use of org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SetSplitOrMergeEnabledRequest in project hbase by apache.
the class RequestConverter method buildSetSplitOrMergeEnabledRequest.
/**
* Creates a protocol buffer SetSplitOrMergeEnabledRequest
*
* @param enabled switch is enabled or not
* @param synchronous set switch sync?
* @param switchTypes see {@link org.apache.hadoop.hbase.client.MasterSwitchType}, it is
* a list.
* @return a SetSplitOrMergeEnabledRequest
*/
public static SetSplitOrMergeEnabledRequest buildSetSplitOrMergeEnabledRequest(boolean enabled, boolean synchronous, MasterSwitchType... switchTypes) {
SetSplitOrMergeEnabledRequest.Builder builder = SetSplitOrMergeEnabledRequest.newBuilder();
builder.setEnabled(enabled);
builder.setSynchronous(synchronous);
for (MasterSwitchType switchType : switchTypes) {
builder.addSwitchTypes(convert(switchType));
}
return builder.build();
}
Aggregations