You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/05/20 17:33:30 UTC
[GitHub] [spark] juliuszsompolski commented on a change in pull request #28544: [SPARK-31387][SQL] Handle unknown operation/session ID in HiveThriftServer2Listener
juliuszsompolski commented on a change in pull request #28544:
URL: https://github.com/apache/spark/pull/28544#discussion_r428188247
##########
File path: sql/hive-thriftserver/v1.2/src/main/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
##########
@@ -674,11 +678,15 @@ private void cleanupPipeoutFile() {
File[] fileAry = new File(lScratchDir).listFiles(
(dir, name) -> name.startsWith(sessionID) && name.endsWith(".pipeout"));
- for (File file : fileAry) {
- try {
- FileUtils.forceDelete(file);
- } catch (Exception e) {
- LOG.error("Failed to cleanup pipeout file: " + file, e);
+ if (fileAry == null) {
+ LOG.error("Unable to access pipeout files in " + lScratchDir);
+ } else {
+ for (File file : fileAry) {
+ try {
+ FileUtils.forceDelete(file);
+ } catch (Exception e) {
+ LOG.error("Failed to cleanup pipeout file: " + file, e);
+ }
Review comment:
We found it failing with a NullPointerException in some of the testing environments that we use at. It was related to how HiveSessionImplSuite mocked the session it created. We found it always a non-harmful check to check for NPE when searching for these pipeout files.
----------------------------------------------------------------
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: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org