weiqingy commented on a change in pull request #1106: Making Samza-Sql-Shell
commands pluggable
URL: https://github.com/apache/samza/pull/1106#discussion_r305553734
##########
File path:
samza-sql-shell/src/main/java/org/apache/samza/sql/client/cli/CliEnvironment.java
##########
@@ -173,11 +187,21 @@ public SqlExecutor getExecutor() {
return executor;
}
+ public List<CommandHandler> getCommandHandlers() { return commandHandlers; }
+
private void createShellExecutor(String executorClassName) throws
ExecutorException {
+ executor = (SqlExecutor) createInstance(executorClassName);
Review comment:
I just noticed the original code didn't handle the `ClassCastException`.
Shell would crash if a user flirts with the configuration file, setting
`executor` or `commandhandler` to some random class. Could you help fix it here?
----------------------------------------------------------------
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]
With regards,
Apache Git Services