正在学习storm和kafka,我的项目在本地提交已经成功运行,但是提交到集群报Must submit topologies using the 'storm' client script so that StormSubmitter knows which jar to upload.
这个错误是什么原因,网上百度都是建立在maven基础上的我没有学过maven,是需要配置什么参数吗?
maven什么都不需要学,你把pom文件拷贝过来就行了。如果没有现成的,你看看有没有比较齐全的远程资源库。
submitJar(conf)
private static void submitJar(Map conf) {
if(submittedJar==null) {
LOG.info("Jar not uploaded to master yet. Submitting jar...");
String localJar = System.getProperty("storm.jar");
submittedJar = submitJar(conf, localJar);
} else {
LOG.info("Jar already uploaded to master. Not submitting jar.");
}
}
System.getProperty("storm.jar")获取jvm参数storm.jar的值,即topology jar包的路径,然后调用重载方法submitJar。
public static String submitJar(Map conf, String localJar) {
if(localJar==null) {
throw new RuntimeException("Must submit topologies using the 'storm' client script so that StormSubmitter knows which jar to upload.");
}
要设置jvm参数storm.jar的值