change schedule to submit so it runs without wait for the first time.

LAUNCH_KERBEROS_REFRESH_INTERVAL to KERBEROS_REFRESH_INTERVAL
This commit is contained in:
Prabhjyot Singh 2017-07-05 20:41:41 +05:30
parent 7fe883c3e9
commit 582372744a
2 changed files with 3 additions and 3 deletions

View file

@ -56,7 +56,7 @@
## Kerberos ticket refresh setting
##
#export KINIT_FAIL_THRESHOLD # (optional) How many times should kinit retry. The default value is 5.
#export LAUNCH_KERBEROS_REFRESH_INTERVAL # (optional) The refresh interval for Kerberos ticket. The default value is 1d.
#export KERBEROS_REFRESH_INTERVAL # (optional) The refresh interval for Kerberos ticket. The default value is 1d.
## Use provided spark installation ##
## defining SPARK_HOME makes Zeppelin run spark interpreter process using spark-submit

View file

@ -107,7 +107,7 @@ public abstract class KerberosInterpreter extends Interpreter {
private ScheduledExecutorService startKerberosLoginThread() {
scheduledExecutorService = Executors.newScheduledThreadPool(1);
scheduledExecutorService.schedule(new Callable() {
scheduledExecutorService.submit(new Callable() {
public Object call() throws Exception {
if (runKerberosLogin()) {
@ -129,7 +129,7 @@ public abstract class KerberosInterpreter extends Interpreter {
}
return null;
}
}, getTimeAsMs(getKerberosRefreshInterval()), TimeUnit.MILLISECONDS);
});
return scheduledExecutorService;
}