diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift index b057fa0874..1e78d519c0 100644 --- a/interface/cassandra.thrift +++ b/interface/cassandra.thrift @@ -448,6 +448,7 @@ struct CfDef { 40: optional i32 default_time_to_live, 41: optional i32 index_interval, 42: optional string speculative_retry="NONE", + 43: optional set trigger_class, /* All of the following are now ignored and unsupplied. */ diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java index ec8ffa435b..34aec9847a 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java @@ -8685,14 +8685,14 @@ public class Cassandra { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list190 = iprot.readListBegin(); - struct.success = new ArrayList(_list190.size); - for (int _i191 = 0; _i191 < _list190.size; ++_i191) + org.apache.thrift.protocol.TList _list198 = iprot.readListBegin(); + struct.success = new ArrayList(_list198.size); + for (int _i199 = 0; _i199 < _list198.size; ++_i199) { - ColumnOrSuperColumn _elem192; // required - _elem192 = new ColumnOrSuperColumn(); - _elem192.read(iprot); - struct.success.add(_elem192); + ColumnOrSuperColumn _elem200; // optional + _elem200 = new ColumnOrSuperColumn(); + _elem200.read(iprot); + struct.success.add(_elem200); } iprot.readListEnd(); } @@ -8747,9 +8747,9 @@ public class Cassandra { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (ColumnOrSuperColumn _iter193 : struct.success) + for (ColumnOrSuperColumn _iter201 : struct.success) { - _iter193.write(oprot); + _iter201.write(oprot); } oprot.writeListEnd(); } @@ -8804,9 +8804,9 @@ public class Cassandra { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (ColumnOrSuperColumn _iter194 : struct.success) + for (ColumnOrSuperColumn _iter202 : struct.success) { - _iter194.write(oprot); + _iter202.write(oprot); } } } @@ -8827,14 +8827,14 @@ public class Cassandra { BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list195 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list195.size); - for (int _i196 = 0; _i196 < _list195.size; ++_i196) + org.apache.thrift.protocol.TList _list203 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list203.size); + for (int _i204 = 0; _i204 < _list203.size; ++_i204) { - ColumnOrSuperColumn _elem197; // required - _elem197 = new ColumnOrSuperColumn(); - _elem197.read(iprot); - struct.success.add(_elem197); + ColumnOrSuperColumn _elem205; // optional + _elem205 = new ColumnOrSuperColumn(); + _elem205.read(iprot); + struct.success.add(_elem205); } } struct.setSuccessIsSet(true); @@ -10839,13 +10839,13 @@ public class Cassandra { case 1: // KEYS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list198 = iprot.readListBegin(); - struct.keys = new ArrayList(_list198.size); - for (int _i199 = 0; _i199 < _list198.size; ++_i199) + org.apache.thrift.protocol.TList _list206 = iprot.readListBegin(); + struct.keys = new ArrayList(_list206.size); + for (int _i207 = 0; _i207 < _list206.size; ++_i207) { - ByteBuffer _elem200; // required - _elem200 = iprot.readBinary(); - struct.keys.add(_elem200); + ByteBuffer _elem208; // optional + _elem208 = iprot.readBinary(); + struct.keys.add(_elem208); } iprot.readListEnd(); } @@ -10899,9 +10899,9 @@ public class Cassandra { oprot.writeFieldBegin(KEYS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size())); - for (ByteBuffer _iter201 : struct.keys) + for (ByteBuffer _iter209 : struct.keys) { - oprot.writeBinary(_iter201); + oprot.writeBinary(_iter209); } oprot.writeListEnd(); } @@ -10941,9 +10941,9 @@ public class Cassandra { TTupleProtocol oprot = (TTupleProtocol) prot; { oprot.writeI32(struct.keys.size()); - for (ByteBuffer _iter202 : struct.keys) + for (ByteBuffer _iter210 : struct.keys) { - oprot.writeBinary(_iter202); + oprot.writeBinary(_iter210); } } struct.column_parent.write(oprot); @@ -10955,13 +10955,13 @@ public class Cassandra { public void read(org.apache.thrift.protocol.TProtocol prot, multiget_slice_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { - org.apache.thrift.protocol.TList _list203 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.keys = new ArrayList(_list203.size); - for (int _i204 = 0; _i204 < _list203.size; ++_i204) + org.apache.thrift.protocol.TList _list211 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.keys = new ArrayList(_list211.size); + for (int _i212 = 0; _i212 < _list211.size; ++_i212) { - ByteBuffer _elem205; // required - _elem205 = iprot.readBinary(); - struct.keys.add(_elem205); + ByteBuffer _elem213; // optional + _elem213 = iprot.readBinary(); + struct.keys.add(_elem213); } } struct.setKeysIsSet(true); @@ -11550,26 +11550,26 @@ public class Cassandra { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map206 = iprot.readMapBegin(); - struct.success = new HashMap>(2*_map206.size); - for (int _i207 = 0; _i207 < _map206.size; ++_i207) + org.apache.thrift.protocol.TMap _map214 = iprot.readMapBegin(); + struct.success = new HashMap>(2*_map214.size); + for (int _i215 = 0; _i215 < _map214.size; ++_i215) { - ByteBuffer _key208; // required - List _val209; // required - _key208 = iprot.readBinary(); + ByteBuffer _key216; // required + List _val217; // required + _key216 = iprot.readBinary(); { - org.apache.thrift.protocol.TList _list210 = iprot.readListBegin(); - _val209 = new ArrayList(_list210.size); - for (int _i211 = 0; _i211 < _list210.size; ++_i211) + org.apache.thrift.protocol.TList _list218 = iprot.readListBegin(); + _val217 = new ArrayList(_list218.size); + for (int _i219 = 0; _i219 < _list218.size; ++_i219) { - ColumnOrSuperColumn _elem212; // required - _elem212 = new ColumnOrSuperColumn(); - _elem212.read(iprot); - _val209.add(_elem212); + ColumnOrSuperColumn _elem220; // optional + _elem220 = new ColumnOrSuperColumn(); + _elem220.read(iprot); + _val217.add(_elem220); } iprot.readListEnd(); } - struct.success.put(_key208, _val209); + struct.success.put(_key216, _val217); } iprot.readMapEnd(); } @@ -11624,14 +11624,14 @@ public class Cassandra { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.success.size())); - for (Map.Entry> _iter213 : struct.success.entrySet()) + for (Map.Entry> _iter221 : struct.success.entrySet()) { - oprot.writeBinary(_iter213.getKey()); + oprot.writeBinary(_iter221.getKey()); { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter213.getValue().size())); - for (ColumnOrSuperColumn _iter214 : _iter213.getValue()) + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter221.getValue().size())); + for (ColumnOrSuperColumn _iter222 : _iter221.getValue()) { - _iter214.write(oprot); + _iter222.write(oprot); } oprot.writeListEnd(); } @@ -11689,14 +11689,14 @@ public class Cassandra { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry> _iter215 : struct.success.entrySet()) + for (Map.Entry> _iter223 : struct.success.entrySet()) { - oprot.writeBinary(_iter215.getKey()); + oprot.writeBinary(_iter223.getKey()); { - oprot.writeI32(_iter215.getValue().size()); - for (ColumnOrSuperColumn _iter216 : _iter215.getValue()) + oprot.writeI32(_iter223.getValue().size()); + for (ColumnOrSuperColumn _iter224 : _iter223.getValue()) { - _iter216.write(oprot); + _iter224.write(oprot); } } } @@ -11719,25 +11719,25 @@ public class Cassandra { BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map217 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); - struct.success = new HashMap>(2*_map217.size); - for (int _i218 = 0; _i218 < _map217.size; ++_i218) + org.apache.thrift.protocol.TMap _map225 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.success = new HashMap>(2*_map225.size); + for (int _i226 = 0; _i226 < _map225.size; ++_i226) { - ByteBuffer _key219; // required - List _val220; // required - _key219 = iprot.readBinary(); + ByteBuffer _key227; // required + List _val228; // required + _key227 = iprot.readBinary(); { - org.apache.thrift.protocol.TList _list221 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - _val220 = new ArrayList(_list221.size); - for (int _i222 = 0; _i222 < _list221.size; ++_i222) + org.apache.thrift.protocol.TList _list229 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + _val228 = new ArrayList(_list229.size); + for (int _i230 = 0; _i230 < _list229.size; ++_i230) { - ColumnOrSuperColumn _elem223; // required - _elem223 = new ColumnOrSuperColumn(); - _elem223.read(iprot); - _val220.add(_elem223); + ColumnOrSuperColumn _elem231; // optional + _elem231 = new ColumnOrSuperColumn(); + _elem231.read(iprot); + _val228.add(_elem231); } } - struct.success.put(_key219, _val220); + struct.success.put(_key227, _val228); } } struct.setSuccessIsSet(true); @@ -12363,13 +12363,13 @@ public class Cassandra { case 1: // KEYS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list224 = iprot.readListBegin(); - struct.keys = new ArrayList(_list224.size); - for (int _i225 = 0; _i225 < _list224.size; ++_i225) + org.apache.thrift.protocol.TList _list232 = iprot.readListBegin(); + struct.keys = new ArrayList(_list232.size); + for (int _i233 = 0; _i233 < _list232.size; ++_i233) { - ByteBuffer _elem226; // required - _elem226 = iprot.readBinary(); - struct.keys.add(_elem226); + ByteBuffer _elem234; // optional + _elem234 = iprot.readBinary(); + struct.keys.add(_elem234); } iprot.readListEnd(); } @@ -12423,9 +12423,9 @@ public class Cassandra { oprot.writeFieldBegin(KEYS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.keys.size())); - for (ByteBuffer _iter227 : struct.keys) + for (ByteBuffer _iter235 : struct.keys) { - oprot.writeBinary(_iter227); + oprot.writeBinary(_iter235); } oprot.writeListEnd(); } @@ -12465,9 +12465,9 @@ public class Cassandra { TTupleProtocol oprot = (TTupleProtocol) prot; { oprot.writeI32(struct.keys.size()); - for (ByteBuffer _iter228 : struct.keys) + for (ByteBuffer _iter236 : struct.keys) { - oprot.writeBinary(_iter228); + oprot.writeBinary(_iter236); } } struct.column_parent.write(oprot); @@ -12479,13 +12479,13 @@ public class Cassandra { public void read(org.apache.thrift.protocol.TProtocol prot, multiget_count_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { - org.apache.thrift.protocol.TList _list229 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.keys = new ArrayList(_list229.size); - for (int _i230 = 0; _i230 < _list229.size; ++_i230) + org.apache.thrift.protocol.TList _list237 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.keys = new ArrayList(_list237.size); + for (int _i238 = 0; _i238 < _list237.size; ++_i238) { - ByteBuffer _elem231; // required - _elem231 = iprot.readBinary(); - struct.keys.add(_elem231); + ByteBuffer _elem239; // optional + _elem239 = iprot.readBinary(); + struct.keys.add(_elem239); } } struct.setKeysIsSet(true); @@ -13070,15 +13070,15 @@ public class Cassandra { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map232 = iprot.readMapBegin(); - struct.success = new HashMap(2*_map232.size); - for (int _i233 = 0; _i233 < _map232.size; ++_i233) + org.apache.thrift.protocol.TMap _map240 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map240.size); + for (int _i241 = 0; _i241 < _map240.size; ++_i241) { - ByteBuffer _key234; // required - int _val235; // required - _key234 = iprot.readBinary(); - _val235 = iprot.readI32(); - struct.success.put(_key234, _val235); + ByteBuffer _key242; // required + int _val243; // required + _key242 = iprot.readBinary(); + _val243 = iprot.readI32(); + struct.success.put(_key242, _val243); } iprot.readMapEnd(); } @@ -13133,10 +13133,10 @@ public class Cassandra { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, struct.success.size())); - for (Map.Entry _iter236 : struct.success.entrySet()) + for (Map.Entry _iter244 : struct.success.entrySet()) { - oprot.writeBinary(_iter236.getKey()); - oprot.writeI32(_iter236.getValue()); + oprot.writeBinary(_iter244.getKey()); + oprot.writeI32(_iter244.getValue()); } oprot.writeMapEnd(); } @@ -13191,10 +13191,10 @@ public class Cassandra { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry _iter237 : struct.success.entrySet()) + for (Map.Entry _iter245 : struct.success.entrySet()) { - oprot.writeBinary(_iter237.getKey()); - oprot.writeI32(_iter237.getValue()); + oprot.writeBinary(_iter245.getKey()); + oprot.writeI32(_iter245.getValue()); } } } @@ -13215,15 +13215,15 @@ public class Cassandra { BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map238 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32()); - struct.success = new HashMap(2*_map238.size); - for (int _i239 = 0; _i239 < _map238.size; ++_i239) + org.apache.thrift.protocol.TMap _map246 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32()); + struct.success = new HashMap(2*_map246.size); + for (int _i247 = 0; _i247 < _map246.size; ++_i247) { - ByteBuffer _key240; // required - int _val241; // required - _key240 = iprot.readBinary(); - _val241 = iprot.readI32(); - struct.success.put(_key240, _val241); + ByteBuffer _key248; // required + int _val249; // required + _key248 = iprot.readBinary(); + _val249 = iprot.readI32(); + struct.success.put(_key248, _val249); } } struct.setSuccessIsSet(true); @@ -14501,14 +14501,14 @@ public class Cassandra { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list242 = iprot.readListBegin(); - struct.success = new ArrayList(_list242.size); - for (int _i243 = 0; _i243 < _list242.size; ++_i243) + org.apache.thrift.protocol.TList _list250 = iprot.readListBegin(); + struct.success = new ArrayList(_list250.size); + for (int _i251 = 0; _i251 < _list250.size; ++_i251) { - KeySlice _elem244; // required - _elem244 = new KeySlice(); - _elem244.read(iprot); - struct.success.add(_elem244); + KeySlice _elem252; // optional + _elem252 = new KeySlice(); + _elem252.read(iprot); + struct.success.add(_elem252); } iprot.readListEnd(); } @@ -14563,9 +14563,9 @@ public class Cassandra { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (KeySlice _iter245 : struct.success) + for (KeySlice _iter253 : struct.success) { - _iter245.write(oprot); + _iter253.write(oprot); } oprot.writeListEnd(); } @@ -14620,9 +14620,9 @@ public class Cassandra { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (KeySlice _iter246 : struct.success) + for (KeySlice _iter254 : struct.success) { - _iter246.write(oprot); + _iter254.write(oprot); } } } @@ -14643,14 +14643,14 @@ public class Cassandra { BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list247 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list247.size); - for (int _i248 = 0; _i248 < _list247.size; ++_i248) + org.apache.thrift.protocol.TList _list255 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list255.size); + for (int _i256 = 0; _i256 < _list255.size; ++_i256) { - KeySlice _elem249; // required - _elem249 = new KeySlice(); - _elem249.read(iprot); - struct.success.add(_elem249); + KeySlice _elem257; // optional + _elem257 = new KeySlice(); + _elem257.read(iprot); + struct.success.add(_elem257); } } struct.setSuccessIsSet(true); @@ -15929,14 +15929,14 @@ public class Cassandra { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list250 = iprot.readListBegin(); - struct.success = new ArrayList(_list250.size); - for (int _i251 = 0; _i251 < _list250.size; ++_i251) + org.apache.thrift.protocol.TList _list258 = iprot.readListBegin(); + struct.success = new ArrayList(_list258.size); + for (int _i259 = 0; _i259 < _list258.size; ++_i259) { - KeySlice _elem252; // required - _elem252 = new KeySlice(); - _elem252.read(iprot); - struct.success.add(_elem252); + KeySlice _elem260; // optional + _elem260 = new KeySlice(); + _elem260.read(iprot); + struct.success.add(_elem260); } iprot.readListEnd(); } @@ -15991,9 +15991,9 @@ public class Cassandra { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (KeySlice _iter253 : struct.success) + for (KeySlice _iter261 : struct.success) { - _iter253.write(oprot); + _iter261.write(oprot); } oprot.writeListEnd(); } @@ -16048,9 +16048,9 @@ public class Cassandra { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (KeySlice _iter254 : struct.success) + for (KeySlice _iter262 : struct.success) { - _iter254.write(oprot); + _iter262.write(oprot); } } } @@ -16071,14 +16071,14 @@ public class Cassandra { BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list255 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list255.size); - for (int _i256 = 0; _i256 < _list255.size; ++_i256) + org.apache.thrift.protocol.TList _list263 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list263.size); + for (int _i264 = 0; _i264 < _list263.size; ++_i264) { - KeySlice _elem257; // required - _elem257 = new KeySlice(); - _elem257.read(iprot); - struct.success.add(_elem257); + KeySlice _elem265; // optional + _elem265 = new KeySlice(); + _elem265.read(iprot); + struct.success.add(_elem265); } } struct.setSuccessIsSet(true); @@ -17356,14 +17356,14 @@ public class Cassandra { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list258 = iprot.readListBegin(); - struct.success = new ArrayList(_list258.size); - for (int _i259 = 0; _i259 < _list258.size; ++_i259) + org.apache.thrift.protocol.TList _list266 = iprot.readListBegin(); + struct.success = new ArrayList(_list266.size); + for (int _i267 = 0; _i267 < _list266.size; ++_i267) { - KeySlice _elem260; // required - _elem260 = new KeySlice(); - _elem260.read(iprot); - struct.success.add(_elem260); + KeySlice _elem268; // optional + _elem268 = new KeySlice(); + _elem268.read(iprot); + struct.success.add(_elem268); } iprot.readListEnd(); } @@ -17418,9 +17418,9 @@ public class Cassandra { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (KeySlice _iter261 : struct.success) + for (KeySlice _iter269 : struct.success) { - _iter261.write(oprot); + _iter269.write(oprot); } oprot.writeListEnd(); } @@ -17475,9 +17475,9 @@ public class Cassandra { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (KeySlice _iter262 : struct.success) + for (KeySlice _iter270 : struct.success) { - _iter262.write(oprot); + _iter270.write(oprot); } } } @@ -17498,14 +17498,14 @@ public class Cassandra { BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list263 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list263.size); - for (int _i264 = 0; _i264 < _list263.size; ++_i264) + org.apache.thrift.protocol.TList _list271 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list271.size); + for (int _i272 = 0; _i272 < _list271.size; ++_i272) { - KeySlice _elem265; // required - _elem265 = new KeySlice(); - _elem265.read(iprot); - struct.success.add(_elem265); + KeySlice _elem273; // optional + _elem273 = new KeySlice(); + _elem273.read(iprot); + struct.success.add(_elem273); } } struct.setSuccessIsSet(true); @@ -20693,14 +20693,14 @@ public class Cassandra { case 3: // EXPECTED if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list266 = iprot.readListBegin(); - struct.expected = new ArrayList(_list266.size); - for (int _i267 = 0; _i267 < _list266.size; ++_i267) + org.apache.thrift.protocol.TList _list274 = iprot.readListBegin(); + struct.expected = new ArrayList(_list274.size); + for (int _i275 = 0; _i275 < _list274.size; ++_i275) { - Column _elem268; // required - _elem268 = new Column(); - _elem268.read(iprot); - struct.expected.add(_elem268); + Column _elem276; // optional + _elem276 = new Column(); + _elem276.read(iprot); + struct.expected.add(_elem276); } iprot.readListEnd(); } @@ -20712,14 +20712,14 @@ public class Cassandra { case 4: // UPDATES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list269 = iprot.readListBegin(); - struct.updates = new ArrayList(_list269.size); - for (int _i270 = 0; _i270 < _list269.size; ++_i270) + org.apache.thrift.protocol.TList _list277 = iprot.readListBegin(); + struct.updates = new ArrayList(_list277.size); + for (int _i278 = 0; _i278 < _list277.size; ++_i278) { - Column _elem271; // required - _elem271 = new Column(); - _elem271.read(iprot); - struct.updates.add(_elem271); + Column _elem279; // optional + _elem279 = new Column(); + _elem279.read(iprot); + struct.updates.add(_elem279); } iprot.readListEnd(); } @@ -20757,9 +20757,9 @@ public class Cassandra { oprot.writeFieldBegin(EXPECTED_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.expected.size())); - for (Column _iter272 : struct.expected) + for (Column _iter280 : struct.expected) { - _iter272.write(oprot); + _iter280.write(oprot); } oprot.writeListEnd(); } @@ -20769,9 +20769,9 @@ public class Cassandra { oprot.writeFieldBegin(UPDATES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.updates.size())); - for (Column _iter273 : struct.updates) + for (Column _iter281 : struct.updates) { - _iter273.write(oprot); + _iter281.write(oprot); } oprot.writeListEnd(); } @@ -20807,18 +20807,18 @@ public class Cassandra { if (struct.isSetExpected()) { { oprot.writeI32(struct.expected.size()); - for (Column _iter274 : struct.expected) + for (Column _iter282 : struct.expected) { - _iter274.write(oprot); + _iter282.write(oprot); } } } if (struct.isSetUpdates()) { { oprot.writeI32(struct.updates.size()); - for (Column _iter275 : struct.updates) + for (Column _iter283 : struct.updates) { - _iter275.write(oprot); + _iter283.write(oprot); } } } @@ -20834,28 +20834,28 @@ public class Cassandra { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list276 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.expected = new ArrayList(_list276.size); - for (int _i277 = 0; _i277 < _list276.size; ++_i277) + org.apache.thrift.protocol.TList _list284 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.expected = new ArrayList(_list284.size); + for (int _i285 = 0; _i285 < _list284.size; ++_i285) { - Column _elem278; // required - _elem278 = new Column(); - _elem278.read(iprot); - struct.expected.add(_elem278); + Column _elem286; // optional + _elem286 = new Column(); + _elem286.read(iprot); + struct.expected.add(_elem286); } } struct.setExpectedIsSet(true); } if (incoming.get(1)) { { - org.apache.thrift.protocol.TList _list279 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.updates = new ArrayList(_list279.size); - for (int _i280 = 0; _i280 < _list279.size; ++_i280) + org.apache.thrift.protocol.TList _list287 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.updates = new ArrayList(_list287.size); + for (int _i288 = 0; _i288 < _list287.size; ++_i288) { - Column _elem281; // required - _elem281 = new Column(); - _elem281.read(iprot); - struct.updates.add(_elem281); + Column _elem289; // optional + _elem289 = new Column(); + _elem289.read(iprot); + struct.updates.add(_elem289); } } struct.setUpdatesIsSet(true); @@ -24436,38 +24436,38 @@ public class Cassandra { case 1: // MUTATION_MAP if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map282 = iprot.readMapBegin(); - struct.mutation_map = new HashMap>>(2*_map282.size); - for (int _i283 = 0; _i283 < _map282.size; ++_i283) + org.apache.thrift.protocol.TMap _map290 = iprot.readMapBegin(); + struct.mutation_map = new HashMap>>(2*_map290.size); + for (int _i291 = 0; _i291 < _map290.size; ++_i291) { - ByteBuffer _key284; // required - Map> _val285; // required - _key284 = iprot.readBinary(); + ByteBuffer _key292; // required + Map> _val293; // required + _key292 = iprot.readBinary(); { - org.apache.thrift.protocol.TMap _map286 = iprot.readMapBegin(); - _val285 = new HashMap>(2*_map286.size); - for (int _i287 = 0; _i287 < _map286.size; ++_i287) + org.apache.thrift.protocol.TMap _map294 = iprot.readMapBegin(); + _val293 = new HashMap>(2*_map294.size); + for (int _i295 = 0; _i295 < _map294.size; ++_i295) { - String _key288; // required - List _val289; // required - _key288 = iprot.readString(); + String _key296; // required + List _val297; // required + _key296 = iprot.readString(); { - org.apache.thrift.protocol.TList _list290 = iprot.readListBegin(); - _val289 = new ArrayList(_list290.size); - for (int _i291 = 0; _i291 < _list290.size; ++_i291) + org.apache.thrift.protocol.TList _list298 = iprot.readListBegin(); + _val297 = new ArrayList(_list298.size); + for (int _i299 = 0; _i299 < _list298.size; ++_i299) { - Mutation _elem292; // required - _elem292 = new Mutation(); - _elem292.read(iprot); - _val289.add(_elem292); + Mutation _elem300; // optional + _elem300 = new Mutation(); + _elem300.read(iprot); + _val297.add(_elem300); } iprot.readListEnd(); } - _val285.put(_key288, _val289); + _val293.put(_key296, _val297); } iprot.readMapEnd(); } - struct.mutation_map.put(_key284, _val285); + struct.mutation_map.put(_key292, _val293); } iprot.readMapEnd(); } @@ -24503,19 +24503,19 @@ public class Cassandra { oprot.writeFieldBegin(MUTATION_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.mutation_map.size())); - for (Map.Entry>> _iter293 : struct.mutation_map.entrySet()) + for (Map.Entry>> _iter301 : struct.mutation_map.entrySet()) { - oprot.writeBinary(_iter293.getKey()); + oprot.writeBinary(_iter301.getKey()); { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, _iter293.getValue().size())); - for (Map.Entry> _iter294 : _iter293.getValue().entrySet()) + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, _iter301.getValue().size())); + for (Map.Entry> _iter302 : _iter301.getValue().entrySet()) { - oprot.writeString(_iter294.getKey()); + oprot.writeString(_iter302.getKey()); { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter294.getValue().size())); - for (Mutation _iter295 : _iter294.getValue()) + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter302.getValue().size())); + for (Mutation _iter303 : _iter302.getValue()) { - _iter295.write(oprot); + _iter303.write(oprot); } oprot.writeListEnd(); } @@ -24551,19 +24551,19 @@ public class Cassandra { TTupleProtocol oprot = (TTupleProtocol) prot; { oprot.writeI32(struct.mutation_map.size()); - for (Map.Entry>> _iter296 : struct.mutation_map.entrySet()) + for (Map.Entry>> _iter304 : struct.mutation_map.entrySet()) { - oprot.writeBinary(_iter296.getKey()); + oprot.writeBinary(_iter304.getKey()); { - oprot.writeI32(_iter296.getValue().size()); - for (Map.Entry> _iter297 : _iter296.getValue().entrySet()) + oprot.writeI32(_iter304.getValue().size()); + for (Map.Entry> _iter305 : _iter304.getValue().entrySet()) { - oprot.writeString(_iter297.getKey()); + oprot.writeString(_iter305.getKey()); { - oprot.writeI32(_iter297.getValue().size()); - for (Mutation _iter298 : _iter297.getValue()) + oprot.writeI32(_iter305.getValue().size()); + for (Mutation _iter306 : _iter305.getValue()) { - _iter298.write(oprot); + _iter306.write(oprot); } } } @@ -24577,36 +24577,36 @@ public class Cassandra { public void read(org.apache.thrift.protocol.TProtocol prot, batch_mutate_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { - org.apache.thrift.protocol.TMap _map299 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32()); - struct.mutation_map = new HashMap>>(2*_map299.size); - for (int _i300 = 0; _i300 < _map299.size; ++_i300) + org.apache.thrift.protocol.TMap _map307 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32()); + struct.mutation_map = new HashMap>>(2*_map307.size); + for (int _i308 = 0; _i308 < _map307.size; ++_i308) { - ByteBuffer _key301; // required - Map> _val302; // required - _key301 = iprot.readBinary(); + ByteBuffer _key309; // required + Map> _val310; // required + _key309 = iprot.readBinary(); { - org.apache.thrift.protocol.TMap _map303 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); - _val302 = new HashMap>(2*_map303.size); - for (int _i304 = 0; _i304 < _map303.size; ++_i304) + org.apache.thrift.protocol.TMap _map311 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + _val310 = new HashMap>(2*_map311.size); + for (int _i312 = 0; _i312 < _map311.size; ++_i312) { - String _key305; // required - List _val306; // required - _key305 = iprot.readString(); + String _key313; // required + List _val314; // required + _key313 = iprot.readString(); { - org.apache.thrift.protocol.TList _list307 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - _val306 = new ArrayList(_list307.size); - for (int _i308 = 0; _i308 < _list307.size; ++_i308) + org.apache.thrift.protocol.TList _list315 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + _val314 = new ArrayList(_list315.size); + for (int _i316 = 0; _i316 < _list315.size; ++_i316) { - Mutation _elem309; // required - _elem309 = new Mutation(); - _elem309.read(iprot); - _val306.add(_elem309); + Mutation _elem317; // optional + _elem317 = new Mutation(); + _elem317.read(iprot); + _val314.add(_elem317); } } - _val302.put(_key305, _val306); + _val310.put(_key313, _val314); } } - struct.mutation_map.put(_key301, _val302); + struct.mutation_map.put(_key309, _val310); } } struct.setMutation_mapIsSet(true); @@ -25640,38 +25640,38 @@ public class Cassandra { case 1: // MUTATION_MAP if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map310 = iprot.readMapBegin(); - struct.mutation_map = new HashMap>>(2*_map310.size); - for (int _i311 = 0; _i311 < _map310.size; ++_i311) + org.apache.thrift.protocol.TMap _map318 = iprot.readMapBegin(); + struct.mutation_map = new HashMap>>(2*_map318.size); + for (int _i319 = 0; _i319 < _map318.size; ++_i319) { - ByteBuffer _key312; // required - Map> _val313; // required - _key312 = iprot.readBinary(); + ByteBuffer _key320; // required + Map> _val321; // required + _key320 = iprot.readBinary(); { - org.apache.thrift.protocol.TMap _map314 = iprot.readMapBegin(); - _val313 = new HashMap>(2*_map314.size); - for (int _i315 = 0; _i315 < _map314.size; ++_i315) + org.apache.thrift.protocol.TMap _map322 = iprot.readMapBegin(); + _val321 = new HashMap>(2*_map322.size); + for (int _i323 = 0; _i323 < _map322.size; ++_i323) { - String _key316; // required - List _val317; // required - _key316 = iprot.readString(); + String _key324; // required + List _val325; // required + _key324 = iprot.readString(); { - org.apache.thrift.protocol.TList _list318 = iprot.readListBegin(); - _val317 = new ArrayList(_list318.size); - for (int _i319 = 0; _i319 < _list318.size; ++_i319) + org.apache.thrift.protocol.TList _list326 = iprot.readListBegin(); + _val325 = new ArrayList(_list326.size); + for (int _i327 = 0; _i327 < _list326.size; ++_i327) { - Mutation _elem320; // required - _elem320 = new Mutation(); - _elem320.read(iprot); - _val317.add(_elem320); + Mutation _elem328; // optional + _elem328 = new Mutation(); + _elem328.read(iprot); + _val325.add(_elem328); } iprot.readListEnd(); } - _val313.put(_key316, _val317); + _val321.put(_key324, _val325); } iprot.readMapEnd(); } - struct.mutation_map.put(_key312, _val313); + struct.mutation_map.put(_key320, _val321); } iprot.readMapEnd(); } @@ -25707,19 +25707,19 @@ public class Cassandra { oprot.writeFieldBegin(MUTATION_MAP_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, struct.mutation_map.size())); - for (Map.Entry>> _iter321 : struct.mutation_map.entrySet()) + for (Map.Entry>> _iter329 : struct.mutation_map.entrySet()) { - oprot.writeBinary(_iter321.getKey()); + oprot.writeBinary(_iter329.getKey()); { - oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, _iter321.getValue().size())); - for (Map.Entry> _iter322 : _iter321.getValue().entrySet()) + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, _iter329.getValue().size())); + for (Map.Entry> _iter330 : _iter329.getValue().entrySet()) { - oprot.writeString(_iter322.getKey()); + oprot.writeString(_iter330.getKey()); { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter322.getValue().size())); - for (Mutation _iter323 : _iter322.getValue()) + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, _iter330.getValue().size())); + for (Mutation _iter331 : _iter330.getValue()) { - _iter323.write(oprot); + _iter331.write(oprot); } oprot.writeListEnd(); } @@ -25755,19 +25755,19 @@ public class Cassandra { TTupleProtocol oprot = (TTupleProtocol) prot; { oprot.writeI32(struct.mutation_map.size()); - for (Map.Entry>> _iter324 : struct.mutation_map.entrySet()) + for (Map.Entry>> _iter332 : struct.mutation_map.entrySet()) { - oprot.writeBinary(_iter324.getKey()); + oprot.writeBinary(_iter332.getKey()); { - oprot.writeI32(_iter324.getValue().size()); - for (Map.Entry> _iter325 : _iter324.getValue().entrySet()) + oprot.writeI32(_iter332.getValue().size()); + for (Map.Entry> _iter333 : _iter332.getValue().entrySet()) { - oprot.writeString(_iter325.getKey()); + oprot.writeString(_iter333.getKey()); { - oprot.writeI32(_iter325.getValue().size()); - for (Mutation _iter326 : _iter325.getValue()) + oprot.writeI32(_iter333.getValue().size()); + for (Mutation _iter334 : _iter333.getValue()) { - _iter326.write(oprot); + _iter334.write(oprot); } } } @@ -25781,36 +25781,36 @@ public class Cassandra { public void read(org.apache.thrift.protocol.TProtocol prot, atomic_batch_mutate_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { - org.apache.thrift.protocol.TMap _map327 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32()); - struct.mutation_map = new HashMap>>(2*_map327.size); - for (int _i328 = 0; _i328 < _map327.size; ++_i328) + org.apache.thrift.protocol.TMap _map335 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, iprot.readI32()); + struct.mutation_map = new HashMap>>(2*_map335.size); + for (int _i336 = 0; _i336 < _map335.size; ++_i336) { - ByteBuffer _key329; // required - Map> _val330; // required - _key329 = iprot.readBinary(); + ByteBuffer _key337; // required + Map> _val338; // required + _key337 = iprot.readBinary(); { - org.apache.thrift.protocol.TMap _map331 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); - _val330 = new HashMap>(2*_map331.size); - for (int _i332 = 0; _i332 < _map331.size; ++_i332) + org.apache.thrift.protocol.TMap _map339 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + _val338 = new HashMap>(2*_map339.size); + for (int _i340 = 0; _i340 < _map339.size; ++_i340) { - String _key333; // required - List _val334; // required - _key333 = iprot.readString(); + String _key341; // required + List _val342; // required + _key341 = iprot.readString(); { - org.apache.thrift.protocol.TList _list335 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - _val334 = new ArrayList(_list335.size); - for (int _i336 = 0; _i336 < _list335.size; ++_i336) + org.apache.thrift.protocol.TList _list343 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + _val342 = new ArrayList(_list343.size); + for (int _i344 = 0; _i344 < _list343.size; ++_i344) { - Mutation _elem337; // required - _elem337 = new Mutation(); - _elem337.read(iprot); - _val334.add(_elem337); + Mutation _elem345; // optional + _elem345 = new Mutation(); + _elem345.read(iprot); + _val342.add(_elem345); } } - _val330.put(_key333, _val334); + _val338.put(_key341, _val342); } } - struct.mutation_map.put(_key329, _val330); + struct.mutation_map.put(_key337, _val338); } } struct.setMutation_mapIsSet(true); @@ -27984,25 +27984,25 @@ public class Cassandra { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map338 = iprot.readMapBegin(); - struct.success = new HashMap>(2*_map338.size); - for (int _i339 = 0; _i339 < _map338.size; ++_i339) + org.apache.thrift.protocol.TMap _map346 = iprot.readMapBegin(); + struct.success = new HashMap>(2*_map346.size); + for (int _i347 = 0; _i347 < _map346.size; ++_i347) { - String _key340; // required - List _val341; // required - _key340 = iprot.readString(); + String _key348; // required + List _val349; // required + _key348 = iprot.readString(); { - org.apache.thrift.protocol.TList _list342 = iprot.readListBegin(); - _val341 = new ArrayList(_list342.size); - for (int _i343 = 0; _i343 < _list342.size; ++_i343) + org.apache.thrift.protocol.TList _list350 = iprot.readListBegin(); + _val349 = new ArrayList(_list350.size); + for (int _i351 = 0; _i351 < _list350.size; ++_i351) { - String _elem344; // required - _elem344 = iprot.readString(); - _val341.add(_elem344); + String _elem352; // optional + _elem352 = iprot.readString(); + _val349.add(_elem352); } iprot.readListEnd(); } - struct.success.put(_key340, _val341); + struct.success.put(_key348, _val349); } iprot.readMapEnd(); } @@ -28039,14 +28039,14 @@ public class Cassandra { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, struct.success.size())); - for (Map.Entry> _iter345 : struct.success.entrySet()) + for (Map.Entry> _iter353 : struct.success.entrySet()) { - oprot.writeString(_iter345.getKey()); + oprot.writeString(_iter353.getKey()); { - oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter345.getValue().size())); - for (String _iter346 : _iter345.getValue()) + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, _iter353.getValue().size())); + for (String _iter354 : _iter353.getValue()) { - oprot.writeString(_iter346); + oprot.writeString(_iter354); } oprot.writeListEnd(); } @@ -28088,14 +28088,14 @@ public class Cassandra { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry> _iter347 : struct.success.entrySet()) + for (Map.Entry> _iter355 : struct.success.entrySet()) { - oprot.writeString(_iter347.getKey()); + oprot.writeString(_iter355.getKey()); { - oprot.writeI32(_iter347.getValue().size()); - for (String _iter348 : _iter347.getValue()) + oprot.writeI32(_iter355.getValue().size()); + for (String _iter356 : _iter355.getValue()) { - oprot.writeString(_iter348); + oprot.writeString(_iter356); } } } @@ -28112,24 +28112,24 @@ public class Cassandra { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map349 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); - struct.success = new HashMap>(2*_map349.size); - for (int _i350 = 0; _i350 < _map349.size; ++_i350) + org.apache.thrift.protocol.TMap _map357 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.LIST, iprot.readI32()); + struct.success = new HashMap>(2*_map357.size); + for (int _i358 = 0; _i358 < _map357.size; ++_i358) { - String _key351; // required - List _val352; // required - _key351 = iprot.readString(); + String _key359; // required + List _val360; // required + _key359 = iprot.readString(); { - org.apache.thrift.protocol.TList _list353 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - _val352 = new ArrayList(_list353.size); - for (int _i354 = 0; _i354 < _list353.size; ++_i354) + org.apache.thrift.protocol.TList _list361 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + _val360 = new ArrayList(_list361.size); + for (int _i362 = 0; _i362 < _list361.size; ++_i362) { - String _elem355; // required - _elem355 = iprot.readString(); - _val352.add(_elem355); + String _elem363; // optional + _elem363 = iprot.readString(); + _val360.add(_elem363); } } - struct.success.put(_key351, _val352); + struct.success.put(_key359, _val360); } } struct.setSuccessIsSet(true); @@ -28790,14 +28790,14 @@ public class Cassandra { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list356 = iprot.readListBegin(); - struct.success = new ArrayList(_list356.size); - for (int _i357 = 0; _i357 < _list356.size; ++_i357) + org.apache.thrift.protocol.TList _list364 = iprot.readListBegin(); + struct.success = new ArrayList(_list364.size); + for (int _i365 = 0; _i365 < _list364.size; ++_i365) { - KsDef _elem358; // required - _elem358 = new KsDef(); - _elem358.read(iprot); - struct.success.add(_elem358); + KsDef _elem366; // optional + _elem366 = new KsDef(); + _elem366.read(iprot); + struct.success.add(_elem366); } iprot.readListEnd(); } @@ -28834,9 +28834,9 @@ public class Cassandra { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (KsDef _iter359 : struct.success) + for (KsDef _iter367 : struct.success) { - _iter359.write(oprot); + _iter367.write(oprot); } oprot.writeListEnd(); } @@ -28875,9 +28875,9 @@ public class Cassandra { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (KsDef _iter360 : struct.success) + for (KsDef _iter368 : struct.success) { - _iter360.write(oprot); + _iter368.write(oprot); } } } @@ -28892,14 +28892,14 @@ public class Cassandra { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list361 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list361.size); - for (int _i362 = 0; _i362 < _list361.size; ++_i362) + org.apache.thrift.protocol.TList _list369 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list369.size); + for (int _i370 = 0; _i370 < _list369.size; ++_i370) { - KsDef _elem363; // required - _elem363 = new KsDef(); - _elem363.read(iprot); - struct.success.add(_elem363); + KsDef _elem371; // optional + _elem371 = new KsDef(); + _elem371.read(iprot); + struct.success.add(_elem371); } } struct.setSuccessIsSet(true); @@ -30884,14 +30884,14 @@ public class Cassandra { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list364 = iprot.readListBegin(); - struct.success = new ArrayList(_list364.size); - for (int _i365 = 0; _i365 < _list364.size; ++_i365) + org.apache.thrift.protocol.TList _list372 = iprot.readListBegin(); + struct.success = new ArrayList(_list372.size); + for (int _i373 = 0; _i373 < _list372.size; ++_i373) { - TokenRange _elem366; // required - _elem366 = new TokenRange(); - _elem366.read(iprot); - struct.success.add(_elem366); + TokenRange _elem374; // optional + _elem374 = new TokenRange(); + _elem374.read(iprot); + struct.success.add(_elem374); } iprot.readListEnd(); } @@ -30928,9 +30928,9 @@ public class Cassandra { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (TokenRange _iter367 : struct.success) + for (TokenRange _iter375 : struct.success) { - _iter367.write(oprot); + _iter375.write(oprot); } oprot.writeListEnd(); } @@ -30969,9 +30969,9 @@ public class Cassandra { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (TokenRange _iter368 : struct.success) + for (TokenRange _iter376 : struct.success) { - _iter368.write(oprot); + _iter376.write(oprot); } } } @@ -30986,14 +30986,14 @@ public class Cassandra { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list369 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list369.size); - for (int _i370 = 0; _i370 < _list369.size; ++_i370) + org.apache.thrift.protocol.TList _list377 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list377.size); + for (int _i378 = 0; _i378 < _list377.size; ++_i378) { - TokenRange _elem371; // required - _elem371 = new TokenRange(); - _elem371.read(iprot); - struct.success.add(_elem371); + TokenRange _elem379; // optional + _elem379 = new TokenRange(); + _elem379.read(iprot); + struct.success.add(_elem379); } } struct.setSuccessIsSet(true); @@ -31659,15 +31659,15 @@ public class Cassandra { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map372 = iprot.readMapBegin(); - struct.success = new HashMap(2*_map372.size); - for (int _i373 = 0; _i373 < _map372.size; ++_i373) + org.apache.thrift.protocol.TMap _map380 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map380.size); + for (int _i381 = 0; _i381 < _map380.size; ++_i381) { - String _key374; // required - String _val375; // required - _key374 = iprot.readString(); - _val375 = iprot.readString(); - struct.success.put(_key374, _val375); + String _key382; // required + String _val383; // required + _key382 = iprot.readString(); + _val383 = iprot.readString(); + struct.success.put(_key382, _val383); } iprot.readMapEnd(); } @@ -31704,10 +31704,10 @@ public class Cassandra { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (Map.Entry _iter376 : struct.success.entrySet()) + for (Map.Entry _iter384 : struct.success.entrySet()) { - oprot.writeString(_iter376.getKey()); - oprot.writeString(_iter376.getValue()); + oprot.writeString(_iter384.getKey()); + oprot.writeString(_iter384.getValue()); } oprot.writeMapEnd(); } @@ -31746,10 +31746,10 @@ public class Cassandra { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (Map.Entry _iter377 : struct.success.entrySet()) + for (Map.Entry _iter385 : struct.success.entrySet()) { - oprot.writeString(_iter377.getKey()); - oprot.writeString(_iter377.getValue()); + oprot.writeString(_iter385.getKey()); + oprot.writeString(_iter385.getValue()); } } } @@ -31764,15 +31764,15 @@ public class Cassandra { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map378 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new HashMap(2*_map378.size); - for (int _i379 = 0; _i379 < _map378.size; ++_i379) + org.apache.thrift.protocol.TMap _map386 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new HashMap(2*_map386.size); + for (int _i387 = 0; _i387 < _map386.size; ++_i387) { - String _key380; // required - String _val381; // required - _key380 = iprot.readString(); - _val381 = iprot.readString(); - struct.success.put(_key380, _val381); + String _key388; // required + String _val389; // required + _key388 = iprot.readString(); + _val389 = iprot.readString(); + struct.success.put(_key388, _val389); } } struct.setSuccessIsSet(true); @@ -34993,13 +34993,13 @@ public class Cassandra { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list382 = iprot.readListBegin(); - struct.success = new ArrayList(_list382.size); - for (int _i383 = 0; _i383 < _list382.size; ++_i383) + org.apache.thrift.protocol.TList _list390 = iprot.readListBegin(); + struct.success = new ArrayList(_list390.size); + for (int _i391 = 0; _i391 < _list390.size; ++_i391) { - String _elem384; // required - _elem384 = iprot.readString(); - struct.success.add(_elem384); + String _elem392; // optional + _elem392 = iprot.readString(); + struct.success.add(_elem392); } iprot.readListEnd(); } @@ -35036,9 +35036,9 @@ public class Cassandra { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); - for (String _iter385 : struct.success) + for (String _iter393 : struct.success) { - oprot.writeString(_iter385); + oprot.writeString(_iter393); } oprot.writeListEnd(); } @@ -35077,9 +35077,9 @@ public class Cassandra { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (String _iter386 : struct.success) + for (String _iter394 : struct.success) { - oprot.writeString(_iter386); + oprot.writeString(_iter394); } } } @@ -35094,13 +35094,13 @@ public class Cassandra { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list387 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.success = new ArrayList(_list387.size); - for (int _i388 = 0; _i388 < _list387.size; ++_i388) + org.apache.thrift.protocol.TList _list395 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list395.size); + for (int _i396 = 0; _i396 < _list395.size; ++_i396) { - String _elem389; // required - _elem389 = iprot.readString(); - struct.success.add(_elem389); + String _elem397; // optional + _elem397 = iprot.readString(); + struct.success.add(_elem397); } } struct.setSuccessIsSet(true); @@ -36789,14 +36789,14 @@ public class Cassandra { case 0: // SUCCESS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list390 = iprot.readListBegin(); - struct.success = new ArrayList(_list390.size); - for (int _i391 = 0; _i391 < _list390.size; ++_i391) + org.apache.thrift.protocol.TList _list398 = iprot.readListBegin(); + struct.success = new ArrayList(_list398.size); + for (int _i399 = 0; _i399 < _list398.size; ++_i399) { - CfSplit _elem392; // required - _elem392 = new CfSplit(); - _elem392.read(iprot); - struct.success.add(_elem392); + CfSplit _elem400; // optional + _elem400 = new CfSplit(); + _elem400.read(iprot); + struct.success.add(_elem400); } iprot.readListEnd(); } @@ -36833,9 +36833,9 @@ public class Cassandra { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); - for (CfSplit _iter393 : struct.success) + for (CfSplit _iter401 : struct.success) { - _iter393.write(oprot); + _iter401.write(oprot); } oprot.writeListEnd(); } @@ -36874,9 +36874,9 @@ public class Cassandra { if (struct.isSetSuccess()) { { oprot.writeI32(struct.success.size()); - for (CfSplit _iter394 : struct.success) + for (CfSplit _iter402 : struct.success) { - _iter394.write(oprot); + _iter402.write(oprot); } } } @@ -36891,14 +36891,14 @@ public class Cassandra { BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list395 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.success = new ArrayList(_list395.size); - for (int _i396 = 0; _i396 < _list395.size; ++_i396) + org.apache.thrift.protocol.TList _list403 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list403.size); + for (int _i404 = 0; _i404 < _list403.size; ++_i404) { - CfSplit _elem397; // required - _elem397 = new CfSplit(); - _elem397.read(iprot); - struct.success.add(_elem397); + CfSplit _elem405; // optional + _elem405 = new CfSplit(); + _elem405.read(iprot); + struct.success.add(_elem405); } } struct.setSuccessIsSet(true); @@ -47498,13 +47498,13 @@ public class Cassandra { case 2: // VALUES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list398 = iprot.readListBegin(); - struct.values = new ArrayList(_list398.size); - for (int _i399 = 0; _i399 < _list398.size; ++_i399) + org.apache.thrift.protocol.TList _list406 = iprot.readListBegin(); + struct.values = new ArrayList(_list406.size); + for (int _i407 = 0; _i407 < _list406.size; ++_i407) { - ByteBuffer _elem400; // required - _elem400 = iprot.readBinary(); - struct.values.add(_elem400); + ByteBuffer _elem408; // optional + _elem408 = iprot.readBinary(); + struct.values.add(_elem408); } iprot.readListEnd(); } @@ -47538,9 +47538,9 @@ public class Cassandra { oprot.writeFieldBegin(VALUES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size())); - for (ByteBuffer _iter401 : struct.values) + for (ByteBuffer _iter409 : struct.values) { - oprot.writeBinary(_iter401); + oprot.writeBinary(_iter409); } oprot.writeListEnd(); } @@ -47566,9 +47566,9 @@ public class Cassandra { oprot.writeI32(struct.itemId); { oprot.writeI32(struct.values.size()); - for (ByteBuffer _iter402 : struct.values) + for (ByteBuffer _iter410 : struct.values) { - oprot.writeBinary(_iter402); + oprot.writeBinary(_iter410); } } } @@ -47579,13 +47579,13 @@ public class Cassandra { struct.itemId = iprot.readI32(); struct.setItemIdIsSet(true); { - org.apache.thrift.protocol.TList _list403 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.values = new ArrayList(_list403.size); - for (int _i404 = 0; _i404 < _list403.size; ++_i404) + org.apache.thrift.protocol.TList _list411 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.values = new ArrayList(_list411.size); + for (int _i412 = 0; _i412 < _list411.size; ++_i412) { - ByteBuffer _elem405; // required - _elem405 = iprot.readBinary(); - struct.values.add(_elem405); + ByteBuffer _elem413; // optional + _elem413 = iprot.readBinary(); + struct.values.add(_elem413); } } struct.setValuesIsSet(true); @@ -48901,13 +48901,13 @@ public class Cassandra { case 2: // VALUES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list406 = iprot.readListBegin(); - struct.values = new ArrayList(_list406.size); - for (int _i407 = 0; _i407 < _list406.size; ++_i407) + org.apache.thrift.protocol.TList _list414 = iprot.readListBegin(); + struct.values = new ArrayList(_list414.size); + for (int _i415 = 0; _i415 < _list414.size; ++_i415) { - ByteBuffer _elem408; // required - _elem408 = iprot.readBinary(); - struct.values.add(_elem408); + ByteBuffer _elem416; // optional + _elem416 = iprot.readBinary(); + struct.values.add(_elem416); } iprot.readListEnd(); } @@ -48949,9 +48949,9 @@ public class Cassandra { oprot.writeFieldBegin(VALUES_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size())); - for (ByteBuffer _iter409 : struct.values) + for (ByteBuffer _iter417 : struct.values) { - oprot.writeBinary(_iter409); + oprot.writeBinary(_iter417); } oprot.writeListEnd(); } @@ -48982,9 +48982,9 @@ public class Cassandra { oprot.writeI32(struct.itemId); { oprot.writeI32(struct.values.size()); - for (ByteBuffer _iter410 : struct.values) + for (ByteBuffer _iter418 : struct.values) { - oprot.writeBinary(_iter410); + oprot.writeBinary(_iter418); } } oprot.writeI32(struct.consistency.getValue()); @@ -48996,13 +48996,13 @@ public class Cassandra { struct.itemId = iprot.readI32(); struct.setItemIdIsSet(true); { - org.apache.thrift.protocol.TList _list411 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.values = new ArrayList(_list411.size); - for (int _i412 = 0; _i412 < _list411.size; ++_i412) + org.apache.thrift.protocol.TList _list419 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.values = new ArrayList(_list419.size); + for (int _i420 = 0; _i420 < _list419.size; ++_i420) { - ByteBuffer _elem413; // required - _elem413 = iprot.readBinary(); - struct.values.add(_elem413); + ByteBuffer _elem421; // optional + _elem421 = iprot.readBinary(); + struct.values.add(_elem421); } } struct.setValuesIsSet(true); diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java index 09add15b92..2155b8e01e 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/CfDef.java @@ -82,6 +82,7 @@ public class CfDef implements org.apache.thrift.TBase, jav private static final org.apache.thrift.protocol.TField DEFAULT_TIME_TO_LIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("default_time_to_live", org.apache.thrift.protocol.TType.I32, (short)40); private static final org.apache.thrift.protocol.TField INDEX_INTERVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("index_interval", org.apache.thrift.protocol.TType.I32, (short)41); private static final org.apache.thrift.protocol.TField SPECULATIVE_RETRY_FIELD_DESC = new org.apache.thrift.protocol.TField("speculative_retry", org.apache.thrift.protocol.TType.STRING, (short)42); + private static final org.apache.thrift.protocol.TField TRIGGER_CLASS_FIELD_DESC = new org.apache.thrift.protocol.TField("trigger_class", org.apache.thrift.protocol.TType.SET, (short)43); private static final org.apache.thrift.protocol.TField ROW_CACHE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("row_cache_size", org.apache.thrift.protocol.TType.DOUBLE, (short)9); private static final org.apache.thrift.protocol.TField KEY_CACHE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("key_cache_size", org.apache.thrift.protocol.TType.DOUBLE, (short)11); private static final org.apache.thrift.protocol.TField ROW_CACHE_SAVE_PERIOD_IN_SECONDS_FIELD_DESC = new org.apache.thrift.protocol.TField("row_cache_save_period_in_seconds", org.apache.thrift.protocol.TType.I32, (short)19); @@ -126,6 +127,7 @@ public class CfDef implements org.apache.thrift.TBase, jav public int default_time_to_live; // optional public int index_interval; // optional public String speculative_retry; // optional + public Set trigger_class; // optional /** * @deprecated */ @@ -196,6 +198,7 @@ public class CfDef implements org.apache.thrift.TBase, jav DEFAULT_TIME_TO_LIVE((short)40, "default_time_to_live"), INDEX_INTERVAL((short)41, "index_interval"), SPECULATIVE_RETRY((short)42, "speculative_retry"), + TRIGGER_CLASS((short)43, "trigger_class"), /** * @deprecated */ @@ -304,6 +307,8 @@ public class CfDef implements org.apache.thrift.TBase, jav return INDEX_INTERVAL; case 42: // SPECULATIVE_RETRY return SPECULATIVE_RETRY; + case 43: // TRIGGER_CLASS + return TRIGGER_CLASS; case 9: // ROW_CACHE_SIZE return ROW_CACHE_SIZE; case 11: // KEY_CACHE_SIZE @@ -386,7 +391,7 @@ public class CfDef implements org.apache.thrift.TBase, jav private static final int __MERGE_SHARDS_CHANCE_ISSET_ID = 19; private static final int __ROW_CACHE_KEYS_TO_SAVE_ISSET_ID = 20; private int __isset_bitfield = 0; - private _Fields optionals[] = {_Fields.COLUMN_TYPE,_Fields.COMPARATOR_TYPE,_Fields.SUBCOMPARATOR_TYPE,_Fields.COMMENT,_Fields.READ_REPAIR_CHANCE,_Fields.COLUMN_METADATA,_Fields.GC_GRACE_SECONDS,_Fields.DEFAULT_VALIDATION_CLASS,_Fields.ID,_Fields.MIN_COMPACTION_THRESHOLD,_Fields.MAX_COMPACTION_THRESHOLD,_Fields.REPLICATE_ON_WRITE,_Fields.KEY_VALIDATION_CLASS,_Fields.KEY_ALIAS,_Fields.COMPACTION_STRATEGY,_Fields.COMPACTION_STRATEGY_OPTIONS,_Fields.COMPRESSION_OPTIONS,_Fields.BLOOM_FILTER_FP_CHANCE,_Fields.CACHING,_Fields.DCLOCAL_READ_REPAIR_CHANCE,_Fields.POPULATE_IO_CACHE_ON_FLUSH,_Fields.MEMTABLE_FLUSH_PERIOD_IN_MS,_Fields.DEFAULT_TIME_TO_LIVE,_Fields.INDEX_INTERVAL,_Fields.SPECULATIVE_RETRY,_Fields.ROW_CACHE_SIZE,_Fields.KEY_CACHE_SIZE,_Fields.ROW_CACHE_SAVE_PERIOD_IN_SECONDS,_Fields.KEY_CACHE_SAVE_PERIOD_IN_SECONDS,_Fields.MEMTABLE_FLUSH_AFTER_MINS,_Fields.MEMTABLE_THROUGHPUT_IN_MB,_Fields.MEMTABLE_OPERATIONS_IN_MILLIONS,_Fields.MERGE_SHARDS_CHANCE,_Fields.ROW_CACHE_PROVIDER,_Fields.ROW_CACHE_KEYS_TO_SAVE}; + private _Fields optionals[] = {_Fields.COLUMN_TYPE,_Fields.COMPARATOR_TYPE,_Fields.SUBCOMPARATOR_TYPE,_Fields.COMMENT,_Fields.READ_REPAIR_CHANCE,_Fields.COLUMN_METADATA,_Fields.GC_GRACE_SECONDS,_Fields.DEFAULT_VALIDATION_CLASS,_Fields.ID,_Fields.MIN_COMPACTION_THRESHOLD,_Fields.MAX_COMPACTION_THRESHOLD,_Fields.REPLICATE_ON_WRITE,_Fields.KEY_VALIDATION_CLASS,_Fields.KEY_ALIAS,_Fields.COMPACTION_STRATEGY,_Fields.COMPACTION_STRATEGY_OPTIONS,_Fields.COMPRESSION_OPTIONS,_Fields.BLOOM_FILTER_FP_CHANCE,_Fields.CACHING,_Fields.DCLOCAL_READ_REPAIR_CHANCE,_Fields.POPULATE_IO_CACHE_ON_FLUSH,_Fields.MEMTABLE_FLUSH_PERIOD_IN_MS,_Fields.DEFAULT_TIME_TO_LIVE,_Fields.INDEX_INTERVAL,_Fields.SPECULATIVE_RETRY,_Fields.TRIGGER_CLASS,_Fields.ROW_CACHE_SIZE,_Fields.KEY_CACHE_SIZE,_Fields.ROW_CACHE_SAVE_PERIOD_IN_SECONDS,_Fields.KEY_CACHE_SAVE_PERIOD_IN_SECONDS,_Fields.MEMTABLE_FLUSH_AFTER_MINS,_Fields.MEMTABLE_THROUGHPUT_IN_MB,_Fields.MEMTABLE_OPERATIONS_IN_MILLIONS,_Fields.MERGE_SHARDS_CHANCE,_Fields.ROW_CACHE_PROVIDER,_Fields.ROW_CACHE_KEYS_TO_SAVE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -449,6 +454,9 @@ public class CfDef implements org.apache.thrift.TBase, jav new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); tmpMap.put(_Fields.SPECULATIVE_RETRY, new org.apache.thrift.meta_data.FieldMetaData("speculative_retry", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TRIGGER_CLASS, new org.apache.thrift.meta_data.FieldMetaData("trigger_class", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); tmpMap.put(_Fields.ROW_CACHE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("row_cache_size", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.KEY_CACHE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("key_cache_size", org.apache.thrift.TFieldRequirementType.OPTIONAL, @@ -586,6 +594,13 @@ public class CfDef implements org.apache.thrift.TBase, jav if (other.isSetSpeculative_retry()) { this.speculative_retry = other.speculative_retry; } + if (other.isSetTrigger_class()) { + Set __this__trigger_class = new HashSet(); + for (String other_element : other.trigger_class) { + __this__trigger_class.add(other_element); + } + this.trigger_class = __this__trigger_class; + } this.row_cache_size = other.row_cache_size; this.key_cache_size = other.key_cache_size; this.row_cache_save_period_in_seconds = other.row_cache_save_period_in_seconds; @@ -649,6 +664,7 @@ public class CfDef implements org.apache.thrift.TBase, jav this.index_interval = 0; this.speculative_retry = "NONE"; + this.trigger_class = null; setRow_cache_sizeIsSet(false); this.row_cache_size = 0.0; setKey_cache_sizeIsSet(false); @@ -1353,6 +1369,45 @@ public class CfDef implements org.apache.thrift.TBase, jav } } + public int getTrigger_classSize() { + return (this.trigger_class == null) ? 0 : this.trigger_class.size(); + } + + public java.util.Iterator getTrigger_classIterator() { + return (this.trigger_class == null) ? null : this.trigger_class.iterator(); + } + + public void addToTrigger_class(String elem) { + if (this.trigger_class == null) { + this.trigger_class = new HashSet(); + } + this.trigger_class.add(elem); + } + + public Set getTrigger_class() { + return this.trigger_class; + } + + public CfDef setTrigger_class(Set trigger_class) { + this.trigger_class = trigger_class; + return this; + } + + public void unsetTrigger_class() { + this.trigger_class = null; + } + + /** Returns true if field trigger_class is set (has been assigned a value) and false otherwise */ + public boolean isSetTrigger_class() { + return this.trigger_class != null; + } + + public void setTrigger_classIsSet(boolean value) { + if (!value) { + this.trigger_class = null; + } + } + /** * @deprecated */ @@ -1862,6 +1917,14 @@ public class CfDef implements org.apache.thrift.TBase, jav } break; + case TRIGGER_CLASS: + if (value == null) { + unsetTrigger_class(); + } else { + setTrigger_class((Set)value); + } + break; + case ROW_CACHE_SIZE: if (value == null) { unsetRow_cache_size(); @@ -2028,6 +2091,9 @@ public class CfDef implements org.apache.thrift.TBase, jav case SPECULATIVE_RETRY: return getSpeculative_retry(); + case TRIGGER_CLASS: + return getTrigger_class(); + case ROW_CACHE_SIZE: return Double.valueOf(getRow_cache_size()); @@ -2123,6 +2189,8 @@ public class CfDef implements org.apache.thrift.TBase, jav return isSetIndex_interval(); case SPECULATIVE_RETRY: return isSetSpeculative_retry(); + case TRIGGER_CLASS: + return isSetTrigger_class(); case ROW_CACHE_SIZE: return isSetRow_cache_size(); case KEY_CACHE_SIZE: @@ -2403,6 +2471,15 @@ public class CfDef implements org.apache.thrift.TBase, jav return false; } + boolean this_present_trigger_class = true && this.isSetTrigger_class(); + boolean that_present_trigger_class = true && that.isSetTrigger_class(); + if (this_present_trigger_class || that_present_trigger_class) { + if (!(this_present_trigger_class && that_present_trigger_class)) + return false; + if (!this.trigger_class.equals(that.trigger_class)) + return false; + } + boolean this_present_row_cache_size = true && this.isSetRow_cache_size(); boolean that_present_row_cache_size = true && that.isSetRow_cache_size(); if (this_present_row_cache_size || that_present_row_cache_size) { @@ -2635,6 +2712,11 @@ public class CfDef implements org.apache.thrift.TBase, jav if (present_speculative_retry) builder.append(speculative_retry); + boolean present_trigger_class = true && (isSetTrigger_class()); + builder.append(present_trigger_class); + if (present_trigger_class) + builder.append(trigger_class); + boolean present_row_cache_size = true && (isSetRow_cache_size()); builder.append(present_row_cache_size); if (present_row_cache_size) @@ -2966,6 +3048,16 @@ public class CfDef implements org.apache.thrift.TBase, jav return lastComparison; } } + lastComparison = Boolean.valueOf(isSetTrigger_class()).compareTo(typedOther.isSetTrigger_class()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTrigger_class()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trigger_class, typedOther.trigger_class); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetRow_cache_size()).compareTo(typedOther.isSetRow_cache_size()); if (lastComparison != 0) { return lastComparison; @@ -3303,6 +3395,16 @@ public class CfDef implements org.apache.thrift.TBase, jav } first = false; } + if (isSetTrigger_class()) { + if (!first) sb.append(", "); + sb.append("trigger_class:"); + if (this.trigger_class == null) { + sb.append("null"); + } else { + sb.append(this.trigger_class); + } + first = false; + } if (isSetRow_cache_size()) { if (!first) sb.append(", "); sb.append("row_cache_size:"); @@ -3481,7 +3583,7 @@ public class CfDef implements org.apache.thrift.TBase, jav struct.column_metadata = new ArrayList(_list92.size); for (int _i93 = 0; _i93 < _list92.size; ++_i93) { - ColumnDef _elem94; // required + ColumnDef _elem94; // optional _elem94 = new ColumnDef(); _elem94.read(iprot); struct.column_metadata.add(_elem94); @@ -3669,6 +3771,24 @@ public class CfDef implements org.apache.thrift.TBase, jav org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 43: // TRIGGER_CLASS + if (schemeField.type == org.apache.thrift.protocol.TType.SET) { + { + org.apache.thrift.protocol.TSet _set103 = iprot.readSetBegin(); + struct.trigger_class = new HashSet(2*_set103.size); + for (int _i104 = 0; _i104 < _set103.size; ++_i104) + { + String _elem105; // optional + _elem105 = iprot.readString(); + struct.trigger_class.add(_elem105); + } + iprot.readSetEnd(); + } + struct.setTrigger_classIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; case 9: // ROW_CACHE_SIZE if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.row_cache_size = iprot.readDouble(); @@ -3822,9 +3942,9 @@ public class CfDef implements org.apache.thrift.TBase, jav oprot.writeFieldBegin(COLUMN_METADATA_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.column_metadata.size())); - for (ColumnDef _iter103 : struct.column_metadata) + for (ColumnDef _iter106 : struct.column_metadata) { - _iter103.write(oprot); + _iter106.write(oprot); } oprot.writeListEnd(); } @@ -3926,10 +4046,10 @@ public class CfDef implements org.apache.thrift.TBase, jav oprot.writeFieldBegin(COMPACTION_STRATEGY_OPTIONS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.compaction_strategy_options.size())); - for (Map.Entry _iter104 : struct.compaction_strategy_options.entrySet()) + for (Map.Entry _iter107 : struct.compaction_strategy_options.entrySet()) { - oprot.writeString(_iter104.getKey()); - oprot.writeString(_iter104.getValue()); + oprot.writeString(_iter107.getKey()); + oprot.writeString(_iter107.getValue()); } oprot.writeMapEnd(); } @@ -3946,10 +4066,10 @@ public class CfDef implements org.apache.thrift.TBase, jav oprot.writeFieldBegin(COMPRESSION_OPTIONS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.compression_options.size())); - for (Map.Entry _iter105 : struct.compression_options.entrySet()) + for (Map.Entry _iter108 : struct.compression_options.entrySet()) { - oprot.writeString(_iter105.getKey()); - oprot.writeString(_iter105.getValue()); + oprot.writeString(_iter108.getKey()); + oprot.writeString(_iter108.getValue()); } oprot.writeMapEnd(); } @@ -4000,6 +4120,20 @@ public class CfDef implements org.apache.thrift.TBase, jav oprot.writeFieldEnd(); } } + if (struct.trigger_class != null) { + if (struct.isSetTrigger_class()) { + oprot.writeFieldBegin(TRIGGER_CLASS_FIELD_DESC); + { + oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.trigger_class.size())); + for (String _iter109 : struct.trigger_class) + { + oprot.writeString(_iter109); + } + oprot.writeSetEnd(); + } + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -4095,37 +4229,40 @@ public class CfDef implements org.apache.thrift.TBase, jav if (struct.isSetSpeculative_retry()) { optionals.set(24); } - if (struct.isSetRow_cache_size()) { + if (struct.isSetTrigger_class()) { optionals.set(25); } - if (struct.isSetKey_cache_size()) { + if (struct.isSetRow_cache_size()) { optionals.set(26); } - if (struct.isSetRow_cache_save_period_in_seconds()) { + if (struct.isSetKey_cache_size()) { optionals.set(27); } - if (struct.isSetKey_cache_save_period_in_seconds()) { + if (struct.isSetRow_cache_save_period_in_seconds()) { optionals.set(28); } - if (struct.isSetMemtable_flush_after_mins()) { + if (struct.isSetKey_cache_save_period_in_seconds()) { optionals.set(29); } - if (struct.isSetMemtable_throughput_in_mb()) { + if (struct.isSetMemtable_flush_after_mins()) { optionals.set(30); } - if (struct.isSetMemtable_operations_in_millions()) { + if (struct.isSetMemtable_throughput_in_mb()) { optionals.set(31); } - if (struct.isSetMerge_shards_chance()) { + if (struct.isSetMemtable_operations_in_millions()) { optionals.set(32); } - if (struct.isSetRow_cache_provider()) { + if (struct.isSetMerge_shards_chance()) { optionals.set(33); } - if (struct.isSetRow_cache_keys_to_save()) { + if (struct.isSetRow_cache_provider()) { optionals.set(34); } - oprot.writeBitSet(optionals, 35); + if (struct.isSetRow_cache_keys_to_save()) { + optionals.set(35); + } + oprot.writeBitSet(optionals, 36); if (struct.isSetColumn_type()) { oprot.writeString(struct.column_type); } @@ -4144,9 +4281,9 @@ public class CfDef implements org.apache.thrift.TBase, jav if (struct.isSetColumn_metadata()) { { oprot.writeI32(struct.column_metadata.size()); - for (ColumnDef _iter106 : struct.column_metadata) + for (ColumnDef _iter110 : struct.column_metadata) { - _iter106.write(oprot); + _iter110.write(oprot); } } } @@ -4180,20 +4317,20 @@ public class CfDef implements org.apache.thrift.TBase, jav if (struct.isSetCompaction_strategy_options()) { { oprot.writeI32(struct.compaction_strategy_options.size()); - for (Map.Entry _iter107 : struct.compaction_strategy_options.entrySet()) + for (Map.Entry _iter111 : struct.compaction_strategy_options.entrySet()) { - oprot.writeString(_iter107.getKey()); - oprot.writeString(_iter107.getValue()); + oprot.writeString(_iter111.getKey()); + oprot.writeString(_iter111.getValue()); } } } if (struct.isSetCompression_options()) { { oprot.writeI32(struct.compression_options.size()); - for (Map.Entry _iter108 : struct.compression_options.entrySet()) + for (Map.Entry _iter112 : struct.compression_options.entrySet()) { - oprot.writeString(_iter108.getKey()); - oprot.writeString(_iter108.getValue()); + oprot.writeString(_iter112.getKey()); + oprot.writeString(_iter112.getValue()); } } } @@ -4221,6 +4358,15 @@ public class CfDef implements org.apache.thrift.TBase, jav if (struct.isSetSpeculative_retry()) { oprot.writeString(struct.speculative_retry); } + if (struct.isSetTrigger_class()) { + { + oprot.writeI32(struct.trigger_class.size()); + for (String _iter113 : struct.trigger_class) + { + oprot.writeString(_iter113); + } + } + } if (struct.isSetRow_cache_size()) { oprot.writeDouble(struct.row_cache_size); } @@ -4260,7 +4406,7 @@ public class CfDef implements org.apache.thrift.TBase, jav struct.setKeyspaceIsSet(true); struct.name = iprot.readString(); struct.setNameIsSet(true); - BitSet incoming = iprot.readBitSet(35); + BitSet incoming = iprot.readBitSet(36); if (incoming.get(0)) { struct.column_type = iprot.readString(); struct.setColumn_typeIsSet(true); @@ -4283,14 +4429,14 @@ public class CfDef implements org.apache.thrift.TBase, jav } if (incoming.get(5)) { { - org.apache.thrift.protocol.TList _list109 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.column_metadata = new ArrayList(_list109.size); - for (int _i110 = 0; _i110 < _list109.size; ++_i110) + org.apache.thrift.protocol.TList _list114 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.column_metadata = new ArrayList(_list114.size); + for (int _i115 = 0; _i115 < _list114.size; ++_i115) { - ColumnDef _elem111; // required - _elem111 = new ColumnDef(); - _elem111.read(iprot); - struct.column_metadata.add(_elem111); + ColumnDef _elem116; // optional + _elem116 = new ColumnDef(); + _elem116.read(iprot); + struct.column_metadata.add(_elem116); } } struct.setColumn_metadataIsSet(true); @@ -4333,30 +4479,30 @@ public class CfDef implements org.apache.thrift.TBase, jav } if (incoming.get(15)) { { - org.apache.thrift.protocol.TMap _map112 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.compaction_strategy_options = new HashMap(2*_map112.size); - for (int _i113 = 0; _i113 < _map112.size; ++_i113) + org.apache.thrift.protocol.TMap _map117 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.compaction_strategy_options = new HashMap(2*_map117.size); + for (int _i118 = 0; _i118 < _map117.size; ++_i118) { - String _key114; // required - String _val115; // required - _key114 = iprot.readString(); - _val115 = iprot.readString(); - struct.compaction_strategy_options.put(_key114, _val115); + String _key119; // required + String _val120; // required + _key119 = iprot.readString(); + _val120 = iprot.readString(); + struct.compaction_strategy_options.put(_key119, _val120); } } struct.setCompaction_strategy_optionsIsSet(true); } if (incoming.get(16)) { { - org.apache.thrift.protocol.TMap _map116 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.compression_options = new HashMap(2*_map116.size); - for (int _i117 = 0; _i117 < _map116.size; ++_i117) + org.apache.thrift.protocol.TMap _map121 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.compression_options = new HashMap(2*_map121.size); + for (int _i122 = 0; _i122 < _map121.size; ++_i122) { - String _key118; // required - String _val119; // required - _key118 = iprot.readString(); - _val119 = iprot.readString(); - struct.compression_options.put(_key118, _val119); + String _key123; // required + String _val124; // required + _key123 = iprot.readString(); + _val124 = iprot.readString(); + struct.compression_options.put(_key123, _val124); } } struct.setCompression_optionsIsSet(true); @@ -4394,42 +4540,55 @@ public class CfDef implements org.apache.thrift.TBase, jav struct.setSpeculative_retryIsSet(true); } if (incoming.get(25)) { + { + org.apache.thrift.protocol.TSet _set125 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.trigger_class = new HashSet(2*_set125.size); + for (int _i126 = 0; _i126 < _set125.size; ++_i126) + { + String _elem127; // optional + _elem127 = iprot.readString(); + struct.trigger_class.add(_elem127); + } + } + struct.setTrigger_classIsSet(true); + } + if (incoming.get(26)) { struct.row_cache_size = iprot.readDouble(); struct.setRow_cache_sizeIsSet(true); } - if (incoming.get(26)) { + if (incoming.get(27)) { struct.key_cache_size = iprot.readDouble(); struct.setKey_cache_sizeIsSet(true); } - if (incoming.get(27)) { + if (incoming.get(28)) { struct.row_cache_save_period_in_seconds = iprot.readI32(); struct.setRow_cache_save_period_in_secondsIsSet(true); } - if (incoming.get(28)) { + if (incoming.get(29)) { struct.key_cache_save_period_in_seconds = iprot.readI32(); struct.setKey_cache_save_period_in_secondsIsSet(true); } - if (incoming.get(29)) { + if (incoming.get(30)) { struct.memtable_flush_after_mins = iprot.readI32(); struct.setMemtable_flush_after_minsIsSet(true); } - if (incoming.get(30)) { + if (incoming.get(31)) { struct.memtable_throughput_in_mb = iprot.readI32(); struct.setMemtable_throughput_in_mbIsSet(true); } - if (incoming.get(31)) { + if (incoming.get(32)) { struct.memtable_operations_in_millions = iprot.readDouble(); struct.setMemtable_operations_in_millionsIsSet(true); } - if (incoming.get(32)) { + if (incoming.get(33)) { struct.merge_shards_chance = iprot.readDouble(); struct.setMerge_shards_chanceIsSet(true); } - if (incoming.get(33)) { + if (incoming.get(34)) { struct.row_cache_provider = iprot.readString(); struct.setRow_cache_providerIsSet(true); } - if (incoming.get(34)) { + if (incoming.get(35)) { struct.row_cache_keys_to_save = iprot.readI32(); struct.setRow_cache_keys_to_saveIsSet(true); } diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterSuperColumn.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterSuperColumn.java index ea719cc908..f9bccfe9b4 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterSuperColumn.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/CounterSuperColumn.java @@ -479,7 +479,7 @@ public class CounterSuperColumn implements org.apache.thrift.TBase(_list8.size); for (int _i9 = 0; _i9 < _list8.size; ++_i9) { - CounterColumn _elem10; // required + CounterColumn _elem10; // optional _elem10 = new CounterColumn(); _elem10.read(iprot); struct.columns.add(_elem10); @@ -560,7 +560,7 @@ public class CounterSuperColumn implements org.apache.thrift.TBase(_list13.size); for (int _i14 = 0; _i14 < _list13.size; ++_i14) { - CounterColumn _elem15; // required + CounterColumn _elem15; // optional _elem15 = new CounterColumn(); _elem15.read(iprot); struct.columns.add(_elem15); diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlMetadata.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlMetadata.java index 6af8e9e547..6b6033733e 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlMetadata.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlMetadata.java @@ -658,15 +658,15 @@ public class CqlMetadata implements org.apache.thrift.TBase(2*_map146.size); - for (int _i147 = 0; _i147 < _map146.size; ++_i147) + org.apache.thrift.protocol.TMap _map154 = iprot.readMapBegin(); + struct.name_types = new HashMap(2*_map154.size); + for (int _i155 = 0; _i155 < _map154.size; ++_i155) { - ByteBuffer _key148; // required - String _val149; // required - _key148 = iprot.readBinary(); - _val149 = iprot.readString(); - struct.name_types.put(_key148, _val149); + ByteBuffer _key156; // required + String _val157; // required + _key156 = iprot.readBinary(); + _val157 = iprot.readString(); + struct.name_types.put(_key156, _val157); } iprot.readMapEnd(); } @@ -678,15 +678,15 @@ public class CqlMetadata implements org.apache.thrift.TBase(2*_map150.size); - for (int _i151 = 0; _i151 < _map150.size; ++_i151) + org.apache.thrift.protocol.TMap _map158 = iprot.readMapBegin(); + struct.value_types = new HashMap(2*_map158.size); + for (int _i159 = 0; _i159 < _map158.size; ++_i159) { - ByteBuffer _key152; // required - String _val153; // required - _key152 = iprot.readBinary(); - _val153 = iprot.readString(); - struct.value_types.put(_key152, _val153); + ByteBuffer _key160; // required + String _val161; // required + _key160 = iprot.readBinary(); + _val161 = iprot.readString(); + struct.value_types.put(_key160, _val161); } iprot.readMapEnd(); } @@ -730,10 +730,10 @@ public class CqlMetadata implements org.apache.thrift.TBase _iter154 : struct.name_types.entrySet()) + for (Map.Entry _iter162 : struct.name_types.entrySet()) { - oprot.writeBinary(_iter154.getKey()); - oprot.writeString(_iter154.getValue()); + oprot.writeBinary(_iter162.getKey()); + oprot.writeString(_iter162.getValue()); } oprot.writeMapEnd(); } @@ -743,10 +743,10 @@ public class CqlMetadata implements org.apache.thrift.TBase _iter155 : struct.value_types.entrySet()) + for (Map.Entry _iter163 : struct.value_types.entrySet()) { - oprot.writeBinary(_iter155.getKey()); - oprot.writeString(_iter155.getValue()); + oprot.writeBinary(_iter163.getKey()); + oprot.writeString(_iter163.getValue()); } oprot.writeMapEnd(); } @@ -781,18 +781,18 @@ public class CqlMetadata implements org.apache.thrift.TBase _iter156 : struct.name_types.entrySet()) + for (Map.Entry _iter164 : struct.name_types.entrySet()) { - oprot.writeBinary(_iter156.getKey()); - oprot.writeString(_iter156.getValue()); + oprot.writeBinary(_iter164.getKey()); + oprot.writeString(_iter164.getValue()); } } { oprot.writeI32(struct.value_types.size()); - for (Map.Entry _iter157 : struct.value_types.entrySet()) + for (Map.Entry _iter165 : struct.value_types.entrySet()) { - oprot.writeBinary(_iter157.getKey()); - oprot.writeString(_iter157.getValue()); + oprot.writeBinary(_iter165.getKey()); + oprot.writeString(_iter165.getValue()); } } oprot.writeString(struct.default_name_type); @@ -803,28 +803,28 @@ public class CqlMetadata implements org.apache.thrift.TBase(2*_map158.size); - for (int _i159 = 0; _i159 < _map158.size; ++_i159) + org.apache.thrift.protocol.TMap _map166 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.name_types = new HashMap(2*_map166.size); + for (int _i167 = 0; _i167 < _map166.size; ++_i167) { - ByteBuffer _key160; // required - String _val161; // required - _key160 = iprot.readBinary(); - _val161 = iprot.readString(); - struct.name_types.put(_key160, _val161); + ByteBuffer _key168; // required + String _val169; // required + _key168 = iprot.readBinary(); + _val169 = iprot.readString(); + struct.name_types.put(_key168, _val169); } } struct.setName_typesIsSet(true); { - org.apache.thrift.protocol.TMap _map162 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.value_types = new HashMap(2*_map162.size); - for (int _i163 = 0; _i163 < _map162.size; ++_i163) + org.apache.thrift.protocol.TMap _map170 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.value_types = new HashMap(2*_map170.size); + for (int _i171 = 0; _i171 < _map170.size; ++_i171) { - ByteBuffer _key164; // required - String _val165; // required - _key164 = iprot.readBinary(); - _val165 = iprot.readString(); - struct.value_types.put(_key164, _val165); + ByteBuffer _key172; // required + String _val173; // required + _key172 = iprot.readBinary(); + _val173 = iprot.readString(); + struct.value_types.put(_key172, _val173); } } struct.setValue_typesIsSet(true); diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlPreparedResult.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlPreparedResult.java index 7d3460c4e9..8f9146b49a 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlPreparedResult.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlPreparedResult.java @@ -649,13 +649,13 @@ public class CqlPreparedResult implements org.apache.thrift.TBase(_list174.size); - for (int _i175 = 0; _i175 < _list174.size; ++_i175) + org.apache.thrift.protocol.TList _list182 = iprot.readListBegin(); + struct.variable_types = new ArrayList(_list182.size); + for (int _i183 = 0; _i183 < _list182.size; ++_i183) { - String _elem176; // required - _elem176 = iprot.readString(); - struct.variable_types.add(_elem176); + String _elem184; // optional + _elem184 = iprot.readString(); + struct.variable_types.add(_elem184); } iprot.readListEnd(); } @@ -667,13 +667,13 @@ public class CqlPreparedResult implements org.apache.thrift.TBase(_list177.size); - for (int _i178 = 0; _i178 < _list177.size; ++_i178) + org.apache.thrift.protocol.TList _list185 = iprot.readListBegin(); + struct.variable_names = new ArrayList(_list185.size); + for (int _i186 = 0; _i186 < _list185.size; ++_i186) { - String _elem179; // required - _elem179 = iprot.readString(); - struct.variable_names.add(_elem179); + String _elem187; // optional + _elem187 = iprot.readString(); + struct.variable_names.add(_elem187); } iprot.readListEnd(); } @@ -714,9 +714,9 @@ public class CqlPreparedResult implements org.apache.thrift.TBase(_list184.size); - for (int _i185 = 0; _i185 < _list184.size; ++_i185) + org.apache.thrift.protocol.TList _list192 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.variable_types = new ArrayList(_list192.size); + for (int _i193 = 0; _i193 < _list192.size; ++_i193) { - String _elem186; // required - _elem186 = iprot.readString(); - struct.variable_types.add(_elem186); + String _elem194; // optional + _elem194 = iprot.readString(); + struct.variable_types.add(_elem194); } } struct.setVariable_typesIsSet(true); } if (incoming.get(1)) { { - org.apache.thrift.protocol.TList _list187 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.variable_names = new ArrayList(_list187.size); - for (int _i188 = 0; _i188 < _list187.size; ++_i188) + org.apache.thrift.protocol.TList _list195 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.variable_names = new ArrayList(_list195.size); + for (int _i196 = 0; _i196 < _list195.size; ++_i196) { - String _elem189; // required - _elem189 = iprot.readString(); - struct.variable_names.add(_elem189); + String _elem197; // optional + _elem197 = iprot.readString(); + struct.variable_names.add(_elem197); } } struct.setVariable_namesIsSet(true); diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlResult.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlResult.java index 53afbaa80f..0ef02f7cb2 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlResult.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlResult.java @@ -644,14 +644,14 @@ public class CqlResult implements org.apache.thrift.TBase(_list166.size); - for (int _i167 = 0; _i167 < _list166.size; ++_i167) + org.apache.thrift.protocol.TList _list174 = iprot.readListBegin(); + struct.rows = new ArrayList(_list174.size); + for (int _i175 = 0; _i175 < _list174.size; ++_i175) { - CqlRow _elem168; // required - _elem168 = new CqlRow(); - _elem168.read(iprot); - struct.rows.add(_elem168); + CqlRow _elem176; // optional + _elem176 = new CqlRow(); + _elem176.read(iprot); + struct.rows.add(_elem176); } iprot.readListEnd(); } @@ -702,9 +702,9 @@ public class CqlResult implements org.apache.thrift.TBase(_list171.size); - for (int _i172 = 0; _i172 < _list171.size; ++_i172) + org.apache.thrift.protocol.TList _list179 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.rows = new ArrayList(_list179.size); + for (int _i180 = 0; _i180 < _list179.size; ++_i180) { - CqlRow _elem173; // required - _elem173 = new CqlRow(); - _elem173.read(iprot); - struct.rows.add(_elem173); + CqlRow _elem181; // optional + _elem181 = new CqlRow(); + _elem181.read(iprot); + struct.rows.add(_elem181); } } struct.setRowsIsSet(true); diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlRow.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlRow.java index 8fce2e1f14..d3816cc840 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlRow.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/CqlRow.java @@ -478,14 +478,14 @@ public class CqlRow implements org.apache.thrift.TBase, case 2: // COLUMNS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list138 = iprot.readListBegin(); - struct.columns = new ArrayList(_list138.size); - for (int _i139 = 0; _i139 < _list138.size; ++_i139) + org.apache.thrift.protocol.TList _list146 = iprot.readListBegin(); + struct.columns = new ArrayList(_list146.size); + for (int _i147 = 0; _i147 < _list146.size; ++_i147) { - Column _elem140; // required - _elem140 = new Column(); - _elem140.read(iprot); - struct.columns.add(_elem140); + Column _elem148; // optional + _elem148 = new Column(); + _elem148.read(iprot); + struct.columns.add(_elem148); } iprot.readListEnd(); } @@ -518,9 +518,9 @@ public class CqlRow implements org.apache.thrift.TBase, oprot.writeFieldBegin(COLUMNS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size())); - for (Column _iter141 : struct.columns) + for (Column _iter149 : struct.columns) { - _iter141.write(oprot); + _iter149.write(oprot); } oprot.writeListEnd(); } @@ -546,9 +546,9 @@ public class CqlRow implements org.apache.thrift.TBase, oprot.writeBinary(struct.key); { oprot.writeI32(struct.columns.size()); - for (Column _iter142 : struct.columns) + for (Column _iter150 : struct.columns) { - _iter142.write(oprot); + _iter150.write(oprot); } } } @@ -559,14 +559,14 @@ public class CqlRow implements org.apache.thrift.TBase, struct.key = iprot.readBinary(); struct.setKeyIsSet(true); { - org.apache.thrift.protocol.TList _list143 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.columns = new ArrayList(_list143.size); - for (int _i144 = 0; _i144 < _list143.size; ++_i144) + org.apache.thrift.protocol.TList _list151 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.columns = new ArrayList(_list151.size); + for (int _i152 = 0; _i152 < _list151.size; ++_i152) { - Column _elem145; // required - _elem145 = new Column(); - _elem145.read(iprot); - struct.columns.add(_elem145); + Column _elem153; // optional + _elem153 = new Column(); + _elem153.read(iprot); + struct.columns.add(_elem153); } } struct.setColumnsIsSet(true); diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java index 499a081152..3e1058fb41 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/IndexClause.java @@ -559,7 +559,7 @@ public class IndexClause implements org.apache.thrift.TBase(_list24.size); for (int _i25 = 0; _i25 < _list24.size; ++_i25) { - IndexExpression _elem26; // required + IndexExpression _elem26; // optional _elem26 = new IndexExpression(); _elem26.read(iprot); struct.expressions.add(_elem26); @@ -661,7 +661,7 @@ public class IndexClause implements org.apache.thrift.TBase(_list29.size); for (int _i30 = 0; _i30 < _list29.size; ++_i30) { - IndexExpression _elem31; // required + IndexExpression _elem31; // optional _elem31 = new IndexExpression(); _elem31.read(iprot); struct.expressions.add(_elem31); diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java index 243327ddbb..152444ec2b 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/KeyRange.java @@ -848,7 +848,7 @@ public class KeyRange implements org.apache.thrift.TBase(_list32.size); for (int _i33 = 0; _i33 < _list32.size; ++_i33) { - IndexExpression _elem34; // required + IndexExpression _elem34; // optional _elem34 = new IndexExpression(); _elem34.read(iprot); struct.row_filter.add(_elem34); @@ -1017,7 +1017,7 @@ public class KeyRange implements org.apache.thrift.TBase(_list37.size); for (int _i38 = 0; _i38 < _list37.size; ++_i38) { - IndexExpression _elem39; // required + IndexExpression _elem39; // optional _elem39 = new IndexExpression(); _elem39.read(iprot); struct.row_filter.add(_elem39); diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java index e7de670979..07a53d4f6a 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/KeySlice.java @@ -486,7 +486,7 @@ public class KeySlice implements org.apache.thrift.TBase(_list40.size); for (int _i41 = 0; _i41 < _list40.size; ++_i41) { - ColumnOrSuperColumn _elem42; // required + ColumnOrSuperColumn _elem42; // optional _elem42 = new ColumnOrSuperColumn(); _elem42.read(iprot); struct.columns.add(_elem42); @@ -567,7 +567,7 @@ public class KeySlice implements org.apache.thrift.TBase(_list45.size); for (int _i46 = 0; _i46 < _list45.size; ++_i46) { - ColumnOrSuperColumn _elem47; // required + ColumnOrSuperColumn _elem47; // optional _elem47 = new ColumnOrSuperColumn(); _elem47.read(iprot); struct.columns.add(_elem47); diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java index c1530a1698..f284680c5b 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/KsDef.java @@ -837,15 +837,15 @@ public class KsDef implements org.apache.thrift.TBase, jav case 3: // STRATEGY_OPTIONS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map120 = iprot.readMapBegin(); - struct.strategy_options = new HashMap(2*_map120.size); - for (int _i121 = 0; _i121 < _map120.size; ++_i121) + org.apache.thrift.protocol.TMap _map128 = iprot.readMapBegin(); + struct.strategy_options = new HashMap(2*_map128.size); + for (int _i129 = 0; _i129 < _map128.size; ++_i129) { - String _key122; // required - String _val123; // required - _key122 = iprot.readString(); - _val123 = iprot.readString(); - struct.strategy_options.put(_key122, _val123); + String _key130; // required + String _val131; // required + _key130 = iprot.readString(); + _val131 = iprot.readString(); + struct.strategy_options.put(_key130, _val131); } iprot.readMapEnd(); } @@ -865,14 +865,14 @@ public class KsDef implements org.apache.thrift.TBase, jav case 5: // CF_DEFS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list124 = iprot.readListBegin(); - struct.cf_defs = new ArrayList(_list124.size); - for (int _i125 = 0; _i125 < _list124.size; ++_i125) + org.apache.thrift.protocol.TList _list132 = iprot.readListBegin(); + struct.cf_defs = new ArrayList(_list132.size); + for (int _i133 = 0; _i133 < _list132.size; ++_i133) { - CfDef _elem126; // required - _elem126 = new CfDef(); - _elem126.read(iprot); - struct.cf_defs.add(_elem126); + CfDef _elem134; // optional + _elem134 = new CfDef(); + _elem134.read(iprot); + struct.cf_defs.add(_elem134); } iprot.readListEnd(); } @@ -919,10 +919,10 @@ public class KsDef implements org.apache.thrift.TBase, jav oprot.writeFieldBegin(STRATEGY_OPTIONS_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.strategy_options.size())); - for (Map.Entry _iter127 : struct.strategy_options.entrySet()) + for (Map.Entry _iter135 : struct.strategy_options.entrySet()) { - oprot.writeString(_iter127.getKey()); - oprot.writeString(_iter127.getValue()); + oprot.writeString(_iter135.getKey()); + oprot.writeString(_iter135.getValue()); } oprot.writeMapEnd(); } @@ -938,9 +938,9 @@ public class KsDef implements org.apache.thrift.TBase, jav oprot.writeFieldBegin(CF_DEFS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.cf_defs.size())); - for (CfDef _iter128 : struct.cf_defs) + for (CfDef _iter136 : struct.cf_defs) { - _iter128.write(oprot); + _iter136.write(oprot); } oprot.writeListEnd(); } @@ -972,9 +972,9 @@ public class KsDef implements org.apache.thrift.TBase, jav oprot.writeString(struct.strategy_class); { oprot.writeI32(struct.cf_defs.size()); - for (CfDef _iter129 : struct.cf_defs) + for (CfDef _iter137 : struct.cf_defs) { - _iter129.write(oprot); + _iter137.write(oprot); } } BitSet optionals = new BitSet(); @@ -991,10 +991,10 @@ public class KsDef implements org.apache.thrift.TBase, jav if (struct.isSetStrategy_options()) { { oprot.writeI32(struct.strategy_options.size()); - for (Map.Entry _iter130 : struct.strategy_options.entrySet()) + for (Map.Entry _iter138 : struct.strategy_options.entrySet()) { - oprot.writeString(_iter130.getKey()); - oprot.writeString(_iter130.getValue()); + oprot.writeString(_iter138.getKey()); + oprot.writeString(_iter138.getValue()); } } } @@ -1014,29 +1014,29 @@ public class KsDef implements org.apache.thrift.TBase, jav struct.strategy_class = iprot.readString(); struct.setStrategy_classIsSet(true); { - org.apache.thrift.protocol.TList _list131 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.cf_defs = new ArrayList(_list131.size); - for (int _i132 = 0; _i132 < _list131.size; ++_i132) + org.apache.thrift.protocol.TList _list139 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.cf_defs = new ArrayList(_list139.size); + for (int _i140 = 0; _i140 < _list139.size; ++_i140) { - CfDef _elem133; // required - _elem133 = new CfDef(); - _elem133.read(iprot); - struct.cf_defs.add(_elem133); + CfDef _elem141; // optional + _elem141 = new CfDef(); + _elem141.read(iprot); + struct.cf_defs.add(_elem141); } } struct.setCf_defsIsSet(true); BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { { - org.apache.thrift.protocol.TMap _map134 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.strategy_options = new HashMap(2*_map134.size); - for (int _i135 = 0; _i135 < _map134.size; ++_i135) + org.apache.thrift.protocol.TMap _map142 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.strategy_options = new HashMap(2*_map142.size); + for (int _i143 = 0; _i143 < _map142.size; ++_i143) { - String _key136; // required - String _val137; // required - _key136 = iprot.readString(); - _val137 = iprot.readString(); - struct.strategy_options.put(_key136, _val137); + String _key144; // required + String _val145; // required + _key144 = iprot.readString(); + _val145 = iprot.readString(); + struct.strategy_options.put(_key144, _val145); } } struct.setStrategy_optionsIsSet(true); diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/SlicePredicate.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/SlicePredicate.java index 0624e93e7f..1a3dfd5d28 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/SlicePredicate.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/SlicePredicate.java @@ -467,7 +467,7 @@ public class SlicePredicate implements org.apache.thrift.TBase(_list16.size); for (int _i17 = 0; _i17 < _list16.size; ++_i17) { - ByteBuffer _elem18; // required + ByteBuffer _elem18; // optional _elem18 = iprot.readBinary(); struct.column_names.add(_elem18); } @@ -572,7 +572,7 @@ public class SlicePredicate implements org.apache.thrift.TBase(_list21.size); for (int _i22 = 0; _i22 < _list21.size; ++_i22) { - ByteBuffer _elem23; // required + ByteBuffer _elem23; // optional _elem23 = iprot.readBinary(); struct.column_names.add(_elem23); } diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java index 3a30a215e7..aa14815140 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java @@ -485,7 +485,7 @@ public class SuperColumn implements org.apache.thrift.TBase(_list0.size); for (int _i1 = 0; _i1 < _list0.size; ++_i1) { - Column _elem2; // required + Column _elem2; // optional _elem2 = new Column(); _elem2.read(iprot); struct.columns.add(_elem2); @@ -566,7 +566,7 @@ public class SuperColumn implements org.apache.thrift.TBase(_list5.size); for (int _i6 = 0; _i6 < _list5.size; ++_i6) { - Column _elem7; // required + Column _elem7; // optional _elem7 = new Column(); _elem7.read(iprot); struct.columns.add(_elem7); diff --git a/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.java b/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.java index 1393fd5197..fc32d021ba 100644 --- a/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.java +++ b/interface/thrift/gen-java/org/apache/cassandra/thrift/TokenRange.java @@ -774,7 +774,7 @@ public class TokenRange implements org.apache.thrift.TBase(_list48.size); for (int _i49 = 0; _i49 < _list48.size; ++_i49) { - String _elem50; // required + String _elem50; // optional _elem50 = iprot.readString(); struct.endpoints.add(_elem50); } @@ -792,7 +792,7 @@ public class TokenRange implements org.apache.thrift.TBase(_list51.size); for (int _i52 = 0; _i52 < _list51.size; ++_i52) { - String _elem53; // required + String _elem53; // optional _elem53 = iprot.readString(); struct.rpc_endpoints.add(_elem53); } @@ -810,7 +810,7 @@ public class TokenRange implements org.apache.thrift.TBase(_list54.size); for (int _i55 = 0; _i55 < _list54.size; ++_i55) { - EndpointDetails _elem56; // required + EndpointDetails _elem56; // optional _elem56 = new EndpointDetails(); _elem56.read(iprot); struct.endpoint_details.add(_elem56); @@ -953,7 +953,7 @@ public class TokenRange implements org.apache.thrift.TBase(_list63.size); for (int _i64 = 0; _i64 < _list63.size; ++_i64) { - String _elem65; // required + String _elem65; // optional _elem65 = iprot.readString(); struct.endpoints.add(_elem65); } @@ -966,7 +966,7 @@ public class TokenRange implements org.apache.thrift.TBase(_list66.size); for (int _i67 = 0; _i67 < _list66.size; ++_i67) { - String _elem68; // required + String _elem68; // optional _elem68 = iprot.readString(); struct.rpc_endpoints.add(_elem68); } @@ -979,7 +979,7 @@ public class TokenRange implements org.apache.thrift.TBase(_list69.size); for (int _i70 = 0; _i70 < _list69.size; ++_i70) { - EndpointDetails _elem71; // required + EndpointDetails _elem71; // optional _elem71 = new EndpointDetails(); _elem71.read(iprot); struct.endpoint_details.add(_elem71); diff --git a/src/java/org/apache/cassandra/cli/CliClient.java b/src/java/org/apache/cassandra/cli/CliClient.java index 2b87943b81..c27ee2efe8 100644 --- a/src/java/org/apache/cassandra/cli/CliClient.java +++ b/src/java/org/apache/cassandra/cli/CliClient.java @@ -27,10 +27,14 @@ import java.nio.ByteBuffer; import java.nio.charset.CharacterCodingException; import java.util.*; +import com.google.common.base.CharMatcher; import com.google.common.base.Charsets; import com.google.common.base.Predicate; +import com.google.common.base.Splitter; import com.google.common.collect.Collections2; import com.google.common.collect.Iterables; +import com.google.common.collect.Sets; + import org.apache.commons.lang.StringUtils; import org.antlr.runtime.tree.Tree; @@ -140,7 +144,8 @@ public class CliClient CACHING, DEFAULT_TIME_TO_LIVE, SPECULATIVE_RETRY, - POPULATE_IO_CACHE_ON_FLUSH + POPULATE_IO_CACHE_ON_FLUSH, + TRIGGER_CLASSES } private static final String DEFAULT_PLACEMENT_STRATEGY = "org.apache.cassandra.locator.NetworkTopologyStrategy"; @@ -1354,6 +1359,10 @@ public class CliClient case POPULATE_IO_CACHE_ON_FLUSH: cfDef.setPopulate_io_cache_on_flush(Boolean.parseBoolean(mValue)); break; + case TRIGGER_CLASSES: + Iterable tcIt = Splitter.on(',').trimResults(CharMatcher.is('\'')).split(mValue); + cfDef.setTrigger_class(Sets.newHashSet(tcIt)); + break; default: //must match one of the above or we'd throw an exception at the valueOf statement above. assert(false); @@ -1818,6 +1827,8 @@ public class CliClient if (cfDef.isSetBloom_filter_fp_chance()) writeAttr(output, false, "bloom_filter_fp_chance", cfDef.bloom_filter_fp_chance); + if (cfDef.isSetTrigger_class()) + writeAttr(output, false, "trigger_class", StringUtils.join(cfDef.trigger_class, ',')); if (!cfDef.compaction_strategy_options.isEmpty()) { @@ -2188,6 +2199,9 @@ public class CliClient sessionState.out.printf(" Index interval: %s%n", cf_def.isSetIndex_interval() ? cf_def.index_interval : "default"); sessionState.out.printf(" Speculative Retry: %s%n", cf_def.speculative_retry); + if (cf_def.trigger_class != null) + sessionState.out.printf(" Trigger class: %s%n", cf_def.trigger_class); + // if we have connection to the cfMBean established if (cfMBean != null) sessionState.out.printf(" Built indexes: %s%n", cfMBean.getBuiltIndexes()); diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java index e9ed8bba14..0af6c77fc2 100644 --- a/src/java/org/apache/cassandra/config/CFMetaData.java +++ b/src/java/org/apache/cassandra/config/CFMetaData.java @@ -26,8 +26,11 @@ import java.util.*; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Objects; +import com.google.common.base.Strings; import com.google.common.collect.MapDifference; import com.google.common.collect.Maps; +import com.google.common.collect.Sets; + import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.builder.EqualsBuilder; @@ -138,6 +141,7 @@ public final class CFMetaData + "default_write_consistency text," + "speculative_retry text," + "populate_io_cache_on_flush boolean," + + "trigger_class text," + "dropped_columns map," + "PRIMARY KEY (keyspace_name, columnfamily_name)" + ") WITH COMMENT='ColumnFamily definitions' AND gc_grace_seconds=8640"); @@ -360,6 +364,7 @@ public final class CFMetaData private volatile SpeculativeRetry speculativeRetry = DEFAULT_SPECULATIVE_RETRY; private volatile boolean populateIoCacheOnFlush = DEFAULT_POPULATE_IO_CACHE_ON_FLUSH; private volatile Map droppedColumns = new HashMap(); + private volatile Set triggerClass = null; /* * All CQL3 columns definition are stored in the column_metadata map. @@ -405,6 +410,7 @@ public final class CFMetaData public CFMetaData speculativeRetry(SpeculativeRetry prop) {speculativeRetry = prop; return this;} public CFMetaData populateIoCacheOnFlush(boolean prop) {populateIoCacheOnFlush = prop; return this;} public CFMetaData droppedColumns(Map cols) {droppedColumns = cols; return this;} + public CFMetaData triggerClass(Set prop) {triggerClass = prop; return this;} public CFMetaData(String keyspace, String name, ColumnFamilyType type, AbstractType comp, AbstractType subcc) { @@ -502,6 +508,7 @@ public final class CFMetaData .gcGraceSeconds(0) .caching(indexCaching) .speculativeRetry(parent.speculativeRetry) + .triggerClass(parent.triggerClass) .compactionStrategyClass(parent.compactionStrategyClass) .compactionStrategyOptions(parent.compactionStrategyOptions) .reloadSecondaryIndexMetadata(parent); @@ -556,7 +563,8 @@ public final class CFMetaData .speculativeRetry(oldCFMD.speculativeRetry) .memtableFlushPeriod(oldCFMD.memtableFlushPeriod) .populateIoCacheOnFlush(oldCFMD.populateIoCacheOnFlush) - .droppedColumns(oldCFMD.droppedColumns); + .droppedColumns(oldCFMD.droppedColumns) + .triggerClass(oldCFMD.triggerClass); } /** @@ -687,6 +695,11 @@ public final class CFMetaData : bloomFilterFpChance; } + public Set getTriggerClass() + { + return triggerClass; + } + public Caching getCaching() { return caching; @@ -756,6 +769,7 @@ public final class CFMetaData .append(speculativeRetry, rhs.speculativeRetry) .append(populateIoCacheOnFlush, rhs.populateIoCacheOnFlush) .append(droppedColumns, rhs.droppedColumns) + .append(triggerClass, rhs.triggerClass) .isEquals(); } @@ -788,6 +802,7 @@ public final class CFMetaData .append(speculativeRetry) .append(populateIoCacheOnFlush) .append(droppedColumns) + .append(triggerClass) .toHashCode(); } @@ -877,6 +892,8 @@ public final class CFMetaData newCFMD.speculativeRetry(SpeculativeRetry.fromString(cf_def.speculative_retry)); if (cf_def.isSetPopulate_io_cache_on_flush()) newCFMD.populateIoCacheOnFlush(cf_def.populate_io_cache_on_flush); + if (cf_def.isSetTrigger_class()) + newCFMD.triggerClass(cf_def.trigger_class); CompressionParameters cp = CompressionParameters.create(cf_def.compression_options); @@ -958,6 +975,8 @@ public final class CFMetaData speculativeRetry = cfm.speculativeRetry; populateIoCacheOnFlush = cfm.populateIoCacheOnFlush; + if (cfm.triggerClass != null) + triggerClass = cfm.triggerClass; if (!cfm.droppedColumns.isEmpty()) droppedColumns = cfm.droppedColumns; @@ -1118,6 +1137,8 @@ public final class CFMetaData def.setCaching(caching.toString()); def.setDefault_time_to_live(defaultTimeToLive); def.setSpeculative_retry(speculativeRetry.toString()); + if (triggerClass != null) + def.setTrigger_class(new HashSet(triggerClass)); return def; } @@ -1453,6 +1474,7 @@ public final class CFMetaData cf.addColumn(DeletedColumn.create(ldt, timestamp, cfName, "column_aliases")); cf.addColumn(DeletedColumn.create(ldt, timestamp, cfName, "compaction_strategy_options")); cf.addColumn(DeletedColumn.create(ldt, timestamp, cfName, "index_interval")); + cf.addColumn(DeletedColumn.create(ldt, timestamp, cfName, "trigger_class")); for (Map.Entry entry : droppedColumns.entrySet()) cf.addColumn(new DeletedColumn(makeDroppedColumnName(entry.getKey()), ldt, timestamp)); @@ -1516,6 +1538,8 @@ public final class CFMetaData cf.addColumn(Column.create(json(compactionStrategyOptions), timestamp, cfName, "compaction_strategy_options")); cf.addColumn(Column.create(indexInterval, timestamp, cfName, "index_interval")); cf.addColumn(Column.create(speculativeRetry.toString(), timestamp, cfName, "speculative_retry")); + cf.addColumn(triggerClass == null ? DeletedColumn.create(ldt, timestamp, cfName, "trigger_class") + : Column.create(StringUtils.join(triggerClass, ','), timestamp, cfName, "trigger_class")); for (Map.Entry entry : droppedColumns.entrySet()) cf.addColumn(new Column(makeDroppedColumnName(entry.getKey()), LongType.instance.decompose(entry.getValue()), timestamp)); @@ -1565,6 +1589,8 @@ public final class CFMetaData cfm.indexInterval(result.getInt("index_interval")); if (result.has("populate_io_cache_on_flush")) cfm.populateIoCacheOnFlush(result.getBoolean("populate_io_cache_on_flush")); + if (result.has("trigger_class") && !Strings.isNullOrEmpty(result.getString("trigger_class"))) + cfm.triggerClass(Sets.newHashSet(StringUtils.split(result.getString("trigger_class"), ','))); /* * The info previously hold by key_alias(es), column_alias and value_alias is now stored in column_metadata (because 1) this @@ -1987,6 +2013,7 @@ public final class CFMetaData .append("indexInterval", indexInterval) .append("populateIoCacheOnFlush", populateIoCacheOnFlush) .append("droppedColumns", droppedColumns) + .append("trigger_class", triggerClass) .toString(); } } diff --git a/src/java/org/apache/cassandra/cql/AlterTableStatement.java b/src/java/org/apache/cassandra/cql/AlterTableStatement.java index 662d88953a..951b1bb549 100644 --- a/src/java/org/apache/cassandra/cql/AlterTableStatement.java +++ b/src/java/org/apache/cassandra/cql/AlterTableStatement.java @@ -186,6 +186,7 @@ public class AlterTableStatement cfm.populateIoCacheOnFlush(cfProps.getPropertyBoolean(CFPropDefs.KW_POPULATE_IO_CACHE_ON_FLUSH, cfm.populateIoCacheOnFlush())); cfm.bloomFilterFpChance(cfProps.getPropertyDouble(CFPropDefs.KW_BF_FP_CHANCE, cfm.getBloomFilterFpChance())); cfm.memtableFlushPeriod(cfProps.getPropertyInt(CFPropDefs.KW_MEMTABLE_FLUSH_PERIOD, cfm.getMemtableFlushPeriod())); + cfm.triggerClass(cfProps.getPropertySet(CFPropDefs.KW_TRIGGER_CLASS, cfm.getTriggerClass())); if (!cfProps.compactionStrategyOptions.isEmpty()) { diff --git a/src/java/org/apache/cassandra/cql/CFPropDefs.java b/src/java/org/apache/cassandra/cql/CFPropDefs.java index 82485fcbe4..760da761aa 100644 --- a/src/java/org/apache/cassandra/cql/CFPropDefs.java +++ b/src/java/org/apache/cassandra/cql/CFPropDefs.java @@ -22,6 +22,7 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; +import com.google.common.base.Strings; import com.google.common.collect.Sets; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -33,6 +34,7 @@ import org.apache.cassandra.db.marshal.AbstractType; import org.apache.cassandra.db.marshal.TypeParser; import org.apache.cassandra.exceptions.InvalidRequestException; import org.apache.cassandra.exceptions.SyntaxException; +import org.apache.commons.lang.StringUtils; public class CFPropDefs { private static final Logger logger = LoggerFactory.getLogger(CFPropDefs.class); @@ -53,6 +55,7 @@ public class CFPropDefs { public static final String KW_POPULATE_IO_CACHE_ON_FLUSH = "populate_io_cache_on_flush"; public static final String KW_BF_FP_CHANCE = "bloom_filter_fp_chance"; public static final String KW_MEMTABLE_FLUSH_PERIOD = "memtable_flush_period_in_ms"; + public static final String KW_TRIGGER_CLASS = "trigger_class"; // Maps CQL short names to the respective Cassandra comparator/validator class names public static final Map comparators = new HashMap(); @@ -96,6 +99,7 @@ public class CFPropDefs { keywords.add(KW_POPULATE_IO_CACHE_ON_FLUSH); keywords.add(KW_BF_FP_CHANCE); keywords.add(KW_MEMTABLE_FLUSH_PERIOD); + keywords.add(KW_TRIGGER_CLASS); obsoleteKeywords.add("row_cache_size"); obsoleteKeywords.add("key_cache_size"); @@ -286,6 +290,14 @@ public class CFPropDefs { return result; } + public Set getPropertySet(String key, Set defaultValue) + { + String value = properties.get(key); + if (Strings.isNullOrEmpty(value)) + return defaultValue; + return Sets.newHashSet(StringUtils.split(value, ',')); + } + public String toString() { return String.format("CFPropDefs(%s, compaction: %s, compression: %s)", diff --git a/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java b/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java index 409fca8eba..e8b73ef9ce 100644 --- a/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java +++ b/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; import org.apache.cassandra.config.CFMetaData; import org.apache.cassandra.config.ColumnDefinition; @@ -201,7 +202,8 @@ public class CreateColumnFamilyStatement .bloomFilterFpChance(getPropertyDouble(CFPropDefs.KW_BF_FP_CHANCE, null)) .memtableFlushPeriod(getPropertyInt(CFPropDefs.KW_MEMTABLE_FLUSH_PERIOD, 0)) .defaultTimeToLive(getPropertyInt(CFPropDefs.KW_DEFAULT_TIME_TO_LIVE, CFMetaData.DEFAULT_DEFAULT_TIME_TO_LIVE)) - .populateIoCacheOnFlush(getPropertyBoolean(CFPropDefs.KW_POPULATE_IO_CACHE_ON_FLUSH, CFMetaData.DEFAULT_POPULATE_IO_CACHE_ON_FLUSH)); + .populateIoCacheOnFlush(getPropertyBoolean(CFPropDefs.KW_POPULATE_IO_CACHE_ON_FLUSH, CFMetaData.DEFAULT_POPULATE_IO_CACHE_ON_FLUSH)) + .triggerClass(getPropertySet(CFPropDefs.KW_TRIGGER_CLASS, null)); // CQL2 can have null keyAliases if (keyAlias != null) @@ -238,6 +240,11 @@ public class CreateColumnFamilyStatement return cfProps.getPropertyInt(key, defaultValue); } + private Set getPropertySet(String key, Set defaultValue) + { + return cfProps.getPropertySet(key, defaultValue); + } + public Map getColumns() { return columns; diff --git a/src/java/org/apache/cassandra/cql/QueryProcessor.java b/src/java/org/apache/cassandra/cql/QueryProcessor.java index 2f9c5ba446..57fec4a4d0 100644 --- a/src/java/org/apache/cassandra/cql/QueryProcessor.java +++ b/src/java/org/apache/cassandra/cql/QueryProcessor.java @@ -507,7 +507,7 @@ public class QueryProcessor validateKey(mutation.key()); } - StorageProxy.mutate(rowMutations, update.getConsistencyLevel()); + StorageProxy.mutateWithTriggers(rowMutations, update.getConsistencyLevel(), false); result.type = CqlResultType.VOID; return result; @@ -536,7 +536,7 @@ public class QueryProcessor validateKey(mutation.key()); } - StorageProxy.mutate(mutations, batch.getConsistencyLevel()); + StorageProxy.mutateWithTriggers(mutations, batch.getConsistencyLevel(), false); result.type = CqlResultType.VOID; return result; @@ -582,7 +582,7 @@ public class QueryProcessor validateKey(deletion.key()); } - StorageProxy.mutate(deletions, delete.getConsistencyLevel()); + StorageProxy.mutateWithTriggers(deletions, delete.getConsistencyLevel(), false); result.type = CqlResultType.VOID; return result; diff --git a/src/java/org/apache/cassandra/cql3/CFPropDefs.java b/src/java/org/apache/cassandra/cql3/CFPropDefs.java index cc4c457b0e..2c0ad0dd5f 100644 --- a/src/java/org/apache/cassandra/cql3/CFPropDefs.java +++ b/src/java/org/apache/cassandra/cql3/CFPropDefs.java @@ -45,6 +45,7 @@ public class CFPropDefs extends PropertyDefinitions public static final String KW_POPULATE_IO_CACHE_ON_FLUSH = "populate_io_cache_on_flush"; public static final String KW_BF_FP_CHANCE = "bloom_filter_fp_chance"; public static final String KW_MEMTABLE_FLUSH_PERIOD = "memtable_flush_period_in_ms"; + public static final String KW_TRIGGER_CLASS = "trigger_class"; public static final String KW_COMPACTION = "compaction"; public static final String KW_COMPRESSION = "compression"; @@ -69,6 +70,7 @@ public class CFPropDefs extends PropertyDefinitions keywords.add(KW_COMPACTION); keywords.add(KW_COMPRESSION); keywords.add(KW_MEMTABLE_FLUSH_PERIOD); + keywords.add(KW_TRIGGER_CLASS); obsoleteKeywords.add("compaction_strategy_class"); obsoleteKeywords.add("compaction_strategy_options"); @@ -150,6 +152,8 @@ public class CFPropDefs extends PropertyDefinitions cfm.speculativeRetry(CFMetaData.SpeculativeRetry.fromString(getString(KW_SPECULATIVE_RETRY, cfm.getSpeculativeRetry().toString()))); cfm.memtableFlushPeriod(getInt(KW_MEMTABLE_FLUSH_PERIOD, cfm.getMemtableFlushPeriod())); cfm.populateIoCacheOnFlush(getBoolean(KW_POPULATE_IO_CACHE_ON_FLUSH, cfm.populateIoCacheOnFlush())); + if (hasProperty(KW_TRIGGER_CLASS)) + cfm.triggerClass(getSet(KW_TRIGGER_CLASS, cfm.getTriggerClass())); if (compactionStrategyClass != null) { diff --git a/src/java/org/apache/cassandra/cql3/PropertyDefinitions.java b/src/java/org/apache/cassandra/cql3/PropertyDefinitions.java index ba83e45b8a..82a1b82b09 100644 --- a/src/java/org/apache/cassandra/cql3/PropertyDefinitions.java +++ b/src/java/org/apache/cassandra/cql3/PropertyDefinitions.java @@ -76,6 +76,16 @@ public class PropertyDefinitions return (Map)val; } + protected Set getSet(String name, Set defaultValue) throws SyntaxException + { + Object val = properties.get(name); + if (val == null) + return defaultValue; + if (!(val instanceof Set)) + throw new SyntaxException(String.format("Invalid value for property '%s'", name)); + return (Set) val; + } + public Boolean hasProperty(String name) { return properties.containsKey(name); diff --git a/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java b/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java index e9623a2bbf..c7cd9ae5a1 100644 --- a/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java +++ b/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java @@ -125,11 +125,8 @@ public class BatchStatement implements CQLStatement throw new InvalidRequestException("Invalid empty consistency level"); Collection mutations = getMutations(variables, false, cl, queryState.getTimestamp()); - if (type == Type.LOGGED && mutations.size() > 1) - StorageProxy.mutateAtomically((Collection) mutations, cl); - else - StorageProxy.mutate(mutations, cl); - + boolean mutateAtomic = (type == Type.LOGGED && mutations.size() > 1); + StorageProxy.mutateWithTriggers(mutations, cl, mutateAtomic); return null; } diff --git a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java index 45fbecc043..5b3e718c0d 100644 --- a/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java +++ b/src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java @@ -351,7 +351,7 @@ public abstract class ModificationStatement implements CQLStatement else cl.validateForWrite(cfm.ksName); - StorageProxy.mutate(getMutations(variables, false, cl, queryState.getTimestamp(), false), cl); + StorageProxy.mutateWithTriggers(getMutations(variables, false, cl, queryState.getTimestamp(), false), cl, false); return null; } diff --git a/src/java/org/apache/cassandra/db/CounterMutation.java b/src/java/org/apache/cassandra/db/CounterMutation.java index 65ca22a941..6f60a26353 100644 --- a/src/java/org/apache/cassandra/db/CounterMutation.java +++ b/src/java/org/apache/cassandra/db/CounterMutation.java @@ -61,6 +61,11 @@ public class CounterMutation implements IMutation return rowMutation.getColumnFamilyIds(); } + public Collection getColumnFamilies() + { + return rowMutation.getColumnFamilies(); + } + public ByteBuffer key() { return rowMutation.key(); diff --git a/src/java/org/apache/cassandra/db/IMutation.java b/src/java/org/apache/cassandra/db/IMutation.java index 04c3042d45..b15b14422f 100644 --- a/src/java/org/apache/cassandra/db/IMutation.java +++ b/src/java/org/apache/cassandra/db/IMutation.java @@ -29,4 +29,5 @@ public interface IMutation public void apply(); public String toString(boolean shallow); public void addAll(IMutation m); + public Collection getColumnFamilies(); } diff --git a/src/java/org/apache/cassandra/service/StorageProxy.java b/src/java/org/apache/cassandra/service/StorageProxy.java index f170039d9b..2499caf5d2 100644 --- a/src/java/org/apache/cassandra/service/StorageProxy.java +++ b/src/java/org/apache/cassandra/service/StorageProxy.java @@ -63,6 +63,7 @@ import org.apache.cassandra.metrics.ClientRequestMetrics; import org.apache.cassandra.net.*; import org.apache.cassandra.service.paxos.*; import org.apache.cassandra.tracing.Tracing; +import org.apache.cassandra.triggers.TriggerExecutor; import org.apache.cassandra.utils.*; public class StorageProxy implements StorageProxyMBean @@ -449,6 +450,23 @@ public class StorageProxy implements StorageProxyMBean } } + public static void mutateWithTriggers(Collection mutations, ConsistencyLevel consistencyLevel, boolean mutateAtomically) throws WriteTimeoutException, UnavailableException, + OverloadedException, InvalidRequestException + { + Collection tmutations = TriggerExecutor.instance.execute(mutations); + if (mutateAtomically || tmutations != null) + { + Collection allMutations = (Collection) mutations; + if (tmutations != null) + allMutations.addAll(tmutations); + StorageProxy.mutateAtomically(allMutations, consistencyLevel); + } + else + { + StorageProxy.mutate(mutations, consistencyLevel); + } + } + /** * See mutate. Adds additional steps before and after writing a batch. * Before writing the batch (but after doing availability check against the FD for the row replicas): @@ -1878,5 +1896,5 @@ public class StorageProxy implements StorageProxyMBean public Long getTruncateRpcTimeout() { return DatabaseDescriptor.getTruncateRpcTimeout(); } public void setTruncateRpcTimeout(Long timeoutInMillis) { DatabaseDescriptor.setTruncateRpcTimeout(timeoutInMillis); } - + public void reloadTriggerClass() { TriggerExecutor.instance.reloadClasses(); } } diff --git a/src/java/org/apache/cassandra/service/StorageProxyMBean.java b/src/java/org/apache/cassandra/service/StorageProxyMBean.java index 18e5da1500..f482fc7945 100644 --- a/src/java/org/apache/cassandra/service/StorageProxyMBean.java +++ b/src/java/org/apache/cassandra/service/StorageProxyMBean.java @@ -88,4 +88,6 @@ public interface StorageProxyMBean public void setRangeRpcTimeout(Long timeoutInMillis); public Long getTruncateRpcTimeout(); public void setTruncateRpcTimeout(Long timeoutInMillis); + + public void reloadTriggerClass(); } diff --git a/src/java/org/apache/cassandra/thrift/CassandraServer.java b/src/java/org/apache/cassandra/thrift/CassandraServer.java index 6b5eb9a533..4c188f7860 100644 --- a/src/java/org/apache/cassandra/thrift/CassandraServer.java +++ b/src/java/org/apache/cassandra/thrift/CassandraServer.java @@ -1062,10 +1062,7 @@ public class CassandraServer implements Cassandra.Iface schedule(DatabaseDescriptor.getWriteRpcTimeout()); try { - if (mutateAtomically) - StorageProxy.mutateAtomically((List) mutations, consistencyLevel); - else - StorageProxy.mutate(mutations, consistencyLevel); + StorageProxy.mutateWithTriggers(mutations, consistencyLevel, mutateAtomically); } catch (RequestExecutionException e) { diff --git a/src/java/org/apache/cassandra/triggers/CustomClassLoader.java b/src/java/org/apache/cassandra/triggers/CustomClassLoader.java new file mode 100644 index 0000000000..31efdc50c5 --- /dev/null +++ b/src/java/org/apache/cassandra/triggers/CustomClassLoader.java @@ -0,0 +1,113 @@ +package org.apache.cassandra.triggers; + +import java.io.File; +import java.io.FilenameFilter; +import java.io.IOError; +import java.io.IOException; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.common.io.Files; + +/** + * Custom class loader will load the classes from the class path, CCL will load + * the classes from the the URL first, if it cannot find the required class it + * will let the parent class loader do the its job. + * + * Note: If the CCL is GC'ed then the associated classes will be unloaded. + */ +public class CustomClassLoader extends URLClassLoader +{ + private static final Logger logger = LoggerFactory.getLogger(CustomClassLoader.class); + private static final String[] PACKAGE_EXCLUSION_LIST = new String[] {"org.apache.log4j", "org.slf4j"}; + private final Map> cache = new ConcurrentHashMap>(); + private final ClassLoader parent; + + public CustomClassLoader(ClassLoader parent) + { + super(new URL[] {}, parent); + assert parent != null; + this.parent = getParent(); + } + + public CustomClassLoader(ClassLoader parent, File classPathDir) + { + super(new URL[] {}, parent); + assert parent != null; + this.parent = getParent(); + addClassPath(classPathDir); + } + + public void addClassPath(File dir) + { + if (dir == null || !dir.exists()) + return; + FilenameFilter filter = new FilenameFilter() { + public boolean accept(File dir, String name) { + return name.endsWith(".jar"); + } + }; + for (File inputJar : dir.listFiles(filter)) + { + File lib = new File(System.getProperty("java.io.tmpdir"), "lib"); + if (!lib.exists()) + { + lib.mkdir(); + lib.deleteOnExit(); + } + try + { + File out = File.createTempFile("cassandra-", ".jar", lib); + out.deleteOnExit(); + logger.info("Loading new jar {}", inputJar.getAbsolutePath()); + Files.copy(inputJar, out); + addURL(out.toURL()); + } + catch (IOException ex) + { + throw new IOError(ex); + } + } + } + + @Override + public Class loadClass(String name) throws ClassNotFoundException + { + Class clazz = cache.get(name); + if (clazz == null) + return loadClassInternal(name); + return clazz; + } + + public synchronized Class loadClassInternal(String name) throws ClassNotFoundException + { + try + { + if (!isExcluded(name)) + return parent.loadClass(name); + } + catch (ClassNotFoundException ex) + { + logger.debug("Class not found using parent class loader,", ex); + // Don't throw the exception here, try triggers directory. + } + Class clazz = this.findClass(name); + cache.put(name, clazz); + return clazz; + } + + private boolean isExcluded(String name) + { + for (String exclusion : PACKAGE_EXCLUSION_LIST) + { + if (name.startsWith(exclusion)) + return true; + } + return false; + } +} diff --git a/src/java/org/apache/cassandra/triggers/ITrigger.java b/src/java/org/apache/cassandra/triggers/ITrigger.java new file mode 100644 index 0000000000..534a4ad210 --- /dev/null +++ b/src/java/org/apache/cassandra/triggers/ITrigger.java @@ -0,0 +1,31 @@ +package org.apache.cassandra.triggers; + +import java.nio.ByteBuffer; +import java.util.Collection; + +import org.apache.cassandra.db.ColumnFamily; +import org.apache.cassandra.db.RowMutation; + +/** + * Trigger interface, For every Mutation received by the coordinator {@link #augment(ByteBuffer, ColumnFamily)} + * is called.

+ * + * Contract:
+ * 1) Implementation of this interface should only have a constructor without parameters
+ * 2) ITrigger implementation can be instantiated multiple times during the server life time. + * (Depends on the number of times trigger folder is updated.)
+ * 3) ITrigger implementation should be state-less (avoid dependency on instance variables).
+ * + *
The API is still beta and can change. + */ +public interface ITrigger +{ + /** + * Called exactly once per CF update, returned mutations are atomically updated. + * + * @param key - Row Key for the update. + * @param update - Update received for the CF + * @return modifications to be applied, null if no action to be performed. + */ + public Collection augment(ByteBuffer key, ColumnFamily update); +} diff --git a/src/java/org/apache/cassandra/triggers/TriggerExecutor.java b/src/java/org/apache/cassandra/triggers/TriggerExecutor.java new file mode 100644 index 0000000000..ade5fb29fa --- /dev/null +++ b/src/java/org/apache/cassandra/triggers/TriggerExecutor.java @@ -0,0 +1,129 @@ +package org.apache.cassandra.triggers; + +import java.io.File; +import java.lang.reflect.Constructor; +import java.nio.ByteBuffer; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.cassandra.cql.QueryProcessor; +import org.apache.cassandra.db.ColumnFamily; +import org.apache.cassandra.db.CounterMutation; +import org.apache.cassandra.db.IMutation; +import org.apache.cassandra.db.RowMutation; +import org.apache.cassandra.exceptions.InvalidRequestException; +import org.apache.cassandra.utils.FBUtilities; + +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; + +public class TriggerExecutor +{ + public static final TriggerExecutor instance = new TriggerExecutor(); + + private final Map cachedTriggers = Maps.newConcurrentMap(); + private final ClassLoader parent = Thread.currentThread().getContextClassLoader(); + private final File triggerDirectory = new File(FBUtilities.cassandraHomeDir(), "triggers"); + private volatile ClassLoader customClassLoader; + + private TriggerExecutor() + { + reloadClasses(); + } + + /** + * Reload the triggers which is already loaded, Invoking this will update + * the class loader so new jars can be loaded. + */ + public void reloadClasses() + { + customClassLoader = new CustomClassLoader(parent, triggerDirectory); + cachedTriggers.clear(); + } + + public Collection execute(Collection updates) throws InvalidRequestException + { + boolean hasCounters = false; + Collection tmutations = null; + for (IMutation mutation : updates) + { + for (ColumnFamily cf : mutation.getColumnFamilies()) + { + List intermediate = execute(mutation.key(), cf); + if (intermediate == null) + continue; + + validate(intermediate); + if (tmutations == null) + tmutations = intermediate; + else + tmutations.addAll(intermediate); + } + if (mutation instanceof CounterMutation) + hasCounters = true; + } + if (tmutations != null && hasCounters) + throw new InvalidRequestException("Counter mutations and trigger mutations cannot be applied together atomically."); + return tmutations; + } + + private void validate(Collection tmutations) throws InvalidRequestException + { + for (RowMutation mutation : tmutations) + { + QueryProcessor.validateKey(mutation.key()); + for (ColumnFamily tcf : mutation.getColumnFamilies()) + for (ByteBuffer tName : tcf.getColumnNames()) + QueryProcessor.validateColumn(tcf.metadata(), tName, tcf.getColumn(tName).value()); + } + } + + /** + * Switch class loader before using the triggers for the column family, if + * not loaded them with the custom class loader. + */ + private List execute(ByteBuffer key, ColumnFamily columnFamily) + { + Set triggerNames = columnFamily.metadata().getTriggerClass(); + if (triggerNames == null) + return null; + List tmutations = Lists.newLinkedList(); + Thread.currentThread().setContextClassLoader(customClassLoader); + try + { + for (String triggerName : triggerNames) + { + ITrigger trigger = cachedTriggers.get(triggerName); + if (trigger == null) + { + trigger = loadTriggerInstance(triggerName); + cachedTriggers.put(triggerName, trigger); + } + Collection temp = trigger.augment(key, columnFamily); + if (temp != null) + tmutations.addAll(temp); + } + return tmutations; + } + catch (Exception ex) + { + throw new RuntimeException(String.format("Exception while creating trigger a trigger on CF with ID: %s", columnFamily.id()), ex); + } + finally + { + Thread.currentThread().setContextClassLoader(parent); + } + } + + private synchronized ITrigger loadTriggerInstance(String triggerName) throws Exception + { + // double check. + if (cachedTriggers.get(triggerName) != null) + return cachedTriggers.get(triggerName); + + Constructor costructor = (Constructor) customClassLoader.loadClass(triggerName).getConstructor(new Class[0]); + return costructor.newInstance(new Object[0]); + } +} diff --git a/src/java/org/apache/cassandra/utils/FBUtilities.java b/src/java/org/apache/cassandra/utils/FBUtilities.java index e4b9f5892e..07e72f2ac5 100644 --- a/src/java/org/apache/cassandra/utils/FBUtilities.java +++ b/src/java/org/apache/cassandra/utils/FBUtilities.java @@ -333,6 +333,12 @@ public class FBUtilities return scpurl.getFile(); } + public static File cassandraHomeDir() + { + String libDir = new File(FBUtilities.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent(); + return new File(new File(libDir).getParent()); + } + public static String getReleaseVersionString() { try diff --git a/src/resources/org/apache/cassandra/cli/CliHelp.yaml b/src/resources/org/apache/cassandra/cli/CliHelp.yaml index 3d4bd991c6..d5ee151b1f 100644 --- a/src/resources/org/apache/cassandra/cli/CliHelp.yaml +++ b/src/resources/org/apache/cassandra/cli/CliHelp.yaml @@ -650,6 +650,9 @@ commands: - bloom_filter_fp_chance: Desired false positive probability for sstable row bloom filters. Default is 0.000744. + - trigger_class: Trigger class / set of Trigger classes implementing ITrigger + Tigger class is invoked for every insert/update statement. + - column_type: Type of columns this column family holds, valid values are Standard and Super. Default is Standard. diff --git a/test/triggers/README.txt b/test/triggers/README.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/triggers/README.txt b/triggers/README.txt new file mode 100644 index 0000000000..e69de29bb2