mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
add zeppelin.livy.pull_status.interval.millis
This commit is contained in:
parent
070fea05ca
commit
1cbeb26128
3 changed files with 17 additions and 4 deletions
|
|
@ -65,6 +65,11 @@ Example: `spark.driver.memory` to `livy.spark.driver.memory`
|
|||
<td>false</td>
|
||||
<td>Whether to display app info</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>zeppelin.livy.pull_status.interval.millis</td>
|
||||
<td>1000</td>
|
||||
<td>The interval for checking paragraph execution status</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>livy.spark.driver.cores</td>
|
||||
<td></td>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ public abstract class BaseLivyInterprereter extends Interpreter {
|
|||
|
||||
protected volatile SessionInfo sessionInfo;
|
||||
private String livyURL;
|
||||
private long sessionCreationTimeout;
|
||||
private int sessionCreationTimeout;
|
||||
private int pullStatusInterval;
|
||||
protected boolean displayAppInfo;
|
||||
private AtomicBoolean sessionExpired = new AtomicBoolean(false);
|
||||
private LivyVersion livyVersion;
|
||||
|
|
@ -61,8 +62,10 @@ public abstract class BaseLivyInterprereter extends Interpreter {
|
|||
public BaseLivyInterprereter(Properties property) {
|
||||
super(property);
|
||||
this.livyURL = property.getProperty("zeppelin.livy.url");
|
||||
this.sessionCreationTimeout = Long.parseLong(
|
||||
this.sessionCreationTimeout = Integer.parseInt(
|
||||
property.getProperty("zeppelin.livy.create.session.timeout", 120 + ""));
|
||||
this.pullStatusInterval = Integer.parseInt(
|
||||
property.getProperty("zeppelin.livy.pull_status.interval.millis", 1000 + ""));
|
||||
}
|
||||
|
||||
public abstract String getSessionKind();
|
||||
|
|
@ -217,7 +220,7 @@ public abstract class BaseLivyInterprereter extends Interpreter {
|
|||
LOGGER.error(msg);
|
||||
throw new LivyException(msg);
|
||||
}
|
||||
Thread.sleep(1000);
|
||||
Thread.sleep(pullStatusInterval);
|
||||
sessionInfo = getSessionInfo(sessionInfo.id);
|
||||
}
|
||||
return sessionInfo;
|
||||
|
|
@ -259,7 +262,7 @@ public abstract class BaseLivyInterprereter extends Interpreter {
|
|||
// pull the statement status
|
||||
while (!stmtInfo.isAvailable()) {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
Thread.sleep(pullStatusInterval);
|
||||
} catch (InterruptedException e) {
|
||||
LOGGER.error("InterruptedException when pulling statement status.", e);
|
||||
throw new LivyException(e);
|
||||
|
|
|
|||
|
|
@ -77,6 +77,11 @@
|
|||
"defaultValue": "",
|
||||
"description": "Kerberos keytab to authenticate livy"
|
||||
},
|
||||
"zeppelin.livy.pull_status.interval.millis": {
|
||||
"propertyName": "zeppelin.livy.pull_status.interval.millis",
|
||||
"defaultValue": "1000",
|
||||
"description": "The interval for checking paragraph execution status"
|
||||
},
|
||||
"livy.spark.jars.packages": {
|
||||
"propertyName": "livy.spark.jars.packages",
|
||||
"defaultValue": "",
|
||||
|
|
|
|||
Loading…
Reference in a new issue