Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Expose hector Cluster object to subclasses.

  • Loading branch information...
commit 230bbaebb3f510940b43f9e0352eeb31094a2599 1 parent fda0fb6
@ptgoetz ptgoetz authored
View
63 examples/schema/cassandra_schema.txt
@@ -10,6 +10,68 @@ use stormks;
and default_validation_class = 'UTF8Type'
and key_validation_class = 'UTF8Type';
+ create column family followers
+ with column_type = 'Standard'
+ and comparator = 'UTF8Type'
+ and default_validation_class = 'UTF8Type'
+ and key_validation_class = 'UTF8Type';
+ set followers['sally']['bob']='';
+ set followers['sally']['tim']='';
+ set followers['sally']['alice']='';
+ set followers['sally']['adam']='';
+ set followers['sally']['jim']='';
+ set followers['sally']['chris']='';
+ set followers['sally']['jai']='';
+ set followers['bob']['sally']='';
+ set followers['bob']['nathan']='';
+ set followers['bob']['jim']='';
+ set followers['bob']['mary']='';
+ set followers['bob']['david']='';
+ set followers['bob']['vivian']='';
+ set followers['tim']['alex']='';
+ set followers['nathan']['sally']='';
+ set followers['nathan']['bob']='';
+ set followers['nathan']['adam']='';
+ set followers['nathan']['harry']='';
+ set followers['nathan']['chris']='';
+ set followers['nathan']['vivian']='';
+ set followers['nathan']['jordan']='';
+ set followers['nathan']['emily']='';
+ set followers['adam']['david']='';
+ set followers['adam']['carissa']='';
+ set followers['adam']['david']='';
+ set followers['mike']['john']='';
+ set followers['mike']['bob']='';
+ set followers['john']['alice']='';
+ set followers['john']['nathan']='';
+ set followers['john']['jim']='';
+ set followers['john']['mike']='';
+ set followers['john']['bob']='';
+
+
+ create column family tweeters
+ with column_type = 'Standard'
+ and comparator = 'UTF8Type'
+ and default_validation_class = 'UTF8Type'
+ and key_validation_class = 'UTF8Type';
+
+ set tweeters['http://github.com/ptgoetz']['sally']='';
+ set tweeters['http://github.com/ptgoetz']['bob']='';
+ set tweeters['http://github.com/ptgoetz']['tim']='';
+ set tweeters['http://github.com/ptgoetz']['george']='';
+ set tweeters['http://github.com/ptgoetz']['nathan']='';
+
+ set tweeters['http://github.com/hmsonline']['adam']='';
+ set tweeters['http://github.com/hmsonline']['david']='';
+ set tweeters['http://github.com/hmsonline']['sally']='';
+ set tweeters['http://github.com/hmsonline']['nathan']='';
+
+ set tweeters['http://github.com/nathanmarz']['tim']='';
+ set tweeters['http://github.com/nathanmarz']['mike']='';
+ set tweeters['http://github.com/nathanmarz']['john']='';
+
+
+
create column family followers_delimited
with column_type = 'Standard'
and comparator = 'UTF8Type'
@@ -19,7 +81,6 @@ use stormks;
set followers_delimited['sally']['followers']='bob:tim:alice:adam:jim:chris:jai';
set followers_delimited['bob']['followers']='sally:nathan:jim:mary:david:vivian';
- set followers_delimited['bob']['followers']='sally:nathan:jim:mary:david:vivian';
set followers_delimited['tim']['followers']='alex';
set followers_delimited['nathan']['followers']='sally:bob:adam:harry:chris:vivian:emily:jordan';
set followers_delimited['adam']['followers']='david:carissa';
View
15 examples/src/main/java/backtype/storm/contrib/cassandra/example/CassandraReachTopology.java
@@ -13,6 +13,7 @@
import backtype.storm.StormSubmitter;
import backtype.storm.contrib.cassandra.bolt.CassandraConstants;
import backtype.storm.contrib.cassandra.bolt.DelimitedColumnLookupBolt;
+import backtype.storm.contrib.cassandra.bolt.ValueLessColumnLookupBolt;
import backtype.storm.drpc.CoordinatedBolt.FinishedCallback;
import backtype.storm.drpc.LinearDRPCTopologyBuilder;
import backtype.storm.task.OutputCollector;
@@ -30,11 +31,17 @@
public static void main(String[] args) throws Exception{
LinearDRPCTopologyBuilder builder = new LinearDRPCTopologyBuilder("reach");
- DelimitedColumnLookupBolt tweetersBolt =
- new DelimitedColumnLookupBolt("tweeters_delimited", "rowKey", "tweeted_by", ":", "rowKey", "tweeter", true);
+// DelimitedColumnLookupBolt tweetersBolt =
+// new DelimitedColumnLookupBolt("tweeters_delimited", "rowKey", "tweeted_by", ":", "rowKey", "tweeter", true);
+//
+// DelimitedColumnLookupBolt followersBolt =
+// new DelimitedColumnLookupBolt("followers_delimited", "tweeter", "followers", ":", "rowKey", "follower", true);
- DelimitedColumnLookupBolt followersBolt =
- new DelimitedColumnLookupBolt("followers_delimited", "tweeter", "followers", ":", "rowKey", "follower", true);
+ ValueLessColumnLookupBolt tweetersBolt =
+ new ValueLessColumnLookupBolt("tweeters", "rowKey","rowKey", "tweeter", true);
+
+ ValueLessColumnLookupBolt followersBolt =
+ new ValueLessColumnLookupBolt("followers", "tweeter", "rowKey", "follower", true);
builder.addBolt(new InitBolt());
builder.addBolt(tweetersBolt).shuffleGrouping();
View
4 src/main/java/backtype/storm/contrib/cassandra/bolt/BatchingCassandraBolt.java
@@ -12,8 +12,6 @@
import backtype.storm.contrib.cassandra.bolt.determinable.ColumnFamilyDeterminable;
import backtype.storm.contrib.cassandra.bolt.determinable.DefaultColumnFamilyDeterminable;
-import backtype.storm.contrib.cassandra.bolt.determinable.DefaultRowKeyDeterminable;
-import backtype.storm.contrib.cassandra.bolt.determinable.RowKeyDeterminable;
import backtype.storm.task.OutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.OutputFieldsDeclarer;
@@ -39,7 +37,7 @@
private String cassandraPort;
private String cassandraKeyspace;
- private Cluster cluster;
+ protected Cluster cluster;
protected Keyspace keyspace;
protected ColumnFamilyDeterminable cfDeterminable;
Please sign in to comment.
Something went wrong with that request. Please try again.