cuspymd commented on a change in pull request #4072:
URL: https://github.com/apache/zeppelin/pull/4072#discussion_r603933999
##########
File path:
zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/RemoteInterpreterDownloader.java
##########
@@ -51,22 +50,21 @@ public RemoteInterpreterDownloader(
}
public static void main(String[] args) {
- String zeppelinServerHost = null;
- int port = Constants.ZEPPELIN_INTERPRETER_DEFAUlT_PORT;
- String interpreter = null;
- String localRepoPath = null;
- if (args.length > 0) {
- zeppelinServerHost = args[0];
- port = Integer.parseInt(args[1]);
- interpreter = args[2];
- localRepoPath = args[3];
- }
- RemoteInterpreterEventClient intpEventClient = new
RemoteInterpreterEventClient(
- zeppelinServerHost, port, 3);
+ if (args.length == 4) {
+ String zeppelinServerHost = args[0];
+ int port = Integer.parseInt(args[1]);
+ String interpreter = args[2];
+ String localRepoPath = args[3];
+ RemoteInterpreterEventClient intpEventClient = new
RemoteInterpreterEventClient(
+ zeppelinServerHost, port, 3);
- RemoteInterpreterDownloader downloader = new
RemoteInterpreterDownloader(interpreter,
- intpEventClient, new File(localRepoPath));
- downloader.syncAllLibraries();
+ RemoteInterpreterDownloader downloader = new
RemoteInterpreterDownloader(interpreter,
+ intpEventClient, new File(localRepoPath));
+ downloader.syncAllLibraries();
+ } else {
+ LOGGER.error(
+ "Wrong amount of Arguments. Expected: [ZeppelinHostname]
[ZeppelinPort] [InterpreterName] [LocalRepoPath]");
+ }
Review comment:
In this case, the script executing this program cannot determine that
this program has not been executed normally due to the mismatch of the
arguments. Is this intentional?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]