huage1994 commented on PR #4368: URL: https://github.com/apache/zeppelin/pull/4368#issuecomment-1127446019
> I do not like this solution and would "veto" it. The readability and simplicity of the code suffers greatly with this change. I would prefer a conversion directly at the call (e.g. > > https://github.com/apache/zeppelin/blob/85ed8e2e51e1ea10df38d4710216343efe218d60/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/lifecycle/TimeoutLifecycleManager.java#L51 > > ). Hi @Reamer , I see what you mean. Now I plan to keep the original code of method `getLong` without changin. And then add a new method `getTime`. Maybe like this: ``` public long getTime(String envName, String propertyName, long defaultValue) { String timeStr = getString(envName, propertyName, defaultValue + ""); if(timeUnitToMill(timeStr) > 0){ return timeUnitToMill(timeStr); } return getLong(envName, propertyName, defaultValue); } ``` Finally ,replace the calls of `getLong` with `getTime` where needed. How do you think about it? -- 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: dev-unsubscr...@zeppelin.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org