• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ModifyColumnRequest类的典型用法和代码示例

java 3次浏览

本文整理汇总了Java中org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ModifyColumnRequest的典型用法代码示例。如果您正苦于以下问题:Java ModifyColumnRequest类的具体用法?Java ModifyColumnRequest怎么用?Java ModifyColumnRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ModifyColumnRequest类属于org.apache.hadoop.hbase.protobuf.generated.MasterProtos包,在下文中一共展示了ModifyColumnRequest类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: modifyColumn

点赞 3

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ModifyColumnRequest; //导入依赖的package包/类
/**
 * Modify an existing column family on a table.
 * Asynchronous operation.
 *
 * @param tableName name of table
 * @param descriptor new column descriptor to use
 * @throws IOException if a remote or network exception occurs
 */
@Override
public void modifyColumn(final TableName tableName, final HColumnDescriptor descriptor)
throws IOException {
  executeCallable(new MasterCallable<Void>(getConnection()) {
    @Override
    public Void call(int callTimeout) throws ServiceException {
      PayloadCarryingRpcController controller = rpcControllerFactory.newController();
      controller.setCallTimeout(callTimeout);
      controller.setPriority(tableName);
      ModifyColumnRequest req = RequestConverter.buildModifyColumnRequest(
        tableName, descriptor, ng.getNonceGroup(), ng.newNonce());
      master.modifyColumn(controller, req);
      return null;
    }
  });
}
 

开发者ID:fengchen8086,
项目名称:ditb,
代码行数:25,
代码来源:HBaseAdmin.java

示例2: modifyColumn

点赞 2

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ModifyColumnRequest; //导入依赖的package包/类
@Override
public ModifyColumnResponse modifyColumn(RpcController controller,
    ModifyColumnRequest req) throws ServiceException {
  try {
    master.modifyColumn(
      ProtobufUtil.toTableName(req.getTableName()),
      HColumnDescriptor.convert(req.getColumnFamilies()),
      req.getNonceGroup(),
      req.getNonce());
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }
  return ModifyColumnResponse.newBuilder().build();
}
 

开发者ID:fengchen8086,
项目名称:ditb,
代码行数:15,
代码来源:MasterRpcServices.java

示例3: buildModifyColumnRequest

点赞 2

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ModifyColumnRequest; //导入依赖的package包/类
/**
 * Create a protocol buffer ModifyColumnRequest
 *
 * @param tableName
 * @param column
 * @return an ModifyColumnRequest
 */
public static ModifyColumnRequest buildModifyColumnRequest(
    final TableName tableName,
    final HColumnDescriptor column,
    final long nonceGroup,
    final long nonce) {
  ModifyColumnRequest.Builder builder = ModifyColumnRequest.newBuilder();
  builder.setTableName(ProtobufUtil.toProtoTableName((tableName)));
  builder.setColumnFamilies(column.convert());
  builder.setNonceGroup(nonceGroup);
  builder.setNonce(nonce);
  return builder.build();
}
 

开发者ID:fengchen8086,
项目名称:ditb,
代码行数:20,
代码来源:RequestConverter.java

示例4: modifyColumn

点赞 2

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ModifyColumnRequest; //导入依赖的package包/类
@Override
public ModifyColumnResponse modifyColumn(RpcController controller,
    ModifyColumnRequest req) throws ServiceException {
  try {
    master.modifyColumn(ProtobufUtil.toTableName(req.getTableName()),
      HColumnDescriptor.convert(req.getColumnFamilies()));
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }
  return ModifyColumnResponse.newBuilder().build();
}
 

开发者ID:grokcoder,
项目名称:pbase,
代码行数:12,
代码来源:MasterRpcServices.java

示例5: buildModifyColumnRequest

点赞 2

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ModifyColumnRequest; //导入依赖的package包/类
/**
 * Create a protocol buffer ModifyColumnRequest
 *
 * @param tableName
 * @param column
 * @return an ModifyColumnRequest
 */
public static ModifyColumnRequest buildModifyColumnRequest(
    final TableName tableName, final HColumnDescriptor column) {
  ModifyColumnRequest.Builder builder = ModifyColumnRequest.newBuilder();
  builder.setTableName(ProtobufUtil.toProtoTableName((tableName)));
  builder.setColumnFamilies(column.convert());
  return builder.build();
}
 

开发者ID:grokcoder,
项目名称:pbase,
代码行数:15,
代码来源:RequestConverter.java

示例6: modifyColumn

点赞 2

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ModifyColumnRequest; //导入依赖的package包/类
/**
 * Modify an existing column family on a table.
 * Asynchronous operation.
 *
 * @param tableName name of table
 * @param descriptor new column descriptor to use
 * @throws IOException if a remote or network exception occurs
 */
@Override
public void modifyColumn(final TableName tableName, final HColumnDescriptor descriptor)
throws IOException {
  executeCallable(new MasterCallable<Void>(getConnection()) {
    @Override
    public Void call(int callTimeout) throws ServiceException {
      ModifyColumnRequest req = RequestConverter.buildModifyColumnRequest(tableName, descriptor);
      master.modifyColumn(null,req);
      return null;
    }
  });
}
 

开发者ID:grokcoder,
项目名称:pbase,
代码行数:21,
代码来源:HBaseAdmin.java

示例7: modifyColumn

点赞 2

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ModifyColumnRequest; //导入依赖的package包/类
@Override
public ModifyColumnResponse modifyColumn(RpcController controller, ModifyColumnRequest req)
throws ServiceException {
  try {
    modifyColumn(ProtobufUtil.toTableName(req.getTableName()),
      HColumnDescriptor.convert(req.getColumnFamilies()));
  } catch (IOException ioe) {
    throw new ServiceException(ioe);
  }
  return ModifyColumnResponse.newBuilder().build();
}
 

开发者ID:tenggyut,
项目名称:HIndex,
代码行数:12,
代码来源:HMaster.java

示例8: modifyColumn

点赞 2

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ModifyColumnRequest; //导入依赖的package包/类
/**
 * Modify an existing column family on a table.
 * Asynchronous operation.
 *
 * @param tableName name of table
 * @param descriptor new column descriptor to use
 * @throws IOException if a remote or network exception occurs
 */
public void modifyColumn(final TableName tableName, final HColumnDescriptor descriptor)
throws IOException {
  executeCallable(new MasterCallable<Void>(getConnection()) {
    @Override
    public Void call() throws ServiceException {
      ModifyColumnRequest req = RequestConverter.buildModifyColumnRequest(tableName, descriptor);
      master.modifyColumn(null,req);
      return null;
    }
  });
}
 

开发者ID:tenggyut,
项目名称:HIndex,
代码行数:20,
代码来源:HBaseAdmin.java

示例9: modifyColumn

点赞 2

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ModifyColumnRequest; //导入依赖的package包/类
/**
 * Modify an existing column family on a table.
 * Asynchronous operation.
 *
 * @param tableName name of table
 * @param descriptor new column descriptor to use
 * @throws IOException if a remote or network exception occurs
 */
public void modifyColumn(final TableName tableName, final HColumnDescriptor descriptor)
throws IOException {
  executeCallable(new MasterCallable<Void>(getConnection()) {
    @Override
    public Void call(int callTimeout) throws ServiceException {
      ModifyColumnRequest req = RequestConverter.buildModifyColumnRequest(tableName, descriptor);
      master.modifyColumn(null,req);
      return null;
    }
  });
}
 

开发者ID:shenli-uiuc,
项目名称:PyroDB,
代码行数:20,
代码来源:HBaseAdmin.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)