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

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

java 2次浏览

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

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

示例1: listTableNamesByNamespace

点赞 3

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ListTableNamesByNamespaceRequest; //导入依赖的package包/类
/**
 * Get list of table names by namespace
 * @param name namespace name
 * @return The list of table names in the namespace
 * @throws IOException
 */
@Override
public TableName[] listTableNamesByNamespace(final String name) throws IOException {
  return
      executeCallable(new MasterCallable<TableName[]>(getConnection()) {
        @Override
        public TableName[] call(int callTimeout) throws Exception {
          PayloadCarryingRpcController controller = rpcControllerFactory.newController();
          controller.setCallTimeout(callTimeout);
          List<HBaseProtos.TableName> tableNames =
            master.listTableNamesByNamespace(controller, ListTableNamesByNamespaceRequest.
              newBuilder().setNamespaceName(name).build())
              .getTableNameList();
          TableName[] result = new TableName[tableNames.size()];
          for (int i = 0; i < tableNames.size(); i++) {
            result[i] = ProtobufUtil.toTableName(tableNames.get(i));
          }
          return result;
        }
      });
}
 

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

示例2: listTableNamesByNamespace

点赞 3

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ListTableNamesByNamespaceRequest; //导入依赖的package包/类
/**
 * Get list of table names by namespace
 * @param name namespace name
 * @return The list of table names in the namespace
 * @throws IOException
 */
@Override
public TableName[] listTableNamesByNamespace(final String name) throws IOException {
  return
      executeCallable(new MasterCallable<TableName[]>(getConnection()) {
        @Override
        public TableName[] call(int callTimeout) throws Exception {
          List<HBaseProtos.TableName> tableNames =
            master.listTableNamesByNamespace(null, ListTableNamesByNamespaceRequest.
              newBuilder().setNamespaceName(name).build())
              .getTableNameList();
          TableName[] result = new TableName[tableNames.size()];
          for (int i = 0; i < tableNames.size(); i++) {
            result[i] = ProtobufUtil.toTableName(tableNames.get(i));
          }
          return result;
        }
      });
}
 

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

示例3: listTableNamesByNamespace

点赞 3

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ListTableNamesByNamespaceRequest; //导入依赖的package包/类
/**
 * Get list of table names by namespace
 * @param name namespace name
 * @return The list of table names in the namespace
 * @throws IOException
 */
public TableName[] listTableNamesByNamespace(final String name) throws IOException {
  return
      executeCallable(new MasterCallable<TableName[]>(getConnection()) {
        @Override
        public TableName[] call() throws Exception {
          List<HBaseProtos.TableName> tableNames =
            master.listTableNamesByNamespace(null, ListTableNamesByNamespaceRequest.
              newBuilder().setNamespaceName(name).build())
              .getTableNameList();
          TableName[] result = new TableName[tableNames.size()];
          for (int i = 0; i < tableNames.size(); i++) {
            result[i] = ProtobufUtil.toTableName(tableNames.get(i));
          }
          return result;
        }
      });
}
 

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

示例4: listTableNamesByNamespace

点赞 3

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ListTableNamesByNamespaceRequest; //导入依赖的package包/类
/**
 * Get list of table names by namespace
 * @param name namespace name
 * @return The list of table names in the namespace
 * @throws IOException
 */
public TableName[] listTableNamesByNamespace(final String name) throws IOException {
  return
      executeCallable(new MasterCallable<TableName[]>(getConnection()) {
        @Override
        public TableName[] call(int callTimeout) throws Exception {
          List<HBaseProtos.TableName> tableNames =
            master.listTableNamesByNamespace(null, ListTableNamesByNamespaceRequest.
              newBuilder().setNamespaceName(name).build())
              .getTableNameList();
          TableName[] result = new TableName[tableNames.size()];
          for (int i = 0; i < tableNames.size(); i++) {
            result[i] = ProtobufUtil.toTableName(tableNames.get(i));
          }
          return result;
        }
      });
}
 

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

示例5: listTableNamesByNamespace

点赞 2

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ListTableNamesByNamespaceRequest; //导入依赖的package包/类
@Override
public ListTableNamesByNamespaceResponse listTableNamesByNamespace(RpcController c,
    ListTableNamesByNamespaceRequest request) throws ServiceException {
  try {
    ListTableNamesByNamespaceResponse.Builder b =
      ListTableNamesByNamespaceResponse.newBuilder();
    for (TableName tableName: master.listTableNamesByNamespace(request.getNamespaceName())) {
      b.addTableName(ProtobufUtil.toProtoTableName(tableName));
    }
    return b.build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
 

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

示例6: listTableNamesByNamespace

点赞 2

import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.ListTableNamesByNamespaceRequest; //导入依赖的package包/类
@Override
public ListTableNamesByNamespaceResponse listTableNamesByNamespace(
    RpcController controller, ListTableNamesByNamespaceRequest request)
    throws ServiceException {
  try {
    ListTableNamesByNamespaceResponse.Builder b =
        ListTableNamesByNamespaceResponse.newBuilder();
    for (TableName tableName: listTableNamesByNamespace(request.getNamespaceName())) {
      b.addTableName(ProtobufUtil.toProtoTableName(tableName));
    }
    return b.build();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
 

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


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