public class HBaseTableSchema extends Object implements Serializable
Constructor and Description |
---|
HBaseTableSchema() |
Modifier and Type | Method and Description |
---|---|
void |
addColumn(String family,
String qualifier,
Class<?> clazz)
Adds a column defined by family, qualifier, and type to the table schema.
|
byte[][] |
getFamilyKeys()
Returns the HBase identifiers of all registered column families.
|
String[] |
getFamilyNames()
Returns the names of all registered column families.
|
byte[][] |
getQualifierKeys(String family)
Returns the HBase identifiers of all registered column qualifiers for a specific column family.
|
TypeInformation<?>[] |
getQualifierTypes(String family)
Returns the types of all registered column qualifiers of a specific column family.
|
int |
getRowKeyIndex()
Returns field index of row key in the table schema.
|
Optional<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.
|
public void addColumn(String family, String qualifier, Class<?> clazz)
family
- the family namequalifier
- the qualifier nameclazz
- the data type of the qualifierpublic void setRowKey(String rowKeyName, Class<?> clazz)
rowKeyName
- the row key field nameclazz
- the data type of the row keypublic void setCharset(String charset)
charset
- the charset for value strings and HBase identifiers.public String[] getFamilyNames()
public byte[][] getFamilyKeys()
public byte[][] getQualifierKeys(String family)
family
- The name of the column family for which the column qualifier identifiers are returned.public TypeInformation<?>[] getQualifierTypes(String family)
family
- The name of the column family for which the column qualifier types are returned.public String getStringCharset()
public int getRowKeyIndex()
public Optional<TypeInformation<?>> getRowKeyTypeInfo()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.