huage1994 commented on PR #4368:
URL: https://github.com/apache/zeppelin/pull/4368#issuecomment-1135320025
> How did it happen? How did you fix the error?
The type of default value of ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT was int
before.
When the ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT is not set, we expect to get
the default value , but `getLong()` in `getTime()` would get nothing because
`intValue` and `longValue` are two independent fields in `ConfVars`.
I change the default value type from `int` to `long` as follow.
```
-
ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT("zeppelin.interpreter.connect.timeout",
600000),
+
ZEPPELIN_INTERPRETER_CONNECT_TIMEOUT("zeppelin.interpreter.connect.timeout",
600000L),
```
And I added comment for method `getTime`.
```
/**
* This method is to support time unit like `1s`, `2m`, `3h`.
*
* @param {ConfVars} c . Noteļ¼The type of default value of `ConfVars c`
should be long.
* @return {long} Milliseconds
*/
public long getTime(ConfVars c) {
try {
return timeUnitToMill(getString(c.name(), c.getVarName(), ""));
} catch (Exception e) {
return getLong(c);
}
}
```
--
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]