1
2
3
4
5
6 package org.apache.hadoop.hbase.thrift.generated;
7
8 import java.util.List;
9 import java.util.ArrayList;
10 import java.util.Map;
11 import java.util.HashMap;
12 import java.util.EnumMap;
13 import java.util.Set;
14 import java.util.HashSet;
15 import java.util.EnumSet;
16 import java.util.Collections;
17 import java.util.BitSet;
18 import java.nio.ByteBuffer;
19 import java.util.Arrays;
20 import org.slf4j.Logger;
21 import org.slf4j.LoggerFactory;
22
23
24
25
26
27
28 public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescriptor, ColumnDescriptor._Fields>, java.io.Serializable, Cloneable {
29 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnDescriptor");
30
31 private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
32 private static final org.apache.thrift.protocol.TField MAX_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxVersions", org.apache.thrift.protocol.TType.I32, (short)2);
33 private static final org.apache.thrift.protocol.TField COMPRESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("compression", org.apache.thrift.protocol.TType.STRING, (short)3);
34 private static final org.apache.thrift.protocol.TField IN_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("inMemory", org.apache.thrift.protocol.TType.BOOL, (short)4);
35 private static final org.apache.thrift.protocol.TField BLOOM_FILTER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("bloomFilterType", org.apache.thrift.protocol.TType.STRING, (short)5);
36 private static final org.apache.thrift.protocol.TField BLOOM_FILTER_VECTOR_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("bloomFilterVectorSize", org.apache.thrift.protocol.TType.I32, (short)6);
37 private static final org.apache.thrift.protocol.TField BLOOM_FILTER_NB_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("bloomFilterNbHashes", org.apache.thrift.protocol.TType.I32, (short)7);
38 private static final org.apache.thrift.protocol.TField BLOCK_CACHE_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("blockCacheEnabled", org.apache.thrift.protocol.TType.BOOL, (short)8);
39 private static final org.apache.thrift.protocol.TField TIME_TO_LIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeToLive", org.apache.thrift.protocol.TType.I32, (short)9);
40
41 public ByteBuffer name;
42 public int maxVersions;
43 public String compression;
44 public boolean inMemory;
45 public String bloomFilterType;
46 public int bloomFilterVectorSize;
47 public int bloomFilterNbHashes;
48 public boolean blockCacheEnabled;
49 public int timeToLive;
50
51
52 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
53 NAME((short)1, "name"),
54 MAX_VERSIONS((short)2, "maxVersions"),
55 COMPRESSION((short)3, "compression"),
56 IN_MEMORY((short)4, "inMemory"),
57 BLOOM_FILTER_TYPE((short)5, "bloomFilterType"),
58 BLOOM_FILTER_VECTOR_SIZE((short)6, "bloomFilterVectorSize"),
59 BLOOM_FILTER_NB_HASHES((short)7, "bloomFilterNbHashes"),
60 BLOCK_CACHE_ENABLED((short)8, "blockCacheEnabled"),
61 TIME_TO_LIVE((short)9, "timeToLive");
62
63 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
64
65 static {
66 for (_Fields field : EnumSet.allOf(_Fields.class)) {
67 byName.put(field.getFieldName(), field);
68 }
69 }
70
71
72
73
74 public static _Fields findByThriftId(int fieldId) {
75 switch(fieldId) {
76 case 1:
77 return NAME;
78 case 2:
79 return MAX_VERSIONS;
80 case 3:
81 return COMPRESSION;
82 case 4:
83 return IN_MEMORY;
84 case 5:
85 return BLOOM_FILTER_TYPE;
86 case 6:
87 return BLOOM_FILTER_VECTOR_SIZE;
88 case 7:
89 return BLOOM_FILTER_NB_HASHES;
90 case 8:
91 return BLOCK_CACHE_ENABLED;
92 case 9:
93 return TIME_TO_LIVE;
94 default:
95 return null;
96 }
97 }
98
99
100
101
102
103 public static _Fields findByThriftIdOrThrow(int fieldId) {
104 _Fields fields = findByThriftId(fieldId);
105 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
106 return fields;
107 }
108
109
110
111
112 public static _Fields findByName(String name) {
113 return byName.get(name);
114 }
115
116 private final short _thriftId;
117 private final String _fieldName;
118
119 _Fields(short thriftId, String fieldName) {
120 _thriftId = thriftId;
121 _fieldName = fieldName;
122 }
123
124 public short getThriftFieldId() {
125 return _thriftId;
126 }
127
128 public String getFieldName() {
129 return _fieldName;
130 }
131 }
132
133
134 private static final int __MAXVERSIONS_ISSET_ID = 0;
135 private static final int __INMEMORY_ISSET_ID = 1;
136 private static final int __BLOOMFILTERVECTORSIZE_ISSET_ID = 2;
137 private static final int __BLOOMFILTERNBHASHES_ISSET_ID = 3;
138 private static final int __BLOCKCACHEENABLED_ISSET_ID = 4;
139 private static final int __TIMETOLIVE_ISSET_ID = 5;
140 private BitSet __isset_bit_vector = new BitSet(6);
141
142 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
143 static {
144 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
145 tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
146 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
147 tmpMap.put(_Fields.MAX_VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("maxVersions", org.apache.thrift.TFieldRequirementType.DEFAULT,
148 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
149 tmpMap.put(_Fields.COMPRESSION, new org.apache.thrift.meta_data.FieldMetaData("compression", org.apache.thrift.TFieldRequirementType.DEFAULT,
150 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
151 tmpMap.put(_Fields.IN_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("inMemory", org.apache.thrift.TFieldRequirementType.DEFAULT,
152 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
153 tmpMap.put(_Fields.BLOOM_FILTER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("bloomFilterType", org.apache.thrift.TFieldRequirementType.DEFAULT,
154 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
155 tmpMap.put(_Fields.BLOOM_FILTER_VECTOR_SIZE, new org.apache.thrift.meta_data.FieldMetaData("bloomFilterVectorSize", org.apache.thrift.TFieldRequirementType.DEFAULT,
156 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
157 tmpMap.put(_Fields.BLOOM_FILTER_NB_HASHES, new org.apache.thrift.meta_data.FieldMetaData("bloomFilterNbHashes", org.apache.thrift.TFieldRequirementType.DEFAULT,
158 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
159 tmpMap.put(_Fields.BLOCK_CACHE_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("blockCacheEnabled", org.apache.thrift.TFieldRequirementType.DEFAULT,
160 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
161 tmpMap.put(_Fields.TIME_TO_LIVE, new org.apache.thrift.meta_data.FieldMetaData("timeToLive", org.apache.thrift.TFieldRequirementType.DEFAULT,
162 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
163 metaDataMap = Collections.unmodifiableMap(tmpMap);
164 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnDescriptor.class, metaDataMap);
165 }
166
167 public ColumnDescriptor() {
168 this.maxVersions = 3;
169
170 this.compression = "NONE";
171
172 this.inMemory = false;
173
174 this.bloomFilterType = "NONE";
175
176 this.bloomFilterVectorSize = 0;
177
178 this.bloomFilterNbHashes = 0;
179
180 this.blockCacheEnabled = false;
181
182 this.timeToLive = -1;
183
184 }
185
186 public ColumnDescriptor(
187 ByteBuffer name,
188 int maxVersions,
189 String compression,
190 boolean inMemory,
191 String bloomFilterType,
192 int bloomFilterVectorSize,
193 int bloomFilterNbHashes,
194 boolean blockCacheEnabled,
195 int timeToLive)
196 {
197 this();
198 this.name = name;
199 this.maxVersions = maxVersions;
200 setMaxVersionsIsSet(true);
201 this.compression = compression;
202 this.inMemory = inMemory;
203 setInMemoryIsSet(true);
204 this.bloomFilterType = bloomFilterType;
205 this.bloomFilterVectorSize = bloomFilterVectorSize;
206 setBloomFilterVectorSizeIsSet(true);
207 this.bloomFilterNbHashes = bloomFilterNbHashes;
208 setBloomFilterNbHashesIsSet(true);
209 this.blockCacheEnabled = blockCacheEnabled;
210 setBlockCacheEnabledIsSet(true);
211 this.timeToLive = timeToLive;
212 setTimeToLiveIsSet(true);
213 }
214
215
216
217
218 public ColumnDescriptor(ColumnDescriptor other) {
219 __isset_bit_vector.clear();
220 __isset_bit_vector.or(other.__isset_bit_vector);
221 if (other.isSetName()) {
222 this.name = other.name;
223 }
224 this.maxVersions = other.maxVersions;
225 if (other.isSetCompression()) {
226 this.compression = other.compression;
227 }
228 this.inMemory = other.inMemory;
229 if (other.isSetBloomFilterType()) {
230 this.bloomFilterType = other.bloomFilterType;
231 }
232 this.bloomFilterVectorSize = other.bloomFilterVectorSize;
233 this.bloomFilterNbHashes = other.bloomFilterNbHashes;
234 this.blockCacheEnabled = other.blockCacheEnabled;
235 this.timeToLive = other.timeToLive;
236 }
237
238 public ColumnDescriptor deepCopy() {
239 return new ColumnDescriptor(this);
240 }
241
242 @Override
243 public void clear() {
244 this.name = null;
245 this.maxVersions = 3;
246
247 this.compression = "NONE";
248
249 this.inMemory = false;
250
251 this.bloomFilterType = "NONE";
252
253 this.bloomFilterVectorSize = 0;
254
255 this.bloomFilterNbHashes = 0;
256
257 this.blockCacheEnabled = false;
258
259 this.timeToLive = -1;
260
261 }
262
263 public byte[] getName() {
264 setName(org.apache.thrift.TBaseHelper.rightSize(name));
265 return name == null ? null : name.array();
266 }
267
268 public ByteBuffer bufferForName() {
269 return name;
270 }
271
272 public ColumnDescriptor setName(byte[] name) {
273 setName(name == null ? (ByteBuffer)null : ByteBuffer.wrap(name));
274 return this;
275 }
276
277 public ColumnDescriptor setName(ByteBuffer name) {
278 this.name = name;
279 return this;
280 }
281
282 public void unsetName() {
283 this.name = null;
284 }
285
286
287 public boolean isSetName() {
288 return this.name != null;
289 }
290
291 public void setNameIsSet(boolean value) {
292 if (!value) {
293 this.name = null;
294 }
295 }
296
297 public int getMaxVersions() {
298 return this.maxVersions;
299 }
300
301 public ColumnDescriptor setMaxVersions(int maxVersions) {
302 this.maxVersions = maxVersions;
303 setMaxVersionsIsSet(true);
304 return this;
305 }
306
307 public void unsetMaxVersions() {
308 __isset_bit_vector.clear(__MAXVERSIONS_ISSET_ID);
309 }
310
311
312 public boolean isSetMaxVersions() {
313 return __isset_bit_vector.get(__MAXVERSIONS_ISSET_ID);
314 }
315
316 public void setMaxVersionsIsSet(boolean value) {
317 __isset_bit_vector.set(__MAXVERSIONS_ISSET_ID, value);
318 }
319
320 public String getCompression() {
321 return this.compression;
322 }
323
324 public ColumnDescriptor setCompression(String compression) {
325 this.compression = compression;
326 return this;
327 }
328
329 public void unsetCompression() {
330 this.compression = null;
331 }
332
333
334 public boolean isSetCompression() {
335 return this.compression != null;
336 }
337
338 public void setCompressionIsSet(boolean value) {
339 if (!value) {
340 this.compression = null;
341 }
342 }
343
344 public boolean isInMemory() {
345 return this.inMemory;
346 }
347
348 public ColumnDescriptor setInMemory(boolean inMemory) {
349 this.inMemory = inMemory;
350 setInMemoryIsSet(true);
351 return this;
352 }
353
354 public void unsetInMemory() {
355 __isset_bit_vector.clear(__INMEMORY_ISSET_ID);
356 }
357
358
359 public boolean isSetInMemory() {
360 return __isset_bit_vector.get(__INMEMORY_ISSET_ID);
361 }
362
363 public void setInMemoryIsSet(boolean value) {
364 __isset_bit_vector.set(__INMEMORY_ISSET_ID, value);
365 }
366
367 public String getBloomFilterType() {
368 return this.bloomFilterType;
369 }
370
371 public ColumnDescriptor setBloomFilterType(String bloomFilterType) {
372 this.bloomFilterType = bloomFilterType;
373 return this;
374 }
375
376 public void unsetBloomFilterType() {
377 this.bloomFilterType = null;
378 }
379
380
381 public boolean isSetBloomFilterType() {
382 return this.bloomFilterType != null;
383 }
384
385 public void setBloomFilterTypeIsSet(boolean value) {
386 if (!value) {
387 this.bloomFilterType = null;
388 }
389 }
390
391 public int getBloomFilterVectorSize() {
392 return this.bloomFilterVectorSize;
393 }
394
395 public ColumnDescriptor setBloomFilterVectorSize(int bloomFilterVectorSize) {
396 this.bloomFilterVectorSize = bloomFilterVectorSize;
397 setBloomFilterVectorSizeIsSet(true);
398 return this;
399 }
400
401 public void unsetBloomFilterVectorSize() {
402 __isset_bit_vector.clear(__BLOOMFILTERVECTORSIZE_ISSET_ID);
403 }
404
405
406 public boolean isSetBloomFilterVectorSize() {
407 return __isset_bit_vector.get(__BLOOMFILTERVECTORSIZE_ISSET_ID);
408 }
409
410 public void setBloomFilterVectorSizeIsSet(boolean value) {
411 __isset_bit_vector.set(__BLOOMFILTERVECTORSIZE_ISSET_ID, value);
412 }
413
414 public int getBloomFilterNbHashes() {
415 return this.bloomFilterNbHashes;
416 }
417
418 public ColumnDescriptor setBloomFilterNbHashes(int bloomFilterNbHashes) {
419 this.bloomFilterNbHashes = bloomFilterNbHashes;
420 setBloomFilterNbHashesIsSet(true);
421 return this;
422 }
423
424 public void unsetBloomFilterNbHashes() {
425 __isset_bit_vector.clear(__BLOOMFILTERNBHASHES_ISSET_ID);
426 }
427
428
429 public boolean isSetBloomFilterNbHashes() {
430 return __isset_bit_vector.get(__BLOOMFILTERNBHASHES_ISSET_ID);
431 }
432
433 public void setBloomFilterNbHashesIsSet(boolean value) {
434 __isset_bit_vector.set(__BLOOMFILTERNBHASHES_ISSET_ID, value);
435 }
436
437 public boolean isBlockCacheEnabled() {
438 return this.blockCacheEnabled;
439 }
440
441 public ColumnDescriptor setBlockCacheEnabled(boolean blockCacheEnabled) {
442 this.blockCacheEnabled = blockCacheEnabled;
443 setBlockCacheEnabledIsSet(true);
444 return this;
445 }
446
447 public void unsetBlockCacheEnabled() {
448 __isset_bit_vector.clear(__BLOCKCACHEENABLED_ISSET_ID);
449 }
450
451
452 public boolean isSetBlockCacheEnabled() {
453 return __isset_bit_vector.get(__BLOCKCACHEENABLED_ISSET_ID);
454 }
455
456 public void setBlockCacheEnabledIsSet(boolean value) {
457 __isset_bit_vector.set(__BLOCKCACHEENABLED_ISSET_ID, value);
458 }
459
460 public int getTimeToLive() {
461 return this.timeToLive;
462 }
463
464 public ColumnDescriptor setTimeToLive(int timeToLive) {
465 this.timeToLive = timeToLive;
466 setTimeToLiveIsSet(true);
467 return this;
468 }
469
470 public void unsetTimeToLive() {
471 __isset_bit_vector.clear(__TIMETOLIVE_ISSET_ID);
472 }
473
474
475 public boolean isSetTimeToLive() {
476 return __isset_bit_vector.get(__TIMETOLIVE_ISSET_ID);
477 }
478
479 public void setTimeToLiveIsSet(boolean value) {
480 __isset_bit_vector.set(__TIMETOLIVE_ISSET_ID, value);
481 }
482
483 public void setFieldValue(_Fields field, Object value) {
484 switch (field) {
485 case NAME:
486 if (value == null) {
487 unsetName();
488 } else {
489 setName((ByteBuffer)value);
490 }
491 break;
492
493 case MAX_VERSIONS:
494 if (value == null) {
495 unsetMaxVersions();
496 } else {
497 setMaxVersions((Integer)value);
498 }
499 break;
500
501 case COMPRESSION:
502 if (value == null) {
503 unsetCompression();
504 } else {
505 setCompression((String)value);
506 }
507 break;
508
509 case IN_MEMORY:
510 if (value == null) {
511 unsetInMemory();
512 } else {
513 setInMemory((Boolean)value);
514 }
515 break;
516
517 case BLOOM_FILTER_TYPE:
518 if (value == null) {
519 unsetBloomFilterType();
520 } else {
521 setBloomFilterType((String)value);
522 }
523 break;
524
525 case BLOOM_FILTER_VECTOR_SIZE:
526 if (value == null) {
527 unsetBloomFilterVectorSize();
528 } else {
529 setBloomFilterVectorSize((Integer)value);
530 }
531 break;
532
533 case BLOOM_FILTER_NB_HASHES:
534 if (value == null) {
535 unsetBloomFilterNbHashes();
536 } else {
537 setBloomFilterNbHashes((Integer)value);
538 }
539 break;
540
541 case BLOCK_CACHE_ENABLED:
542 if (value == null) {
543 unsetBlockCacheEnabled();
544 } else {
545 setBlockCacheEnabled((Boolean)value);
546 }
547 break;
548
549 case TIME_TO_LIVE:
550 if (value == null) {
551 unsetTimeToLive();
552 } else {
553 setTimeToLive((Integer)value);
554 }
555 break;
556
557 }
558 }
559
560 public Object getFieldValue(_Fields field) {
561 switch (field) {
562 case NAME:
563 return getName();
564
565 case MAX_VERSIONS:
566 return Integer.valueOf(getMaxVersions());
567
568 case COMPRESSION:
569 return getCompression();
570
571 case IN_MEMORY:
572 return Boolean.valueOf(isInMemory());
573
574 case BLOOM_FILTER_TYPE:
575 return getBloomFilterType();
576
577 case BLOOM_FILTER_VECTOR_SIZE:
578 return Integer.valueOf(getBloomFilterVectorSize());
579
580 case BLOOM_FILTER_NB_HASHES:
581 return Integer.valueOf(getBloomFilterNbHashes());
582
583 case BLOCK_CACHE_ENABLED:
584 return Boolean.valueOf(isBlockCacheEnabled());
585
586 case TIME_TO_LIVE:
587 return Integer.valueOf(getTimeToLive());
588
589 }
590 throw new IllegalStateException();
591 }
592
593
594 public boolean isSet(_Fields field) {
595 if (field == null) {
596 throw new IllegalArgumentException();
597 }
598
599 switch (field) {
600 case NAME:
601 return isSetName();
602 case MAX_VERSIONS:
603 return isSetMaxVersions();
604 case COMPRESSION:
605 return isSetCompression();
606 case IN_MEMORY:
607 return isSetInMemory();
608 case BLOOM_FILTER_TYPE:
609 return isSetBloomFilterType();
610 case BLOOM_FILTER_VECTOR_SIZE:
611 return isSetBloomFilterVectorSize();
612 case BLOOM_FILTER_NB_HASHES:
613 return isSetBloomFilterNbHashes();
614 case BLOCK_CACHE_ENABLED:
615 return isSetBlockCacheEnabled();
616 case TIME_TO_LIVE:
617 return isSetTimeToLive();
618 }
619 throw new IllegalStateException();
620 }
621
622 @Override
623 public boolean equals(Object that) {
624 if (that == null)
625 return false;
626 if (that instanceof ColumnDescriptor)
627 return this.equals((ColumnDescriptor)that);
628 return false;
629 }
630
631 public boolean equals(ColumnDescriptor that) {
632 if (that == null)
633 return false;
634
635 boolean this_present_name = true && this.isSetName();
636 boolean that_present_name = true && that.isSetName();
637 if (this_present_name || that_present_name) {
638 if (!(this_present_name && that_present_name))
639 return false;
640 if (!this.name.equals(that.name))
641 return false;
642 }
643
644 boolean this_present_maxVersions = true;
645 boolean that_present_maxVersions = true;
646 if (this_present_maxVersions || that_present_maxVersions) {
647 if (!(this_present_maxVersions && that_present_maxVersions))
648 return false;
649 if (this.maxVersions != that.maxVersions)
650 return false;
651 }
652
653 boolean this_present_compression = true && this.isSetCompression();
654 boolean that_present_compression = true && that.isSetCompression();
655 if (this_present_compression || that_present_compression) {
656 if (!(this_present_compression && that_present_compression))
657 return false;
658 if (!this.compression.equals(that.compression))
659 return false;
660 }
661
662 boolean this_present_inMemory = true;
663 boolean that_present_inMemory = true;
664 if (this_present_inMemory || that_present_inMemory) {
665 if (!(this_present_inMemory && that_present_inMemory))
666 return false;
667 if (this.inMemory != that.inMemory)
668 return false;
669 }
670
671 boolean this_present_bloomFilterType = true && this.isSetBloomFilterType();
672 boolean that_present_bloomFilterType = true && that.isSetBloomFilterType();
673 if (this_present_bloomFilterType || that_present_bloomFilterType) {
674 if (!(this_present_bloomFilterType && that_present_bloomFilterType))
675 return false;
676 if (!this.bloomFilterType.equals(that.bloomFilterType))
677 return false;
678 }
679
680 boolean this_present_bloomFilterVectorSize = true;
681 boolean that_present_bloomFilterVectorSize = true;
682 if (this_present_bloomFilterVectorSize || that_present_bloomFilterVectorSize) {
683 if (!(this_present_bloomFilterVectorSize && that_present_bloomFilterVectorSize))
684 return false;
685 if (this.bloomFilterVectorSize != that.bloomFilterVectorSize)
686 return false;
687 }
688
689 boolean this_present_bloomFilterNbHashes = true;
690 boolean that_present_bloomFilterNbHashes = true;
691 if (this_present_bloomFilterNbHashes || that_present_bloomFilterNbHashes) {
692 if (!(this_present_bloomFilterNbHashes && that_present_bloomFilterNbHashes))
693 return false;
694 if (this.bloomFilterNbHashes != that.bloomFilterNbHashes)
695 return false;
696 }
697
698 boolean this_present_blockCacheEnabled = true;
699 boolean that_present_blockCacheEnabled = true;
700 if (this_present_blockCacheEnabled || that_present_blockCacheEnabled) {
701 if (!(this_present_blockCacheEnabled && that_present_blockCacheEnabled))
702 return false;
703 if (this.blockCacheEnabled != that.blockCacheEnabled)
704 return false;
705 }
706
707 boolean this_present_timeToLive = true;
708 boolean that_present_timeToLive = true;
709 if (this_present_timeToLive || that_present_timeToLive) {
710 if (!(this_present_timeToLive && that_present_timeToLive))
711 return false;
712 if (this.timeToLive != that.timeToLive)
713 return false;
714 }
715
716 return true;
717 }
718
719 @Override
720 public int hashCode() {
721 return 0;
722 }
723
724 public int compareTo(ColumnDescriptor other) {
725 if (!getClass().equals(other.getClass())) {
726 return getClass().getName().compareTo(other.getClass().getName());
727 }
728
729 int lastComparison = 0;
730 ColumnDescriptor typedOther = (ColumnDescriptor)other;
731
732 lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
733 if (lastComparison != 0) {
734 return lastComparison;
735 }
736 if (isSetName()) {
737 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
738 if (lastComparison != 0) {
739 return lastComparison;
740 }
741 }
742 lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(typedOther.isSetMaxVersions());
743 if (lastComparison != 0) {
744 return lastComparison;
745 }
746 if (isSetMaxVersions()) {
747 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, typedOther.maxVersions);
748 if (lastComparison != 0) {
749 return lastComparison;
750 }
751 }
752 lastComparison = Boolean.valueOf(isSetCompression()).compareTo(typedOther.isSetCompression());
753 if (lastComparison != 0) {
754 return lastComparison;
755 }
756 if (isSetCompression()) {
757 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compression, typedOther.compression);
758 if (lastComparison != 0) {
759 return lastComparison;
760 }
761 }
762 lastComparison = Boolean.valueOf(isSetInMemory()).compareTo(typedOther.isSetInMemory());
763 if (lastComparison != 0) {
764 return lastComparison;
765 }
766 if (isSetInMemory()) {
767 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inMemory, typedOther.inMemory);
768 if (lastComparison != 0) {
769 return lastComparison;
770 }
771 }
772 lastComparison = Boolean.valueOf(isSetBloomFilterType()).compareTo(typedOther.isSetBloomFilterType());
773 if (lastComparison != 0) {
774 return lastComparison;
775 }
776 if (isSetBloomFilterType()) {
777 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterType, typedOther.bloomFilterType);
778 if (lastComparison != 0) {
779 return lastComparison;
780 }
781 }
782 lastComparison = Boolean.valueOf(isSetBloomFilterVectorSize()).compareTo(typedOther.isSetBloomFilterVectorSize());
783 if (lastComparison != 0) {
784 return lastComparison;
785 }
786 if (isSetBloomFilterVectorSize()) {
787 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterVectorSize, typedOther.bloomFilterVectorSize);
788 if (lastComparison != 0) {
789 return lastComparison;
790 }
791 }
792 lastComparison = Boolean.valueOf(isSetBloomFilterNbHashes()).compareTo(typedOther.isSetBloomFilterNbHashes());
793 if (lastComparison != 0) {
794 return lastComparison;
795 }
796 if (isSetBloomFilterNbHashes()) {
797 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterNbHashes, typedOther.bloomFilterNbHashes);
798 if (lastComparison != 0) {
799 return lastComparison;
800 }
801 }
802 lastComparison = Boolean.valueOf(isSetBlockCacheEnabled()).compareTo(typedOther.isSetBlockCacheEnabled());
803 if (lastComparison != 0) {
804 return lastComparison;
805 }
806 if (isSetBlockCacheEnabled()) {
807 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockCacheEnabled, typedOther.blockCacheEnabled);
808 if (lastComparison != 0) {
809 return lastComparison;
810 }
811 }
812 lastComparison = Boolean.valueOf(isSetTimeToLive()).compareTo(typedOther.isSetTimeToLive());
813 if (lastComparison != 0) {
814 return lastComparison;
815 }
816 if (isSetTimeToLive()) {
817 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeToLive, typedOther.timeToLive);
818 if (lastComparison != 0) {
819 return lastComparison;
820 }
821 }
822 return 0;
823 }
824
825 public _Fields fieldForId(int fieldId) {
826 return _Fields.findByThriftId(fieldId);
827 }
828
829 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
830 org.apache.thrift.protocol.TField field;
831 iprot.readStructBegin();
832 while (true)
833 {
834 field = iprot.readFieldBegin();
835 if (field.type == org.apache.thrift.protocol.TType.STOP) {
836 break;
837 }
838 switch (field.id) {
839 case 1:
840 if (field.type == org.apache.thrift.protocol.TType.STRING) {
841 this.name = iprot.readBinary();
842 } else {
843 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
844 }
845 break;
846 case 2:
847 if (field.type == org.apache.thrift.protocol.TType.I32) {
848 this.maxVersions = iprot.readI32();
849 setMaxVersionsIsSet(true);
850 } else {
851 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
852 }
853 break;
854 case 3:
855 if (field.type == org.apache.thrift.protocol.TType.STRING) {
856 this.compression = iprot.readString();
857 } else {
858 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
859 }
860 break;
861 case 4:
862 if (field.type == org.apache.thrift.protocol.TType.BOOL) {
863 this.inMemory = iprot.readBool();
864 setInMemoryIsSet(true);
865 } else {
866 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
867 }
868 break;
869 case 5:
870 if (field.type == org.apache.thrift.protocol.TType.STRING) {
871 this.bloomFilterType = iprot.readString();
872 } else {
873 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
874 }
875 break;
876 case 6:
877 if (field.type == org.apache.thrift.protocol.TType.I32) {
878 this.bloomFilterVectorSize = iprot.readI32();
879 setBloomFilterVectorSizeIsSet(true);
880 } else {
881 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
882 }
883 break;
884 case 7:
885 if (field.type == org.apache.thrift.protocol.TType.I32) {
886 this.bloomFilterNbHashes = iprot.readI32();
887 setBloomFilterNbHashesIsSet(true);
888 } else {
889 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
890 }
891 break;
892 case 8:
893 if (field.type == org.apache.thrift.protocol.TType.BOOL) {
894 this.blockCacheEnabled = iprot.readBool();
895 setBlockCacheEnabledIsSet(true);
896 } else {
897 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
898 }
899 break;
900 case 9:
901 if (field.type == org.apache.thrift.protocol.TType.I32) {
902 this.timeToLive = iprot.readI32();
903 setTimeToLiveIsSet(true);
904 } else {
905 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
906 }
907 break;
908 default:
909 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
910 }
911 iprot.readFieldEnd();
912 }
913 iprot.readStructEnd();
914
915
916 validate();
917 }
918
919 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
920 validate();
921
922 oprot.writeStructBegin(STRUCT_DESC);
923 if (this.name != null) {
924 oprot.writeFieldBegin(NAME_FIELD_DESC);
925 oprot.writeBinary(this.name);
926 oprot.writeFieldEnd();
927 }
928 oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC);
929 oprot.writeI32(this.maxVersions);
930 oprot.writeFieldEnd();
931 if (this.compression != null) {
932 oprot.writeFieldBegin(COMPRESSION_FIELD_DESC);
933 oprot.writeString(this.compression);
934 oprot.writeFieldEnd();
935 }
936 oprot.writeFieldBegin(IN_MEMORY_FIELD_DESC);
937 oprot.writeBool(this.inMemory);
938 oprot.writeFieldEnd();
939 if (this.bloomFilterType != null) {
940 oprot.writeFieldBegin(BLOOM_FILTER_TYPE_FIELD_DESC);
941 oprot.writeString(this.bloomFilterType);
942 oprot.writeFieldEnd();
943 }
944 oprot.writeFieldBegin(BLOOM_FILTER_VECTOR_SIZE_FIELD_DESC);
945 oprot.writeI32(this.bloomFilterVectorSize);
946 oprot.writeFieldEnd();
947 oprot.writeFieldBegin(BLOOM_FILTER_NB_HASHES_FIELD_DESC);
948 oprot.writeI32(this.bloomFilterNbHashes);
949 oprot.writeFieldEnd();
950 oprot.writeFieldBegin(BLOCK_CACHE_ENABLED_FIELD_DESC);
951 oprot.writeBool(this.blockCacheEnabled);
952 oprot.writeFieldEnd();
953 oprot.writeFieldBegin(TIME_TO_LIVE_FIELD_DESC);
954 oprot.writeI32(this.timeToLive);
955 oprot.writeFieldEnd();
956 oprot.writeFieldStop();
957 oprot.writeStructEnd();
958 }
959
960 @Override
961 public String toString() {
962 StringBuilder sb = new StringBuilder("ColumnDescriptor(");
963 boolean first = true;
964
965 sb.append("name:");
966 if (this.name == null) {
967 sb.append("null");
968 } else {
969 sb.append(this.name);
970 }
971 first = false;
972 if (!first) sb.append(", ");
973 sb.append("maxVersions:");
974 sb.append(this.maxVersions);
975 first = false;
976 if (!first) sb.append(", ");
977 sb.append("compression:");
978 if (this.compression == null) {
979 sb.append("null");
980 } else {
981 sb.append(this.compression);
982 }
983 first = false;
984 if (!first) sb.append(", ");
985 sb.append("inMemory:");
986 sb.append(this.inMemory);
987 first = false;
988 if (!first) sb.append(", ");
989 sb.append("bloomFilterType:");
990 if (this.bloomFilterType == null) {
991 sb.append("null");
992 } else {
993 sb.append(this.bloomFilterType);
994 }
995 first = false;
996 if (!first) sb.append(", ");
997 sb.append("bloomFilterVectorSize:");
998 sb.append(this.bloomFilterVectorSize);
999 first = false;
1000 if (!first) sb.append(", ");
1001 sb.append("bloomFilterNbHashes:");
1002 sb.append(this.bloomFilterNbHashes);
1003 first = false;
1004 if (!first) sb.append(", ");
1005 sb.append("blockCacheEnabled:");
1006 sb.append(this.blockCacheEnabled);
1007 first = false;
1008 if (!first) sb.append(", ");
1009 sb.append("timeToLive:");
1010 sb.append(this.timeToLive);
1011 first = false;
1012 sb.append(")");
1013 return sb.toString();
1014 }
1015
1016 public void validate() throws org.apache.thrift.TException {
1017
1018 }
1019
1020 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1021 try {
1022 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1023 } catch (org.apache.thrift.TException te) {
1024 throw new java.io.IOException(te);
1025 }
1026 }
1027
1028 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1029 try {
1030
1031 __isset_bit_vector = new BitSet(1);
1032 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1033 } catch (org.apache.thrift.TException te) {
1034 throw new java.io.IOException(te);
1035 }
1036 }
1037
1038 }
1039