Index: src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java (revision 1197197) +++ src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java (working copy) @@ -41,6 +41,7 @@ import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.HRegionLocation; import org.apache.hadoop.hbase.HTableDescriptor; +import org.apache.hadoop.hbase.InvalidFamilyOperationException; import org.apache.hadoop.hbase.MasterNotRunningException; import org.apache.hadoop.hbase.NotServingRegionException; import org.apache.hadoop.hbase.RegionException; @@ -944,6 +945,17 @@ public void deleteColumn(final byte [] tableName, final byte [] columnName) throws IOException { try { + HTableDescriptor htd = getTableDescriptor(tableName); + if (htd == null) { + throw new IOException("Add Family operation could not be completed as " + + "HTableDescritor is missing for table = " + + Bytes.toString(tableName)); + } + if(!htd.hasFamily(columnName)) { + throw new InvalidFamilyOperationException( + "Family '" + Bytes.toString(columnName) + "' does not exist so " + + "cannot be deleted"); + } getMaster().deleteColumn(tableName, columnName); } catch (RemoteException e) { throw RemoteExceptionHandler.decodeRemoteException(e);