You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by al...@apache.org on 2018/12/29 10:07:16 UTC
[2/9] hbase git commit: HBASE-21650 Add DDL operation and some other
miscellaneous to thrift2
http://git-wip-us.apache.org/repos/asf/hbase/blob/4e8a8467/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java
index 129ab2e..8450f5b 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27")
public class THRegionInfo implements org.apache.thrift.TBase<THRegionInfo, THRegionInfo._Fields>, java.io.Serializable, Cloneable, Comparable<THRegionInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THRegionInfo");
http://git-wip-us.apache.org/repos/asf/hbase/blob/4e8a8467/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java
index 94b25ff..b1146e9 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27")
public class THRegionLocation implements org.apache.thrift.TBase<THRegionLocation, THRegionLocation._Fields>, java.io.Serializable, Cloneable, Comparable<THRegionLocation> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THRegionLocation");
http://git-wip-us.apache.org/repos/asf/hbase/blob/4e8a8467/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java
index 2e50d3d..9569c3f 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java
@@ -39,7 +39,7 @@ import org.slf4j.LoggerFactory;
* to the HBase master or a HBase region server. Also used to return
* more general HBase error conditions.
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27")
public class TIOError extends TException implements org.apache.thrift.TBase<TIOError, TIOError._Fields>, java.io.Serializable, Cloneable, Comparable<TIOError> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIOError");
http://git-wip-us.apache.org/repos/asf/hbase/blob/4e8a8467/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java
index 9387429..6734dec 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
* A TIllegalArgument exception indicates an illegal or invalid
* argument was passed into a procedure.
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27")
public class TIllegalArgument extends TException implements org.apache.thrift.TBase<TIllegalArgument, TIllegalArgument._Fields>, java.io.Serializable, Cloneable, Comparable<TIllegalArgument> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIllegalArgument");
http://git-wip-us.apache.org/repos/asf/hbase/blob/4e8a8467/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java
index 8d62eb5..3663e61 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java
@@ -41,7 +41,7 @@ import org.slf4j.LoggerFactory;
* by changing the durability. If you don't provide durability, it defaults to
* column family's default setting for durability.
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27")
public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncrement._Fields>, java.io.Serializable, Cloneable, Comparable<TIncrement> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIncrement");
@@ -50,6 +50,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)4);
private static final org.apache.thrift.protocol.TField DURABILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("durability", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.protocol.TField CELL_VISIBILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("cellVisibility", org.apache.thrift.protocol.TType.STRUCT, (short)6);
+ private static final org.apache.thrift.protocol.TField RETURN_RESULTS_FIELD_DESC = new org.apache.thrift.protocol.TField("returnResults", org.apache.thrift.protocol.TType.BOOL, (short)7);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -66,6 +67,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
*/
public TDurability durability; // optional
public TCellVisibility cellVisibility; // optional
+ public boolean returnResults; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -77,7 +79,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
* @see TDurability
*/
DURABILITY((short)5, "durability"),
- CELL_VISIBILITY((short)6, "cellVisibility");
+ CELL_VISIBILITY((short)6, "cellVisibility"),
+ RETURN_RESULTS((short)7, "returnResults");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -102,6 +105,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return DURABILITY;
case 6: // CELL_VISIBILITY
return CELL_VISIBILITY;
+ case 7: // RETURN_RESULTS
+ return RETURN_RESULTS;
default:
return null;
}
@@ -142,7 +147,9 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
// isset id assignments
- private static final _Fields optionals[] = {_Fields.ATTRIBUTES,_Fields.DURABILITY,_Fields.CELL_VISIBILITY};
+ private static final int __RETURNRESULTS_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.ATTRIBUTES,_Fields.DURABILITY,_Fields.CELL_VISIBILITY,_Fields.RETURN_RESULTS};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -159,6 +166,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDurability.class)));
tmpMap.put(_Fields.CELL_VISIBILITY, new org.apache.thrift.meta_data.FieldMetaData("cellVisibility", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCellVisibility.class)));
+ tmpMap.put(_Fields.RETURN_RESULTS, new org.apache.thrift.meta_data.FieldMetaData("returnResults", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TIncrement.class, metaDataMap);
}
@@ -179,6 +188,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
* Performs a deep copy on <i>other</i>.
*/
public TIncrement(TIncrement other) {
+ __isset_bitfield = other.__isset_bitfield;
if (other.isSetRow()) {
this.row = org.apache.thrift.TBaseHelper.copyBinary(other.row);
}
@@ -199,6 +209,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
if (other.isSetCellVisibility()) {
this.cellVisibility = new TCellVisibility(other.cellVisibility);
}
+ this.returnResults = other.returnResults;
}
public TIncrement deepCopy() {
@@ -212,6 +223,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
this.attributes = null;
this.durability = null;
this.cellVisibility = null;
+ setReturnResultsIsSet(false);
+ this.returnResults = false;
}
public byte[] getRow() {
@@ -378,6 +391,29 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
}
+ public boolean isReturnResults() {
+ return this.returnResults;
+ }
+
+ public TIncrement setReturnResults(boolean returnResults) {
+ this.returnResults = returnResults;
+ setReturnResultsIsSet(true);
+ return this;
+ }
+
+ public void unsetReturnResults() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID);
+ }
+
+ /** Returns true if field returnResults is set (has been assigned a value) and false otherwise */
+ public boolean isSetReturnResults() {
+ return EncodingUtils.testBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID);
+ }
+
+ public void setReturnResultsIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETURNRESULTS_ISSET_ID, value);
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ROW:
@@ -420,6 +456,14 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
break;
+ case RETURN_RESULTS:
+ if (value == null) {
+ unsetReturnResults();
+ } else {
+ setReturnResults((Boolean)value);
+ }
+ break;
+
}
}
@@ -440,6 +484,9 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
case CELL_VISIBILITY:
return getCellVisibility();
+ case RETURN_RESULTS:
+ return isReturnResults();
+
}
throw new IllegalStateException();
}
@@ -461,6 +508,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return isSetDurability();
case CELL_VISIBILITY:
return isSetCellVisibility();
+ case RETURN_RESULTS:
+ return isSetReturnResults();
}
throw new IllegalStateException();
}
@@ -523,6 +572,15 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return false;
}
+ boolean this_present_returnResults = true && this.isSetReturnResults();
+ boolean that_present_returnResults = true && that.isSetReturnResults();
+ if (this_present_returnResults || that_present_returnResults) {
+ if (!(this_present_returnResults && that_present_returnResults))
+ return false;
+ if (this.returnResults != that.returnResults)
+ return false;
+ }
+
return true;
}
@@ -555,6 +613,11 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
if (present_cellVisibility)
list.add(cellVisibility);
+ boolean present_returnResults = true && (isSetReturnResults());
+ list.add(present_returnResults);
+ if (present_returnResults)
+ list.add(returnResults);
+
return list.hashCode();
}
@@ -616,6 +679,16 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetReturnResults()).compareTo(other.isSetReturnResults());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetReturnResults()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.returnResults, other.returnResults);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -681,6 +754,12 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
first = false;
}
+ if (isSetReturnResults()) {
+ if (!first) sb.append(", ");
+ sb.append("returnResults:");
+ sb.append(this.returnResults);
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -709,6 +788,8 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
@@ -797,6 +878,14 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 7: // RETURN_RESULTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.returnResults = iprot.readBool();
+ struct.setReturnResultsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -858,6 +947,11 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
oprot.writeFieldEnd();
}
}
+ if (struct.isSetReturnResults()) {
+ oprot.writeFieldBegin(RETURN_RESULTS_FIELD_DESC);
+ oprot.writeBool(struct.returnResults);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -893,7 +987,10 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
if (struct.isSetCellVisibility()) {
optionals.set(2);
}
- oprot.writeBitSet(optionals, 3);
+ if (struct.isSetReturnResults()) {
+ optionals.set(3);
+ }
+ oprot.writeBitSet(optionals, 4);
if (struct.isSetAttributes()) {
{
oprot.writeI32(struct.attributes.size());
@@ -910,6 +1007,9 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
if (struct.isSetCellVisibility()) {
struct.cellVisibility.write(oprot);
}
+ if (struct.isSetReturnResults()) {
+ oprot.writeBool(struct.returnResults);
+ }
}
@Override
@@ -929,7 +1029,7 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
}
}
struct.setColumnsIsSet(true);
- BitSet incoming = iprot.readBitSet(3);
+ BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map84 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
@@ -954,6 +1054,10 @@ public class TIncrement implements org.apache.thrift.TBase<TIncrement, TIncremen
struct.cellVisibility.read(iprot);
struct.setCellVisibilityIsSet(true);
}
+ if (incoming.get(3)) {
+ struct.returnResults = iprot.readBool();
+ struct.setReturnResultsIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/4e8a8467/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TKeepDeletedCells.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TKeepDeletedCells.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TKeepDeletedCells.java
new file mode 100644
index 0000000..4ce64e2
--- /dev/null
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TKeepDeletedCells.java
@@ -0,0 +1,63 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hadoop.hbase.thrift2.generated;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum TKeepDeletedCells implements org.apache.thrift.TEnum {
+ /**
+ * Deleted Cells are not retained.
+ */
+ FALSE(0),
+ /**
+ * Deleted Cells are retained until they are removed by other means
+ * such TTL or VERSIONS.
+ * If no TTL is specified or no new versions of delete cells are
+ * written, they are retained forever.
+ */
+ TRUE(1),
+ /**
+ * Deleted Cells are retained until the delete marker expires due to TTL.
+ * This is useful when TTL is combined with MIN_VERSIONS and one
+ * wants to keep a minimum number of versions around but at the same
+ * time remove deleted cells after the TTL.
+ */
+ TTL(2);
+
+ private final int value;
+
+ private TKeepDeletedCells(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static TKeepDeletedCells findByValue(int value) {
+ switch (value) {
+ case 0:
+ return FALSE;
+ case 1:
+ return TRUE;
+ case 2:
+ return TTL;
+ default:
+ return null;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/hbase/blob/4e8a8467/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TNamespaceDescriptor.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TNamespaceDescriptor.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TNamespaceDescriptor.java
new file mode 100644
index 0000000..72d4916
--- /dev/null
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TNamespaceDescriptor.java
@@ -0,0 +1,554 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hadoop.hbase.thrift2.generated;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27")
+public class TNamespaceDescriptor implements org.apache.thrift.TBase<TNamespaceDescriptor, TNamespaceDescriptor._Fields>, java.io.Serializable, Cloneable, Comparable<TNamespaceDescriptor> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TNamespaceDescriptor");
+
+ 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);
+ private static final org.apache.thrift.protocol.TField CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("configuration", org.apache.thrift.protocol.TType.MAP, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TNamespaceDescriptorStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TNamespaceDescriptorTupleSchemeFactory());
+ }
+
+ public String name; // required
+ public Map<String,String> configuration; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ NAME((short)1, "name"),
+ CONFIGURATION((short)2, "configuration");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // NAME
+ return NAME;
+ case 2: // CONFIGURATION
+ return CONFIGURATION;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final _Fields optionals[] = {_Fields.CONFIGURATION};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CONFIGURATION, new org.apache.thrift.meta_data.FieldMetaData("configuration", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TNamespaceDescriptor.class, metaDataMap);
+ }
+
+ public TNamespaceDescriptor() {
+ }
+
+ public TNamespaceDescriptor(
+ String name)
+ {
+ this();
+ this.name = name;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TNamespaceDescriptor(TNamespaceDescriptor other) {
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetConfiguration()) {
+ Map<String,String> __this__configuration = new HashMap<String,String>(other.configuration);
+ this.configuration = __this__configuration;
+ }
+ }
+
+ public TNamespaceDescriptor deepCopy() {
+ return new TNamespaceDescriptor(this);
+ }
+
+ @Override
+ public void clear() {
+ this.name = null;
+ this.configuration = null;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public TNamespaceDescriptor setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public int getConfigurationSize() {
+ return (this.configuration == null) ? 0 : this.configuration.size();
+ }
+
+ public void putToConfiguration(String key, String val) {
+ if (this.configuration == null) {
+ this.configuration = new HashMap<String,String>();
+ }
+ this.configuration.put(key, val);
+ }
+
+ public Map<String,String> getConfiguration() {
+ return this.configuration;
+ }
+
+ public TNamespaceDescriptor setConfiguration(Map<String,String> configuration) {
+ this.configuration = configuration;
+ return this;
+ }
+
+ public void unsetConfiguration() {
+ this.configuration = null;
+ }
+
+ /** Returns true if field configuration is set (has been assigned a value) and false otherwise */
+ public boolean isSetConfiguration() {
+ return this.configuration != null;
+ }
+
+ public void setConfigurationIsSet(boolean value) {
+ if (!value) {
+ this.configuration = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case CONFIGURATION:
+ if (value == null) {
+ unsetConfiguration();
+ } else {
+ setConfiguration((Map<String,String>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case NAME:
+ return getName();
+
+ case CONFIGURATION:
+ return getConfiguration();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case NAME:
+ return isSetName();
+ case CONFIGURATION:
+ return isSetConfiguration();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TNamespaceDescriptor)
+ return this.equals((TNamespaceDescriptor)that);
+ return false;
+ }
+
+ public boolean equals(TNamespaceDescriptor that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ boolean this_present_configuration = true && this.isSetConfiguration();
+ boolean that_present_configuration = true && that.isSetConfiguration();
+ if (this_present_configuration || that_present_configuration) {
+ if (!(this_present_configuration && that_present_configuration))
+ return false;
+ if (!this.configuration.equals(that.configuration))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_name = true && (isSetName());
+ list.add(present_name);
+ if (present_name)
+ list.add(name);
+
+ boolean present_configuration = true && (isSetConfiguration());
+ list.add(present_configuration);
+ if (present_configuration)
+ list.add(configuration);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(TNamespaceDescriptor other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetConfiguration()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TNamespaceDescriptor(");
+ boolean first = true;
+
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ if (isSetConfiguration()) {
+ if (!first) sb.append(", ");
+ sb.append("configuration:");
+ if (this.configuration == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.configuration);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (name == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TNamespaceDescriptorStandardSchemeFactory implements SchemeFactory {
+ public TNamespaceDescriptorStandardScheme getScheme() {
+ return new TNamespaceDescriptorStandardScheme();
+ }
+ }
+
+ private static class TNamespaceDescriptorStandardScheme extends StandardScheme<TNamespaceDescriptor> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TNamespaceDescriptor struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // CONFIGURATION
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map180 = iprot.readMapBegin();
+ struct.configuration = new HashMap<String,String>(2*_map180.size);
+ String _key181;
+ String _val182;
+ for (int _i183 = 0; _i183 < _map180.size; ++_i183)
+ {
+ _key181 = iprot.readString();
+ _val182 = iprot.readString();
+ struct.configuration.put(_key181, _val182);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setConfigurationIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TNamespaceDescriptor struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ if (struct.configuration != null) {
+ if (struct.isSetConfiguration()) {
+ oprot.writeFieldBegin(CONFIGURATION_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.configuration.size()));
+ for (Map.Entry<String, String> _iter184 : struct.configuration.entrySet())
+ {
+ oprot.writeString(_iter184.getKey());
+ oprot.writeString(_iter184.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TNamespaceDescriptorTupleSchemeFactory implements SchemeFactory {
+ public TNamespaceDescriptorTupleScheme getScheme() {
+ return new TNamespaceDescriptorTupleScheme();
+ }
+ }
+
+ private static class TNamespaceDescriptorTupleScheme extends TupleScheme<TNamespaceDescriptor> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TNamespaceDescriptor struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.name);
+ BitSet optionals = new BitSet();
+ if (struct.isSetConfiguration()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetConfiguration()) {
+ {
+ oprot.writeI32(struct.configuration.size());
+ for (Map.Entry<String, String> _iter185 : struct.configuration.entrySet())
+ {
+ oprot.writeString(_iter185.getKey());
+ oprot.writeString(_iter185.getValue());
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TNamespaceDescriptor struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TMap _map186 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.configuration = new HashMap<String,String>(2*_map186.size);
+ String _key187;
+ String _val188;
+ for (int _i189 = 0; _i189 < _map186.size; ++_i189)
+ {
+ _key187 = iprot.readString();
+ _val188 = iprot.readString();
+ struct.configuration.put(_key187, _val188);
+ }
+ }
+ struct.setConfigurationIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/hbase/blob/4e8a8467/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java
index 552e3d4..ad82c67 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java
@@ -46,7 +46,7 @@ import org.slf4j.LoggerFactory;
* by changing the durability. If you don't provide durability, it defaults to
* column family's default setting for durability.
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27")
public class TPut implements org.apache.thrift.TBase<TPut, TPut._Fields>, java.io.Serializable, Cloneable, Comparable<TPut> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPut");
http://git-wip-us.apache.org/repos/asf/hbase/blob/4e8a8467/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java
index 317f9b5..c19cf89 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java
@@ -37,13 +37,14 @@ import org.slf4j.LoggerFactory;
/**
* if no Result is found, row and columnValues will not be set.
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-07-04")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27")
public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields>, java.io.Serializable, Cloneable, Comparable<TResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TResult");
private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField COLUMN_VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("columnValues", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField STALE_FIELD_DESC = new org.apache.thrift.protocol.TField("stale", org.apache.thrift.protocol.TType.BOOL, (short)3);
+ private static final org.apache.thrift.protocol.TField PARTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("partial", org.apache.thrift.protocol.TType.BOOL, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
@@ -54,12 +55,14 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
public ByteBuffer row; // optional
public List<TColumnValue> columnValues; // required
public boolean stale; // optional
+ public boolean partial; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
ROW((short)1, "row"),
COLUMN_VALUES((short)2, "columnValues"),
- STALE((short)3, "stale");
+ STALE((short)3, "stale"),
+ PARTIAL((short)4, "partial");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -80,6 +83,8 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
return COLUMN_VALUES;
case 3: // STALE
return STALE;
+ case 4: // PARTIAL
+ return PARTIAL;
default:
return null;
}
@@ -121,8 +126,9 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
// isset id assignments
private static final int __STALE_ISSET_ID = 0;
+ private static final int __PARTIAL_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.ROW,_Fields.STALE};
+ private static final _Fields optionals[] = {_Fields.ROW,_Fields.STALE,_Fields.PARTIAL};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -133,6 +139,8 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumnValue.class))));
tmpMap.put(_Fields.STALE, new org.apache.thrift.meta_data.FieldMetaData("stale", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.PARTIAL, new org.apache.thrift.meta_data.FieldMetaData("partial", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TResult.class, metaDataMap);
}
@@ -140,6 +148,8 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
public TResult() {
this.stale = false;
+ this.partial = false;
+
}
public TResult(
@@ -165,6 +175,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
this.columnValues = __this__columnValues;
}
this.stale = other.stale;
+ this.partial = other.partial;
}
public TResult deepCopy() {
@@ -177,6 +188,8 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
this.columnValues = null;
this.stale = false;
+ this.partial = false;
+
}
public byte[] getRow() {
@@ -275,6 +288,29 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STALE_ISSET_ID, value);
}
+ public boolean isPartial() {
+ return this.partial;
+ }
+
+ public TResult setPartial(boolean partial) {
+ this.partial = partial;
+ setPartialIsSet(true);
+ return this;
+ }
+
+ public void unsetPartial() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARTIAL_ISSET_ID);
+ }
+
+ /** Returns true if field partial is set (has been assigned a value) and false otherwise */
+ public boolean isSetPartial() {
+ return EncodingUtils.testBit(__isset_bitfield, __PARTIAL_ISSET_ID);
+ }
+
+ public void setPartialIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARTIAL_ISSET_ID, value);
+ }
+
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case ROW:
@@ -301,6 +337,14 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
}
break;
+ case PARTIAL:
+ if (value == null) {
+ unsetPartial();
+ } else {
+ setPartial((Boolean)value);
+ }
+ break;
+
}
}
@@ -315,6 +359,9 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
case STALE:
return isStale();
+ case PARTIAL:
+ return isPartial();
+
}
throw new IllegalStateException();
}
@@ -332,6 +379,8 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
return isSetColumnValues();
case STALE:
return isSetStale();
+ case PARTIAL:
+ return isSetPartial();
}
throw new IllegalStateException();
}
@@ -376,6 +425,15 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
return false;
}
+ boolean this_present_partial = true && this.isSetPartial();
+ boolean that_present_partial = true && that.isSetPartial();
+ if (this_present_partial || that_present_partial) {
+ if (!(this_present_partial && that_present_partial))
+ return false;
+ if (this.partial != that.partial)
+ return false;
+ }
+
return true;
}
@@ -398,6 +456,11 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
if (present_stale)
list.add(stale);
+ boolean present_partial = true && (isSetPartial());
+ list.add(present_partial);
+ if (present_partial)
+ list.add(partial);
+
return list.hashCode();
}
@@ -439,6 +502,16 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
return lastComparison;
}
}
+ lastComparison = Boolean.valueOf(isSetPartial()).compareTo(other.isSetPartial());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPartial()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partial, other.partial);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
@@ -482,6 +555,12 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
sb.append(this.stale);
first = false;
}
+ if (isSetPartial()) {
+ if (!first) sb.append(", ");
+ sb.append("partial:");
+ sb.append(this.partial);
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -565,6 +644,14 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 4: // PARTIAL
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.partial = iprot.readBool();
+ struct.setPartialIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -604,6 +691,11 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
oprot.writeBool(struct.stale);
oprot.writeFieldEnd();
}
+ if (struct.isSetPartial()) {
+ oprot.writeFieldBegin(PARTIAL_FIELD_DESC);
+ oprot.writeBool(struct.partial);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
@@ -635,13 +727,19 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
if (struct.isSetStale()) {
optionals.set(1);
}
- oprot.writeBitSet(optionals, 2);
+ if (struct.isSetPartial()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
if (struct.isSetRow()) {
oprot.writeBinary(struct.row);
}
if (struct.isSetStale()) {
oprot.writeBool(struct.stale);
}
+ if (struct.isSetPartial()) {
+ oprot.writeBool(struct.partial);
+ }
}
@Override
@@ -659,7 +757,7 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
}
}
struct.setColumnValuesIsSet(true);
- BitSet incoming = iprot.readBitSet(2);
+ BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
@@ -668,6 +766,10 @@ public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields
struct.stale = iprot.readBool();
struct.setStaleIsSet(true);
}
+ if (incoming.get(2)) {
+ struct.partial = iprot.readBool();
+ struct.setPartialIsSet(true);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/hbase/blob/4e8a8467/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TRowMutations.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TRowMutations.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TRowMutations.java
index dfa06ff..a3ab58e 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TRowMutations.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TRowMutations.java
@@ -37,7 +37,7 @@ import org.slf4j.LoggerFactory;
/**
* A TRowMutations object is used to apply a number of Mutations to a single row.
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27")
public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRowMutations._Fields>, java.io.Serializable, Cloneable, Comparable<TRowMutations> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowMutations");
@@ -460,14 +460,14 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
case 2: // MUTATIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list124 = iprot.readListBegin();
- struct.mutations = new ArrayList<TMutation>(_list124.size);
- TMutation _elem125;
- for (int _i126 = 0; _i126 < _list124.size; ++_i126)
+ org.apache.thrift.protocol.TList _list134 = iprot.readListBegin();
+ struct.mutations = new ArrayList<TMutation>(_list134.size);
+ TMutation _elem135;
+ for (int _i136 = 0; _i136 < _list134.size; ++_i136)
{
- _elem125 = new TMutation();
- _elem125.read(iprot);
- struct.mutations.add(_elem125);
+ _elem135 = new TMutation();
+ _elem135.read(iprot);
+ struct.mutations.add(_elem135);
}
iprot.readListEnd();
}
@@ -500,9 +500,9 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
oprot.writeFieldBegin(MUTATIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.mutations.size()));
- for (TMutation _iter127 : struct.mutations)
+ for (TMutation _iter137 : struct.mutations)
{
- _iter127.write(oprot);
+ _iter137.write(oprot);
}
oprot.writeListEnd();
}
@@ -528,9 +528,9 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
oprot.writeBinary(struct.row);
{
oprot.writeI32(struct.mutations.size());
- for (TMutation _iter128 : struct.mutations)
+ for (TMutation _iter138 : struct.mutations)
{
- _iter128.write(oprot);
+ _iter138.write(oprot);
}
}
}
@@ -541,14 +541,14 @@ public class TRowMutations implements org.apache.thrift.TBase<TRowMutations, TRo
struct.row = iprot.readBinary();
struct.setRowIsSet(true);
{
- org.apache.thrift.protocol.TList _list129 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.mutations = new ArrayList<TMutation>(_list129.size);
- TMutation _elem130;
- for (int _i131 = 0; _i131 < _list129.size; ++_i131)
+ org.apache.thrift.protocol.TList _list139 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.mutations = new ArrayList<TMutation>(_list139.size);
+ TMutation _elem140;
+ for (int _i141 = 0; _i141 < _list139.size; ++_i141)
{
- _elem130 = new TMutation();
- _elem130.read(iprot);
- struct.mutations.add(_elem130);
+ _elem140 = new TMutation();
+ _elem140.read(iprot);
+ struct.mutations.add(_elem140);
}
}
struct.setMutationsIsSet(true);
http://git-wip-us.apache.org/repos/asf/hbase/blob/4e8a8467/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java
index b5ece00..ddcedb4 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
* Any timestamps in the columns are ignored but the colFamTimeRangeMap included, use timeRange to select by timestamp.
* Max versions defaults to 1.
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-07-03")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27")
public class TScan implements org.apache.thrift.TBase<TScan, TScan._Fields>, java.io.Serializable, Cloneable, Comparable<TScan> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TScan");
http://git-wip-us.apache.org/repos/asf/hbase/blob/4e8a8467/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java
index 27188e9..65f963d 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java
@@ -34,7 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-25")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27")
public class TServerName implements org.apache.thrift.TBase<TServerName, TServerName._Fields>, java.io.Serializable, Cloneable, Comparable<TServerName> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TServerName");
http://git-wip-us.apache.org/repos/asf/hbase/blob/4e8a8467/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java
new file mode 100644
index 0000000..89a8a5e
--- /dev/null
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java
@@ -0,0 +1,843 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hadoop.hbase.thrift2.generated;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-27")
+public class TTableDescriptor implements org.apache.thrift.TBase<TTableDescriptor, TTableDescriptor._Fields>, java.io.Serializable, Cloneable, Comparable<TTableDescriptor> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTableDescriptor");
+
+ private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)2);
+ private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)3);
+ private static final org.apache.thrift.protocol.TField DURABILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("durability", org.apache.thrift.protocol.TType.I32, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TTableDescriptorStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TTableDescriptorTupleSchemeFactory());
+ }
+
+ public TTableName tableName; // required
+ public List<TColumnFamilyDescriptor> columns; // optional
+ public Map<ByteBuffer,ByteBuffer> attributes; // optional
+ /**
+ *
+ * @see TDurability
+ */
+ public TDurability durability; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ TABLE_NAME((short)1, "tableName"),
+ COLUMNS((short)2, "columns"),
+ ATTRIBUTES((short)3, "attributes"),
+ /**
+ *
+ * @see TDurability
+ */
+ DURABILITY((short)4, "durability");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // TABLE_NAME
+ return TABLE_NAME;
+ case 2: // COLUMNS
+ return COLUMNS;
+ case 3: // ATTRIBUTES
+ return ATTRIBUTES;
+ case 4: // DURABILITY
+ return DURABILITY;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final _Fields optionals[] = {_Fields.COLUMNS,_Fields.ATTRIBUTES,_Fields.DURABILITY};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTableName.class)));
+ tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumnFamilyDescriptor.class))));
+ tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true),
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
+ tmpMap.put(_Fields.DURABILITY, new org.apache.thrift.meta_data.FieldMetaData("durability", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TDurability.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TTableDescriptor.class, metaDataMap);
+ }
+
+ public TTableDescriptor() {
+ }
+
+ public TTableDescriptor(
+ TTableName tableName)
+ {
+ this();
+ this.tableName = tableName;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TTableDescriptor(TTableDescriptor other) {
+ if (other.isSetTableName()) {
+ this.tableName = new TTableName(other.tableName);
+ }
+ if (other.isSetColumns()) {
+ List<TColumnFamilyDescriptor> __this__columns = new ArrayList<TColumnFamilyDescriptor>(other.columns.size());
+ for (TColumnFamilyDescriptor other_element : other.columns) {
+ __this__columns.add(new TColumnFamilyDescriptor(other_element));
+ }
+ this.columns = __this__columns;
+ }
+ if (other.isSetAttributes()) {
+ Map<ByteBuffer,ByteBuffer> __this__attributes = new HashMap<ByteBuffer,ByteBuffer>(other.attributes);
+ this.attributes = __this__attributes;
+ }
+ if (other.isSetDurability()) {
+ this.durability = other.durability;
+ }
+ }
+
+ public TTableDescriptor deepCopy() {
+ return new TTableDescriptor(this);
+ }
+
+ @Override
+ public void clear() {
+ this.tableName = null;
+ this.columns = null;
+ this.attributes = null;
+ this.durability = null;
+ }
+
+ public TTableName getTableName() {
+ return this.tableName;
+ }
+
+ public TTableDescriptor setTableName(TTableName tableName) {
+ this.tableName = tableName;
+ return this;
+ }
+
+ public void unsetTableName() {
+ this.tableName = null;
+ }
+
+ /** Returns true if field tableName is set (has been assigned a value) and false otherwise */
+ public boolean isSetTableName() {
+ return this.tableName != null;
+ }
+
+ public void setTableNameIsSet(boolean value) {
+ if (!value) {
+ this.tableName = null;
+ }
+ }
+
+ public int getColumnsSize() {
+ return (this.columns == null) ? 0 : this.columns.size();
+ }
+
+ public java.util.Iterator<TColumnFamilyDescriptor> getColumnsIterator() {
+ return (this.columns == null) ? null : this.columns.iterator();
+ }
+
+ public void addToColumns(TColumnFamilyDescriptor elem) {
+ if (this.columns == null) {
+ this.columns = new ArrayList<TColumnFamilyDescriptor>();
+ }
+ this.columns.add(elem);
+ }
+
+ public List<TColumnFamilyDescriptor> getColumns() {
+ return this.columns;
+ }
+
+ public TTableDescriptor setColumns(List<TColumnFamilyDescriptor> columns) {
+ this.columns = columns;
+ return this;
+ }
+
+ public void unsetColumns() {
+ this.columns = null;
+ }
+
+ /** Returns true if field columns is set (has been assigned a value) and false otherwise */
+ public boolean isSetColumns() {
+ return this.columns != null;
+ }
+
+ public void setColumnsIsSet(boolean value) {
+ if (!value) {
+ this.columns = null;
+ }
+ }
+
+ public int getAttributesSize() {
+ return (this.attributes == null) ? 0 : this.attributes.size();
+ }
+
+ public void putToAttributes(ByteBuffer key, ByteBuffer val) {
+ if (this.attributes == null) {
+ this.attributes = new HashMap<ByteBuffer,ByteBuffer>();
+ }
+ this.attributes.put(key, val);
+ }
+
+ public Map<ByteBuffer,ByteBuffer> getAttributes() {
+ return this.attributes;
+ }
+
+ public TTableDescriptor setAttributes(Map<ByteBuffer,ByteBuffer> attributes) {
+ this.attributes = attributes;
+ return this;
+ }
+
+ public void unsetAttributes() {
+ this.attributes = null;
+ }
+
+ /** Returns true if field attributes is set (has been assigned a value) and false otherwise */
+ public boolean isSetAttributes() {
+ return this.attributes != null;
+ }
+
+ public void setAttributesIsSet(boolean value) {
+ if (!value) {
+ this.attributes = null;
+ }
+ }
+
+ /**
+ *
+ * @see TDurability
+ */
+ public TDurability getDurability() {
+ return this.durability;
+ }
+
+ /**
+ *
+ * @see TDurability
+ */
+ public TTableDescriptor setDurability(TDurability durability) {
+ this.durability = durability;
+ return this;
+ }
+
+ public void unsetDurability() {
+ this.durability = null;
+ }
+
+ /** Returns true if field durability is set (has been assigned a value) and false otherwise */
+ public boolean isSetDurability() {
+ return this.durability != null;
+ }
+
+ public void setDurabilityIsSet(boolean value) {
+ if (!value) {
+ this.durability = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TABLE_NAME:
+ if (value == null) {
+ unsetTableName();
+ } else {
+ setTableName((TTableName)value);
+ }
+ break;
+
+ case COLUMNS:
+ if (value == null) {
+ unsetColumns();
+ } else {
+ setColumns((List<TColumnFamilyDescriptor>)value);
+ }
+ break;
+
+ case ATTRIBUTES:
+ if (value == null) {
+ unsetAttributes();
+ } else {
+ setAttributes((Map<ByteBuffer,ByteBuffer>)value);
+ }
+ break;
+
+ case DURABILITY:
+ if (value == null) {
+ unsetDurability();
+ } else {
+ setDurability((TDurability)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TABLE_NAME:
+ return getTableName();
+
+ case COLUMNS:
+ return getColumns();
+
+ case ATTRIBUTES:
+ return getAttributes();
+
+ case DURABILITY:
+ return getDurability();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case TABLE_NAME:
+ return isSetTableName();
+ case COLUMNS:
+ return isSetColumns();
+ case ATTRIBUTES:
+ return isSetAttributes();
+ case DURABILITY:
+ return isSetDurability();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TTableDescriptor)
+ return this.equals((TTableDescriptor)that);
+ return false;
+ }
+
+ public boolean equals(TTableDescriptor that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_tableName = true && this.isSetTableName();
+ boolean that_present_tableName = true && that.isSetTableName();
+ if (this_present_tableName || that_present_tableName) {
+ if (!(this_present_tableName && that_present_tableName))
+ return false;
+ if (!this.tableName.equals(that.tableName))
+ return false;
+ }
+
+ boolean this_present_columns = true && this.isSetColumns();
+ boolean that_present_columns = true && that.isSetColumns();
+ if (this_present_columns || that_present_columns) {
+ if (!(this_present_columns && that_present_columns))
+ return false;
+ if (!this.columns.equals(that.columns))
+ return false;
+ }
+
+ boolean this_present_attributes = true && this.isSetAttributes();
+ boolean that_present_attributes = true && that.isSetAttributes();
+ if (this_present_attributes || that_present_attributes) {
+ if (!(this_present_attributes && that_present_attributes))
+ return false;
+ if (!this.attributes.equals(that.attributes))
+ return false;
+ }
+
+ boolean this_present_durability = true && this.isSetDurability();
+ boolean that_present_durability = true && that.isSetDurability();
+ if (this_present_durability || that_present_durability) {
+ if (!(this_present_durability && that_present_durability))
+ return false;
+ if (!this.durability.equals(that.durability))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_tableName = true && (isSetTableName());
+ list.add(present_tableName);
+ if (present_tableName)
+ list.add(tableName);
+
+ boolean present_columns = true && (isSetColumns());
+ list.add(present_columns);
+ if (present_columns)
+ list.add(columns);
+
+ boolean present_attributes = true && (isSetAttributes());
+ list.add(present_attributes);
+ if (present_attributes)
+ list.add(attributes);
+
+ boolean present_durability = true && (isSetDurability());
+ list.add(present_durability);
+ if (present_durability)
+ list.add(durability.getValue());
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(TTableDescriptor other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTableName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetColumns()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAttributes()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, other.attributes);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetDurability()).compareTo(other.isSetDurability());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetDurability()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.durability, other.durability);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TTableDescriptor(");
+ boolean first = true;
+
+ sb.append("tableName:");
+ if (this.tableName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tableName);
+ }
+ first = false;
+ if (isSetColumns()) {
+ if (!first) sb.append(", ");
+ sb.append("columns:");
+ if (this.columns == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.columns);
+ }
+ first = false;
+ }
+ if (isSetAttributes()) {
+ if (!first) sb.append(", ");
+ sb.append("attributes:");
+ if (this.attributes == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.attributes);
+ }
+ first = false;
+ }
+ if (isSetDurability()) {
+ if (!first) sb.append(", ");
+ sb.append("durability:");
+ if (this.durability == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.durability);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (tableName == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'tableName' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ if (tableName != null) {
+ tableName.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TTableDescriptorStandardSchemeFactory implements SchemeFactory {
+ public TTableDescriptorStandardScheme getScheme() {
+ return new TTableDescriptorStandardScheme();
+ }
+ }
+
+ private static class TTableDescriptorStandardScheme extends StandardScheme<TTableDescriptor> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TTableDescriptor struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // TABLE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.tableName = new TTableName();
+ struct.tableName.read(iprot);
+ struct.setTableNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // COLUMNS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list162 = iprot.readListBegin();
+ struct.columns = new ArrayList<TColumnFamilyDescriptor>(_list162.size);
+ TColumnFamilyDescriptor _elem163;
+ for (int _i164 = 0; _i164 < _list162.size; ++_i164)
+ {
+ _elem163 = new TColumnFamilyDescriptor();
+ _elem163.read(iprot);
+ struct.columns.add(_elem163);
+ }
+ iprot.readListEnd();
+ }
+ struct.setColumnsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // ATTRIBUTES
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map165 = iprot.readMapBegin();
+ struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map165.size);
+ ByteBuffer _key166;
+ ByteBuffer _val167;
+ for (int _i168 = 0; _i168 < _map165.size; ++_i168)
+ {
+ _key166 = iprot.readBinary();
+ _val167 = iprot.readBinary();
+ struct.attributes.put(_key166, _val167);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setAttributesIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // DURABILITY
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.durability = org.apache.hadoop.hbase.thrift2.generated.TDurability.findByValue(iprot.readI32());
+ struct.setDurabilityIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TTableDescriptor struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.tableName != null) {
+ oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
+ struct.tableName.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.columns != null) {
+ if (struct.isSetColumns()) {
+ oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
+ for (TColumnFamilyDescriptor _iter169 : struct.columns)
+ {
+ _iter169.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.attributes != null) {
+ if (struct.isSetAttributes()) {
+ oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size()));
+ for (Map.Entry<ByteBuffer, ByteBuffer> _iter170 : struct.attributes.entrySet())
+ {
+ oprot.writeBinary(_iter170.getKey());
+ oprot.writeBinary(_iter170.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.durability != null) {
+ if (struct.isSetDurability()) {
+ oprot.writeFieldBegin(DURABILITY_FIELD_DESC);
+ oprot.writeI32(struct.durability.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TTableDescriptorTupleSchemeFactory implements SchemeFactory {
+ public TTableDescriptorTupleScheme getScheme() {
+ return new TTableDescriptorTupleScheme();
+ }
+ }
+
+ private static class TTableDescriptorTupleScheme extends TupleScheme<TTableDescriptor> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TTableDescriptor struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.tableName.write(oprot);
+ BitSet optionals = new BitSet();
+ if (struct.isSetColumns()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAttributes()) {
+ optionals.set(1);
+ }
+ if (struct.isSetDurability()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetColumns()) {
+ {
+ oprot.writeI32(struct.columns.size());
+ for (TColumnFamilyDescriptor _iter171 : struct.columns)
+ {
+ _iter171.write(oprot);
+ }
+ }
+ }
+ if (struct.isSetAttributes()) {
+ {
+ oprot.writeI32(struct.attributes.size());
+ for (Map.Entry<ByteBuffer, ByteBuffer> _iter172 : struct.attributes.entrySet())
+ {
+ oprot.writeBinary(_iter172.getKey());
+ oprot.writeBinary(_iter172.getValue());
+ }
+ }
+ }
+ if (struct.isSetDurability()) {
+ oprot.writeI32(struct.durability.getValue());
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TTableDescriptor struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.tableName = new TTableName();
+ struct.tableName.read(iprot);
+ struct.setTableNameIsSet(true);
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list173 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.columns = new ArrayList<TColumnFamilyDescriptor>(_list173.size);
+ TColumnFamilyDescriptor _elem174;
+ for (int _i175 = 0; _i175 < _list173.size; ++_i175)
+ {
+ _elem174 = new TColumnFamilyDescriptor();
+ _elem174.read(iprot);
+ struct.columns.add(_elem174);
+ }
+ }
+ struct.setColumnsIsSet(true);
+ }
+ if (incoming.get(1)) {
+ {
+ org.apache.thrift.protocol.TMap _map176 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map176.size);
+ ByteBuffer _key177;
+ ByteBuffer _val178;
+ for (int _i179 = 0; _i179 < _map176.size; ++_i179)
+ {
+ _key177 = iprot.readBinary();
+ _val178 = iprot.readBinary();
+ struct.attributes.put(_key177, _val178);
+ }
+ }
+ struct.setAttributesIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.durability = org.apache.hadoop.hbase.thrift2.generated.TDurability.findByValue(iprot.readI32());
+ struct.setDurabilityIsSet(true);
+ }
+ }
+ }
+
+}
+