Java 类org.apache.hadoop.hbase.protobuf.generated.MasterProtos.CreateNamespaceRequest 实例源码

项目:ditb    文件:HBaseAdmin.java   
/**
 * Create a new namespace
 * @param descriptor descriptor which describes the new namespace
 * @throws IOException
 */
@Override
public void createNamespace(final NamespaceDescriptor descriptor) throws IOException {
  executeCallable(new MasterCallable<Void>(getConnection()) {
    @Override
    public Void call(int callTimeout) throws Exception {
      PayloadCarryingRpcController controller = rpcControllerFactory.newController();
      controller.setCallTimeout(callTimeout);
      // TODO: set priority based on NS?
      master.createNamespace(controller,
        CreateNamespaceRequest.newBuilder()
          .setNamespaceDescriptor(ProtobufUtil
            .toProtoNamespaceDescriptor(descriptor)).build()
      );
      return null;
    }
  });
}
项目:ditb    文件:MasterRpcServices.java   
@Override
public CreateNamespaceResponse createNamespace(RpcController controller,
   CreateNamespaceRequest request) throws ServiceException {
  try {
    master.createNamespace(ProtobufUtil.toNamespaceDescriptor(request.getNamespaceDescriptor()));
    return CreateNamespaceResponse.getDefaultInstance();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:pbase    文件:MasterRpcServices.java   
@Override
public CreateNamespaceResponse createNamespace(RpcController controller,
   CreateNamespaceRequest request) throws ServiceException {
  try {
    master.createNamespace(ProtobufUtil.toNamespaceDescriptor(request.getNamespaceDescriptor()));
    return CreateNamespaceResponse.getDefaultInstance();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:pbase    文件:HBaseAdmin.java   
/**
 * Create a new namespace
 * @param descriptor descriptor which describes the new namespace
 * @throws IOException
 */
@Override
public void createNamespace(final NamespaceDescriptor descriptor) throws IOException {
  executeCallable(new MasterCallable<Void>(getConnection()) {
    @Override
    public Void call(int callTimeout) throws Exception {
      master.createNamespace(null,
        CreateNamespaceRequest.newBuilder()
          .setNamespaceDescriptor(ProtobufUtil
            .toProtoNamespaceDescriptor(descriptor)).build()
      );
      return null;
    }
  });
}
项目:HIndex    文件:HMaster.java   
@Override
public CreateNamespaceResponse createNamespace(RpcController controller,
   CreateNamespaceRequest request) throws ServiceException {
  try {
    createNamespace(ProtobufUtil.toNamespaceDescriptor(request.getNamespaceDescriptor()));
    return CreateNamespaceResponse.getDefaultInstance();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:HIndex    文件:HBaseAdmin.java   
/**
 * Create a new namespace
 * @param descriptor descriptor which describes the new namespace
 * @throws IOException
 */
public void createNamespace(final NamespaceDescriptor descriptor) throws IOException {
  executeCallable(new MasterCallable<Void>(getConnection()) {
    @Override
    public Void call() throws Exception {
      master.createNamespace(null,
        CreateNamespaceRequest.newBuilder()
              .setNamespaceDescriptor(ProtobufUtil
                  .toProtoNamespaceDescriptor(descriptor)).build());
      return null;
    }
  });
}
项目:PyroDB    文件:MasterRpcServices.java   
@Override
public CreateNamespaceResponse createNamespace(RpcController controller,
   CreateNamespaceRequest request) throws ServiceException {
  try {
    master.createNamespace(ProtobufUtil.toNamespaceDescriptor(request.getNamespaceDescriptor()));
    return CreateNamespaceResponse.getDefaultInstance();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:PyroDB    文件:HBaseAdmin.java   
/**
 * Create a new namespace
 * @param descriptor descriptor which describes the new namespace
 * @throws IOException
 */
public void createNamespace(final NamespaceDescriptor descriptor) throws IOException {
  executeCallable(new MasterCallable<Void>(getConnection()) {
    @Override
    public Void call(int callTimeout) throws Exception {
      master.createNamespace(null,
        CreateNamespaceRequest.newBuilder()
              .setNamespaceDescriptor(ProtobufUtil
                  .toProtoNamespaceDescriptor(descriptor)).build());
      return null;
    }
  });
}
项目:c5    文件:HMaster.java   
@Override
public CreateNamespaceResponse createNamespace(RpcController controller,
   CreateNamespaceRequest request) throws ServiceException {
  try {
    createNamespace(ProtobufUtil.toNamespaceDescriptor(request.getNamespaceDescriptor()));
    return CreateNamespaceResponse.getDefaultInstance();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
项目:c5    文件:HBaseAdmin.java   
/**
 * Create a new namespace
 * @param descriptor descriptor which describes the new namespace
 * @throws IOException
 */
public void createNamespace(final NamespaceDescriptor descriptor) throws IOException {
  executeCallable(new MasterCallable<Void>(getConnection()) {
    @Override
    public Void call() throws Exception {
      master.createNamespace(null,
        CreateNamespaceRequest.newBuilder()
              .setNamespaceDescriptor(ProtobufUtil
                  .toProtoNamespaceDescriptor(descriptor)).build());
      return null;
    }
  });
}