LsomeYeah commented on code in PR #1371:
URL: https://github.com/apache/incubator-paimon/pull/1371#discussion_r1229299145


##########
paimon-hive/paimon-hive-connector-common/src/main/java/org/apache/paimon/hive/PaimonMetaHook.java:
##########
@@ -76,10 +77,12 @@ public void preCreateTable(Table table) throws 
MetaException {
 
         
table.getSd().setInputFormat(PaimonInputFormat.class.getCanonicalName());
         
table.getSd().setOutputFormat(PaimonOutputFormat.class.getCanonicalName());
-
-        String location = LocationKeyExtractor.getLocation(table);
+        String location = LocationKeyExtractor.getLocation(table, conf);
         if (location == null) {
             String warehouse = 
conf.get(HiveConf.ConfVars.METASTOREWAREHOUSE.varname);
+            org.apache.hadoop.fs.Path hadoopPath =
+                    getDnsPath(new org.apache.hadoop.fs.Path(warehouse), conf);
+            warehouse = hadoopPath.toUri().toString();
             Identifier identifier = Identifier.create(table.getDbName(), 
table.getTableName());
             location = AbstractCatalog.dataTableLocation(warehouse, 
identifier).toUri().toString();
             table.getSd().setLocation(location);

Review Comment:
   `Identifier.class` and `AbstractCatalog.class` are used here. The two 
classes are defined in '`paimon-core`' module, if merge these implementation 
into `LocationKeyExtractor.getLocation`, we need add dependency to the 
`pom.xml` of the module '`paimon-hive : paimon-hive-common`' in which 
`LocationKeyExtractor.getLocation` is defined. 



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

Reply via email to