1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 /**
18 * Autogenerated by Thrift Compiler (0.9.0)
19 *
20 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
21 * @generated
22 */
23 package org.apache.accumulo.core.tabletserver.thrift;
24
25 import org.apache.thrift.scheme.IScheme;
26 import org.apache.thrift.scheme.SchemeFactory;
27 import org.apache.thrift.scheme.StandardScheme;
28
29 import org.apache.thrift.scheme.TupleScheme;
30 import org.apache.thrift.protocol.TTupleProtocol;
31 import org.apache.thrift.protocol.TProtocolException;
32 import org.apache.thrift.EncodingUtils;
33 import org.apache.thrift.TException;
34 import java.util.List;
35 import java.util.ArrayList;
36 import java.util.Map;
37 import java.util.HashMap;
38 import java.util.EnumMap;
39 import java.util.Set;
40 import java.util.HashSet;
41 import java.util.EnumSet;
42 import java.util.Collections;
43 import java.util.BitSet;
44 import java.nio.ByteBuffer;
45 import java.util.Arrays;
46 import org.slf4j.Logger;
47 import org.slf4j.LoggerFactory;
48
49 @SuppressWarnings("all") public class TabletStats implements org.apache.thrift.TBase<TabletStats, TabletStats._Fields>, java.io.Serializable, Cloneable {
50 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TabletStats");
51
52 private static final org.apache.thrift.protocol.TField EXTENT_FIELD_DESC = new org.apache.thrift.protocol.TField("extent", org.apache.thrift.protocol.TType.STRUCT, (short)1);
53 private static final org.apache.thrift.protocol.TField MAJORS_FIELD_DESC = new org.apache.thrift.protocol.TField("majors", org.apache.thrift.protocol.TType.STRUCT, (short)2);
54 private static final org.apache.thrift.protocol.TField MINORS_FIELD_DESC = new org.apache.thrift.protocol.TField("minors", org.apache.thrift.protocol.TType.STRUCT, (short)3);
55 private static final org.apache.thrift.protocol.TField SPLITS_FIELD_DESC = new org.apache.thrift.protocol.TField("splits", org.apache.thrift.protocol.TType.STRUCT, (short)4);
56 private static final org.apache.thrift.protocol.TField NUM_ENTRIES_FIELD_DESC = new org.apache.thrift.protocol.TField("numEntries", org.apache.thrift.protocol.TType.I64, (short)5);
57 private static final org.apache.thrift.protocol.TField INGEST_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("ingestRate", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
58 private static final org.apache.thrift.protocol.TField QUERY_RATE_FIELD_DESC = new org.apache.thrift.protocol.TField("queryRate", org.apache.thrift.protocol.TType.DOUBLE, (short)7);
59 private static final org.apache.thrift.protocol.TField SPLIT_CREATION_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("splitCreationTime", org.apache.thrift.protocol.TType.I64, (short)8);
60
61 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
62 static {
63 schemes.put(StandardScheme.class, new TabletStatsStandardSchemeFactory());
64 schemes.put(TupleScheme.class, new TabletStatsTupleSchemeFactory());
65 }
66
67 public org.apache.accumulo.core.data.thrift.TKeyExtent extent;
68 public ActionStats majors;
69 public ActionStats minors;
70 public ActionStats splits;
71 public long numEntries;
72 public double ingestRate;
73 public double queryRate;
74 public long splitCreationTime;
75
76 /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
77 @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
78 EXTENT((short)1, "extent"),
79 MAJORS((short)2, "majors"),
80 MINORS((short)3, "minors"),
81 SPLITS((short)4, "splits"),
82 NUM_ENTRIES((short)5, "numEntries"),
83 INGEST_RATE((short)6, "ingestRate"),
84 QUERY_RATE((short)7, "queryRate"),
85 SPLIT_CREATION_TIME((short)8, "splitCreationTime");
86
87 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
88
89 static {
90 for (_Fields field : EnumSet.allOf(_Fields.class)) {
91 byName.put(field.getFieldName(), field);
92 }
93 }
94
95 /**
96 * Find the _Fields constant that matches fieldId, or null if its not found.
97 */
98 public static _Fields findByThriftId(int fieldId) {
99 switch(fieldId) {
100 case 1:
101 return EXTENT;
102 case 2:
103 return MAJORS;
104 case 3:
105 return MINORS;
106 case 4:
107 return SPLITS;
108 case 5:
109 return NUM_ENTRIES;
110 case 6:
111 return INGEST_RATE;
112 case 7:
113 return QUERY_RATE;
114 case 8:
115 return SPLIT_CREATION_TIME;
116 default:
117 return null;
118 }
119 }
120
121 /**
122 * Find the _Fields constant that matches fieldId, throwing an exception
123 * if it is not found.
124 */
125 public static _Fields findByThriftIdOrThrow(int fieldId) {
126 _Fields fields = findByThriftId(fieldId);
127 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
128 return fields;
129 }
130
131 /**
132 * Find the _Fields constant that matches name, or null if its not found.
133 */
134 public static _Fields findByName(String name) {
135 return byName.get(name);
136 }
137
138 private final short _thriftId;
139 private final String _fieldName;
140
141 _Fields(short thriftId, String fieldName) {
142 _thriftId = thriftId;
143 _fieldName = fieldName;
144 }
145
146 public short getThriftFieldId() {
147 return _thriftId;
148 }
149
150 public String getFieldName() {
151 return _fieldName;
152 }
153 }
154
155
156 private static final int __NUMENTRIES_ISSET_ID = 0;
157 private static final int __INGESTRATE_ISSET_ID = 1;
158 private static final int __QUERYRATE_ISSET_ID = 2;
159 private static final int __SPLITCREATIONTIME_ISSET_ID = 3;
160 private byte __isset_bitfield = 0;
161 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
162 static {
163 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
164 tmpMap.put(_Fields.EXTENT, new org.apache.thrift.meta_data.FieldMetaData("extent", org.apache.thrift.TFieldRequirementType.DEFAULT,
165 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.data.thrift.TKeyExtent.class)));
166 tmpMap.put(_Fields.MAJORS, new org.apache.thrift.meta_data.FieldMetaData("majors", org.apache.thrift.TFieldRequirementType.DEFAULT,
167 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActionStats.class)));
168 tmpMap.put(_Fields.MINORS, new org.apache.thrift.meta_data.FieldMetaData("minors", org.apache.thrift.TFieldRequirementType.DEFAULT,
169 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActionStats.class)));
170 tmpMap.put(_Fields.SPLITS, new org.apache.thrift.meta_data.FieldMetaData("splits", org.apache.thrift.TFieldRequirementType.DEFAULT,
171 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ActionStats.class)));
172 tmpMap.put(_Fields.NUM_ENTRIES, new org.apache.thrift.meta_data.FieldMetaData("numEntries", org.apache.thrift.TFieldRequirementType.DEFAULT,
173 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
174 tmpMap.put(_Fields.INGEST_RATE, new org.apache.thrift.meta_data.FieldMetaData("ingestRate", org.apache.thrift.TFieldRequirementType.DEFAULT,
175 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
176 tmpMap.put(_Fields.QUERY_RATE, new org.apache.thrift.meta_data.FieldMetaData("queryRate", org.apache.thrift.TFieldRequirementType.DEFAULT,
177 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
178 tmpMap.put(_Fields.SPLIT_CREATION_TIME, new org.apache.thrift.meta_data.FieldMetaData("splitCreationTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
179 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
180 metaDataMap = Collections.unmodifiableMap(tmpMap);
181 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TabletStats.class, metaDataMap);
182 }
183
184 public TabletStats() {
185 }
186
187 public TabletStats(
188 org.apache.accumulo.core.data.thrift.TKeyExtent extent,
189 ActionStats majors,
190 ActionStats minors,
191 ActionStats splits,
192 long numEntries,
193 double ingestRate,
194 double queryRate,
195 long splitCreationTime)
196 {
197 this();
198 this.extent = extent;
199 this.majors = majors;
200 this.minors = minors;
201 this.splits = splits;
202 this.numEntries = numEntries;
203 setNumEntriesIsSet(true);
204 this.ingestRate = ingestRate;
205 setIngestRateIsSet(true);
206 this.queryRate = queryRate;
207 setQueryRateIsSet(true);
208 this.splitCreationTime = splitCreationTime;
209 setSplitCreationTimeIsSet(true);
210 }
211
212 /**
213 * Performs a deep copy on <i>other</i>.
214 */
215 public TabletStats(TabletStats other) {
216 __isset_bitfield = other.__isset_bitfield;
217 if (other.isSetExtent()) {
218 this.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent(other.extent);
219 }
220 if (other.isSetMajors()) {
221 this.majors = new ActionStats(other.majors);
222 }
223 if (other.isSetMinors()) {
224 this.minors = new ActionStats(other.minors);
225 }
226 if (other.isSetSplits()) {
227 this.splits = new ActionStats(other.splits);
228 }
229 this.numEntries = other.numEntries;
230 this.ingestRate = other.ingestRate;
231 this.queryRate = other.queryRate;
232 this.splitCreationTime = other.splitCreationTime;
233 }
234
235 public TabletStats deepCopy() {
236 return new TabletStats(this);
237 }
238
239 @Override
240 public void clear() {
241 this.extent = null;
242 this.majors = null;
243 this.minors = null;
244 this.splits = null;
245 setNumEntriesIsSet(false);
246 this.numEntries = 0;
247 setIngestRateIsSet(false);
248 this.ingestRate = 0.0;
249 setQueryRateIsSet(false);
250 this.queryRate = 0.0;
251 setSplitCreationTimeIsSet(false);
252 this.splitCreationTime = 0;
253 }
254
255 public org.apache.accumulo.core.data.thrift.TKeyExtent getExtent() {
256 return this.extent;
257 }
258
259 public TabletStats setExtent(org.apache.accumulo.core.data.thrift.TKeyExtent extent) {
260 this.extent = extent;
261 return this;
262 }
263
264 public void unsetExtent() {
265 this.extent = null;
266 }
267
268 /** Returns true if field extent is set (has been assigned a value) and false otherwise */
269 public boolean isSetExtent() {
270 return this.extent != null;
271 }
272
273 public void setExtentIsSet(boolean value) {
274 if (!value) {
275 this.extent = null;
276 }
277 }
278
279 public ActionStats getMajors() {
280 return this.majors;
281 }
282
283 public TabletStats setMajors(ActionStats majors) {
284 this.majors = majors;
285 return this;
286 }
287
288 public void unsetMajors() {
289 this.majors = null;
290 }
291
292 /** Returns true if field majors is set (has been assigned a value) and false otherwise */
293 public boolean isSetMajors() {
294 return this.majors != null;
295 }
296
297 public void setMajorsIsSet(boolean value) {
298 if (!value) {
299 this.majors = null;
300 }
301 }
302
303 public ActionStats getMinors() {
304 return this.minors;
305 }
306
307 public TabletStats setMinors(ActionStats minors) {
308 this.minors = minors;
309 return this;
310 }
311
312 public void unsetMinors() {
313 this.minors = null;
314 }
315
316 /** Returns true if field minors is set (has been assigned a value) and false otherwise */
317 public boolean isSetMinors() {
318 return this.minors != null;
319 }
320
321 public void setMinorsIsSet(boolean value) {
322 if (!value) {
323 this.minors = null;
324 }
325 }
326
327 public ActionStats getSplits() {
328 return this.splits;
329 }
330
331 public TabletStats setSplits(ActionStats splits) {
332 this.splits = splits;
333 return this;
334 }
335
336 public void unsetSplits() {
337 this.splits = null;
338 }
339
340 /** Returns true if field splits is set (has been assigned a value) and false otherwise */
341 public boolean isSetSplits() {
342 return this.splits != null;
343 }
344
345 public void setSplitsIsSet(boolean value) {
346 if (!value) {
347 this.splits = null;
348 }
349 }
350
351 public long getNumEntries() {
352 return this.numEntries;
353 }
354
355 public TabletStats setNumEntries(long numEntries) {
356 this.numEntries = numEntries;
357 setNumEntriesIsSet(true);
358 return this;
359 }
360
361 public void unsetNumEntries() {
362 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMENTRIES_ISSET_ID);
363 }
364
365 /** Returns true if field numEntries is set (has been assigned a value) and false otherwise */
366 public boolean isSetNumEntries() {
367 return EncodingUtils.testBit(__isset_bitfield, __NUMENTRIES_ISSET_ID);
368 }
369
370 public void setNumEntriesIsSet(boolean value) {
371 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMENTRIES_ISSET_ID, value);
372 }
373
374 public double getIngestRate() {
375 return this.ingestRate;
376 }
377
378 public TabletStats setIngestRate(double ingestRate) {
379 this.ingestRate = ingestRate;
380 setIngestRateIsSet(true);
381 return this;
382 }
383
384 public void unsetIngestRate() {
385 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __INGESTRATE_ISSET_ID);
386 }
387
388 /** Returns true if field ingestRate is set (has been assigned a value) and false otherwise */
389 public boolean isSetIngestRate() {
390 return EncodingUtils.testBit(__isset_bitfield, __INGESTRATE_ISSET_ID);
391 }
392
393 public void setIngestRateIsSet(boolean value) {
394 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __INGESTRATE_ISSET_ID, value);
395 }
396
397 public double getQueryRate() {
398 return this.queryRate;
399 }
400
401 public TabletStats setQueryRate(double queryRate) {
402 this.queryRate = queryRate;
403 setQueryRateIsSet(true);
404 return this;
405 }
406
407 public void unsetQueryRate() {
408 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __QUERYRATE_ISSET_ID);
409 }
410
411 /** Returns true if field queryRate is set (has been assigned a value) and false otherwise */
412 public boolean isSetQueryRate() {
413 return EncodingUtils.testBit(__isset_bitfield, __QUERYRATE_ISSET_ID);
414 }
415
416 public void setQueryRateIsSet(boolean value) {
417 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __QUERYRATE_ISSET_ID, value);
418 }
419
420 public long getSplitCreationTime() {
421 return this.splitCreationTime;
422 }
423
424 public TabletStats setSplitCreationTime(long splitCreationTime) {
425 this.splitCreationTime = splitCreationTime;
426 setSplitCreationTimeIsSet(true);
427 return this;
428 }
429
430 public void unsetSplitCreationTime() {
431 __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID);
432 }
433
434 /** Returns true if field splitCreationTime is set (has been assigned a value) and false otherwise */
435 public boolean isSetSplitCreationTime() {
436 return EncodingUtils.testBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID);
437 }
438
439 public void setSplitCreationTimeIsSet(boolean value) {
440 __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SPLITCREATIONTIME_ISSET_ID, value);
441 }
442
443 public void setFieldValue(_Fields field, Object value) {
444 switch (field) {
445 case EXTENT:
446 if (value == null) {
447 unsetExtent();
448 } else {
449 setExtent((org.apache.accumulo.core.data.thrift.TKeyExtent)value);
450 }
451 break;
452
453 case MAJORS:
454 if (value == null) {
455 unsetMajors();
456 } else {
457 setMajors((ActionStats)value);
458 }
459 break;
460
461 case MINORS:
462 if (value == null) {
463 unsetMinors();
464 } else {
465 setMinors((ActionStats)value);
466 }
467 break;
468
469 case SPLITS:
470 if (value == null) {
471 unsetSplits();
472 } else {
473 setSplits((ActionStats)value);
474 }
475 break;
476
477 case NUM_ENTRIES:
478 if (value == null) {
479 unsetNumEntries();
480 } else {
481 setNumEntries((Long)value);
482 }
483 break;
484
485 case INGEST_RATE:
486 if (value == null) {
487 unsetIngestRate();
488 } else {
489 setIngestRate((Double)value);
490 }
491 break;
492
493 case QUERY_RATE:
494 if (value == null) {
495 unsetQueryRate();
496 } else {
497 setQueryRate((Double)value);
498 }
499 break;
500
501 case SPLIT_CREATION_TIME:
502 if (value == null) {
503 unsetSplitCreationTime();
504 } else {
505 setSplitCreationTime((Long)value);
506 }
507 break;
508
509 }
510 }
511
512 public Object getFieldValue(_Fields field) {
513 switch (field) {
514 case EXTENT:
515 return getExtent();
516
517 case MAJORS:
518 return getMajors();
519
520 case MINORS:
521 return getMinors();
522
523 case SPLITS:
524 return getSplits();
525
526 case NUM_ENTRIES:
527 return Long.valueOf(getNumEntries());
528
529 case INGEST_RATE:
530 return Double.valueOf(getIngestRate());
531
532 case QUERY_RATE:
533 return Double.valueOf(getQueryRate());
534
535 case SPLIT_CREATION_TIME:
536 return Long.valueOf(getSplitCreationTime());
537
538 }
539 throw new IllegalStateException();
540 }
541
542 /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
543 public boolean isSet(_Fields field) {
544 if (field == null) {
545 throw new IllegalArgumentException();
546 }
547
548 switch (field) {
549 case EXTENT:
550 return isSetExtent();
551 case MAJORS:
552 return isSetMajors();
553 case MINORS:
554 return isSetMinors();
555 case SPLITS:
556 return isSetSplits();
557 case NUM_ENTRIES:
558 return isSetNumEntries();
559 case INGEST_RATE:
560 return isSetIngestRate();
561 case QUERY_RATE:
562 return isSetQueryRate();
563 case SPLIT_CREATION_TIME:
564 return isSetSplitCreationTime();
565 }
566 throw new IllegalStateException();
567 }
568
569 @Override
570 public boolean equals(Object that) {
571 if (that == null)
572 return false;
573 if (that instanceof TabletStats)
574 return this.equals((TabletStats)that);
575 return false;
576 }
577
578 public boolean equals(TabletStats that) {
579 if (that == null)
580 return false;
581
582 boolean this_present_extent = true && this.isSetExtent();
583 boolean that_present_extent = true && that.isSetExtent();
584 if (this_present_extent || that_present_extent) {
585 if (!(this_present_extent && that_present_extent))
586 return false;
587 if (!this.extent.equals(that.extent))
588 return false;
589 }
590
591 boolean this_present_majors = true && this.isSetMajors();
592 boolean that_present_majors = true && that.isSetMajors();
593 if (this_present_majors || that_present_majors) {
594 if (!(this_present_majors && that_present_majors))
595 return false;
596 if (!this.majors.equals(that.majors))
597 return false;
598 }
599
600 boolean this_present_minors = true && this.isSetMinors();
601 boolean that_present_minors = true && that.isSetMinors();
602 if (this_present_minors || that_present_minors) {
603 if (!(this_present_minors && that_present_minors))
604 return false;
605 if (!this.minors.equals(that.minors))
606 return false;
607 }
608
609 boolean this_present_splits = true && this.isSetSplits();
610 boolean that_present_splits = true && that.isSetSplits();
611 if (this_present_splits || that_present_splits) {
612 if (!(this_present_splits && that_present_splits))
613 return false;
614 if (!this.splits.equals(that.splits))
615 return false;
616 }
617
618 boolean this_present_numEntries = true;
619 boolean that_present_numEntries = true;
620 if (this_present_numEntries || that_present_numEntries) {
621 if (!(this_present_numEntries && that_present_numEntries))
622 return false;
623 if (this.numEntries != that.numEntries)
624 return false;
625 }
626
627 boolean this_present_ingestRate = true;
628 boolean that_present_ingestRate = true;
629 if (this_present_ingestRate || that_present_ingestRate) {
630 if (!(this_present_ingestRate && that_present_ingestRate))
631 return false;
632 if (this.ingestRate != that.ingestRate)
633 return false;
634 }
635
636 boolean this_present_queryRate = true;
637 boolean that_present_queryRate = true;
638 if (this_present_queryRate || that_present_queryRate) {
639 if (!(this_present_queryRate && that_present_queryRate))
640 return false;
641 if (this.queryRate != that.queryRate)
642 return false;
643 }
644
645 boolean this_present_splitCreationTime = true;
646 boolean that_present_splitCreationTime = true;
647 if (this_present_splitCreationTime || that_present_splitCreationTime) {
648 if (!(this_present_splitCreationTime && that_present_splitCreationTime))
649 return false;
650 if (this.splitCreationTime != that.splitCreationTime)
651 return false;
652 }
653
654 return true;
655 }
656
657 @Override
658 public int hashCode() {
659 return 0;
660 }
661
662 public int compareTo(TabletStats other) {
663 if (!getClass().equals(other.getClass())) {
664 return getClass().getName().compareTo(other.getClass().getName());
665 }
666
667 int lastComparison = 0;
668 TabletStats typedOther = (TabletStats)other;
669
670 lastComparison = Boolean.valueOf(isSetExtent()).compareTo(typedOther.isSetExtent());
671 if (lastComparison != 0) {
672 return lastComparison;
673 }
674 if (isSetExtent()) {
675 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.extent, typedOther.extent);
676 if (lastComparison != 0) {
677 return lastComparison;
678 }
679 }
680 lastComparison = Boolean.valueOf(isSetMajors()).compareTo(typedOther.isSetMajors());
681 if (lastComparison != 0) {
682 return lastComparison;
683 }
684 if (isSetMajors()) {
685 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.majors, typedOther.majors);
686 if (lastComparison != 0) {
687 return lastComparison;
688 }
689 }
690 lastComparison = Boolean.valueOf(isSetMinors()).compareTo(typedOther.isSetMinors());
691 if (lastComparison != 0) {
692 return lastComparison;
693 }
694 if (isSetMinors()) {
695 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minors, typedOther.minors);
696 if (lastComparison != 0) {
697 return lastComparison;
698 }
699 }
700 lastComparison = Boolean.valueOf(isSetSplits()).compareTo(typedOther.isSetSplits());
701 if (lastComparison != 0) {
702 return lastComparison;
703 }
704 if (isSetSplits()) {
705 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.splits, typedOther.splits);
706 if (lastComparison != 0) {
707 return lastComparison;
708 }
709 }
710 lastComparison = Boolean.valueOf(isSetNumEntries()).compareTo(typedOther.isSetNumEntries());
711 if (lastComparison != 0) {
712 return lastComparison;
713 }
714 if (isSetNumEntries()) {
715 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numEntries, typedOther.numEntries);
716 if (lastComparison != 0) {
717 return lastComparison;
718 }
719 }
720 lastComparison = Boolean.valueOf(isSetIngestRate()).compareTo(typedOther.isSetIngestRate());
721 if (lastComparison != 0) {
722 return lastComparison;
723 }
724 if (isSetIngestRate()) {
725 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ingestRate, typedOther.ingestRate);
726 if (lastComparison != 0) {
727 return lastComparison;
728 }
729 }
730 lastComparison = Boolean.valueOf(isSetQueryRate()).compareTo(typedOther.isSetQueryRate());
731 if (lastComparison != 0) {
732 return lastComparison;
733 }
734 if (isSetQueryRate()) {
735 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryRate, typedOther.queryRate);
736 if (lastComparison != 0) {
737 return lastComparison;
738 }
739 }
740 lastComparison = Boolean.valueOf(isSetSplitCreationTime()).compareTo(typedOther.isSetSplitCreationTime());
741 if (lastComparison != 0) {
742 return lastComparison;
743 }
744 if (isSetSplitCreationTime()) {
745 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.splitCreationTime, typedOther.splitCreationTime);
746 if (lastComparison != 0) {
747 return lastComparison;
748 }
749 }
750 return 0;
751 }
752
753 public _Fields fieldForId(int fieldId) {
754 return _Fields.findByThriftId(fieldId);
755 }
756
757 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
758 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
759 }
760
761 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
762 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
763 }
764
765 @Override
766 public String toString() {
767 StringBuilder sb = new StringBuilder("TabletStats(");
768 boolean first = true;
769
770 sb.append("extent:");
771 if (this.extent == null) {
772 sb.append("null");
773 } else {
774 sb.append(this.extent);
775 }
776 first = false;
777 if (!first) sb.append(", ");
778 sb.append("majors:");
779 if (this.majors == null) {
780 sb.append("null");
781 } else {
782 sb.append(this.majors);
783 }
784 first = false;
785 if (!first) sb.append(", ");
786 sb.append("minors:");
787 if (this.minors == null) {
788 sb.append("null");
789 } else {
790 sb.append(this.minors);
791 }
792 first = false;
793 if (!first) sb.append(", ");
794 sb.append("splits:");
795 if (this.splits == null) {
796 sb.append("null");
797 } else {
798 sb.append(this.splits);
799 }
800 first = false;
801 if (!first) sb.append(", ");
802 sb.append("numEntries:");
803 sb.append(this.numEntries);
804 first = false;
805 if (!first) sb.append(", ");
806 sb.append("ingestRate:");
807 sb.append(this.ingestRate);
808 first = false;
809 if (!first) sb.append(", ");
810 sb.append("queryRate:");
811 sb.append(this.queryRate);
812 first = false;
813 if (!first) sb.append(", ");
814 sb.append("splitCreationTime:");
815 sb.append(this.splitCreationTime);
816 first = false;
817 sb.append(")");
818 return sb.toString();
819 }
820
821 public void validate() throws org.apache.thrift.TException {
822
823
824 if (extent != null) {
825 extent.validate();
826 }
827 if (majors != null) {
828 majors.validate();
829 }
830 if (minors != null) {
831 minors.validate();
832 }
833 if (splits != null) {
834 splits.validate();
835 }
836 }
837
838 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
839 try {
840 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
841 } catch (org.apache.thrift.TException te) {
842 throw new java.io.IOException(te);
843 }
844 }
845
846 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
847 try {
848
849 __isset_bitfield = 0;
850 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
851 } catch (org.apache.thrift.TException te) {
852 throw new java.io.IOException(te);
853 }
854 }
855
856 private static class TabletStatsStandardSchemeFactory implements SchemeFactory {
857 public TabletStatsStandardScheme getScheme() {
858 return new TabletStatsStandardScheme();
859 }
860 }
861
862 private static class TabletStatsStandardScheme extends StandardScheme<TabletStats> {
863
864 public void read(org.apache.thrift.protocol.TProtocol iprot, TabletStats struct) throws org.apache.thrift.TException {
865 org.apache.thrift.protocol.TField schemeField;
866 iprot.readStructBegin();
867 while (true)
868 {
869 schemeField = iprot.readFieldBegin();
870 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
871 break;
872 }
873 switch (schemeField.id) {
874 case 1:
875 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
876 struct.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
877 struct.extent.read(iprot);
878 struct.setExtentIsSet(true);
879 } else {
880 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
881 }
882 break;
883 case 2:
884 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
885 struct.majors = new ActionStats();
886 struct.majors.read(iprot);
887 struct.setMajorsIsSet(true);
888 } else {
889 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
890 }
891 break;
892 case 3:
893 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
894 struct.minors = new ActionStats();
895 struct.minors.read(iprot);
896 struct.setMinorsIsSet(true);
897 } else {
898 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
899 }
900 break;
901 case 4:
902 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
903 struct.splits = new ActionStats();
904 struct.splits.read(iprot);
905 struct.setSplitsIsSet(true);
906 } else {
907 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
908 }
909 break;
910 case 5:
911 if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
912 struct.numEntries = iprot.readI64();
913 struct.setNumEntriesIsSet(true);
914 } else {
915 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
916 }
917 break;
918 case 6:
919 if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
920 struct.ingestRate = iprot.readDouble();
921 struct.setIngestRateIsSet(true);
922 } else {
923 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
924 }
925 break;
926 case 7:
927 if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
928 struct.queryRate = iprot.readDouble();
929 struct.setQueryRateIsSet(true);
930 } else {
931 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
932 }
933 break;
934 case 8:
935 if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
936 struct.splitCreationTime = iprot.readI64();
937 struct.setSplitCreationTimeIsSet(true);
938 } else {
939 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
940 }
941 break;
942 default:
943 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
944 }
945 iprot.readFieldEnd();
946 }
947 iprot.readStructEnd();
948
949
950 struct.validate();
951 }
952
953 public void write(org.apache.thrift.protocol.TProtocol oprot, TabletStats struct) throws org.apache.thrift.TException {
954 struct.validate();
955
956 oprot.writeStructBegin(STRUCT_DESC);
957 if (struct.extent != null) {
958 oprot.writeFieldBegin(EXTENT_FIELD_DESC);
959 struct.extent.write(oprot);
960 oprot.writeFieldEnd();
961 }
962 if (struct.majors != null) {
963 oprot.writeFieldBegin(MAJORS_FIELD_DESC);
964 struct.majors.write(oprot);
965 oprot.writeFieldEnd();
966 }
967 if (struct.minors != null) {
968 oprot.writeFieldBegin(MINORS_FIELD_DESC);
969 struct.minors.write(oprot);
970 oprot.writeFieldEnd();
971 }
972 if (struct.splits != null) {
973 oprot.writeFieldBegin(SPLITS_FIELD_DESC);
974 struct.splits.write(oprot);
975 oprot.writeFieldEnd();
976 }
977 oprot.writeFieldBegin(NUM_ENTRIES_FIELD_DESC);
978 oprot.writeI64(struct.numEntries);
979 oprot.writeFieldEnd();
980 oprot.writeFieldBegin(INGEST_RATE_FIELD_DESC);
981 oprot.writeDouble(struct.ingestRate);
982 oprot.writeFieldEnd();
983 oprot.writeFieldBegin(QUERY_RATE_FIELD_DESC);
984 oprot.writeDouble(struct.queryRate);
985 oprot.writeFieldEnd();
986 oprot.writeFieldBegin(SPLIT_CREATION_TIME_FIELD_DESC);
987 oprot.writeI64(struct.splitCreationTime);
988 oprot.writeFieldEnd();
989 oprot.writeFieldStop();
990 oprot.writeStructEnd();
991 }
992
993 }
994
995 private static class TabletStatsTupleSchemeFactory implements SchemeFactory {
996 public TabletStatsTupleScheme getScheme() {
997 return new TabletStatsTupleScheme();
998 }
999 }
1000
1001 private static class TabletStatsTupleScheme extends TupleScheme<TabletStats> {
1002
1003 @Override
1004 public void write(org.apache.thrift.protocol.TProtocol prot, TabletStats struct) throws org.apache.thrift.TException {
1005 TTupleProtocol oprot = (TTupleProtocol) prot;
1006 BitSet optionals = new BitSet();
1007 if (struct.isSetExtent()) {
1008 optionals.set(0);
1009 }
1010 if (struct.isSetMajors()) {
1011 optionals.set(1);
1012 }
1013 if (struct.isSetMinors()) {
1014 optionals.set(2);
1015 }
1016 if (struct.isSetSplits()) {
1017 optionals.set(3);
1018 }
1019 if (struct.isSetNumEntries()) {
1020 optionals.set(4);
1021 }
1022 if (struct.isSetIngestRate()) {
1023 optionals.set(5);
1024 }
1025 if (struct.isSetQueryRate()) {
1026 optionals.set(6);
1027 }
1028 if (struct.isSetSplitCreationTime()) {
1029 optionals.set(7);
1030 }
1031 oprot.writeBitSet(optionals, 8);
1032 if (struct.isSetExtent()) {
1033 struct.extent.write(oprot);
1034 }
1035 if (struct.isSetMajors()) {
1036 struct.majors.write(oprot);
1037 }
1038 if (struct.isSetMinors()) {
1039 struct.minors.write(oprot);
1040 }
1041 if (struct.isSetSplits()) {
1042 struct.splits.write(oprot);
1043 }
1044 if (struct.isSetNumEntries()) {
1045 oprot.writeI64(struct.numEntries);
1046 }
1047 if (struct.isSetIngestRate()) {
1048 oprot.writeDouble(struct.ingestRate);
1049 }
1050 if (struct.isSetQueryRate()) {
1051 oprot.writeDouble(struct.queryRate);
1052 }
1053 if (struct.isSetSplitCreationTime()) {
1054 oprot.writeI64(struct.splitCreationTime);
1055 }
1056 }
1057
1058 @Override
1059 public void read(org.apache.thrift.protocol.TProtocol prot, TabletStats struct) throws org.apache.thrift.TException {
1060 TTupleProtocol iprot = (TTupleProtocol) prot;
1061 BitSet incoming = iprot.readBitSet(8);
1062 if (incoming.get(0)) {
1063 struct.extent = new org.apache.accumulo.core.data.thrift.TKeyExtent();
1064 struct.extent.read(iprot);
1065 struct.setExtentIsSet(true);
1066 }
1067 if (incoming.get(1)) {
1068 struct.majors = new ActionStats();
1069 struct.majors.read(iprot);
1070 struct.setMajorsIsSet(true);
1071 }
1072 if (incoming.get(2)) {
1073 struct.minors = new ActionStats();
1074 struct.minors.read(iprot);
1075 struct.setMinorsIsSet(true);
1076 }
1077 if (incoming.get(3)) {
1078 struct.splits = new ActionStats();
1079 struct.splits.read(iprot);
1080 struct.setSplitsIsSet(true);
1081 }
1082 if (incoming.get(4)) {
1083 struct.numEntries = iprot.readI64();
1084 struct.setNumEntriesIsSet(true);
1085 }
1086 if (incoming.get(5)) {
1087 struct.ingestRate = iprot.readDouble();
1088 struct.setIngestRateIsSet(true);
1089 }
1090 if (incoming.get(6)) {
1091 struct.queryRate = iprot.readDouble();
1092 struct.setQueryRateIsSet(true);
1093 }
1094 if (incoming.get(7)) {
1095 struct.splitCreationTime = iprot.readI64();
1096 struct.setSplitCreationTimeIsSet(true);
1097 }
1098 }
1099 }
1100
1101 }
1102