HBASE-4802 Disable show table metrics in bulk loader
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1391206 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dd10bfe8a7
commit
58af0ecb42
|
@ -76,13 +76,11 @@ public class SchemaConfigured implements HeapSize, SchemaAware {
|
||||||
|
|
||||||
/** A helper constructor that configures the "use table name" flag. */
|
/** A helper constructor that configures the "use table name" flag. */
|
||||||
private SchemaConfigured(Configuration conf) {
|
private SchemaConfigured(Configuration conf) {
|
||||||
if (conf != null) {
|
|
||||||
SchemaMetrics.configureGlobally(conf);
|
SchemaMetrics.configureGlobally(conf);
|
||||||
// Even though we now know if table-level metrics are used, we can't
|
// Even though we now know if table-level metrics are used, we can't
|
||||||
// initialize schemaMetrics yet, because CF and table name are only known
|
// initialize schemaMetrics yet, because CF and table name are only known
|
||||||
// to the calling constructor.
|
// to the calling constructor.
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an instance corresponding to an unknown table and column family.
|
* Creates an instance corresponding to an unknown table and column family.
|
||||||
|
|
|
@ -522,9 +522,13 @@ public class SchemaMetrics {
|
||||||
* instantiating HFile readers/writers.
|
* instantiating HFile readers/writers.
|
||||||
*/
|
*/
|
||||||
public static void configureGlobally(Configuration conf) {
|
public static void configureGlobally(Configuration conf) {
|
||||||
|
if (conf != null) {
|
||||||
final boolean useTableNameNew =
|
final boolean useTableNameNew =
|
||||||
conf.getBoolean(SHOW_TABLE_NAME_CONF_KEY, false);
|
conf.getBoolean(SHOW_TABLE_NAME_CONF_KEY, false);
|
||||||
setUseTableName(useTableNameNew);
|
setUseTableName(useTableNameNew);
|
||||||
|
} else {
|
||||||
|
setUseTableName(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue