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 private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)6);
62
63 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
64 static {
65 schemes.put(StandardScheme.class, new TDeleteStandardSchemeFactory());
66 schemes.put(TupleScheme.class, new TDeleteTupleSchemeFactory());
67 }
68
69 public ByteBuffer row;
70 public List<TColumn> columns;
71 public long timestamp;
72
73
74
75
76 public TDeleteType deleteType;
77 public boolean writeToWal;
78 public Map<ByteBuffer,ByteBuffer> attributes;
79
80
81 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
82 ROW((short)1, "row"),
83 COLUMNS((short)2, "columns"),
84 TIMESTAMP((short)3, "timestamp"),
85
86
87
88
89 DELETE_TYPE((short)4, "deleteType"),
90 WRITE_TO_WAL((short)5, "writeToWal"),
91 ATTRIBUTES((short)6, "attributes");
92
93 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
94
95 static {
96 for (_Fields field : EnumSet.allOf(_Fields.class)) {
97 byName.put(field.getFieldName(), field);
98 }
99 }
100
101
102
103
104 public static _Fields findByThriftId(int fieldId) {
105 switch(fieldId) {
106 case 1:
107 return ROW;
108 case 2:
109 return COLUMNS;
110 case 3:
111 return TIMESTAMP;
112 case 4:
113 return DELETE_TYPE;
114 case 5:
115 return WRITE_TO_WAL;
116 case 6:
117 return ATTRIBUTES;
118 default:
119 return null;
120 }
121 }
122
123
124
125
126
127 public static _Fields findByThriftIdOrThrow(int fieldId) {
128 _Fields fields = findByThriftId(fieldId);
129 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
130 return fields;
131 }
132
133
134
135
136 public static _Fields findByName(String name) {
137 return byName.get(name);
138 }
139
140 private final short _thriftId;
141 private final String _fieldName;
142
143 _Fields(short thriftId, String fieldName) {
144 _thriftId = thriftId;
145 _fieldName = fieldName;
146 }
147
148 public short getThriftFieldId() {
149 return _thriftId;
150 }
151
152 public String getFieldName() {
153 return _fieldName;
154 }
155 }
156
157
158 private static final int __TIMESTAMP_ISSET_ID = 0;
159 private static final int __WRITETOWAL_ISSET_ID = 1;
160 private BitSet __isset_bit_vector = new BitSet(2);
161 private _Fields optionals[] = {_Fields.COLUMNS,_Fields.TIMESTAMP,_Fields.DELETE_TYPE,_Fields.WRITE_TO_WAL,_Fields.ATTRIBUTES};
162 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
163 static {
164 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
165 tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.REQUIRED,
166 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
167 tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.OPTIONAL,
168 new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
169 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumn.class))));
170 tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL,
171 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
172 tmpMap.put(_Fields.DELETE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("deleteType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
173 new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDeleteType.class)));
174 tmpMap.put(_Fields.WRITE_TO_WAL, new org.apache.thrift.meta_data.FieldMetaData("writeToWal", org.apache.thrift.TFieldRequirementType.OPTIONAL,
175 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
176 tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
177 new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
178 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true),
179 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
180 metaDataMap = Collections.unmodifiableMap(tmpMap);
181 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TDelete.class, metaDataMap);
182 }
183
184 public TDelete() {
185 this.deleteType = org.apache.hadoop.hbase.thrift2.generated.TDeleteType.DELETE_COLUMNS;
186
187 this.writeToWal = true;
188
189 }
190
191 public TDelete(
192 ByteBuffer row)
193 {
194 this();
195 this.row = row;
196 }
197
198
199
200
201 public TDelete(TDelete other) {
202 __isset_bit_vector.clear();
203 __isset_bit_vector.or(other.__isset_bit_vector);
204 if (other.isSetRow()) {
205 this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
206 ;
207 }
208 if (other.isSetColumns()) {
209 List<TColumn> __this__columns = new ArrayList<TColumn>();
210 for (TColumn other_element : other.columns) {
211 __this__columns.add(new TColumn(other_element));
212 }
213 this.columns = __this__columns;
214 }
215 this.timestamp = other.timestamp;
216 if (other.isSetDeleteType()) {
217 this.deleteType = other.deleteType;
218 }
219 this.writeToWal = other.writeToWal;
220 if (other.isSetAttributes()) {
221 Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>();
222 for (Map.Entry<ByteBuffer, ByteBuffer> other_element : other.attributes.entrySet()) {
223
224 ByteBuffer other_element_key = other_element.getKey();
225 ByteBuffer other_element_value = other_element.getValue();
226
227 ByteBuffer __this__attributes_copy_key = org.apache.thrift.TBaseHelper.copyBinary(other_element_key);
228 ;
229
230 ByteBuffer __this__attributes_copy_value = org.apache.thrift.TBaseHelper.copyBinary(other_element_value);
231 ;
232
233 __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value);
234 }
235 this.attributes = __this__attributes;
236 }
237 }
238
239 public TDelete deepCopy() {
240 return new TDelete(this);
241 }
242
243 @Override
244 public void clear() {
245 this.row = null;
246 this.columns = null;
247 setTimestampIsSet(false);
248 this.timestamp = 0;
249 this.deleteType = org.apache.hadoop.hbase.thrift2.generated.TDeleteType.DELETE_COLUMNS;
250
251 this.writeToWal = true;
252
253 this.attributes = null;
254 }
255
256 public byte[] getRow() {
257 setRow(org.apache.thrift.TBaseHelper.rightSize(row));
258 return row == null ? null : row.array();
259 }
260
261 public ByteBuffer bufferForRow() {
262 return row;
263 }
264
265 public TDelete setRow(byte[] row) {
266 setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
267 return this;
268 }
269
270 public TDelete setRow(ByteBuffer row) {
271 this.row = row;
272 return this;
273 }
274
275 public void unsetRow() {
276 this.row = null;
277 }
278
279
280 public boolean isSetRow() {
281 return this.row != null;
282 }
283
284 public void setRowIsSet(boolean value) {
285 if (!value) {
286 this.row = null;
287 }
288 }
289
290 public int getColumnsSize() {
291 return (this.columns == null) ? 0 : this.columns.size();
292 }
293
294 public java.util.Iterator<TColumn> getColumnsIterator() {
295 return (this.columns == null) ? null : this.columns.iterator();
296 }
297
298 public void addToColumns(TColumn elem) {
299 if (this.columns == null) {
300 this.columns = new ArrayList<TColumn>();
301 }
302 this.columns.add(elem);
303 }
304
305 public List<TColumn> getColumns() {
306 return this.columns;
307 }
308
309 public TDelete setColumns(List<TColumn> columns) {
310 this.columns = columns;
311 return this;
312 }
313
314 public void unsetColumns() {
315 this.columns = null;
316 }
317
318
319 public boolean isSetColumns() {
320 return this.columns != null;
321 }
322
323 public void setColumnsIsSet(boolean value) {
324 if (!value) {
325 this.columns = null;
326 }
327 }
328
329 public long getTimestamp() {
330 return this.timestamp;
331 }
332
333 public TDelete setTimestamp(long timestamp) {
334 this.timestamp = timestamp;
335 setTimestampIsSet(true);
336 return this;
337 }
338
339 public void unsetTimestamp() {
340 __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
341 }
342
343
344 public boolean isSetTimestamp() {
345 return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
346 }
347
348 public void setTimestampIsSet(boolean value) {
349 __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
350 }
351
352
353
354
355
356 public TDeleteType getDeleteType() {
357 return this.deleteType;
358 }
359
360
361
362
363
364 public TDelete setDeleteType(TDeleteType deleteType) {
365 this.deleteType = deleteType;
366 return this;
367 }
368
369 public void unsetDeleteType() {
370 this.deleteType = null;
371 }
372
373
374 public boolean isSetDeleteType() {
375 return this.deleteType != null;
376 }
377
378 public void setDeleteTypeIsSet(boolean value) {
379 if (!value) {
380 this.deleteType = null;
381 }
382 }
383
384 public boolean isWriteToWal() {
385 return this.writeToWal;
386 }
387
388 public TDelete setWriteToWal(boolean writeToWal) {
389 this.writeToWal = writeToWal;
390 setWriteToWalIsSet(true);
391 return this;
392 }
393
394 public void unsetWriteToWal() {
395 __isset_bit_vector.clear(__WRITETOWAL_ISSET_ID);
396 }
397
398
399 public boolean isSetWriteToWal() {
400 return __isset_bit_vector.get(__WRITETOWAL_ISSET_ID);
401 }
402
403 public void setWriteToWalIsSet(boolean value) {
404 __isset_bit_vector.set(__WRITETOWAL_ISSET_ID, value);
405 }
406
407 public int getAttributesSize() {
408 return (this.attributes == null) ? 0 : this.attributes.size();
409 }
410
411 public void putToAttributes(ByteBuffer key, ByteBuffer val) {
412 if (this.attributes == null) {
413 this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
414 }
415 this.attributes.put(key, val);
416 }
417
418 public Map<ByteBuffer,ByteBuffer> getAttributes() {
419 return this.attributes;
420 }
421
422 public TDelete setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
423 this.attributes = attributes;
424 return this;
425 }
426
427 public void unsetAttributes() {
428 this.attributes = null;
429 }
430
431
432 public boolean isSetAttributes() {
433 return this.attributes != null;
434 }
435
436 public void setAttributesIsSet(boolean value) {
437 if (!value) {
438 this.attributes = null;
439 }
440 }
441
442 public void setFieldValue(_Fields field, Object value) {
443 switch (field) {
444 case ROW:
445 if (value == null) {
446 unsetRow();
447 } else {
448 setRow((ByteBuffer)value);
449 }
450 break;
451
452 case COLUMNS:
453 if (value == null) {
454 unsetColumns();
455 } else {
456 setColumns((List<TColumn>)value);
457 }
458 break;
459
460 case TIMESTAMP:
461 if (value == null) {
462 unsetTimestamp();
463 } else {
464 setTimestamp((Long)value);
465 }
466 break;
467
468 case DELETE_TYPE:
469 if (value == null) {
470 unsetDeleteType();
471 } else {
472 setDeleteType((TDeleteType)value);
473 }
474 break;
475
476 case WRITE_TO_WAL:
477 if (value == null) {
478 unsetWriteToWal();
479 } else {
480 setWriteToWal((Boolean)value);
481 }
482 break;
483
484 case ATTRIBUTES:
485 if (value == null) {
486 unsetAttributes();
487 } else {
488 setAttributes((Map<ByteBuffer,ByteBuffer>)value);
489 }
490 break;
491
492 }
493 }
494
495 public Object getFieldValue(_Fields field) {
496 switch (field) {
497 case ROW:
498 return getRow();
499
500 case COLUMNS:
501 return getColumns();
502
503 case TIMESTAMP:
504 return Long.valueOf(getTimestamp());
505
506 case DELETE_TYPE:
507 return getDeleteType();
508
509 case WRITE_TO_WAL:
510 return Boolean.valueOf(isWriteToWal());
511
512 case ATTRIBUTES:
513 return getAttributes();
514
515 }
516 throw new IllegalStateException();
517 }
518
519
520 public boolean isSet(_Fields field) {
521 if (field == null) {
522 throw new IllegalArgumentException();
523 }
524
525 switch (field) {
526 case ROW:
527 return isSetRow();
528 case COLUMNS:
529 return isSetColumns();
530 case TIMESTAMP:
531 return isSetTimestamp();
532 case DELETE_TYPE:
533 return isSetDeleteType();
534 case WRITE_TO_WAL:
535 return isSetWriteToWal();
536 case ATTRIBUTES:
537 return isSetAttributes();
538 }
539 throw new IllegalStateException();
540 }
541
542 @Override
543 public boolean equals(Object that) {
544 if (that == null)
545 return false;
546 if (that instanceof TDelete)
547 return this.equals((TDelete)that);
548 return false;
549 }
550
551 public boolean equals(TDelete that) {
552 if (that == null)
553 return false;
554
555 boolean this_present_row = true && this.isSetRow();
556 boolean that_present_row = true && that.isSetRow();
557 if (this_present_row || that_present_row) {
558 if (!(this_present_row && that_present_row))
559 return false;
560 if (!this.row.equals(that.row))
561 return false;
562 }
563
564 boolean this_present_columns = true && this.isSetColumns();
565 boolean that_present_columns = true && that.isSetColumns();
566 if (this_present_columns || that_present_columns) {
567 if (!(this_present_columns && that_present_columns))
568 return false;
569 if (!this.columns.equals(that.columns))
570 return false;
571 }
572
573 boolean this_present_timestamp = true && this.isSetTimestamp();
574 boolean that_present_timestamp = true && that.isSetTimestamp();
575 if (this_present_timestamp || that_present_timestamp) {
576 if (!(this_present_timestamp && that_present_timestamp))
577 return false;
578 if (this.timestamp != that.timestamp)
579 return false;
580 }
581
582 boolean this_present_deleteType = true && this.isSetDeleteType();
583 boolean that_present_deleteType = true && that.isSetDeleteType();
584 if (this_present_deleteType || that_present_deleteType) {
585 if (!(this_present_deleteType && that_present_deleteType))
586 return false;
587 if (!this.deleteType.equals(that.deleteType))
588 return false;
589 }
590
591 boolean this_present_writeToWal = true && this.isSetWriteToWal();
592 boolean that_present_writeToWal = true && that.isSetWriteToWal();
593 if (this_present_writeToWal || that_present_writeToWal) {
594 if (!(this_present_writeToWal && that_present_writeToWal))
595 return false;
596 if (this.writeToWal != that.writeToWal)
597 return false;
598 }
599
600 boolean this_present_attributes = true && this.isSetAttributes();
601 boolean that_present_attributes = true && that.isSetAttributes();
602 if (this_present_attributes || that_present_attributes) {
603 if (!(this_present_attributes && that_present_attributes))
604 return false;
605 if (!this.attributes.equals(that.attributes))
606 return false;
607 }
608
609 return true;
610 }
611
612 @Override
613 public int hashCode() {
614 return 0;
615 }
616
617 public int compareTo(TDelete other) {
618 if (!getClass().equals(other.getClass())) {
619 return getClass().getName().compareTo(other.getClass().getName());
620 }
621
622 int lastComparison = 0;
623 TDelete typedOther = (TDelete)other;
624
625 lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow());
626 if (lastComparison != 0) {
627 return lastComparison;
628 }
629 if (isSetRow()) {
630 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
631 if (lastComparison != 0) {
632 return lastComparison;
633 }
634 }
635 lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
636 if (lastComparison != 0) {
637 return lastComparison;
638 }
639 if (isSetColumns()) {
640 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
641 if (lastComparison != 0) {
642 return lastComparison;
643 }
644 }
645 lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
646 if (lastComparison != 0) {
647 return lastComparison;
648 }
649 if (isSetTimestamp()) {
650 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
651 if (lastComparison != 0) {
652 return lastComparison;
653 }
654 }
655 lastComparison = Boolean.valueOf(isSetDeleteType()).compareTo(typedOther.isSetDeleteType());
656 if (lastComparison != 0) {
657 return lastComparison;
658 }
659 if (isSetDeleteType()) {
660 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deleteType, typedOther.deleteType);
661 if (lastComparison != 0) {
662 return lastComparison;
663 }
664 }
665 lastComparison = Boolean.valueOf(isSetWriteToWal()).compareTo(typedOther.isSetWriteToWal());
666 if (lastComparison != 0) {
667 return lastComparison;
668 }
669 if (isSetWriteToWal()) {
670 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeToWal, typedOther.writeToWal);
671 if (lastComparison != 0) {
672 return lastComparison;
673 }
674 }
675 lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
676 if (lastComparison != 0) {
677 return lastComparison;
678 }
679 if (isSetAttributes()) {
680 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
681 if (lastComparison != 0) {
682 return lastComparison;
683 }
684 }
685 return 0;
686 }
687
688 public _Fields fieldForId(int fieldId) {
689 return _Fields.findByThriftId(fieldId);
690 }
691
692 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
693 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
694 }
695
696 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
697 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
698 }
699
700 @Override
701 public String toString() {
702 StringBuilder sb = new StringBuilder("TDelete(");
703 boolean first = true;
704
705 sb.append("row:");
706 if (this.row == null) {
707 sb.append("null");
708 } else {
709 org.apache.thrift.TBaseHelper.toString(this.row, sb);
710 }
711 first = false;
712 if (isSetColumns()) {
713 if (!first) sb.append(", ");
714 sb.append("columns:");
715 if (this.columns == null) {
716 sb.append("null");
717 } else {
718 sb.append(this.columns);
719 }
720 first = false;
721 }
722 if (isSetTimestamp()) {
723 if (!first) sb.append(", ");
724 sb.append("timestamp:");
725 sb.append(this.timestamp);
726 first = false;
727 }
728 if (isSetDeleteType()) {
729 if (!first) sb.append(", ");
730 sb.append("deleteType:");
731 if (this.deleteType == null) {
732 sb.append("null");
733 } else {
734 sb.append(this.deleteType);
735 }
736 first = false;
737 }
738 if (isSetWriteToWal()) {
739 if (!first) sb.append(", ");
740 sb.append("writeToWal:");
741 sb.append(this.writeToWal);
742 first = false;
743 }
744 if (isSetAttributes()) {
745 if (!first) sb.append(", ");
746 sb.append("attributes:");
747 if (this.attributes == null) {
748 sb.append("null");
749 } else {
750 sb.append(this.attributes);
751 }
752 first = false;
753 }
754 sb.append(")");
755 return sb.toString();
756 }
757
758 public void validate() throws org.apache.thrift.TException {
759
760 if (row == null) {
761 throw new org.apache.thrift.protocol.TProtocolException("Required field 'row' was not present! Struct: " + toString());
762 }
763 }
764
765 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
766 try {
767 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
768 } catch (org.apache.thrift.TException te) {
769 throw new java.io.IOException(te);
770 }
771 }
772
773 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
774 try {
775
776 __isset_bit_vector = new BitSet(1);
777 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
778 } catch (org.apache.thrift.TException te) {
779 throw new java.io.IOException(te);
780 }
781 }
782
783 private static class TDeleteStandardSchemeFactory implements SchemeFactory {
784 public TDeleteStandardScheme getScheme() {
785 return new TDeleteStandardScheme();
786 }
787 }
788
789 private static class TDeleteStandardScheme extends StandardScheme<TDelete> {
790
791 public void read(org.apache.thrift.protocol.TProtocol iprot, TDelete struct) throws org.apache.thrift.TException {
792 org.apache.thrift.protocol.TField schemeField;
793 iprot.readStructBegin();
794 while (true)
795 {
796 schemeField = iprot.readFieldBegin();
797 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
798 break;
799 }
800 switch (schemeField.id) {
801 case 1:
802 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
803 struct.row = iprot.readBinary();
804 struct.setRowIsSet(true);
805 } else {
806 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
807 }
808 break;
809 case 2:
810 if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
811 {
812 org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
813 struct.columns = new ArrayList<TColumn>(_list44.size);
814 for (int _i45 = 0; _i45 < _list44.size; ++_i45)
815 {
816 TColumn _elem46;
817 _elem46 = new TColumn();
818 _elem46.read(iprot);
819 struct.columns.add(_elem46);
820 }
821 iprot.readListEnd();
822 }
823 struct.setColumnsIsSet(true);
824 } else {
825 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
826 }
827 break;
828 case 3:
829 if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
830 struct.timestamp = iprot.readI64();
831 struct.setTimestampIsSet(true);
832 } else {
833 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
834 }
835 break;
836 case 4:
837 if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
838 struct.deleteType = TDeleteType.findByValue(iprot.readI32());
839 struct.setDeleteTypeIsSet(true);
840 } else {
841 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
842 }
843 break;
844 case 5:
845 if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
846 struct.writeToWal = iprot.readBool();
847 struct.setWriteToWalIsSet(true);
848 } else {
849 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
850 }
851 break;
852 case 6:
853 if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
854 {
855 org.apache.thrift.protocol.TMap _map47 = iprot.readMapBegin();
856 struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map47.size);
857 for (int _i48 = 0; _i48 < _map47.size; ++_i48)
858 {
859 ByteBuffer _key49;
860 ByteBuffer _val50;
861 _key49 = iprot.readBinary();
862 _val50 = iprot.readBinary();
863 struct.attributes.put(_key49, _val50);
864 }
865 iprot.readMapEnd();
866 }
867 struct.setAttributesIsSet(true);
868 } else {
869 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
870 }
871 break;
872 default:
873 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
874 }
875 iprot.readFieldEnd();
876 }
877 iprot.readStructEnd();
878
879
880 struct.validate();
881 }
882
883 public void write(org.apache.thrift.protocol.TProtocol oprot, TDelete struct) throws org.apache.thrift.TException {
884 struct.validate();
885
886 oprot.writeStructBegin(STRUCT_DESC);
887 if (struct.row != null) {
888 oprot.writeFieldBegin(ROW_FIELD_DESC);
889 oprot.writeBinary(struct.row);
890 oprot.writeFieldEnd();
891 }
892 if (struct.columns != null) {
893 if (struct.isSetColumns()) {
894 oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
895 {
896 oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
897 for (TColumn _iter51 : struct.columns)
898 {
899 _iter51.write(oprot);
900 }
901 oprot.writeListEnd();
902 }
903 oprot.writeFieldEnd();
904 }
905 }
906 if (struct.isSetTimestamp()) {
907 oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
908 oprot.writeI64(struct.timestamp);
909 oprot.writeFieldEnd();
910 }
911 if (struct.deleteType != null) {
912 if (struct.isSetDeleteType()) {
913 oprot.writeFieldBegin(DELETE_TYPE_FIELD_DESC);
914 oprot.writeI32(struct.deleteType.getValue());
915 oprot.writeFieldEnd();
916 }
917 }
918 if (struct.isSetWriteToWal()) {
919 oprot.writeFieldBegin(WRITE_TO_WAL_FIELD_DESC);
920 oprot.writeBool(struct.writeToWal);
921 oprot.writeFieldEnd();
922 }
923 if (struct.attributes != null) {
924 if (struct.isSetAttributes()) {
925 oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
926 {
927 oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
928 for (Map.Entry<ByteBuffer, ByteBuffer> _iter52 : struct.attributes.entrySet())
929 {
930 oprot.writeBinary(_iter52.getKey());
931 oprot.writeBinary(_iter52.getValue());
932 }
933 oprot.writeMapEnd();
934 }
935 oprot.writeFieldEnd();
936 }
937 }
938 oprot.writeFieldStop();
939 oprot.writeStructEnd();
940 }
941
942 }
943
944 private static class TDeleteTupleSchemeFactory implements SchemeFactory {
945 public TDeleteTupleScheme getScheme() {
946 return new TDeleteTupleScheme();
947 }
948 }
949
950 private static class TDeleteTupleScheme extends TupleScheme<TDelete> {
951
952 @Override
953 public void write(org.apache.thrift.protocol.TProtocol prot, TDelete struct) throws org.apache.thrift.TException {
954 TTupleProtocol oprot = (TTupleProtocol) prot;
955 oprot.writeBinary(struct.row);
956 BitSet optionals = new BitSet();
957 if (struct.isSetColumns()) {
958 optionals.set(0);
959 }
960 if (struct.isSetTimestamp()) {
961 optionals.set(1);
962 }
963 if (struct.isSetDeleteType()) {
964 optionals.set(2);
965 }
966 if (struct.isSetWriteToWal()) {
967 optionals.set(3);
968 }
969 if (struct.isSetAttributes()) {
970 optionals.set(4);
971 }
972 oprot.writeBitSet(optionals, 5);
973 if (struct.isSetColumns()) {
974 {
975 oprot.writeI32(struct.columns.size());
976 for (TColumn _iter53 : struct.columns)
977 {
978 _iter53.write(oprot);
979 }
980 }
981 }
982 if (struct.isSetTimestamp()) {
983 oprot.writeI64(struct.timestamp);
984 }
985 if (struct.isSetDeleteType()) {
986 oprot.writeI32(struct.deleteType.getValue());
987 }
988 if (struct.isSetWriteToWal()) {
989 oprot.writeBool(struct.writeToWal);
990 }
991 if (struct.isSetAttributes()) {
992 {
993 oprot.writeI32(struct.attributes.size());
994 for (Map.Entry<ByteBuffer, ByteBuffer> _iter54 : struct.attributes.entrySet())
995 {
996 oprot.writeBinary(_iter54.getKey());
997 oprot.writeBinary(_iter54.getValue());
998 }
999 }
1000 }
1001 }
1002
1003 @Override
1004 public void read(org.apache.thrift.protocol.TProtocol prot, TDelete struct) throws org.apache.thrift.TException {
1005 TTupleProtocol iprot = (TTupleProtocol) prot;
1006 struct.row = iprot.readBinary();
1007 struct.setRowIsSet(true);
1008 BitSet incoming = iprot.readBitSet(5);
1009 if (incoming.get(0)) {
1010 {
1011 org.apache.thrift.protocol.TList _list55 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
1012 struct.columns = new ArrayList<TColumn>(_list55.size);
1013 for (int _i56 = 0; _i56 < _list55.size; ++_i56)
1014 {
1015 TColumn _elem57;
1016 _elem57 = new TColumn();
1017 _elem57.read(iprot);
1018 struct.columns.add(_elem57);
1019 }
1020 }
1021 struct.setColumnsIsSet(true);
1022 }
1023 if (incoming.get(1)) {
1024 struct.timestamp = iprot.readI64();
1025 struct.setTimestampIsSet(true);
1026 }
1027 if (incoming.get(2)) {
1028 struct.deleteType = TDeleteType.findByValue(iprot.readI32());
1029 struct.setDeleteTypeIsSet(true);
1030 }
1031 if (incoming.get(3)) {
1032 struct.writeToWal = iprot.readBool();
1033 struct.setWriteToWalIsSet(true);
1034 }
1035 if (incoming.get(4)) {
1036 {
1037 org.apache.thrift.protocol.TMap _map58 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
1038 struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map58.size);
1039 for (int _i59 = 0; _i59 < _map58.size; ++_i59)
1040 {
1041 ByteBuffer _key60;
1042 ByteBuffer _val61;
1043 _key60 = iprot.readBinary();
1044 _val61 = iprot.readBinary();
1045 struct.attributes.put(_key60, _val61);
1046 }
1047 }
1048 struct.setAttributesIsSet(true);
1049 }
1050 }
1051 }
1052
1053 }
1054