Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running storm cassandra on Windows 7 [Unable to delete log file] #53

Open
erajabi opened this issue Oct 19, 2014 · 1 comment
Open

Running storm cassandra on Windows 7 [Unable to delete log file] #53

erajabi opened this issue Oct 19, 2014 · 1 comment

Comments

@erajabi
Copy link

erajabi commented Oct 19, 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.

@erajabi erajabi changed the title Running storm cassandra on Windows 7 Running storm cassandra on Windows 7 [Unable to delete log file] Oct 20, 2014
@boneill42
Copy link
Contributor

You may be running a newer version of Cassandra. You'll likely need to upgrade the dependency in storm-cassandra (and please submit a PR if you do!)

Alternatively, you could check out storm-cassandra-cql:
https://github.com/hmsonline/storm-cassandra-cql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants