try {
fsDataInputStream.readFully(content);
} finally {
fsDataInputStream.close();
}
TableDescriptor td = null;
try {
td = TableDescriptor.parseFrom(content);
} catch (DeserializationException e) {
// we have old HTableDescriptor here
try {
HTableDescriptor htd = HTableDescriptor.parseFrom(content);
LOG.warn("Found old table descriptor, converting to new format for table " +
htd.getTableName() + "; NOTE table will be in ENABLED state!");
td = new TableDescriptor(htd, TableState.State.ENABLED);
if (rewritePb) rewriteTableDescriptor(fs, status, td);
} catch (DeserializationException e1) {
throw new IOException("content=" + Bytes.toShort(content), e);
}
}