wukong 1.5.3 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. data/CHANGELOG.textile +4 -0
  2. data/bin/hdp-bin +44 -0
  3. data/bin/hdp-ls +2 -1
  4. data/docpages/avro/performance.textile +36 -0
  5. data/examples/cassandra_streaming/avromapper.rb +85 -0
  6. data/examples/cassandra_streaming/berlitz_for_cassandra.textile +22 -0
  7. data/examples/cassandra_streaming/cassandra.avpr +468 -0
  8. data/examples/cassandra_streaming/cassandra_random_partitioner.rb +62 -0
  9. data/examples/cassandra_streaming/catter.sh +45 -0
  10. data/examples/cassandra_streaming/client_interface_notes.textile +200 -0
  11. data/examples/cassandra_streaming/client_schema.avpr +211 -0
  12. data/examples/cassandra_streaming/client_schema.textile +318 -0
  13. data/examples/cassandra_streaming/foofile.avr +0 -0
  14. data/examples/cassandra_streaming/pymap.sh +1 -0
  15. data/examples/cassandra_streaming/pyreduce.sh +1 -0
  16. data/examples/cassandra_streaming/smutation.avpr +188 -0
  17. data/examples/cassandra_streaming/streamer.sh +51 -0
  18. data/examples/cassandra_streaming/struct_loader.rb +24 -0
  19. data/examples/cassandra_streaming/tuning.textile +73 -0
  20. data/examples/emr/README-elastic_map_reduce.textile +26 -0
  21. data/examples/emr/dot_wukong_dir/credentials.json +7 -0
  22. data/examples/emr/{emr.yaml → dot_wukong_dir/emr.yaml} +33 -16
  23. data/{bin/bootstrap.sh → examples/emr/dot_wukong_dir/emr_bootstrap.sh} +1 -1
  24. data/examples/emr/elastic_mapreduce_example.rb +1 -0
  25. data/lib/wukong/encoding/asciize.rb +108 -0
  26. data/lib/wukong/extensions/date_time.rb +33 -7
  27. data/lib/wukong/extensions/emittable.rb +12 -25
  28. data/lib/wukong/extensions/hash_like.rb +13 -6
  29. data/lib/wukong/filename_pattern.rb +8 -7
  30. data/lib/wukong/schema.rb +47 -0
  31. data/lib/wukong/script.rb +7 -0
  32. data/lib/wukong/script/cassandra_loader_script.rb +40 -0
  33. data/lib/wukong/script/emr_command.rb +74 -43
  34. data/lib/wukong/script/hadoop_command.rb +89 -72
  35. data/lib/wukong/store.rb +2 -7
  36. data/lib/wukong/store/cassandra.rb +10 -0
  37. data/lib/wukong/store/cassandra/streaming.rb +75 -0
  38. data/lib/wukong/store/cassandra/struct_loader.rb +21 -0
  39. data/lib/wukong/store/cassandra_model.rb +90 -0
  40. data/lib/wukong/store/chh_chunked_flat_file_store.rb +1 -1
  41. data/lib/wukong/store/chunked_flat_file_store.rb +24 -20
  42. data/wukong.gemspec +32 -4
  43. metadata +33 -14
