Ich versuche, eine Sturm-Topologie mit Intellij ausführen. Bis heute lief die Topologie völlig in Ordnung, aber heute jedes Mal wenn ich versuche, es zu laufen Ich erhalte die folgenden Fehler:Fehler: Maven-Ressourcen-Test: twitter_storm_new: java.lang.NegativeArraySizeException
Error:maven-resources-test:twitter_storm_new: java.lang.NegativeArraySizeException
Kann jemand sagen, ob es eine Möglichkeit, es zu lösen ist und wie?
Hier ist mein Code für die Topologie:
public class AuthorsAndFeaturesTopology {
public static final String PATH_TO_AUTHORS_AND_FEATURES_FILE="/home/christina/twitter_storm_new/CSV/features.csv";
public static final String PATH_TO_AUTHORS_AND_NEW_FEATURES_FILE="/home/christina/twitter_storm_new/CSV/featuresnew.csv";
public static final String keyword1="#blacklivesmatter";
public static final String keyword2="#germanwings";
public static final String keyword3="#bigdata";
public static void main(String[]args) throws Exception {
TopologyBuilder topologyBuilder = new TopologyBuilder();
//topologyBuilder.setSpout("PROCESS_AUTHORS_AND_FEATURES_FILE", new ProcessAuthorsAndFeaturesFromCSVFileSpout(PATH_TO_AUTHORS_AND_FEATURES_FILE,keyword1,keyword2,keyword3),4);
Config config = new Config();
if (args != null && args.length > 0) {
config.setNumWorkers(10);
config.setMaxSpoutPending(100);
StormSubmitter.submitTopology(args[0], config, topologyBuilder.createTopology());
} else {
LocalCluster localCluster = new LocalCluster();
localCluster.submitTopology("Test", config, topologyBuilder.createTopology());
Utils.sleep(2*10000);
localCluster.killTopology("Test");
localCluster.shutdown();
}
}
}
Es sieht aus wie ein Bug in IDEA. "Build-> Rebuild Project" behebt das Problem. – Matiss