You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am using the storm-cassandra code and I could run successfully the example PersistentWordCount on my Windows 7 machine, as I could see the records in Cassandra. However, when I run the following code,
Config config = new Config();
String configKey = "cassandra-config";
HashMap<String, Object> clientConfig = new HashMap<String, Object>();
clientConfig.put(StormCassandraConstants.CASSANDRA_HOST, "localhost:9160");
clientConfig.put(StormCassandraConstants.CASSANDRA_KEYSPACE, Arrays.asList(new String[]{"rating"}));
config.put(configKey, clientConfig);
sampleSpout ratingSpout = new sampleSpout();
averageBolt avgBolt = new averageBolt();
CassandraBatchingBolt<String, String, String> cassandraBolt = new CassandraBatchingBolt<String, String, String>(configKey,
new DefaultTupleMapper("rating", "avg_rating", "LO_ID"));
cassandraBolt.setAckStrategy(AckStrategy.ACK_ON_WRITE);
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout(Rating_SPOUT, ratingSpout , 3);
builder.setBolt(Average_BOLT, avgBolt, 3).fieldsGrouping(Average_BOLT, new Fields("LO_ID", "Average_Value"));
builder.setBolt(CASSANDRA_BOLT, cassandraBolt, 3).shuffleGrouping(Average_BOLT);
if (args.length == 0) {
LocalCluster cluster = new LocalCluster();
cluster.submitTopology("rating_cassandra_topology", config, builder.createTopology());
Thread.sleep(10000);
cluster.killTopology("rating_cassandra_topology");
cluster.shutdown();
System.exit(0);
} else {
config.setNumWorkers(3);
StormSubmitter.submitTopology(args[0], config, builder.createTopology());
}
I get the following error:
...
ERROR (com.netflix.astyanax.connectionpool.impl.ConnectionPoolMBeanManager:66) -
com.netflix.MonitoredResources:type=ASTYANAX,name=MyConnectionPool,ServiceType=
connectionpool
...
and
...
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (d
efault-cli) on project storm-cassandra-examples: An exception occured while exec
uting the Java class. null: InvocationTargetException: Unable to delete file: C:
...\AppData\Local\Temp\4bdd2a57-8999-49c9-ad7e-f185d5c551fd\version-2\
log.1 -> [Help 1]
I can see that my keyspace in cassandra is empty and it means my code doesn't work. Is the problem the first error or the delete problem? How can I resolve it?
Thanks.
The text was updated successfully, but these errors were encountered:
erajabi
changed the title
Running storm cassandra on Windows 7
Running storm cassandra on Windows 7 [Unable to delete log file]
Oct 20, 2014
Hi,
I am using the storm-cassandra code and I could run successfully the example PersistentWordCount on my Windows 7 machine, as I could see the records in Cassandra. However, when I run the following code,
Config config = new Config();
String configKey = "cassandra-config";
HashMap<String, Object> clientConfig = new HashMap<String, Object>();
clientConfig.put(StormCassandraConstants.CASSANDRA_HOST, "localhost:9160");
clientConfig.put(StormCassandraConstants.CASSANDRA_KEYSPACE, Arrays.asList(new String[]{"rating"}));
config.put(configKey, clientConfig);
sampleSpout ratingSpout = new sampleSpout();
averageBolt avgBolt = new averageBolt();
CassandraBatchingBolt<String, String, String> cassandraBolt = new CassandraBatchingBolt<String, String, String>(configKey,
new DefaultTupleMapper("rating", "avg_rating", "LO_ID"));
cassandraBolt.setAckStrategy(AckStrategy.ACK_ON_WRITE);
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout(Rating_SPOUT, ratingSpout , 3);
builder.setBolt(Average_BOLT, avgBolt, 3).fieldsGrouping(Average_BOLT, new Fields("LO_ID", "Average_Value"));
builder.setBolt(CASSANDRA_BOLT, cassandraBolt, 3).shuffleGrouping(Average_BOLT);
if (args.length == 0) {
LocalCluster cluster = new LocalCluster();
cluster.submitTopology("rating_cassandra_topology", config, builder.createTopology());
Thread.sleep(10000);
cluster.killTopology("rating_cassandra_topology");
cluster.shutdown();
System.exit(0);
} else {
config.setNumWorkers(3);
StormSubmitter.submitTopology(args[0], config, builder.createTopology());
}
I get the following error:
... ERROR (com.netflix.astyanax.connectionpool.impl.ConnectionPoolMBeanManager:66) - com.netflix.MonitoredResources:type=ASTYANAX,name=MyConnectionPool,ServiceType= connectionpool ... and ... [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (d efault-cli) on project storm-cassandra-examples: An exception occured while exec uting the Java class. null: InvocationTargetException: Unable to delete file: C: ...\AppData\Local\Temp\4bdd2a57-8999-49c9-ad7e-f185d5c551fd\version-2\ log.1 -> [Help 1]
I can see that my keyspace in cassandra is empty and it means my code doesn't work. Is the problem the first error or the delete problem? How can I resolve it?
Thanks.
The text was updated successfully, but these errors were encountered: