You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/05/10 17:04:37 UTC

[GitHub] [hive] kgyrtkirk commented on a change in pull request #2191: HIVE-24920: TRANSLATED_TO_EXTERNAL tables may write to the same location

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



##########
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:
       there is logic behind this naming schema as well - I think it's better to have an option to choose this as well ; I've added this as `seqprefix`
   I've modified to use `_` as the separator
   
   I wonder which one should be the default behaviour? "seqsuffix", "seqprefix" or "prohibit"
   I'm fine with either the prefix or suffix one; but I would like to avoid prohibit as the default




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



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org