zhangbutao commented on code in PR #4993:
URL: https://github.com/apache/hive/pull/4993#discussion_r1447415606
##########
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:
> My patch also can fix issue when "set hive.metastore.dml.events=true"
@zhixingheyi-tian sure, i know this change maybe can fix `Wrong FS`
exception. But i think you need optimize this change and submit a PR to master
branch. :)
Thanks.
--
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]