### Eclipse Workspace Patch 1.0 #P apache-0.94 Index: src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaConfigured.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaConfigured.java (revision 1560899) +++ src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaConfigured.java (working copy) @@ -161,6 +161,11 @@ schemaMetrics = that.getSchemaMetrics(); } + public SchemaConfigured(String tableName, String cfName) { + this.tableName = tableName != null ? tableName.intern() : tableName; + this.cfName = cfName != null ? cfName.intern() : cfName; + } + @Override public String getTableName() { return tableName; Index: src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java (revision 1560899) +++ src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java (working copy) @@ -41,6 +41,7 @@ import org.apache.hadoop.hbase.io.hfile.Compression.Algorithm; import org.apache.hadoop.hbase.regionserver.MemStore; import org.apache.hadoop.hbase.regionserver.metrics.SchemaConfigured; +import org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.ChecksumType; import org.apache.hadoop.hbase.util.ClassSize; @@ -138,6 +139,9 @@ */ static final int CHECKSUM_SIZE = Bytes.SIZEOF_INT; + private static SchemaConfigured UNKNOWN_TABLE_AND_CF = new SchemaConfigured( + SchemaMetrics.UNKNOWN, SchemaMetrics.UNKNOWN); + private static final CacheableDeserializer blockDeserializer = new CacheableDeserializer() { public HFileBlock deserialize(ByteBuffer buf) throws IOException{ @@ -153,6 +157,7 @@ buf.limit(buf.limit() + HFileBlock.EXTRA_SERIALIZATION_SPACE); ourBuffer.offset = buf.getLong(); ourBuffer.nextBlockOnDiskSizeWithHeader = buf.getInt(); + UNKNOWN_TABLE_AND_CF.passSchemaMetricsTo(ourBuffer); return ourBuffer; } };