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