ajantha-bhat commented on code in PR #8918:
URL: https://github.com/apache/iceberg/pull/8918#discussion_r1371550325


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java:
##########
@@ -261,6 +261,12 @@ public void renameTable(TableIdentifier from, 
TableIdentifier originalTo) {
     } catch (InterruptedException e) {
       Thread.currentThread().interrupt();
       throw new RuntimeException("Interrupted in call to rename", e);
+    } catch (RuntimeException e) {

Review Comment:
   Can you paste the complete callstack? I am wondering why it is not coming as 
`AlreadyExistsException` in line 254



##########
hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCatalogNew.java:
##########
@@ -0,0 +1,63 @@
+/*
+ * 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.iceberg.hive;
+
+import java.util.Collections;
+import org.apache.iceberg.catalog.CatalogTests;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+
+/**
+ * Run all the tests from abstract of {@link CatalogTests} It should replace 
the other tests classes
+ * like {@link TestHiveCatalog}

Review Comment:
   Maybe no need to mention `other tests classes like {@link TestHiveCatalog}`



##########
hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCatalogNew.java:
##########
@@ -0,0 +1,63 @@
+/*
+ * 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.iceberg.hive;
+
+import java.util.Collections;
+import org.apache.iceberg.catalog.CatalogTests;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+
+/**
+ * Run all the tests from abstract of {@link CatalogTests} It should replace 
the other tests classes
+ * like {@link TestHiveCatalog}
+ */
+public class TestHiveCatalogNew extends CatalogTests<HiveCatalog> {

Review Comment:
   I think we can keep this class name as as `TestHiveCatalog` as rename old 
file to `TestWithHiveCatalog` so that you can remove it in the follow up? Extra 
tests that are not present in the this file can be added to this file. 
   
   Also it would be nice if we do this in this PR. 



##########
hive-metastore/src/test/java/org/apache/iceberg/hive/HiveMetastoreSetup.java:
##########
@@ -0,0 +1,71 @@
+/*
+ * 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.iceberg.hive;
+
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.metastore.HiveMetaStoreClient;
+import org.apache.iceberg.CatalogProperties;
+import org.apache.iceberg.CatalogUtil;
+import org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap;
+
+/**
+ * Setup HiveMetastore. It does not create any database. All the tests should 
create a database
+ * accordingly. it should replace the existing setUp class {@link 
HiveMetastoreTest}
+ */
+class HiveMetastoreSetup {

Review Comment:
   It is a duplicate of `HiveMetastoreTest`? Because we cannot do multiple 
inheritance in `TestHiveCatalogNew`?
   
   I checked it. The method we need is static. So, we can directly call those 
method without this class. Maybe we need one more static method in 
`HiveMetastoreTest` to return catalog.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to