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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]