public static TruncateTableRequest buildTruncateTableRequest(final TableName tableName,
    final boolean preserveSplits, final long nonceGroup, final long nonce) {
    TruncateTableRequest.Builder builder = TruncateTableRequest.newBuilder();
    builder.setTableName(ProtobufUtil.toProtoTableName(tableName));
    builder.setPreserveSplits(preserveSplits);
    builder.setNonceGroup(nonceGroup);
    builder.setNonce(nonce);
    return builder.build();
  }
Creates a protocol buffer TruncateTableRequest
@param tableName      name of table to truncate
@param preserveSplits True if the splits should be preserved
@return a TruncateTableRequest
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/RequestConverter.java