public static TableState parseFrom(TableName tableName, byte[] bytes) throws DeserializationException { try { return convert(tableName, HBaseProtos.TableState.parseFrom(bytes)); } catch (InvalidProtocolBufferException e) { throw new DeserializationException(e); } }
/** * Covert from PB version of TableState * * @param tableName table this state of * @param tableState convert from * @return POJO */ public static TableState convert(TableName tableName, HBaseProtos.TableState tableState) { TableState.State state = State.convert(tableState.getState()); return new TableState(tableName, state); }
/** * Covert to PB version of TableState * * @return PB */ public HBaseProtos.TableState convert() { return HBaseProtos.TableState.newBuilder().setState(this.state.convert()).build(); }