[ https://issues.apache.org/jira/browse/HBASE-18651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16164757#comment-16164757 ]
Mike Drob commented on HBASE-18651: ----------------------------------- bq. +import com.google.common.base.Preconditions; I think we have a shaded version we should be using. bq. + Preconditions.checkArgument(conf != null, "Should specify a configuration"); Why not {{checkNotNull}}? {code} + this.runnerThread = new Thread(new Runnable() { + @Override + public void run() { + try { + ToolRunner.run(conf, monkeyRunner, null); + } catch (Exception e) { + LOG.error("Exception occured when running chaos monkeys: ", e); + } + } + }); {code} style preference: could use a lambda here? up to you. {code} + new Thread(() -> { + try { + ToolRunner.run(conf, monkeyRunner, null); + } catch (Exception e) { + LOG.error("Exception occured when running chaos monkeys: ", e); + } + } {code} Looking back at HBASE-18610, I'm not 100% sure that this patch meets the needs there. [~tedyu] - can you confirm? > Let ChaosMonkeyRunner expose the chaos monkey runner it creates > --------------------------------------------------------------- > > Key: HBASE-18651 > URL: https://issues.apache.org/jira/browse/HBASE-18651 > Project: HBase > Issue Type: Improvement > Reporter: Ted Yu > Assignee: Reid Chan > Attachments: HBASE-18651.master.001.patch > > > Currently ChaosMonkeyRunner#main() instantiates ChaosMonkeyRunner without > keeping track of the instance. > This poses some challenge when ChaosMonkeyRunner is used programmatically > because the caller cannot get hold of the runner. > As [~mdrob] suggested, we should expose the chaos monkey runner. -- This message was sent by Atlassian JIRA (v6.4.14#64029)