mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
log more error
This commit is contained in:
parent
72b32ae25f
commit
96bfdfe97d
2 changed files with 14 additions and 6 deletions
|
|
@ -71,7 +71,11 @@ public class ShellInterpreter extends KerberosInterpreter {
|
|||
for (String executorKey : executors.keySet()) {
|
||||
DefaultExecutor executor = executors.remove(executorKey);
|
||||
if (executor != null) {
|
||||
executor.getWatchdog().destroyProcess();
|
||||
try {
|
||||
executor.getWatchdog().destroyProcess();
|
||||
} catch (Exception e){
|
||||
LOGGER.error("error destroying executor for paragraphId: " + executorKey, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -126,7 +130,11 @@ public class ShellInterpreter extends KerberosInterpreter {
|
|||
public void cancel(InterpreterContext context) {
|
||||
DefaultExecutor executor = executors.remove(context.getParagraphId());
|
||||
if (executor != null) {
|
||||
executor.getWatchdog().destroyProcess();
|
||||
try {
|
||||
executor.getWatchdog().destroyProcess();
|
||||
} catch (Exception e){
|
||||
LOGGER.error("error destroying executor for paragraphId: " + context.getParagraphId(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -157,6 +165,7 @@ public class ShellInterpreter extends KerberosInterpreter {
|
|||
try {
|
||||
ShellSecurityImpl.createSecureConfiguration(getProperty(), shell);
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Unable to run kinit for zeppelin", e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -31,10 +31,6 @@ import org.slf4j.LoggerFactory;
|
|||
/**
|
||||
* Interpreter wrapper for Kerberos initialization
|
||||
*
|
||||
* TODO: coming soon
|
||||
* Please see,
|
||||
* https://zeppelin.apache.org/docs/latest/development/writingzeppelininterpreter.html
|
||||
*
|
||||
* runKerberosLogin() method you need to implement that determine Zeppelin's behavior.
|
||||
* startKerberosLoginThread() needs to be called inside the open() and
|
||||
* shutdownExecutorService() inside close().
|
||||
|
|
@ -101,8 +97,11 @@ public abstract class KerberosInterpreter extends Interpreter {
|
|||
scheduledExecutorService
|
||||
.schedule(this, getTimeAsMs(getKerberosRefreshInterval()), TimeUnit.MILLISECONDS);
|
||||
} else {
|
||||
kinitFailCount++;
|
||||
logger.info("runKerberosLogin failed for " + kinitFailCount + "time");
|
||||
// schedule another retry at once or close the interpreter if too many times kinit fails
|
||||
if (kinitFailCount >= kinitFailThreshold()) {
|
||||
logger.error("runKerberosLogin failed for max attempts, calling close interpreter.");
|
||||
close();
|
||||
} else {
|
||||
scheduledExecutorService.submit(this);
|
||||
|
|
|
|||
Loading…
Reference in a new issue