@@ -0,0 +1,318 @@
1
+
2
+
3
+ h3. Operations
4
+
5
+ * Add/insert one value
6
+
7
+ Mutate ks, [col_ref], 'val', ts, ttl }
8
+
9
+ * Add/insert multiple cols to same row
10
+
11
+ MutateRow ks, supercol_or_nil, { [col, val, ts, ttl], [col,val,ts,ttl],...}}
12
+ MutateCRow ks, { [col, val, ts, ttl], [col,val,ts,ttl],...}}
13
+ MutateSCRow ks, supercol, { [col, val, ts, ttl], [col,val,ts,ttl],...}}
14
+
15
+
16
+ pycassa cf.insert('key1',
17
+ { '1': {'sub1': 'val1', 'sub2': 'val2'},
18
+ '2': {'sub3': 'val3', 'sub4': 'val4'} })
19
+
20
+ pycassa cf.remove('key1', super_column='1')
21
+
22
+ pycassa cf.get_range(super_column='2')
23
+ pycassa cf.get('key1')
24
+ pycassa cf.get('key1', super_column='2')
25
+ pycassa cf.multiget(['key1'], super_column='2')
26
+
27
+ pycassa Test.objects.get_count(t.key)
28
+
29
+ get_indexed_slices
30
+ get_range
31
+
32
+
33
+ * Get one, many or all columns from given row
34
+
35
+ get key, super_column, columns, column_start, column_finish, column_reversed, column_count, consistency
36
+
37
+ Multiget ks, supercol_or_nil, [col1, col2, ...] or nil
38
+
39
+ * Get one, many or all columns from a slice of sequential rows
40
+
41
+ get_range
42
+
43
+ * Remove one column from a row
44
+
45
+ remove
46
+
47
+ * Remove many columns from a row
48
+
49
+ * Remove all columns in a row
50
+
51
+
52
+ h4. Hector
53
+
54
+ http://github.com/rantav/hector/tree/master/src/main/java/me/prettyprint/cassandra/examples/
55
+
56
+ keyspace = client.getKeyspace("Keyspace1");
57
+ ColumnPath columnPath = new ColumnPath("Standard1");
58
+ columnPath.setColumn(bytes("column-name"));
59
+
60
+ // insert
61
+ keyspace.insert("key", columnPath, bytes("value"));
62
+ insert(final String key, final String value)
63
+
64
+ // read
65
+ Column col = keyspace.getColumn("key", columnPath);
66
+ System.out.println("Read from cassandra: " + string(col.getValue()));
67
+ get(final String key)
68
+
69
+ delete(final String key)
70
+
71
+ h4. fauna/cassandra
72
+
73
+
74
+ client.insert(:Users, "5", {'screen_name' => "buttonscat"})
75
+ client.insert(:UserRelationships, "5", {"user_timeline" => {UUID.new => "1"}})
76
+ timeline = client.get(:UserRelationships, "5", "user_timeline")
77
+
78
+
79
+ # Insert a row for a key. Pass a flat hash for a regular column family, and
80
+ # a nested hash for a super column family. Supports the <tt>:consistency</tt>,
81
+ # <tt>:timestamp</tt> and <tt>:ttl</tt> options.
82
+ def insert(column_family, key, hash, options = {})
83
+
84
+
85
+ ## Delete
86
+ # _mutate the element at the column_family:key:[column]:[sub_column]
87
+ # path you request. Supports the <tt>:consistency</tt> and <tt>:timestamp</tt>
88
+ # options.
89
+ def remove(column_family, key, *columns_and_options)
90
+
91
+
92
+ ### Read
93
+
94
+ # Count the elements at the column_family:key:[super_column] path you
95
+ # request. Supports the <tt>:consistency</tt> option.
96
+ def count_columns(column_family, key, *columns_and_options)
97
+
98
+ # Multi-key version of Cassandra#count_columns. Supports options <tt>:count</tt>,
99
+ # <tt>:start</tt>, <tt>:finish</tt>, <tt>:reversed</tt>, and <tt>:consistency</tt>.
100
+ # FIXME Not real multi; needs server support
101
+ def multi_count_columns(column_family, keys, *options)
102
+
103
+
104
+ # Multi-key version of Cassandra#get_columns. Supports the <tt>:consistency</tt>
105
+ # option.
106
+ # FIXME Not real multi; needs to use a Column predicate
107
+ def multi_get_columns(column_family, keys, *options)
108
+
109
+ # Return a hash (actually, a Cassandra::OrderedHash) or a single value
110
+ # representing the element at the column_family:key:[column]:[sub_column]
111
+ # path you request. Supports options <tt>:count</tt>, <tt>:start</tt>,
112
+ # <tt>:finish</tt>, <tt>:reversed</tt>, and <tt>:consistency</tt>.
113
+ def get(column_family, key, *columns_and_options)
114
+
115
+ # Multi-key version of Cassandra#get. Supports options <tt>:count</tt>,
116
+ # <tt>:start</tt>, <tt>:finish</tt>, <tt>:reversed</tt>, and <tt>:consistency</tt>.
117
+ def multi_get(column_family, keys, *columns_and_options)
118
+
119
+ # Return true if the column_family:key:[column]:[sub_column] path you
120
+ # request exists. Supports the <tt>:consistency</tt> option.
121
+ def exists?(column_family, key, *columns_and_options)
122
+
123
+ # Return a list of keys in the column_family you request. Requires the
124
+ # table to be partitioned with OrderPreservingHash. Supports the
125
+ # <tt>:count</tt>, <tt>:start</tt>, <tt>:finish</tt>, and <tt>:consistency</tt>
126
+ # options.
127
+ def get_range(column_family, options = {})
128
+
129
+ # Count all rows in the column_family you request. Requires the table
130
+ # to be partitioned with OrderPreservingHash. Supports the <tt>:start</tt>,
131
+ # <tt>:finish</tt>, and <tt>:consistency</tt> options.
132
+ def count_range(column_family, options = {})
133
+
134
+
135
+ h3. Modifiers
136
+
137
+ * Consistency level
138
+ * Show tombstones or not
139
+ * range
140
+
141
+ h4. Thrift Interface
142
+
143
+ ColumnOrSuperColumn get (string keyspace, string key, ColumnPath column_path, ConsistencyLevel consistency_level)
144
+ i32 get_count (string keyspace, string key, ColumnParent column_parent, ConsistencyLevel consistency_level)
145
+ list<ColumnOrSuperColumn> get_slice (string keyspace, string key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
146
+ map<string,list<ColumnOrSuperColumn>> multiget_slice (string keyspace, list<string> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
147
+ list<KeySlice> get_range_slices (string keyspace, KeyRange range, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
148
+ void insert (string keyspace, string key, ColumnPath column_path, binary value, i64 timestamp, ConsistencyLevel consistency_level)
149
+ void remove (string keyspace, string key, ColumnPath column_path, i64 timestamp, ConsistencyLevel consistency_level)
150
+ void batch_mutate (string keyspace, map<string,map<string,list<Mutation>>> mutation_map, ConsistencyLevel consistency_level)
151
+
152
+
153
+
154
+ h3. Old Schema
155
+
156
+ { "name" : "AccessLevel", "type" : "enum", "symbols" : [ "NONE", "READONLY", "READWRITE", "FALL" ] },
157
+ { "name" : "ColumnPath", "type" : "record", "fields" : [
158
+ { "name" : "column_family", "type" : "string"},
159
+ { "name" : "super_column", "type" : [ "bytes", "null" ]},
160
+ { "name" : "column", "type" : [ "bytes", "null" ] } ]},
161
+ { "name" : "ColumnParent", "type" : "record", "fields" : [
162
+ { "name" : "column_family", "type" : "string"},
163
+ { "name" : "super_column", "type" : [ "bytes", "null" ] } ]},
164
+ { "name" : "SliceRange", "type" : "record", "fields" : [
165
+ { "name" : "start", "type" : "bytes"},
166
+ { "name" : "finish", "type" : "bytes"},
167
+ { "name" : "reversed", "type" : "boolean"},
168
+ { "name" : "count", "type" : "int"},
169
+ { "name" : "bitmasks", "type" : [ { "type" : "array", "items" : "bytes"}, "null" ] } ]},
170
+ { "name" : "SlicePredicate", "type" : "record", "fields" : [
171
+ { "name" : "column_names", "type" : [ { "type" : "array", "items" : "bytes"}, "null" ]},
172
+ { "name" : "slice_range", "type" : [ "SliceRange", "null" ] } ]},
173
+
174
+ { "name" : "Clock", "type" : "record", "fields" : [
175
+ { "name" : "timestamp", "type" : "long" } ]},
176
+ { "name" : "Column", "type" : "record", "fields" : [
177
+ { "name" : "name", "type" : "bytes"},
178
+ { "name" : "value", "type" : "bytes"},
179
+ { "name" : "clock", "type" : "Clock"},
180
+ { "name" : "ttl", "type" : "int" } ]},
181
+ { "name" : "SuperColumn", "type" : "record", "fields" : [
182
+ { "name" : "name", "type" : "bytes"},
183
+ { "name" : "columns", "type" : { "type" : "array", "items" : "Column" } } ]},
184
+ { "name" : "ColumnOrSuperColumn", "type" : "record", "fields" : [
185
+ { "name" : "column", "type" : "Column" },
186
+ { "name" : "super_column", "type" : "null" } ]},
187
+ { "name" : "Deletion", "type" : "record", "fields" : [
188
+ { "name" : "clock", "type" : "Clock"},
189
+ { "name" : "super_column", "type" : [ "bytes", "null" ]},
190
+ { "name" : "predicate", "type" : [ "SlicePredicate", "null" ] } ]},
191
+ { "name" : "Mutation", "type" : "record", "fields" : [
192
+ { "name" : "column_or_supercolumn", "type" : "ColumnOrSuperColumn" },
193
+ { "name" : "deletion", "type" : "null" } ]},
194
+ { "name" : "StreamingMutation", "type" : "record", "fields" : [
195
+ { "name" : "key", "type" : "bytes" },
196
+ { "name" : "mutation", "type" : "Mutation" } ]},
197
+
198
+ { "name" : "IndexType", "type" : "enum", "symbols" : [ "KEYS" ]},
199
+ { "name" : "ColumnDef", "type" : "record", "fields" : [
200
+ { "name" : "name", "type" : "bytes"},
201
+ { "name" : "validation_class", "type" : "string"},
202
+ { "name" : "index_type", "type" : [ "IndexType", "null" ]},
203
+ { "name" : "index_name", "type" : [ "string", "null" ] } ]},
204
+ { "name" : "CfDef", "type" : "record", "fields" : [
205
+ { "name" : "keyspace", "type" : "string"},
206
+ { "name" : "name", "type" : "string"},
207
+ { "name" : "column_type", "type" : [ "string", "null" ]},
208
+ { "name" : "clock_type", "type" : [ "string", "null" ]},
209
+ { "name" : "comparator_type", "type" : [ "string", "null" ]},
210
+ { "name" : "subcomparator_type", "type" : [ "string", "null" ]},
211
+ { "name" : "reconciler", "type" : [ "string", "null" ]},
212
+ { "name" : "comment", "type" : [ "string", "null" ]},
213
+ { "name" : "row_cache_size", "type" : [ "double", "null" ]},
214
+ { "name" : "preload_row_cache", "type" : [ "boolean", "null" ]},
215
+ { "name" : "key_cache_size", "type" : [ "double", "null" ]},
216
+ { "name" : "read_repair_chance", "type" : [ "double", "null" ]},
217
+ { "name" : "gc_grace_seconds", "type" : [ "int", "null" ]},
218
+ { "name" : "column_metadata", "type" : [ { "type" : "array", "items" : "ColumnDef"}, "null" ]},
219
+ { "name" : "id", "type" : [ "int", "null" ] } ]},
220
+ { "name" : "KsDef", "type" : "record", "fields" : [
221
+ { "name" : "name", "type" : "string"}, { "name" : "strategy_class", "type" : "string"},
222
+ { "name" : "strategy_options", "type" : [ { "type" : "map", "values" : "string"}, "null" ]},
223
+ { "name" : "replication_factor", "type" : "int"}, { "name" : "cf_defs", "type" : { "type" : "array", "items" : "CfDef" } } ]},
224
+ { "name" : "MutationsMapEntry", "type" : "record", "fields" : [ { "name" : "key", "type" : "bytes"}, { "name" : "mutations", "type" : { "type" : "map", "values" : { "type" : "array", "items" : "Mutation" } } } ]},
225
+ { "name" : "CoscsMapEntry", "type" : "record", "fields" : [ { "name" : "key", "type" : "bytes"}, { "name" : "columns", "type" : { "type" : "array", "items" : "ColumnOrSuperColumn" } } ]},
226
+ { "name" : "ConsistencyLevel", "type" : "enum", "symbols" : [ "ZERO", "ONE", "QUORUM", "DCQUORUM", "DCQUORUMSYNC", "ALL" ]},
227
+ { "name" : "InvalidRequestException", "type" : "error", "fields" : [ { "name" : "why", "type" : [ "string", "null" ] } ]},
228
+ { "name" : "NotFoundException", "type" : "error", "fields" : [ { "name" : "why", "type" : [ "string", "null" ] } ]},
229
+ { "name" : "UnavailableException", "type" : "error", "fields" : [ { "name" : "why", "type" : [ "string", "null" ] } ]},
230
+ { "name" : "TimedOutException", "type" : "error", "fields" : [ { "name" : "why", "type" : [ "string", "null" ] } ] }
231
+ ],
232
+
233
+ "messages" : {
234
+ "get" : {
235
+ "request" : [ { "name" : "key", "type" : "bytes"},
236
+ { "name" : "column_path", "type" : "ColumnPath"},
237
+ { "name" : "consistency_level", "type" : "ConsistencyLevel"
238
+ } ],
239
+ "response" : "ColumnOrSuperColumn",
240
+ "errors" : [ "InvalidRequestException", "NotFoundException", "UnavailableException", "TimedOutException" ]
241
+ },
242
+ "get_slice" : {
243
+ "request" : [ { "name" : "key", "type" : "bytes"},
244
+ { "name" : "column_parent", "type" : "ColumnParent"},
245
+ { "name" : "predicate", "type" : "SlicePredicate"},
246
+ { "name" : "consistency_level", "type" : "ConsistencyLevel"
247
+ } ],
248
+ "response" : { "type" : "array", "items" : "ColumnOrSuperColumn" },
249
+ "errors" : [ "InvalidRequestException", "UnavailableException", "TimedOutException" ]
250
+ },
251
+ "multiget_slice" : {
252
+ "request" : [ { "name" : "keys", "type" : { "type" : "array", "items" : "bytes" }},
253
+ { "name" : "column_parent", "type" : "ColumnParent"},
254
+ { "name" : "predicate", "type" : "SlicePredicate"},
255
+ { "name" : "consistency_level", "type" : "ConsistencyLevel"
256
+ } ],
257
+ "response" : { "type" : "array", "items" : "CoscsMapEntry" },
258
+ "errors" : [ "InvalidRequestException", "UnavailableException", "TimedOutException" ]
259
+ },
260
+ "get_count" : {
261
+ "request" : [ { "name" : "key", "type" : "bytes"},
262
+ { "name" : "column_parent", "type" : "ColumnParent"},
263
+ { "name" : "predicate", "type" : "SlicePredicate"},
264
+ { "name" : "consistency_level", "type" : "ConsistencyLevel"
265
+ } ],
266
+ "response" : "int",
267
+ "errors" : [ "InvalidRequestException", "UnavailableException", "TimedOutException" ]
268
+ },
269
+ "insert" : {
270
+ "request" : [ { "name" : "key", "type" : "bytes"},
271
+ { "name" : "column_parent", "type" : "ColumnParent"},
272
+ { "name" : "column", "type" : "Column"},
273
+ { "name" : "consistency_level", "type" : "ConsistencyLevel"
274
+ } ],
275
+ "response" : "null",
276
+ "errors" : [ "InvalidRequestException", "UnavailableException", "TimedOutException" ]
277
+ },
278
+ "remove" : {
279
+ "request" : [ { "name" : "key", "type" : "bytes"},
280
+ { "name" : "column_path", "type" : "ColumnPath"},
281
+ { "name" : "clock", "type" : "Clock"},
282
+ { "name" : "consistency_level", "type" : "ConsistencyLevel"
283
+ } ],
284
+ "response" : "null",
285
+ "errors" : [ "InvalidRequestException", "UnavailableException", "TimedOutException" ]
286
+ },
287
+ "batch_mutate" : {
288
+ "request" : [ { "name" : "mutation_map", "type" : { "type" : "array", "items" : "MutationsMapEntry" }},
289
+ { "name" : "consistency_level", "type" : "ConsistencyLevel" } ],
290
+ "response" : "null",
291
+ "errors" : [ "InvalidRequestException", "UnavailableException", "TimedOutException" ]
292
+ },
293
+ "system_add_keyspace" : {
294
+ "request" : [ { "name" : "ks_def", "type" : "KsDef"
295
+ } ],
296
+ "response" : "null",
297
+ "errors" : [ "InvalidRequestException" ]
298
+ },
299
+ "set_keyspace" : {
300
+ "request" : [ { "name" : "keyspace", "type" : "string"
301
+ } ],
302
+ "response" : "null",
303
+ "errors" : [ "InvalidRequestException" ]
304
+ },
305
+ "describe_keyspaces" : {
306
+ "request" : [ ],
307
+ "response" : { "type" : "array", "items" : "string" }
308
+ },
309
+ "describe_cluster_name" : {
310
+ "request" : [ ],
311
+ "response" : "string"
312
+ },
313
+ "describe_version" : {
314
+ "request" : [ ],
315
+ "response" : "string"
316
+ }
317
+ }
318
+ }
@@ -0,0 +1 @@
1
+ python /usr/local/share/cassandra/contrib/hadoop_streaming_output/bin/mapper.py
@@ -0,0 +1 @@
1
+ python /usr/local/share/cassandra/contrib/hadoop_streaming_output/bin/reducer.py
@@ -0,0 +1,188 @@
1
+ {
2
+ "protocol" : "Cassandra",
3
+ "namespace" : "org.apache.cassandra.avro", "types" : [
4
+
5
+ { "name" : "AccessLevel", "type" : "enum", "symbols" : [ "NONE", "READONLY", "READWRITE", "FALL" ] },
6
+ { "name" : "ColumnPath", "type" : "record", "fields" : [
7
+ { "name" : "column_family", "type" : "string"},
8
+ { "name" : "super_column", "type" : [ "bytes", "null" ]},
9
+ { "name" : "column", "type" : [ "bytes", "null" ] } ]},
10
+ { "name" : "ColumnParent", "type" : "record", "fields" : [
11
+ { "name" : "column_family", "type" : "string"},
12
+ { "name" : "super_column", "type" : [ "bytes", "null" ] } ]},
13
+ { "name" : "SliceRange", "type" : "record", "fields" : [
14
+ { "name" : "start", "type" : "bytes"},
15
+ { "name" : "finish", "type" : "bytes"},
16
+ { "name" : "reversed", "type" : "boolean"},
17
+ { "name" : "count", "type" : "int"},
18
+ { "name" : "bitmasks", "type" : [ { "type" : "array", "items" : "bytes"}, "null" ] } ]},
19
+ { "name" : "SlicePredicate", "type" : "record", "fields" : [
20
+ { "name" : "column_names", "type" : [ { "type" : "array", "items" : "bytes"}, "null" ]},
21
+ { "name" : "slice_range", "type" : [ "SliceRange", "null" ] } ]},
22
+
23
+ { "name": "StupidColumnMutation", "type": "record",
24
+ "fields": [
25
+ { "name" : "key", "type" : "bytes" },
26
+ { "name" : "name", "type" : "bytes" },
27
+ { "name" : "value", "type" : "bytes" },
28
+ { "name" : "timestamp", "type" : "long" },
29
+ { "name" : "ttl", "type" : "int" }
30
+ ]},
31
+
32
+ { "name" : "Clock", "type" : "record", "fields" : [
33
+ { "name" : "timestamp", "type" : "long" } ]},
34
+ { "name" : "Column", "type" : "record", "fields" : [
35
+ { "name" : "name", "type" : "bytes"},
36
+ { "name" : "value", "type" : "bytes"},
37
+ { "name" : "clock", "type" : "Clock"},
38
+ { "name" : "ttl", "type" : "int" } ]},
39
+ { "name" : "SuperColumn", "type" : "record", "fields" : [
40
+ { "name" : "name", "type" : "bytes"},
41
+ { "name" : "columns", "type" : { "type" : "array", "items" : "Column" } } ]},
42
+ { "name" : "ColumnOrSuperColumn", "type" : "record", "fields" : [
43
+ { "name" : "column", "type" : "Column" },
44
+ { "name" : "super_column", "type" : "null" } ]},
45
+ { "name" : "Deletion", "type" : "record", "fields" : [
46
+ { "name" : "clock", "type" : "Clock"},
47
+ { "name" : "super_column", "type" : [ "bytes", "null" ]},
48
+ { "name" : "predicate", "type" : [ "SlicePredicate", "null" ] } ]},
49
+ { "name" : "Mutation", "type" : "record", "fields" : [
50
+ { "name" : "column_or_supercolumn", "type" : "ColumnOrSuperColumn" },
51
+ { "name" : "deletion", "type" : "null" }
52
+ ]},
53
+ { "name" : "StreamingMutation", "type" : "record", "fields" : [
54
+ { "name" : "key", "type" : "bytes" },
55
+ { "name" : "mutation", "type" : "Mutation" } ]},
56
+
57
+ { "name" : "IndexType", "type" : "enum", "symbols" : [ "KEYS" ]},
58
+ { "name" : "ColumnDef", "type" : "record", "fields" : [
59
+ { "name" : "name", "type" : "bytes"},
60
+ { "name" : "validation_class", "type" : "string"},
61
+ { "name" : "index_type", "type" : [ "IndexType", "null" ]},
62
+ { "name" : "index_name", "type" : [ "string", "null" ] } ]},
63
+ { "name" : "CfDef", "type" : "record", "fields" : [
64
+ { "name" : "keyspace", "type" : "string"},
65
+ { "name" : "name", "type" : "string"},
66
+ { "name" : "column_type", "type" : [ "string", "null" ]},
67
+ { "name" : "clock_type", "type" : [ "string", "null" ]},
68
+ { "name" : "comparator_type", "type" : [ "string", "null" ]},
69
+ { "name" : "subcomparator_type", "type" : [ "string", "null" ]},
70
+ { "name" : "reconciler", "type" : [ "string", "null" ]},
71
+ { "name" : "comment", "type" : [ "string", "null" ]},
72
+ { "name" : "row_cache_size", "type" : [ "double", "null" ]},
73
+ { "name" : "preload_row_cache", "type" : [ "boolean", "null" ]},
74
+ { "name" : "key_cache_size", "type" : [ "double", "null" ]},
75
+ { "name" : "read_repair_chance", "type" : [ "double", "null" ]},
76
+ { "name" : "gc_grace_seconds", "type" : [ "int", "null" ]},
77
+ { "name" : "column_metadata", "type" : [ { "type" : "array", "items" : "ColumnDef"}, "null" ]},
78
+ { "name" : "id", "type" : [ "int", "null" ] } ]},
79
+ { "name" : "KsDef", "type" : "record", "fields" : [
80
+ { "name" : "name", "type" : "string"}, { "name" : "strategy_class", "type" : "string"},
81
+ { "name" : "strategy_options", "type" : [ { "type" : "map", "values" : "string"}, "null" ]},
82
+ { "name" : "replication_factor", "type" : "int"}, { "name" : "cf_defs", "type" : { "type" : "array", "items" : "CfDef" } } ]},
83
+ { "name" : "MutationsMapEntry", "type" : "record", "fields" : [ { "name" : "key", "type" : "bytes"}, { "name" : "mutations", "type" : { "type" : "map", "values" : { "type" : "array", "items" : "Mutation" } } } ]},
84
+ { "name" : "CoscsMapEntry", "type" : "record", "fields" : [ { "name" : "key", "type" : "bytes"}, { "name" : "columns", "type" : { "type" : "array", "items" : "ColumnOrSuperColumn" } } ]},
85
+ { "name" : "ConsistencyLevel", "type" : "enum", "symbols" : [ "ZERO", "ONE", "QUORUM", "DCQUORUM", "DCQUORUMSYNC", "ALL" ]},
86
+ { "name" : "InvalidRequestException", "type" : "error", "fields" : [ { "name" : "why", "type" : [ "string", "null" ] } ]},
87
+ { "name" : "NotFoundException", "type" : "error", "fields" : [ { "name" : "why", "type" : [ "string", "null" ] } ]},
88
+ { "name" : "UnavailableException", "type" : "error", "fields" : [ { "name" : "why", "type" : [ "string", "null" ] } ]},
89
+ { "name" : "TimedOutException", "type" : "error", "fields" : [ { "name" : "why", "type" : [ "string", "null" ] } ] }
90
+ ],
91
+
92
+
93
+ "messages" : { "get" : {
94
+ "request" : [ { "name" : "key", "type" : "bytes"},
95
+ { "name" : "column_path", "type" : "ColumnPath"},
96
+ { "name" : "consistency_level", "type" : "ConsistencyLevel"
97
+ } ],
98
+ "response" : "ColumnOrSuperColumn",
99
+ "errors" : [ "InvalidRequestException", "NotFoundException", "UnavailableException", "TimedOutException" ]
100
+ },
101
+ "get_slice" : {
102
+ "request" : [ { "name" : "key", "type" : "bytes"},
103
+ { "name" : "column_parent", "type" : "ColumnParent"},
104
+ { "name" : "predicate", "type" : "SlicePredicate"},
105
+ { "name" : "consistency_level", "type" : "ConsistencyLevel"
106
+ } ],
107
+ "response" : { "type" : "array",
108
+ "items" : "ColumnOrSuperColumn"
109
+ },
110
+ "errors" : [ "InvalidRequestException", "UnavailableException", "TimedOutException" ]
111
+ },
112
+ "multiget_slice" : {
113
+ "request" : [ { "name" : "keys", "type" : { "type" : "array",
114
+ "items" : "bytes"
115
+ }},
116
+ { "name" : "column_parent", "type" : "ColumnParent"},
117
+ { "name" : "predicate", "type" : "SlicePredicate"},
118
+ { "name" : "consistency_level", "type" : "ConsistencyLevel"
119
+ } ],
120
+ "response" : { "type" : "array",
121
+ "items" : "CoscsMapEntry"
122
+ },
123
+ "errors" : [ "InvalidRequestException", "UnavailableException", "TimedOutException" ]
124
+ },
125
+ "get_count" : {
126
+ "request" : [ { "name" : "key", "type" : "bytes"},
127
+ { "name" : "column_parent", "type" : "ColumnParent"},
128
+ { "name" : "predicate", "type" : "SlicePredicate"},
129
+ { "name" : "consistency_level", "type" : "ConsistencyLevel"
130
+ } ],
131
+ "response" : "int",
132
+ "errors" : [ "InvalidRequestException", "UnavailableException", "TimedOutException" ]
133
+ },
134
+ "insert" : {
135
+ "request" : [ { "name" : "key", "type" : "bytes"},
136
+ { "name" : "column_parent", "type" : "ColumnParent"},
137
+ { "name" : "column", "type" : "Column"},
138
+ { "name" : "consistency_level", "type" : "ConsistencyLevel"
139
+ } ],
140
+ "response" : "null",
141
+ "errors" : [ "InvalidRequestException", "UnavailableException", "TimedOutException" ]
142
+ },
143
+ "remove" : {
144
+ "request" : [ { "name" : "key", "type" : "bytes"},
145
+ { "name" : "column_path", "type" : "ColumnPath"},
146
+ { "name" : "clock", "type" : "Clock"},
147
+ { "name" : "consistency_level", "type" : "ConsistencyLevel"
148
+ } ],
149
+ "response" : "null",
150
+ "errors" : [ "InvalidRequestException", "UnavailableException", "TimedOutException" ]
151
+ },
152
+ "batch_mutate" : {
153
+ "request" : [ { "name" : "mutation_map", "type" : { "type" : "array",
154
+ "items" : "MutationsMapEntry"
155
+ }},
156
+ { "name" : "consistency_level", "type" : "ConsistencyLevel"
157
+ } ],
158
+ "response" : "null",
159
+ "errors" : [ "InvalidRequestException", "UnavailableException", "TimedOutException" ]
160
+ },
161
+ "system_add_keyspace" : {
162
+ "request" : [ { "name" : "ks_def", "type" : "KsDef"
163
+ } ],
164
+ "response" : "null",
165
+ "errors" : [ "InvalidRequestException" ]
166
+ },
167
+ "set_keyspace" : {
168
+ "request" : [ { "name" : "keyspace", "type" : "string"
169
+ } ],
170
+ "response" : "null",
171
+ "errors" : [ "InvalidRequestException" ]
172
+ },
173
+ "describe_keyspaces" : {
174
+ "request" : [ ],
175
+ "response" : { "type" : "array",
176
+ "items" : "string"
177
+ }
178
+ },
179
+ "describe_cluster_name" : {
180
+ "request" : [ ],
181
+ "response" : "string"
182
+ },
183
+ "describe_version" : {
184
+ "request" : [ ],
185
+ "response" : "string"
186
+ }
187
+ }
188
+ }