1
2
3
4
5
6
7 package org.apache.hadoop.hbase.thrift2.generated;
8
9 import org.apache.thrift.scheme.IScheme;
10 import org.apache.thrift.scheme.SchemeFactory;
11 import org.apache.thrift.scheme.StandardScheme;
12
13 import org.apache.thrift.scheme.TupleScheme;
14 import org.apache.thrift.protocol.TTupleProtocol;
15 import java.util.List;
16 import java.util.ArrayList;
17 import java.util.Map;
18 import java.util.HashMap;
19 import java.util.EnumMap;
20 import java.util.Set;
21 import java.util.HashSet;
22 import java.util.EnumSet;
23 import java.util.Collections;
24 import java.util.BitSet;
25 import java.nio.ByteBuffer;
26 import java.util.Arrays;
27 import org.slf4j.Logger;
28 import org.slf4j.LoggerFactory;
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 public class TDelete implements org.apache.thrift.TBase<TDelete, TDelete._Fields>, java.io.Serializable, Cloneable {
54 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDelete");
55
56 private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1);
57 private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)2);
58 private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3);
59 private static final org.apache.thrift.protocol.TField DELETE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("deleteType", org.apache.thrift.protocol.TType.I32, (short)4);
60 private static final org.apache.thrift.protocol.TField WRITE_TO_WAL_FIELD_DESC = new org.apache.thrift.protocol.TField("writeToWal", org.apache.thrift.protocol.TType.BOOL, (short)5);
61
62 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
63 static {
64 schemes.put(StandardScheme.class, new TDeleteStandardSchemeFactory());
65 schemes.put(TupleScheme.class, new TDeleteTupleSchemeFactory());
66 }
67
68 public ByteBuffer row;
69 public List<TColumn> columns;
70 public long timestamp;
71
72
73
74
75 public TDeleteType deleteType;
76 public boolean writeToWal;
77
78
79 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
80 ROW((short)1, "row"),
81 COLUMNS((short)2, "columns"),
82 TIMESTAMP((short)3, "timestamp"),
83
84
85
86
87 DELETE_TYPE((short)4, "deleteType"),
88 WRITE_TO_WAL((short)5, "writeToWal");
89
90 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
91
92 static {
93 for (_Fields field : EnumSet.allOf(_Fields.class)) {
94 byName.put(field.getFieldName(), field);
95 }
96 }
97
98
99
100
101 public static _Fields findByThriftId(int fieldId) {
102 switch(fieldId) {
103 case 1:
104 return ROW;
105 case 2:
106 return COLUMNS;
107 case 3:
108 return TIMESTAMP;
109 case 4:
110 return DELETE_TYPE;
111 case 5:
112 return WRITE_TO_WAL;
113 default:
114 return null;
115 }
116 }
117
118
119
120
121
122 public static _Fields findByThriftIdOrThrow(int fieldId) {
123 _Fields fields = findByThriftId(fieldId);
124 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
125 return fields;
126 }
127
128
129
130
131 public static _Fields findByName(String name) {
132 return byName.get(name);
133 }
134
135 private final short _thriftId;
136 private final String _fieldName;
137
138 _Fields(short thriftId, String fieldName) {
139 _thriftId = thriftId;
140 _fieldName = fieldName;
141 }
142
143 public short getThriftFieldId() {
144 return _thriftId;
145 }
146
147 public String getFieldName() {
148 return _fieldName;
149 }
150 }
151
152
153 private static final int __TIMESTAMP_ISSET_ID = 0;
154 private static final int __WRITETOWAL_ISSET_ID = 1;
155 private BitSet __isset_bit_vector = new BitSet(2);
156 private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.DELETE_TYPE,_Fields.WRITE_TO_WAL};
157 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
158 static {
159 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
160 tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED,
161 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
162 tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.OPTIONAL,
163 new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
164 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumn.class))));
165 tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL,
166 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
167 tmpMap.put(_Fields.DELETE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("deleteType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
168 new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDeleteType.class)));
169 tmpMap.put(_Fields.WRITE_TO_WAL, new org.apache.thrift.meta_data.FieldMetaData("writeToWal", org.apache.thrift.TFieldRequirementType.OPTIONAL,
170 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
171 metaDataMap = Collections.unmodifiableMap(tmpMap);
172 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TDelete.class, metaDataMap);
173 }
174
175 public TDelete() {
176 this.deleteType = org.apache.hadoop.hbase.thrift2.generated.TDeleteType.DELETE_COLUMNS;
177
178 this.writeToWal = true;
179
180 }
181
182 public TDelete(
183 ByteBuffer row)
184 {
185 this();
186 this.row = row;
187 }
188
189
190
191
192 public TDelete(TDelete other) {
193 __isset_bit_vector.clear();
194 __isset_bit_vector.or(other.__isset_bit_vector);
195 if (other.isSetRow()) {
196 this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
197 ;
198 }
199 if (other.isSetColumns()) {
200 List<TColumn> __this__columns = new ArrayList<TColumn>();
201 for (TColumn other_element : other.columns) {
202 __this__columns.add(new TColumn(other_element));
203 }
204 this.columns = __this__columns;
205 }
206 this.timestamp = other.timestamp;
207 if (other.isSetDeleteType()) {
208 this.deleteType = other.deleteType;
209 }
210 this.writeToWal = other.writeToWal;
211 }
212
213 public TDelete deepCopy() {
214 return new TDelete(this);
215 }
216
217 @Override
218 public void clear() {
219 this.row = null;
220 this.columns = null;
221 setTimestampIsSet(false);
222 this.timestamp = 0;
223 this.deleteType = org.apache.hadoop.hbase.thrift2.generated.TDeleteType.DELETE_COLUMNS;
224
225 this.writeToWal = true;
226
227 }
228
229 public byte[] getRow() {
230 setRow(org.apache.thrift.TBaseHelper.rightSize(row));
231 return row == null ? null : row.array();
232 }
233
234 public ByteBuffer bufferForRow() {
235 return row;
236 }
237
238 public TDelete setRow(byte[] row) {
239 setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
240 return this;
241 }
242
243 public TDelete setRow(ByteBuffer row) {
244 this.row = row;
245 return this;
246 }
247
248 public void unsetRow() {
249 this.row = null;
250 }
251
252
253 public boolean isSetRow() {
254 return this.row != null;
255 }
256
257 public void setRowIsSet(boolean value) {
258 if (!value) {
259 this.row = null;
260 }
261 }
262
263 public int getColumnsSize() {
264 return (this.columns == null) ? 0 : this.columns.size();
265 }
266
267 public java.util.Iterator<TColumn> getColumnsIterator() {
268 return (this.columns == null) ? null : this.columns.iterator();
269 }
270
271 public void addToColumns(TColumn elem) {
272 if (this.columns == null) {
273 this.columns = new ArrayList<TColumn>();
274 }
275 this.columns.add(elem);
276 }
277
278 public List<TColumn> getColumns() {
279 return this.columns;
280 }
281
282 public TDelete setColumns(List<TColumn> columns) {
283 this.columns = columns;
284 return this;
285 }
286
287 public void unsetColumns() {
288 this.columns = null;
289 }
290
291
292 public boolean isSetColumns() {
293 return this.columns != null;
294 }
295
296 public void setColumnsIsSet(boolean value) {
297 if (!value) {
298 this.columns = null;
299 }
300 }
301
302 public long getTimestamp() {
303 return this.timestamp;
304 }
305
306 public TDelete setTimestamp(long timestamp) {
307 this.timestamp = timestamp;
308 setTimestampIsSet(true);
309 return this;
310 }
311
312 public void unsetTimestamp() {
313 __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
314 }
315
316
317 public boolean isSetTimestamp() {
318 return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
319 }
320
321 public void setTimestampIsSet(boolean value) {
322 __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
323 }
324
325
326
327
328
329 public TDeleteType getDeleteType() {
330 return this.deleteType;
331 }
332
333
334
335
336
337 public TDelete setDeleteType(TDeleteType deleteType) {
338 this.deleteType = deleteType;
339 return this;
340 }
341
342 public void unsetDeleteType() {
343 this.deleteType = null;
344 }
345
346
347 public boolean isSetDeleteType() {
348 return this.deleteType != null;
349 }
350
351 public void setDeleteTypeIsSet(boolean value) {
352 if (!value) {
353 this.deleteType = null;
354 }
355 }
356
357 public boolean isWriteToWal() {
358 return this.writeToWal;
359 }
360
361 public TDelete setWriteToWal(boolean writeToWal) {
362 this.writeToWal = writeToWal;
363 setWriteToWalIsSet(true);
364 return this;
365 }
366
367 public void unsetWriteToWal() {
368 __isset_bit_vector.clear(__WRITETOWAL_ISSET_ID);
369 }
370
371
372 public boolean isSetWriteToWal() {
373 return __isset_bit_vector.get(__WRITETOWAL_ISSET_ID);
374 }
375
376 public void setWriteToWalIsSet(boolean value) {
377 __isset_bit_vector.set(__WRITETOWAL_ISSET_ID, value);
378 }
379
380 public void setFieldValue(_Fields field, Object value) {
381 switch (field) {
382 case ROW:
383 if (value == null) {
384 unsetRow();
385 } else {
386 setRow((ByteBuffer)value);
387 }
388 break;
389
390 case COLUMNS:
391 if (value == null) {
392 unsetColumns();
393 } else {
394 setColumns((List<TColumn>)value);
395 }
396 break;
397
398 case TIMESTAMP:
399 if (value == null) {
400 unsetTimestamp();
401 } else {
402 setTimestamp((Long)value);
403 }
404 break;
405
406 case DELETE_TYPE:
407 if (value == null) {
408 unsetDeleteType();
409 } else {
410 setDeleteType((TDeleteType)value);
411 }
412 break;
413
414 case WRITE_TO_WAL:
415 if (value == null) {
416 unsetWriteToWal();
417 } else {
418 setWriteToWal((Boolean)value);
419 }
420 break;
421
422 }
423 }
424
425 public Object getFieldValue(_Fields field) {
426 switch (field) {
427 case ROW:
428 return getRow();
429
430 case COLUMNS:
431 return getColumns();
432
433 case TIMESTAMP:
434 return Long.valueOf(getTimestamp());
435
436 case DELETE_TYPE:
437 return getDeleteType();
438
439 case WRITE_TO_WAL:
440 return Boolean.valueOf(isWriteToWal());
441
442 }
443 throw new IllegalStateException();
444 }
445
446
447 public boolean isSet(_Fields field) {
448 if (field == null) {
449 throw new IllegalArgumentException();
450 }
451
452 switch (field) {
453 case ROW:
454 return isSetRow();
455 case COLUMNS:
456 return isSetColumns();
457 case TIMESTAMP:
458 return isSetTimestamp();
459 case DELETE_TYPE:
460 return isSetDeleteType();
461 case WRITE_TO_WAL:
462 return isSetWriteToWal();
463 }
464 throw new IllegalStateException();
465 }
466
467 @Override
468 public boolean equals(Object that) {
469 if (that == null)
470 return false;
471 if (that instanceof TDelete)
472 return this.equals((TDelete)that);
473 return false;
474 }
475
476 public boolean equals(TDelete that) {
477 if (that == null)
478 return false;
479
480 boolean this_present_row = true && this.isSetRow();
481 boolean that_present_row = true && that.isSetRow();
482 if (this_present_row || that_present_row) {
483 if (!(this_present_row && that_present_row))
484 return false;
485 if (!this.row.equals(that.row))
486 return false;
487 }
488
489 boolean this_present_columns = true && this.isSetColumns();
490 boolean that_present_columns = true && that.isSetColumns();
491 if (this_present_columns || that_present_columns) {
492 if (!(this_present_columns && that_present_columns))
493 return false;
494 if (!this.columns.equals(that.columns))
495 return false;
496 }
497
498 boolean this_present_timestamp = true && this.isSetTimestamp();
499 boolean that_present_timestamp = true && that.isSetTimestamp();
500 if (this_present_timestamp || that_present_timestamp) {
501 if (!(this_present_timestamp && that_present_timestamp))
502 return false;
503 if (this.timestamp != that.timestamp)
504 return false;
505 }
506
507 boolean this_present_deleteType = true && this.isSetDeleteType();
508 boolean that_present_deleteType = true && that.isSetDeleteType();
509 if (this_present_deleteType || that_present_deleteType) {
510 if (!(this_present_deleteType && that_present_deleteType))
511 return false;
512 if (!this.deleteType.equals(that.deleteType))
513 return false;
514 }
515
516 boolean this_present_writeToWal = true && this.isSetWriteToWal();
517 boolean that_present_writeToWal = true && that.isSetWriteToWal();
518 if (this_present_writeToWal || that_present_writeToWal) {
519 if (!(this_present_writeToWal && that_present_writeToWal))
520 return false;
521 if (this.writeToWal != that.writeToWal)
522 return false;
523 }
524
525 return true;
526 }
527
528 @Override
529 public int hashCode() {
530 return 0;
531 }
532
533 public int compareTo(TDelete other) {
534 if (!getClass().equals(other.getClass())) {
535 return getClass().getName().compareTo(other.getClass().getName());
536 }
537
538 int lastComparison = 0;
539 TDelete typedOther = (TDelete)other;
540
541 lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
542 if (lastComparison != 0) {
543 return lastComparison;
544 }
545 if (isSetRow()) {
546 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
547 if (lastComparison != 0) {
548 return lastComparison;
549 }
550 }
551 lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
552 if (lastComparison != 0) {
553 return lastComparison;
554 }
555 if (isSetColumns()) {
556 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
557 if (lastComparison != 0) {
558 return lastComparison;
559 }
560 }
561 lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
562 if (lastComparison != 0) {
563 return lastComparison;
564 }
565 if (isSetTimestamp()) {
566 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
567 if (lastComparison != 0) {
568 return lastComparison;
569 }
570 }
571 lastComparison = Boolean.valueOf(isSetDeleteType()).compareTo(typedOther.isSetDeleteType());
572 if (lastComparison != 0) {
573 return lastComparison;
574 }
575 if (isSetDeleteType()) {
576 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteType, typedOther.deleteType);
577 if (lastComparison != 0) {
578 return lastComparison;
579 }
580 }
581 lastComparison = Boolean.valueOf(isSetWriteToWal()).compareTo(typedOther.isSetWriteToWal());
582 if (lastComparison != 0) {
583 return lastComparison;
584 }
585 if (isSetWriteToWal()) {
586 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeToWal, typedOther.writeToWal);
587 if (lastComparison != 0) {
588 return lastComparison;
589 }
590 }
591 return 0;
592 }
593
594 public _Fields fieldForId(int fieldId) {
595 return _Fields.findByThriftId(fieldId);
596 }
597
598 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
599 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
600 }
601
602 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
603 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
604 }
605
606 @Override
607 public String toString() {
608 StringBuilder sb = new StringBuilder("TDelete(");
609 boolean first = true;
610
611 sb.append("row:");
612 if (this.row == null) {
613 sb.append("null");
614 } else {
615 org.apache.thrift.TBaseHelper.toString(this.row, sb);
616 }
617 first = false;
618 if (isSetColumns()) {
619 if (!first) sb.append(", ");
620 sb.append("columns:");
621 if (this.columns == null) {
622 sb.append("null");
623 } else {
624 sb.append(this.columns);
625 }
626 first = false;
627 }
628 if (isSetTimestamp()) {
629 if (!first) sb.append(", ");
630 sb.append("timestamp:");
631 sb.append(this.timestamp);
632 first = false;
633 }
634 if (isSetDeleteType()) {
635 if (!first) sb.append(", ");
636 sb.append("deleteType:");
637 if (this.deleteType == null) {
638 sb.append("null");
639 } else {
640 sb.append(this.deleteType);
641 }
642 first = false;
643 }
644 if (isSetWriteToWal()) {
645 if (!first) sb.append(", ");
646 sb.append("writeToWal:");
647 sb.append(this.writeToWal);
648 first = false;
649 }
650 sb.append(")");
651 return sb.toString();
652 }
653
654 public void validate() throws org.apache.thrift.TException {
655
656 if (row == null) {
657 throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString());
658 }
659 }
660
661 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
662 try {
663 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
664 } catch (org.apache.thrift.TException te) {
665 throw new java.io.IOException(te);
666 }
667 }
668
669 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
670 try {
671
672 __isset_bit_vector = new BitSet(1);
673 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
674 } catch (org.apache.thrift.TException te) {
675 throw new java.io.IOException(te);
676 }
677 }
678
679 private static class TDeleteStandardSchemeFactory implements SchemeFactory {
680 public TDeleteStandardScheme getScheme() {
681 return new TDeleteStandardScheme();
682 }
683 }
684
685 private static class TDeleteStandardScheme extends StandardScheme<TDelete> {
686
687 public void read(org.apache.thrift.protocol.TProtocol iprot, TDelete struct) throws org.apache.thrift.TException {
688 org.apache.thrift.protocol.TField schemeField;
689 iprot.readStructBegin();
690 while (true)
691 {
692 schemeField = iprot.readFieldBegin();
693 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
694 break;
695 }
696 switch (schemeField.id) {
697 case 1:
698 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
699 struct.row = iprot.readBinary();
700 struct.setRowIsSet(true);
701 } else {
702 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
703 }
704 break;
705 case 2:
706 if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
707 {
708 org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
709 struct.columns = new ArrayList<TColumn>(_list24.size);
710 for (int _i25 = 0; _i25 < _list24.size; ++_i25)
711 {
712 TColumn _elem26;
713 _elem26 = new TColumn();
714 _elem26.read(iprot);
715 struct.columns.add(_elem26);
716 }
717 iprot.readListEnd();
718 }
719 struct.setColumnsIsSet(true);
720 } else {
721 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
722 }
723 break;
724 case 3:
725 if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
726 struct.timestamp = iprot.readI64();
727 struct.setTimestampIsSet(true);
728 } else {
729 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
730 }
731 break;
732 case 4:
733 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
734 struct.deleteType = TDeleteType.findByValue(iprot.readI32());
735 struct.setDeleteTypeIsSet(true);
736 } else {
737 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
738 }
739 break;
740 case 5:
741 if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
742 struct.writeToWal = iprot.readBool();
743 struct.setWriteToWalIsSet(true);
744 } else {
745 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
746 }
747 break;
748 default:
749 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
750 }
751 iprot.readFieldEnd();
752 }
753 iprot.readStructEnd();
754
755
756 struct.validate();
757 }
758
759 public void write(org.apache.thrift.protocol.TProtocol oprot, TDelete struct) throws org.apache.thrift.TException {
760 struct.validate();
761
762 oprot.writeStructBegin(STRUCT_DESC);
763 if (struct.row != null) {
764 oprot.writeFieldBegin(ROW_FIELD_DESC);
765 oprot.writeBinary(struct.row);
766 oprot.writeFieldEnd();
767 }
768 if (struct.columns != null) {
769 if (struct.isSetColumns()) {
770 oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
771 {
772 oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
773 for (TColumn _iter27 : struct.columns)
774 {
775 _iter27.write(oprot);
776 }
777 oprot.writeListEnd();
778 }
779 oprot.writeFieldEnd();
780 }
781 }
782 if (struct.isSetTimestamp()) {
783 oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
784 oprot.writeI64(struct.timestamp);
785 oprot.writeFieldEnd();
786 }
787 if (struct.deleteType != null) {
788 if (struct.isSetDeleteType()) {
789 oprot.writeFieldBegin(DELETE_TYPE_FIELD_DESC);
790 oprot.writeI32(struct.deleteType.getValue());
791 oprot.writeFieldEnd();
792 }
793 }
794 if (struct.isSetWriteToWal()) {
795 oprot.writeFieldBegin(WRITE_TO_WAL_FIELD_DESC);
796 oprot.writeBool(struct.writeToWal);
797 oprot.writeFieldEnd();
798 }
799 oprot.writeFieldStop();
800 oprot.writeStructEnd();
801 }
802
803 }
804
805 private static class TDeleteTupleSchemeFactory implements SchemeFactory {
806 public TDeleteTupleScheme getScheme() {
807 return new TDeleteTupleScheme();
808 }
809 }
810
811 private static class TDeleteTupleScheme extends TupleScheme<TDelete> {
812
813 @Override
814 public void write(org.apache.thrift.protocol.TProtocol prot, TDelete struct) throws org.apache.thrift.TException {
815 TTupleProtocol oprot = (TTupleProtocol) prot;
816 oprot.writeBinary(struct.row);
817 BitSet optionals = new BitSet();
818 if (struct.isSetColumns()) {
819 optionals.set(0);
820 }
821 if (struct.isSetTimestamp()) {
822 optionals.set(1);
823 }
824 if (struct.isSetDeleteType()) {
825 optionals.set(2);
826 }
827 if (struct.isSetWriteToWal()) {
828 optionals.set(3);
829 }
830 oprot.writeBitSet(optionals, 4);
831 if (struct.isSetColumns()) {
832 {
833 oprot.writeI32(struct.columns.size());
834 for (TColumn _iter28 : struct.columns)
835 {
836 _iter28.write(oprot);
837 }
838 }
839 }
840 if (struct.isSetTimestamp()) {
841 oprot.writeI64(struct.timestamp);
842 }
843 if (struct.isSetDeleteType()) {
844 oprot.writeI32(struct.deleteType.getValue());
845 }
846 if (struct.isSetWriteToWal()) {
847 oprot.writeBool(struct.writeToWal);
848 }
849 }
850
851 @Override
852 public void read(org.apache.thrift.protocol.TProtocol prot, TDelete struct) throws org.apache.thrift.TException {
853 TTupleProtocol iprot = (TTupleProtocol) prot;
854 struct.row = iprot.readBinary();
855 struct.setRowIsSet(true);
856 BitSet incoming = iprot.readBitSet(4);
857 if (incoming.get(0)) {
858 {
859 org.apache.thrift.protocol.TList _list29 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
860 struct.columns = new ArrayList<TColumn>(_list29.size);
861 for (int _i30 = 0; _i30 < _list29.size; ++_i30)
862 {
863 TColumn _elem31;
864 _elem31 = new TColumn();
865 _elem31.read(iprot);
866 struct.columns.add(_elem31);
867 }
868 }
869 struct.setColumnsIsSet(true);
870 }
871 if (incoming.get(1)) {
872 struct.timestamp = iprot.readI64();
873 struct.setTimestampIsSet(true);
874 }
875 if (incoming.get(2)) {
876 struct.deleteType = TDeleteType.findByValue(iprot.readI32());
877 struct.setDeleteTypeIsSet(true);
878 }
879 if (incoming.get(3)) {
880 struct.writeToWal = iprot.readBool();
881 struct.setWriteToWalIsSet(true);
882 }
883 }
884 }
885
886 }
887