Search in sources :

Example 1 with SetSplitOrMergeEnabledRequest

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();
}
Also used : MasterSwitchType(org.apache.hadoop.hbase.client.MasterSwitchType) SetSplitOrMergeEnabledRequest(org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SetSplitOrMergeEnabledRequest)

Aggregations

MasterSwitchType (org.apache.hadoop.hbase.client.MasterSwitchType)1 SetSplitOrMergeEnabledRequest (org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.SetSplitOrMergeEnabledRequest)1