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:22 UTC
[8/9] hbase git commit: HBASE-21650 Add DDL operation and some other
miscellaneous to thrift2 (ADDENDUM add some comments)
http://git-wip-us.apache.org/repos/asf/hbase/blob/26700fb2/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
index 89a8a5e..8e53bdf 100644
--- 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
@@ -34,7 +34,11 @@ 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")
+/**
+ * Thrift wrapper around
+ * org.apache.hadoop.hbase.client.TableDescriptor
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28")
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");
http://git-wip-us.apache.org/repos/asf/hbase/blob/26700fb2/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java
index f2c0743..cec268a 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java
@@ -34,7 +34,11 @@ 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")
+/**
+ * Thrift wrapper around
+ * org.apache.hadoop.hbase.TableName
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28")
public class TTableName implements org.apache.thrift.TBase<TTableName, TTableName._Fields>, java.io.Serializable, Cloneable, Comparable<TTableName> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTableName");
@@ -47,12 +51,24 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
schemes.put(TupleScheme.class, new TTableNameTupleSchemeFactory());
}
+ /**
+ * namespace name
+ */
public ByteBuffer ns; // required
+ /**
+ * tablename
+ */
public ByteBuffer qualifier; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ /**
+ * namespace name
+ */
NS((short)1, "ns"),
+ /**
+ * tablename
+ */
QUALIFIER((short)2, "qualifier");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -157,6 +173,9 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
this.qualifier = null;
}
+ /**
+ * namespace name
+ */
public byte[] getNs() {
setNs(org.apache.thrift.TBaseHelper.rightSize(ns));
return ns == null ? null : ns.array();
@@ -166,6 +185,9 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
return org.apache.thrift.TBaseHelper.copyBinary(ns);
}
+ /**
+ * namespace name
+ */
public TTableName setNs(byte[] ns) {
this.ns = ns == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(ns, ns.length));
return this;
@@ -191,6 +213,9 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
}
}
+ /**
+ * tablename
+ */
public byte[] getQualifier() {
setQualifier(org.apache.thrift.TBaseHelper.rightSize(qualifier));
return qualifier == null ? null : qualifier.array();
@@ -200,6 +225,9 @@ public class TTableName implements org.apache.thrift.TBase<TTableName, TTableNam
return org.apache.thrift.TBaseHelper.copyBinary(qualifier);
}
+ /**
+ * tablename
+ */
public TTableName setQualifier(byte[] qualifier) {
this.qualifier = qualifier == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(qualifier, qualifier.length));
return this;
http://git-wip-us.apache.org/repos/asf/hbase/blob/26700fb2/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java
index 1e1898c..8ab746c 100644
--- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java
+++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.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 = "2018-12-27")
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2018-12-28")
public class TTimeRange implements org.apache.thrift.TBase<TTimeRange, TTimeRange._Fields>, java.io.Serializable, Cloneable, Comparable<TTimeRange> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTimeRange");
http://git-wip-us.apache.org/repos/asf/hbase/blob/26700fb2/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift b/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
index 6383329..c1b94ef 100644
--- a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
+++ b/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift
@@ -315,6 +315,10 @@ enum TCompareOp {
NO_OP = 6
}
+/**
+ * Thrift wrapper around
+ * org.apache.hadoop.hbase.regionserver.BloomType
+ */
enum TBloomFilterType {
/**
* Bloomfilters disabled
@@ -338,6 +342,10 @@ enum TBloomFilterType {
ROWPREFIX_DELIMITED = 4
}
+/**
+ * Thrift wrapper around
+ * org.apache.hadoop.hbase.io.compress.Algorithm
+ */
enum TCompressionAlgorithm {
LZO = 0,
GZ = 1,
@@ -348,6 +356,10 @@ enum TCompressionAlgorithm {
ZSTD = 6
}
+/**
+ * Thrift wrapper around
+ * org.apache.hadoop.hbase.io.encoding.DataBlockEncoding
+ */
enum TDataBlockEncoding {
/** Disable data block encoding. */
NONE = 0,
@@ -361,6 +373,10 @@ enum TDataBlockEncoding {
ROW_INDEX_V1 = 7
}
+/**
+ * Thrift wrapper around
+ * org.apache.hadoop.hbase.KeepDeletedCells
+ */
enum TKeepDeletedCells {
/** Deleted Cells are not retained. */
FALSE = 0,
@@ -380,11 +396,21 @@ enum TKeepDeletedCells {
TTL = 2
}
+/**
+ * Thrift wrapper around
+ * org.apache.hadoop.hbase.TableName
+ */
struct TTableName {
+ /** namespace name */
1: required binary ns
+ /** tablename */
2: required binary qualifier
}
+/**
+ * Thrift wrapper around
+ * org.apache.hadoop.hbase.client.ColumnFamilyDescriptor
+ */
struct TColumnFamilyDescriptor {
1: required binary name
2: optional map<binary, binary> attributes
@@ -409,6 +435,10 @@ struct TColumnFamilyDescriptor {
}
+/**
+ * Thrift wrapper around
+ * org.apache.hadoop.hbase.client.TableDescriptor
+ */
struct TTableDescriptor {
1: required TTableName tableName
2: optional list<TColumnFamilyDescriptor> columns
@@ -416,6 +446,10 @@ struct TTableDescriptor {
4: optional TDurability durability
}
+/**
+ * Thrift wrapper around
+ * org.apache.hadoop.hbase.NamespaceDescriptor
+ */
struct TNamespaceDescriptor {
1: required string name
2: optional map<string, string> configuration
@@ -761,110 +795,238 @@ service THBaseService {
7: required TRowMutations rowMutations
) throws (1: TIOError io)
+ /**
+ * Get a table descriptor.
+ * @return the TableDescriptor of the giving tablename
+ **/
TTableDescriptor getTableDescriptor(
- 1: required TTableName table
+ /** the tablename of the table to get tableDescriptor*/
+ 1: required TTableName table
) throws (1: TIOError io)
+ /**
+ * Get table descriptors of tables.
+ * @return the TableDescriptor of the giving tablename
+ **/
list<TTableDescriptor> getTableDescriptors(
+ /** the tablename list of the tables to get tableDescriptor*/
1: required list<TTableName> tables
) throws (1: TIOError io)
+ /**
+ *
+ * @return true if table exists already, false if not
+ **/
bool tableExists(
- 1: TTableName tableName
+ /** the tablename of the tables to check*/
+ 1: TTableName tableName
) throws (1: TIOError io)
+ /**
+ * Get table descriptors of tables that match the given pattern
+ * @return the tableDescriptors of the matching table
+ **/
list<TTableDescriptor> getTableDescriptorsByPattern(
+ /** The regular expression to match against */
1: required string regex
+ /** set to false if match only against userspace tables */
2: required bool includeSysTables
) throws (1: TIOError io)
+ /**
+ * Get table descriptors of tables in the given namespace
+ * @return the tableDescriptors in the namespce
+ **/
list<TTableDescriptor> getTableDescriptorsByNamespace(
- 1: required string name
+ /** The namesapce's name */
+ 1: required string name
) throws (1: TIOError io)
+ /**
+ * Get table names of tables that match the given pattern
+ * @return the table names of the matching table
+ **/
list<TTableName> getTableNamesByPattern(
+ /** The regular expression to match against */
1: required string regex
+ /** set to false if match only against userspace tables */
2: required bool includeSysTables
) throws (1: TIOError io)
+ /**
+ * Get table names of tables in the given namespace
+ * @return the table names of the matching table
+ **/
list<TTableName> getTableNamesByNamespace(
+ /** The namesapce's name */
1: required string name
) throws (1: TIOError io)
+ /**
+ * Creates a new table with an initial set of empty regions defined by the specified split keys.
+ * The total number of regions created will be the number of split keys plus one. Synchronous
+ * operation.
+ **/
void createTable(
+ /** table descriptor for table */
1: required TTableDescriptor desc
+ /** rray of split keys for the initial regions of the table */
2: required list<binary> splitKeys
) throws (1: TIOError io)
+ /**
+ * Deletes a table. Synchronous operation.
+ **/
void deleteTable(
+ /** the tablename to delete */
1: required TTableName tableName
) throws (1: TIOError io)
+ /**
+ * Truncate a table. Synchronous operation.
+ **/
void truncateTable(
+ /** the tablename to truncate */
1: required TTableName tableName
+ /** whether to preserve previous splits*/
2: required bool preserveSplits
) throws (1: TIOError io)
+ /**
+ * Enalbe a table
+ **/
void enableTable(
+ /** the tablename to enable */
1: required TTableName tableName
) throws (1: TIOError io)
+ /**
+ * Disable a table
+ **/
void disableTable(
+ /** the tablename to disable */
1: required TTableName tableName
) throws (1: TIOError io)
+ /**
+ *
+ * @return true if table is enabled, false if not
+ **/
bool isTableEnabled(
+ /** the tablename to check */
1: required TTableName tableName
) throws (1: TIOError io)
+ /**
+ *
+ * @return true if table is disabled, false if not
+ **/
bool isTableDisabled(
+ /** the tablename to check */
1: required TTableName tableName
) throws (1: TIOError io)
+ /**
+ *
+ * @return true if table is available, false if not
+ **/
bool isTableAvailable(
+ /** the tablename to check */
1: required TTableName tableName
) throws (1: TIOError io)
+ /**
+ * Use this api to check if the table has been created with the specified number of splitkeys
+ * which was used while creating the given table. Note : If this api is used after a table's
+ * region gets splitted, the api may return false.
+ *
+ * @return true if table is available, false if not
+ **/
bool isTableAvailableWithSplit(
+ /** the tablename to check */
1: required TTableName tableName
+ /** keys to check if the table has been created with all split keys */
2: required list<binary> splitKeys
) throws (1: TIOError io)
+ /**
+ * Add a column family to an existing table. Synchronous operation.
+ **/
void addColumnFamily(
+ /** the tablename to add column family to */
1: required TTableName tableName
+ /** column family descriptor of column family to be added */
2: required TColumnFamilyDescriptor column
) throws (1: TIOError io)
+ /**
+ * Delete a column family from a table. Synchronous operation.
+ **/
void deleteColumnFamily(
+ /** the tablename to delete column family from */
1: required TTableName tableName
+ /** name of column family to be deleted */
2: required binary column
) throws (1: TIOError io)
+ /**
+ * Modify an existing column family on a table. Synchronous operation.
+ **/
void modifyColumnFamily(
+ /** the tablename to modify column family */
1: required TTableName tableName
+ /** column family descriptor of column family to be modified */
2: required TColumnFamilyDescriptor column
) throws (1: TIOError io)
+ /**
+ * Modify an existing table
+ **/
void modifyTable(
+ /** the descriptor of the table to modify */
1: required TTableDescriptor desc
) throws (1: TIOError io)
+ /**
+ * Create a new namespace. Blocks until namespace has been successfully created or an exception is
+ * thrown
+ **/
void createNamespace(
+ /** descriptor which describes the new namespace */
1: required TNamespaceDescriptor namespaceDesc
) throws (1: TIOError io)
+ /**
+ * Modify an existing namespace. Blocks until namespace has been successfully modified or an
+ * exception is thrown
+ **/
void modifyNamespace(
+ /** descriptor which describes the new namespace */
1: required TNamespaceDescriptor namespaceDesc
) throws (1: TIOError io)
+ /**
+ * Delete an existing namespace. Only empty namespaces (no tables) can be removed.
+ * Blocks until namespace has been successfully deleted or an
+ * exception is thrown.
+ **/
void deleteNamespace(
+ /** namespace name */
1: required string name
) throws (1: TIOError io)
+ /**
+ * Get a namespace descriptor by name.
+ * @retrun the descriptor
+ **/
TNamespaceDescriptor getNamespaceDescriptor(
+ /** name of namespace descriptor */
1: required string name
) throws (1: TIOError io)
+ /**
+ * @return all namespaces
+ **/
list<TNamespaceDescriptor> listNamespaceDescriptors(
) throws (1: TIOError io)
}