dongjoon-hyun commented on a change in pull request #28544:
URL: https://github.com/apache/spark/pull/28544#discussion_r428200223
##########
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:
Thank you for the explanation, @juliuszsompolski .
----------------------------------------------------------------
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]