flyrain commented on code in PR #1286: URL: https://github.com/apache/polaris/pull/1286#discussion_r2024140766
########## polaris-core/src/main/java/org/apache/polaris/core/rest/PolarisEndpoint.java: ########## @@ -0,0 +1,32 @@ +/* + * 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.polaris.core.rest; + +import org.apache.iceberg.rest.Endpoint; + +public class PolarisEndpoint { Review Comment: Minor: Is `PolarisEndpoints` or `Endpoints` a more accurate name? Question: are we going to add more endpoints in the future? e.g., policy, volume, and even endpoints in the management yaml? ########## polaris-core/src/test/java/org/apache/polaris/core/rest/PolarisResourcePathsTest.java: ########## @@ -0,0 +1,60 @@ +/* + * 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.polaris.core.rest; + +import java.util.HashMap; +import java.util.Map; +import org.apache.iceberg.catalog.Namespace; +import org.apache.iceberg.catalog.TableIdentifier; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +public class PolarisResourcePathsTest { + private final String testPrefix = "polaris-test"; Review Comment: Minor: this seems more suitable as a static constant. ########## service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogAdapter.java: ########## @@ -127,6 +129,14 @@ public class IcebergCatalogAdapter .add(Endpoint.create("POST", ResourcePaths.V1_TRANSACTIONS_COMMIT)) .build(); + private static final Set<Endpoint> GENERIC_TABLE_ENDPOINTS = Review Comment: minor: is it more suitable if we put this in the class `PolarisEndpoint`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
