String ruleScript = GenerateScriptUtil.toString(scriptStream);
try {
Submit submit = new Submit(Submit.DEFAULT_ADDRESS, config.containerAgentPort());
submit.addScripts(Arrays.asList(new ScriptText(ruleKey, ruleScript)));
} catch (Exception e) {
throw new SubmitException("Could not install script from file", e);
}
}
} catch (IOException e) {
throw new RuntimeException("Could not check stream", e);
}