abstractdog commented on code in PR #6161:
URL: https://github.com/apache/hive/pull/6161#discussion_r2601524929


##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java:
##########
@@ -292,12 +290,37 @@ protected void openInternal(String[] 
additionalFilesNotFromConf,
       LOG.info("Created new resources: " + this.resources);
     }
 
-    // unless already installed on all the cluster nodes, we'll have to
-    // localize hive-exec.jar as well.
+    // Unless already installed on all the cluster nodes, we'll have to 
localize hive-exec.jar as well.
     appJarLr = createJarLocalResource(utils.getExecJarPathLocal(conf));
 
-    // configuration for the application master
-    final Map<String, LocalResource> commonLocalResources = new 
HashMap<String, LocalResource>();
+    try {
+      openInternalUnsafe(isAsync, console);
+    } catch (Exception e) {
+      LOG.info("Failed to open session, deleting scratch dir to prevent 
resource leak...", e);

Review Comment:
   was thinking about this: please be aware that this catch here is just a best 
effort - and so it's the catch and re-throw antipattern, couldn't help with 
that - so I decided to not raise it above LOG.error, as the exception is 99.9% 
is going to be logged again, as HS2 cannot help with tez session opening 
problems, so this is "just an FYI", does it make sense?



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