HBASE-3120 [rest] Content transcoding; catch TNFE in scanTransformAttrs

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1029948 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andrew Kyle Purtell 2010-11-02 04:11:04 +00:00
parent b9e98b72a3
commit b77e6f4319

View File

@ -37,6 +37,7 @@ import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.TableNotFoundException;
import org.apache.hadoop.hbase.client.HBaseAdmin; import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
import org.apache.hadoop.hbase.rest.transform.NullTransform; import org.apache.hadoop.hbase.rest.transform.NullTransform;
@ -131,6 +132,7 @@ public class TableResource extends ResourceBase {
* The attribute key must begin with the string "Transform$". * The attribute key must begin with the string "Transform$".
*/ */
void scanTransformAttrs() throws IOException { void scanTransformAttrs() throws IOException {
try {
HBaseAdmin admin = new HBaseAdmin(servlet.getConfiguration()); HBaseAdmin admin = new HBaseAdmin(servlet.getConfiguration());
HTableDescriptor htd = admin.getTableDescriptor(Bytes.toBytes(table)); HTableDescriptor htd = admin.getTableDescriptor(Bytes.toBytes(table));
for (HColumnDescriptor hcd: htd.getFamilies()) { for (HColumnDescriptor hcd: htd.getFamilies()) {
@ -184,6 +186,9 @@ public class TableResource extends ResourceBase {
} }
} }
} }
} catch (TableNotFoundException e) {
// ignore
}
} }
/** /**