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 2020/07/01 12:12:33 UTC
[GitHub] [hive] pvary opened a new pull request #1196: HIVE-23791: Optimize ACID stats generation
pvary opened a new pull request #1196:
URL: https://github.com/apache/hive/pull/1196
Run AcidUtils.getHdfsDirSnapshots to collect the relevant files, and use that for stats generation
----------------------------------------------------------------
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
[GitHub] [hive] pvargacl commented on a change in pull request #1196: HIVE-23791: Optimize ACID stats generation
Posted by GitBox <gi...@apache.org>.
pvargacl commented on a change in pull request #1196:
URL: https://github.com/apache/hive/pull/1196#discussion_r448474859
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
##########
@@ -1305,7 +1322,9 @@ public static Directory getAcidState(FileSystem fileSystem, Path candidateDirect
bestBase, ignoreEmptyFiles, abortedDirectories, fs, validTxnList);
}
} else {
- dirSnapshots = getHdfsDirSnapshots(fs, candidateDirectory);
+ if (dirSnapshots == null) {
Review comment:
There is a slight problem here, if we are on hdfs and the file listing with id is supported. Few lines below there is a check for dirsnapshot == null, that was running every time for this case, but now it won't run if you call getacidstate with nonnull dirsnapshot
----------------------------------------------------------------
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
[GitHub] [hive] kgyrtkirk commented on a change in pull request #1196: HIVE-23791: Optimize ACID stats generation
Posted by GitBox <gi...@apache.org>.
kgyrtkirk commented on a change in pull request #1196:
URL: https://github.com/apache/hive/pull/1196#discussion_r448482057
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
##########
@@ -2614,28 +2633,25 @@ public static Path getVersionFilePath(Path deltaOrBase) {
+ " from " + jc.get(ValidTxnWriteIdList.VALID_TABLES_WRITEIDS_KEY));
return null;
}
- Directory acidInfo = AcidUtils.getAcidState(fs, dir, jc, idList, null, false);
+ if (fs == null) {
+ fs = dir.getFileSystem(jc);
+ }
+ // Collect the all of the files/dirs
+ Map<Path, HdfsDirSnapshot> hdfsDirSnapshots = AcidUtils.getHdfsDirSnapshots(fs, dir);
Review comment:
this might be out-of-scope for this change: but this *static* method in `AcidUtils` is trying to do all the work upfront...
which might lead to:
* that it does work which is not even needed
* it doesn't scan some location - and the map just returns null ; so it might be not noticable
I think it would be better if this method would return a something (it could still be a map) which could fill in stuff from hdfs if its not cached already...
----------------------------------------------------------------
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
[GitHub] [hive] kgyrtkirk commented on pull request #1196: HIVE-23791: Optimize ACID stats generation
Posted by GitBox <gi...@apache.org>.
kgyrtkirk commented on pull request #1196:
URL: https://github.com/apache/hive/pull/1196#issuecomment-654113119
http://ci.hive.apache.org/job/hive-precommit/job/PR-1196/2/ is valid for this pr; branch indexing have started ~80 ptest runs which I had to cancel manually...
----------------------------------------------------------------
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
[GitHub] [hive] pvary commented on a change in pull request #1196: HIVE-23791: Optimize ACID stats generation
Posted by GitBox <gi...@apache.org>.
pvary commented on a change in pull request #1196:
URL: https://github.com/apache/hive/pull/1196#discussion_r448527274
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java
##########
@@ -2614,28 +2633,25 @@ public static Path getVersionFilePath(Path deltaOrBase) {
+ " from " + jc.get(ValidTxnWriteIdList.VALID_TABLES_WRITEIDS_KEY));
return null;
}
- Directory acidInfo = AcidUtils.getAcidState(fs, dir, jc, idList, null, false);
+ if (fs == null) {
+ fs = dir.getFileSystem(jc);
+ }
+ // Collect the all of the files/dirs
+ Map<Path, HdfsDirSnapshot> hdfsDirSnapshots = AcidUtils.getHdfsDirSnapshots(fs, dir);
Review comment:
Ohh.. I think I get it now.
* You are right that this will do stuff which is not really needed in this case - namely creating objects which are not needed at here (dirSnapshot.metaDataFile/dirSnapshot.acidFormatFile), also we might list and create objects which are not needed in this snapshot. On the other hand the costly part on S3 (and on HDFS as well) is the number of remote calls, which is reduced to a single listing instead of doing the listing for every directory 1-by-1.
* It is not possible that it does not scan some location which needed. If this happens then this is a bug in AcidUtils.getAcidState, as it has to return every directory which is readable
What I do not understand in your comment is "this method would return a something (it could still be a map) which could fill in stuff from hdfs if its not cached already" - the main thing we would like to avoid here is the need of reading the HDFS again and again. The only way to realize that something is missing is reading the directory again... or I miss something :)
----------------------------------------------------------------
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
[GitHub] [hive] pvary merged pull request #1196: HIVE-23791: Optimize ACID stats generation
Posted by GitBox <gi...@apache.org>.
pvary merged pull request #1196:
URL: https://github.com/apache/hive/pull/1196
----------------------------------------------------------------
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