zhangbutao commented on code in PR #4993:
URL: https://github.com/apache/hive/pull/4993#discussion_r1447423386


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -2722,17 +2729,22 @@ private void fireInsertEvent(Table tbl, Map<String, 
String> partitionSpec, boole
 
 
   private static void addInsertFileInformation(List<Path> newFiles, FileSystem 
fileSystem,
-      InsertEventRequestData insertData) throws IOException {
+                                               InsertEventRequestData 
insertData, HiveConf conf) throws IOException {
     LinkedList<Path> directories = null;
+    boolean isSupportDifferentFs = 
conf.getBoolVar(ConfVars.HIVE_SUPPORT_MULTIPLE_FSLOCATIONS);
     for (Path p : newFiles) {
-      if (fileSystem.isDirectory(p)) {
+      FileSystem pFileSystem = fileSystem;
+      if (isSupportDifferentFs && 
(!(p.toUri().getScheme().equals(fileSystem.getScheme())))) {
+        pFileSystem = p.getFileSystem(conf);
+      }
+      if (pFileSystem.isDirectory(p)) {

Review Comment:
   btw, master branch has supported the partitions on different, so no need add 
the new configuration `hive.support.multiple.fslocations`.  And what you need 
on master branch is that check&get the correct location(or filesytem) to avoid 
the `Wrong FS` exception when "set hive.metastore.dml.events=true"



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