@Internal public class HBaseTableSchema extends Object implements Serializable
| 构造器和说明 |
|---|
HBaseTableSchema() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addColumn(String family,
String qualifier,
Class<?> clazz)
Adds a column defined by family, qualifier, and type to the table schema.
|
void |
addColumn(String family,
String qualifier,
org.apache.flink.table.types.DataType type) |
org.apache.flink.table.api.TableSchema |
convertsToTableSchema()
Converts this
HBaseTableSchema to TableSchema, the fields are consisted
of families and rowkey, the order is in the definition order
(i.e. calling addColumn(String, String, Class) and setRowKey(String, Class)). |
static HBaseTableSchema |
fromTableSchema(org.apache.flink.table.api.TableSchema schema)
Construct a
HBaseTableSchema from a TableSchema. |
byte[][] |
getFamilyKeys()
Returns the HBase identifiers of all registered column families.
|
String[] |
getFamilyNames()
Returns the names of all registered column families.
|
HBaseTableSchema |
getProjectedHBaseTableSchema(int[] projectedFields)
Gets a new hbase schema with the selected fields.
|
org.apache.flink.table.types.DataType[] |
getQualifierDataTypes(String family) |
byte[][] |
getQualifierKeys(String family)
Returns the HBase identifiers of all registered column qualifiers for a specific column family.
|
String[] |
getQualifierNames(String family)
Returns the names of all registered column qualifiers of a specific column family.
|
org.apache.flink.api.common.typeinfo.TypeInformation<?>[] |
getQualifierTypes(String family)
Returns the types of all registered column qualifiers of a specific column family.
|
Optional<org.apache.flink.table.types.DataType> |
getRowKeyDataType() |
int |
getRowKeyIndex()
Returns field index of row key in the table schema.
|
Optional<String> |
getRowKeyName()
Returns optional value of row key name.
|
Optional<org.apache.flink.api.common.typeinfo.TypeInformation<?>> |
getRowKeyTypeInfo()
Returns the optional type information of row key.
|
String |
getStringCharset()
Returns the charset for value strings and HBase identifiers.
|
void |
setCharset(String charset)
Sets the charset for value strings and HBase identifiers.
|
void |
setRowKey(String rowKeyName,
Class<?> clazz)
Sets row key information in the table schema.
|
void |
setRowKey(String rowKeyName,
org.apache.flink.table.types.DataType type) |
public void addColumn(String family, String qualifier, Class<?> clazz)
family - the family namequalifier - the qualifier nameclazz - the data type of the qualifierpublic void addColumn(String family, String qualifier, org.apache.flink.table.types.DataType type)
public void setRowKey(String rowKeyName, Class<?> clazz)
rowKeyName - the row key field nameclazz - the data type of the row keypublic void setRowKey(String rowKeyName, org.apache.flink.table.types.DataType type)
public void setCharset(String charset)
charset - the charset for value strings and HBase identifiers.public String[] getFamilyNames()
public byte[][] getFamilyKeys()
public String[] getQualifierNames(String family)
family - The name of the column family for which the column qualifier names are returned.public byte[][] getQualifierKeys(String family)
family - The name of the column family for which the column qualifier identifiers are returned.public org.apache.flink.api.common.typeinfo.TypeInformation<?>[] getQualifierTypes(String family)
family - The name of the column family for which the column qualifier types are returned.public org.apache.flink.table.types.DataType[] getQualifierDataTypes(String family)
public String getStringCharset()
public int getRowKeyIndex()
public Optional<org.apache.flink.api.common.typeinfo.TypeInformation<?>> getRowKeyTypeInfo()
public Optional<org.apache.flink.table.types.DataType> getRowKeyDataType()
public Optional<String> getRowKeyName()
public HBaseTableSchema getProjectedHBaseTableSchema(int[] projectedFields)
public org.apache.flink.table.api.TableSchema convertsToTableSchema()
HBaseTableSchema to TableSchema, the fields are consisted
of families and rowkey, the order is in the definition order
(i.e. calling addColumn(String, String, Class) and setRowKey(String, Class)).
The family field is a composite type which is consisted of qualifiers.TableSchema derived from the HBaseTableSchema.public static HBaseTableSchema fromTableSchema(org.apache.flink.table.api.TableSchema schema)
HBaseTableSchema from a TableSchema.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.