Github user HeartSaVioR commented on a diff in the pull request: https://github.com/apache/storm/pull/2475#discussion_r162316967 --- Diff: storm-client/src/jvm/org/apache/storm/utils/ShellUtils.java --- @@ -464,4 +465,18 @@ public void run() { } } + public static ShellLogHandler getLogHandler(Map<String, Object> topoConf) { + if (topoConf == null) { + throw new IllegalArgumentException("Config is required"); + } + + if (topoConf.containsKey(Config.TOPOLOGY_MULTILANG_LOG_HANDLER)) { + try { + return (ShellLogHandler) Class.forName(topoConf.get(Config.TOPOLOGY_MULTILANG_LOG_HANDLER).toString()).newInstance(); + } catch (ClassCastException | InstantiationException | IllegalAccessException | ClassNotFoundException e) { + LOG.warn(e.toString()); --- End diff -- Let's throw exception (propagation with wrapping RuntimeException) and let worker crash instead of leaving warning message. This is easy to be missed, and there's a principle of Storm: fail-fast.
---