public class SchemaConfigured extends Object implements HeapSize, SchemaMetrics.SchemaAware
Due to the variety of things that can be associated with a table/CF, there are many ways to initialize this base class, either in the constructor, or from another similar object. For example, an HFile reader configures HFile blocks it reads with its own table/CF name.
Modifier and Type | Field and Description |
---|---|
static int |
SCHEMA_CONFIGURED_UNALIGNED_HEAP_SIZE
Estimated heap size of this object.
|
Constructor and Description |
---|
SchemaConfigured()
Default constructor.
|
SchemaConfigured(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path)
Initialize table and column family name from an HFile path.
|
SchemaConfigured(org.apache.hadoop.conf.Configuration conf,
String tableName,
String cfName)
Used when we know table and column family name.
|
SchemaConfigured(org.apache.hadoop.fs.Path path)
Used when we know an HFile path to deduce table and CF name from, but do
not have a configuration.
|
SchemaConfigured(SchemaMetrics.SchemaAware that) |
Modifier and Type | Method and Description |
---|---|
static SchemaConfigured |
createUnknown()
Creates an instance corresponding to an unknown table and column family.
|
String |
getColumnFamilyName() |
SchemaMetrics |
getSchemaMetrics() |
String |
getTableName() |
long |
heapSize() |
protected boolean |
isSchemaConfigured() |
void |
passSchemaMetricsTo(SchemaConfigured target)
Configures the given object (e.g.
|
static void |
resetSchemaMetricsConf(SchemaConfigured target)
Reset schema metrics configuration in this particular instance.
|
String |
schemaConfAsJSON() |
protected void |
schemaConfigurationChanged()
A hook method called when schema configuration changes.
|
public static final int SCHEMA_CONFIGURED_UNALIGNED_HEAP_SIZE
public SchemaConfigured()
public SchemaConfigured(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path)
SchemaMetrics.configureGlobally(Configuration)
should have been
called already.public SchemaConfigured(org.apache.hadoop.fs.Path path)
path
- an HFile pathpublic SchemaConfigured(org.apache.hadoop.conf.Configuration conf, String tableName, String cfName)
SchemaMetrics.configureGlobally(Configuration)
should have been
called already.public SchemaConfigured(SchemaMetrics.SchemaAware that)
public static SchemaConfigured createUnknown()
public String getTableName()
getTableName
in interface SchemaMetrics.SchemaAware
public String getColumnFamilyName()
getColumnFamilyName
in interface SchemaMetrics.SchemaAware
public SchemaMetrics getSchemaMetrics()
getSchemaMetrics
in interface SchemaMetrics.SchemaAware
public void passSchemaMetricsTo(SchemaConfigured target)
public static void resetSchemaMetricsConf(SchemaConfigured target)
public long heapSize()
public String schemaConfAsJSON()
protected boolean isSchemaConfigured()
protected void schemaConfigurationChanged()
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.