nrg4878 commented on a change in pull request #2191:
URL: https://github.com/apache/hive/pull/2191#discussion_r629433082



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetastoreDefaultTransformer.java
##########
@@ -85,6 +86,7 @@ public MetastoreDefaultTransformer(IHMSHandler handler) 
throws HiveMetaException
     this.hmsHandler = handler;
     this.defaultCatalog = MetaStoreUtils.getDefaultCatalog(handler.getConf());
     this.isTenantBasedStorage = 
hmsHandler.getConf().getBoolean(MetastoreConf.ConfVars.ALLOW_TENANT_BASED_STORAGE.getVarname(),
 false);
+    //    this.xMode = hmsHandler.getConf

Review comment:
       nit: delete please.

##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetastoreDefaultTransformer.java
##########
@@ -558,6 +566,39 @@ public MetastoreDefaultTransformer(IHMSHandler handler) 
throws HiveMetaException
     return ret;
   }
 
+  static enum TableLocationStrategy {
+    seqsuffix {
+      @Override
+      Path getLocation(IHMSHandler hmsHandler, Database db, Table table, int 
idx) throws MetaException {
+        if (idx == 0) {
+          return getDefaultPath(hmsHandler, db, table.getTableName());
+        }
+        return getDefaultPath(hmsHandler, db, table.getTableName() + "-" + 
idx);

Review comment:
       I have a mild concern about this convention. It might be confusing to 
use a suffix. would a prefix serve us better? with the latter scheme, the 
original table name can still be preserved?
   create table test;
   alter table rename test to test1;
   create table test; --> test is now at location test-0
   create table test-0; --> test-0 is now at location test-1 (would using 
0_test-0 be better than using test-1?)

##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetastoreDefaultTransformer.java
##########
@@ -527,7 +532,9 @@ public MetastoreDefaultTransformer(IHMSHandler handler) 
throws HiveMetaException
               Partition newPartition = new Partition(partition);
               StorageDescriptor newSd = new 
StorageDescriptor(partition.getSd());
               if (!processorCapabilities.contains(ACCEPTSUNMODIFIEDMETADATA))
+               {

Review comment:
       nit: extra leading space.




-- 
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:
[email protected]



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

Reply via email to