You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2019/05/21 17:21:42 UTC

[GitHub] [incubator-iceberg] rdsr commented on a change in pull request #187: Catalog Implementation for hive and hadoop.

rdsr commented on a change in pull request #187: Catalog Implementation for hive and hadoop.
URL: https://github.com/apache/incubator-iceberg/pull/187#discussion_r286133965
 
 

 ##########
 File path: hive/src/test/java/org/apache/iceberg/hive/HiveCatalogBaseTest.java
 ##########
 @@ -116,23 +120,28 @@ public static void stopMetastore() {
     }
   }
 
-  HiveTables tables;
+  HiveCatalog catalog;
 
   @Before
   public void createTestTable() throws Exception {
-    this.tables = new HiveTables(hiveConf);
-    tables.create(schema, partitionSpec, DB_NAME, TABLE_NAME);
+    this.catalog = new HiveCatalog(hiveConf);
+    catalog.createTable(TABLE_IDENTIFIER, schema, partitionSpec, null);
   }
 
   @After
   public void dropTestTable() throws Exception {
-    metastoreClient.dropTable(DB_NAME, TABLE_NAME);
-    tables.close();
-    this.tables = null;
+    try {
+      metastoreClient.getTable(DB_NAME, TABLE_NAME);
+      metastoreClient.dropTable(DB_NAME, TABLE_NAME);
+      this.catalog.close();
 
 Review comment:
   Why do we close the Catalog after drop?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org