Search in sources :

Example 1 with ReopenTableRegionsStateData

use of org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.ReopenTableRegionsStateData in project hbase by apache.

the class ReopenTableRegionsProcedure method deserializeStateData.

@Override
protected void deserializeStateData(ProcedureStateSerializer serializer) throws IOException {
    super.deserializeStateData(serializer);
    ReopenTableRegionsStateData data = serializer.deserialize(ReopenTableRegionsStateData.class);
    tableName = ProtobufUtil.toTableName(data.getTableName());
    regions = data.getRegionList().stream().map(ProtobufUtil::toRegionLocation).collect(Collectors.toList());
    if (CollectionUtils.isNotEmpty(data.getRegionNamesList())) {
        regionNames = data.getRegionNamesList().stream().map(ByteString::toByteArray).collect(Collectors.toList());
    } else {
        regionNames = Collections.emptyList();
    }
}
Also used : ReopenTableRegionsStateData(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.ReopenTableRegionsStateData) ByteString(org.apache.hbase.thirdparty.com.google.protobuf.ByteString) ProtobufUtil(org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil)

Aggregations

ProtobufUtil (org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil)1 ReopenTableRegionsStateData (org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProcedureProtos.ReopenTableRegionsStateData)1 ByteString (org.apache.hbase.thirdparty.com.google.protobuf.ByteString)1