Skip to content

Commit

Permalink
[core] Add basic implementation to support REST Catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry-024 committed Nov 21, 2024
1 parent 903f71a commit acb64fc
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@

import org.apache.paimon.rest.RESTRequest;

import org.apache.paimon.shade.com.fasterxml.jackson.annotation.JsonCreator;
import org.apache.paimon.shade.jackson2.com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/** Request to get config. */
@JsonIgnoreProperties(ignoreUnknown = true)
public class ConfigRequest implements RESTRequest {
@JsonCreator
public ConfigRequest() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,21 @@

import org.apache.paimon.rest.RESTResponse;

import org.apache.paimon.shade.com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.paimon.shade.jackson2.com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.beans.ConstructorProperties;
import java.util.Map;

/** Response for getting config. */
@JsonIgnoreProperties(ignoreUnknown = true)
public class ConfigResponse implements RESTResponse {
private static final String FIELD_DEFAULTS = "defaults";

@JsonProperty(FIELD_DEFAULTS)
private Map<String, String> defaults;

@ConstructorProperties({FIELD_DEFAULTS})
public ConfigResponse(Map<String, String> defaults) {
this.defaults = defaults;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.paimon.rest;

/** Test for {@link HttpClient}. */
public class HttpClientTest {}

0 comments on commit acb64fc

Please sign in to comment.