sercanCyberVision commented on code in PR #4293:
URL: https://github.com/apache/hive/pull/4293#discussion_r1218674765


##########
ql/src/java/org/apache/hadoop/hive/ql/session/ClearDanglingScratchDir.java:
##########
@@ -236,4 +243,29 @@ static Options createOptions() {
 
     return result;
   }
+
+  /**
+   * While deleting dangling scratch dirs from hdfs, we can clean 
corresponding local files as well
+   * @param sessionName prefix to determine removable tmp files
+   * @param localTmpdir local tmp file location
+   */
+  public void removeLocalTmpFiles(String sessionName, String localTmpdir) {

Review Comment:
   Found the issue; `UnsupportedOperationException` has been considered in the 
initial solution, but the problem is that it is under `catch` block where 
`RemoteException` is caught, please see 
[here](https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/session/ClearDanglingScratchDir.java#L136-L145).
   
   As `UnsupportedOperationException` extends `RuntimeException`, this 
condition was never true.
   
   So, I have removed the related code to separate `catch` block, and executed 
unit test again with whole service in which `removeLocalTmpFiles` is private, 
it worked well;
   
![image](https://github.com/apache/hive/assets/73108963/bb8be817-6f17-43f8-ac70-3fba5f21e551)



-- 
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]

Reply via email to