예제 #1
0
 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);
   }
 }
예제 #2
0
 /**
  * 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);
 }
예제 #3
0
 /**
  * Covert to PB version of TableState
  *
  * @return PB
  */
 public HBaseProtos.TableState convert() {
   return HBaseProtos.TableState.newBuilder().setState(this.state.convert()).build();
 }