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