K - the type of the key in this tableV - the type of the value in this tableD - the type of the concrete table descriptorpublic abstract class BaseTableDescriptor<K,V,D extends BaseTableDescriptor<K,V,D>> extends java.lang.Object implements TableDescriptor<K,V,D>
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
config |
protected java.lang.String |
tableId |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseTableDescriptor(java.lang.String tableId)
Constructs a table descriptor instance
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addTableConfig(java.lang.String key,
java.lang.String value,
java.util.Map<java.lang.String,java.lang.String> tableConfig)
Helper method to add a config item to table configuration
|
abstract java.lang.String |
getProviderFactoryClassName()
Return the fully qualified class name of the
TableProviderFactory |
java.lang.String |
getTableId()
Get the id of the table
|
java.util.Map<java.lang.String,java.lang.String> |
toConfig(Config jobConfig)
Generate configuration for this table descriptor, the generated configuration
should be the complete configuration for this table that can be directly
included in the job configuration.
|
protected abstract void |
validate()
Validate that this table descriptor is constructed properly; this method is used internally.
|
D |
withConfig(java.lang.String key,
java.lang.String value)
Add a configuration entry for the table
|
protected final java.lang.String tableId
protected final java.util.Map<java.lang.String,java.lang.String> config
protected BaseTableDescriptor(java.lang.String tableId)
tableId - Id of the table, it must conform to pattern [\\d\\w-_]+public D withConfig(java.lang.String key, java.lang.String value)
key - the keyvalue - the valuepublic java.lang.String getTableId()
TableDescriptorgetTableId in interface TableDescriptor<K,V,D extends BaseTableDescriptor<K,V,D>>public java.util.Map<java.lang.String,java.lang.String> toConfig(Config jobConfig)
TableDescriptorjobConfig.toConfig in interface TableDescriptor<K,V,D extends BaseTableDescriptor<K,V,D>>jobConfig - job configurationpublic abstract java.lang.String getProviderFactoryClassName()
TableProviderFactoryTableProviderFactoryprotected abstract void validate()
protected void addTableConfig(java.lang.String key,
java.lang.String value,
java.util.Map<java.lang.String,java.lang.String> tableConfig)
key - key of the config itemvalue - value of the config itemtableConfig - table configuration