mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
LOGGER.error
This commit is contained in:
parent
8116b72777
commit
1e184659f1
1 changed files with 5 additions and 2 deletions
|
|
@ -52,6 +52,7 @@ public class LivyHelper {
|
|||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
HashMap<String, Object> paragraphHttpMap = new HashMap<>();
|
||||
Properties property;
|
||||
Integer MAX_NOS_RETRY = 60;
|
||||
|
||||
LivyHelper(Properties property) {
|
||||
this.property = property;
|
||||
|
|
@ -70,8 +71,8 @@ public class LivyHelper {
|
|||
}.getType());
|
||||
Integer sessionId = ((Double) jsonMap.get("id")).intValue();
|
||||
if (!jsonMap.get("state").equals("idle")) {
|
||||
Integer nosRetry = 60;
|
||||
//Try for 60Sec, if session is not made then throw error.
|
||||
Integer nosRetry = MAX_NOS_RETRY;
|
||||
|
||||
while (nosRetry >= 0) {
|
||||
LOGGER.error(String.format("sessionId:%s state is %s",
|
||||
jsonMap.get("id"), jsonMap.get("state")));
|
||||
|
|
@ -294,6 +295,7 @@ public class LivyHelper {
|
|||
}.getType());
|
||||
return jsonMap;
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Error executeCommand", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
@ -310,6 +312,7 @@ public class LivyHelper {
|
|||
}.getType());
|
||||
return jsonMap;
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Error getStatusById", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue