Java 类org.apache.hadoop.hdfs.protocol.proto.ClientDatanodeProtocolProtos.GetReplicaVisibleLengthRequestProto 实例源码

项目:hadoop    文件:TestBlockToken.java   
@Override
public GetReplicaVisibleLengthResponseProto answer(
    InvocationOnMock invocation) throws IOException {
  Object args[] = invocation.getArguments();
  assertEquals(2, args.length);
  GetReplicaVisibleLengthRequestProto req = 
      (GetReplicaVisibleLengthRequestProto) args[1];
  Set<TokenIdentifier> tokenIds = UserGroupInformation.getCurrentUser()
      .getTokenIdentifiers();
  assertEquals("Only one BlockTokenIdentifier expected", 1, tokenIds.size());
  long result = 0;
  for (TokenIdentifier tokenId : tokenIds) {
    BlockTokenIdentifier id = (BlockTokenIdentifier) tokenId;
    LOG.info("Got: " + id.toString());
    assertTrue("Received BlockTokenIdentifier is wrong", ident.equals(id));
    sm.checkAccess(id, null, PBHelper.convert(req.getBlock()),
        BlockTokenSecretManager.AccessMode.WRITE);
    result = id.getBlockId();
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder()
      .setLength(result).build();
}
项目:hadoop    文件:TestBlockToken.java   
private static Server createMockDatanode(BlockTokenSecretManager sm,
    Token<BlockTokenIdentifier> token, Configuration conf)
    throws IOException, ServiceException {
  ClientDatanodeProtocolPB mockDN = mock(ClientDatanodeProtocolPB.class);

  BlockTokenIdentifier id = sm.createIdentifier();
  id.readFields(new DataInputStream(new ByteArrayInputStream(token
      .getIdentifier())));

  doAnswer(new GetLengthAnswer(sm, id)).when(mockDN)
      .getReplicaVisibleLength(any(RpcController.class),
          any(GetReplicaVisibleLengthRequestProto.class));

  RPC.setProtocolEngine(conf, ClientDatanodeProtocolPB.class,
      ProtobufRpcEngine.class);
  BlockingService service = ClientDatanodeProtocolService
      .newReflectiveBlockingService(mockDN);
  return new RPC.Builder(conf).setProtocol(ClientDatanodeProtocolPB.class)
      .setInstance(service).setBindAddress(ADDRESS).setPort(0)
      .setNumHandlers(5).setVerbose(true).setSecretManager(sm).build();
}
项目:aliyun-oss-hadoop-fs    文件:TestBlockToken.java   
@Override
public GetReplicaVisibleLengthResponseProto answer(
    InvocationOnMock invocation) throws IOException {
  Object args[] = invocation.getArguments();
  assertEquals(2, args.length);
  GetReplicaVisibleLengthRequestProto req = 
      (GetReplicaVisibleLengthRequestProto) args[1];
  Set<TokenIdentifier> tokenIds = UserGroupInformation.getCurrentUser()
      .getTokenIdentifiers();
  assertEquals("Only one BlockTokenIdentifier expected", 1, tokenIds.size());
  long result = 0;
  for (TokenIdentifier tokenId : tokenIds) {
    BlockTokenIdentifier id = (BlockTokenIdentifier) tokenId;
    LOG.info("Got: " + id.toString());
    assertTrue("Received BlockTokenIdentifier is wrong", ident.equals(id));
    sm.checkAccess(id, null, PBHelperClient.convert(req.getBlock()),
        BlockTokenIdentifier.AccessMode.WRITE);
    result = id.getBlockId();
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder()
      .setLength(result).build();
}
项目:aliyun-oss-hadoop-fs    文件:TestBlockToken.java   
private static Server createMockDatanode(BlockTokenSecretManager sm,
    Token<BlockTokenIdentifier> token, Configuration conf)
    throws IOException, ServiceException {
  ClientDatanodeProtocolPB mockDN = mock(ClientDatanodeProtocolPB.class);

  BlockTokenIdentifier id = sm.createIdentifier();
  id.readFields(new DataInputStream(new ByteArrayInputStream(token
      .getIdentifier())));

  doAnswer(new GetLengthAnswer(sm, id)).when(mockDN)
      .getReplicaVisibleLength(any(RpcController.class),
          any(GetReplicaVisibleLengthRequestProto.class));

  RPC.setProtocolEngine(conf, ClientDatanodeProtocolPB.class,
      ProtobufRpcEngine.class);
  BlockingService service = ClientDatanodeProtocolService
      .newReflectiveBlockingService(mockDN);
  return new RPC.Builder(conf).setProtocol(ClientDatanodeProtocolPB.class)
      .setInstance(service).setBindAddress(ADDRESS).setPort(0)
      .setNumHandlers(5).setVerbose(true).setSecretManager(sm).build();
}
项目:big-c    文件:TestBlockToken.java   
@Override
public GetReplicaVisibleLengthResponseProto answer(
    InvocationOnMock invocation) throws IOException {
  Object args[] = invocation.getArguments();
  assertEquals(2, args.length);
  GetReplicaVisibleLengthRequestProto req = 
      (GetReplicaVisibleLengthRequestProto) args[1];
  Set<TokenIdentifier> tokenIds = UserGroupInformation.getCurrentUser()
      .getTokenIdentifiers();
  assertEquals("Only one BlockTokenIdentifier expected", 1, tokenIds.size());
  long result = 0;
  for (TokenIdentifier tokenId : tokenIds) {
    BlockTokenIdentifier id = (BlockTokenIdentifier) tokenId;
    LOG.info("Got: " + id.toString());
    assertTrue("Received BlockTokenIdentifier is wrong", ident.equals(id));
    sm.checkAccess(id, null, PBHelper.convert(req.getBlock()),
        BlockTokenSecretManager.AccessMode.WRITE);
    result = id.getBlockId();
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder()
      .setLength(result).build();
}
项目:big-c    文件:TestBlockToken.java   
private static Server createMockDatanode(BlockTokenSecretManager sm,
    Token<BlockTokenIdentifier> token, Configuration conf)
    throws IOException, ServiceException {
  ClientDatanodeProtocolPB mockDN = mock(ClientDatanodeProtocolPB.class);

  BlockTokenIdentifier id = sm.createIdentifier();
  id.readFields(new DataInputStream(new ByteArrayInputStream(token
      .getIdentifier())));

  doAnswer(new GetLengthAnswer(sm, id)).when(mockDN)
      .getReplicaVisibleLength(any(RpcController.class),
          any(GetReplicaVisibleLengthRequestProto.class));

  RPC.setProtocolEngine(conf, ClientDatanodeProtocolPB.class,
      ProtobufRpcEngine.class);
  BlockingService service = ClientDatanodeProtocolService
      .newReflectiveBlockingService(mockDN);
  return new RPC.Builder(conf).setProtocol(ClientDatanodeProtocolPB.class)
      .setInstance(service).setBindAddress(ADDRESS).setPort(0)
      .setNumHandlers(5).setVerbose(true).setSecretManager(sm).build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestBlockToken.java   
@Override
public GetReplicaVisibleLengthResponseProto answer(
    InvocationOnMock invocation) throws IOException {
  Object args[] = invocation.getArguments();
  assertEquals(2, args.length);
  GetReplicaVisibleLengthRequestProto req = 
      (GetReplicaVisibleLengthRequestProto) args[1];
  Set<TokenIdentifier> tokenIds = UserGroupInformation.getCurrentUser()
      .getTokenIdentifiers();
  assertEquals("Only one BlockTokenIdentifier expected", 1, tokenIds.size());
  long result = 0;
  for (TokenIdentifier tokenId : tokenIds) {
    BlockTokenIdentifier id = (BlockTokenIdentifier) tokenId;
    LOG.info("Got: " + id.toString());
    assertTrue("Received BlockTokenIdentifier is wrong", ident.equals(id));
    sm.checkAccess(id, null, PBHelper.convert(req.getBlock()),
        BlockTokenSecretManager.AccessMode.WRITE);
    result = id.getBlockId();
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder()
      .setLength(result).build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestBlockToken.java   
private static Server createMockDatanode(BlockTokenSecretManager sm,
    Token<BlockTokenIdentifier> token, Configuration conf)
    throws IOException, ServiceException {
  ClientDatanodeProtocolPB mockDN = mock(ClientDatanodeProtocolPB.class);

  BlockTokenIdentifier id = sm.createIdentifier();
  id.readFields(new DataInputStream(new ByteArrayInputStream(token
      .getIdentifier())));

  doAnswer(new GetLengthAnswer(sm, id)).when(mockDN)
      .getReplicaVisibleLength(any(RpcController.class),
          any(GetReplicaVisibleLengthRequestProto.class));

  RPC.setProtocolEngine(conf, ClientDatanodeProtocolPB.class,
      ProtobufRpcEngine.class);
  BlockingService service = ClientDatanodeProtocolService
      .newReflectiveBlockingService(mockDN);
  return new RPC.Builder(conf).setProtocol(ClientDatanodeProtocolPB.class)
      .setInstance(service).setBindAddress(ADDRESS).setPort(0)
      .setNumHandlers(5).setVerbose(true).setSecretManager(sm).build();
}
项目:hadoop-plus    文件:TestBlockToken.java   
@Override
public GetReplicaVisibleLengthResponseProto answer(
    InvocationOnMock invocation) throws IOException {
  Object args[] = invocation.getArguments();
  assertEquals(2, args.length);
  GetReplicaVisibleLengthRequestProto req = 
      (GetReplicaVisibleLengthRequestProto) args[1];
  Set<TokenIdentifier> tokenIds = UserGroupInformation.getCurrentUser()
      .getTokenIdentifiers();
  assertEquals("Only one BlockTokenIdentifier expected", 1, tokenIds.size());
  long result = 0;
  for (TokenIdentifier tokenId : tokenIds) {
    BlockTokenIdentifier id = (BlockTokenIdentifier) tokenId;
    LOG.info("Got: " + id.toString());
    assertTrue("Received BlockTokenIdentifier is wrong", ident.equals(id));
    sm.checkAccess(id, null, PBHelper.convert(req.getBlock()),
        BlockTokenSecretManager.AccessMode.WRITE);
    result = id.getBlockId();
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder()
      .setLength(result).build();
}
项目:hadoop-plus    文件:TestBlockToken.java   
private static Server createMockDatanode(BlockTokenSecretManager sm,
    Token<BlockTokenIdentifier> token, Configuration conf)
    throws IOException, ServiceException {
  ClientDatanodeProtocolPB mockDN = mock(ClientDatanodeProtocolPB.class);

  BlockTokenIdentifier id = sm.createIdentifier();
  id.readFields(new DataInputStream(new ByteArrayInputStream(token
      .getIdentifier())));

  doAnswer(new GetLengthAnswer(sm, id)).when(mockDN)
      .getReplicaVisibleLength(any(RpcController.class),
          any(GetReplicaVisibleLengthRequestProto.class));

  RPC.setProtocolEngine(conf, ClientDatanodeProtocolPB.class,
      ProtobufRpcEngine.class);
  BlockingService service = ClientDatanodeProtocolService
      .newReflectiveBlockingService(mockDN);
  return new RPC.Builder(conf).setProtocol(ClientDatanodeProtocolPB.class)
      .setInstance(service).setBindAddress(ADDRESS).setPort(0)
      .setNumHandlers(5).setVerbose(true).setSecretManager(sm).build();
}
项目:FlexMap    文件:TestBlockToken.java   
@Override
public GetReplicaVisibleLengthResponseProto answer(
    InvocationOnMock invocation) throws IOException {
  Object args[] = invocation.getArguments();
  assertEquals(2, args.length);
  GetReplicaVisibleLengthRequestProto req = 
      (GetReplicaVisibleLengthRequestProto) args[1];
  Set<TokenIdentifier> tokenIds = UserGroupInformation.getCurrentUser()
      .getTokenIdentifiers();
  assertEquals("Only one BlockTokenIdentifier expected", 1, tokenIds.size());
  long result = 0;
  for (TokenIdentifier tokenId : tokenIds) {
    BlockTokenIdentifier id = (BlockTokenIdentifier) tokenId;
    LOG.info("Got: " + id.toString());
    assertTrue("Received BlockTokenIdentifier is wrong", ident.equals(id));
    sm.checkAccess(id, null, PBHelper.convert(req.getBlock()),
        BlockTokenSecretManager.AccessMode.WRITE);
    result = id.getBlockId();
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder()
      .setLength(result).build();
}
项目:FlexMap    文件:TestBlockToken.java   
private static Server createMockDatanode(BlockTokenSecretManager sm,
    Token<BlockTokenIdentifier> token, Configuration conf)
    throws IOException, ServiceException {
  ClientDatanodeProtocolPB mockDN = mock(ClientDatanodeProtocolPB.class);

  BlockTokenIdentifier id = sm.createIdentifier();
  id.readFields(new DataInputStream(new ByteArrayInputStream(token
      .getIdentifier())));

  doAnswer(new GetLengthAnswer(sm, id)).when(mockDN)
      .getReplicaVisibleLength(any(RpcController.class),
          any(GetReplicaVisibleLengthRequestProto.class));

  RPC.setProtocolEngine(conf, ClientDatanodeProtocolPB.class,
      ProtobufRpcEngine.class);
  BlockingService service = ClientDatanodeProtocolService
      .newReflectiveBlockingService(mockDN);
  return new RPC.Builder(conf).setProtocol(ClientDatanodeProtocolPB.class)
      .setInstance(service).setBindAddress(ADDRESS).setPort(0)
      .setNumHandlers(5).setVerbose(true).setSecretManager(sm).build();
}
项目:hops    文件:TestBlockToken.java   
@Override
public GetReplicaVisibleLengthResponseProto answer(
    InvocationOnMock invocation) throws IOException {
  Object args[] = invocation.getArguments();
  assertEquals(2, args.length);
  GetReplicaVisibleLengthRequestProto req =
      (GetReplicaVisibleLengthRequestProto) args[1];
  Set<TokenIdentifier> tokenIds =
      UserGroupInformation.getCurrentUser().getTokenIdentifiers();
  assertEquals("Only one BlockTokenIdentifier expected", 1,
      tokenIds.size());
  long result = 0;
  for (TokenIdentifier tokenId : tokenIds) {
    BlockTokenIdentifier id = (BlockTokenIdentifier) tokenId;
    LOG.info("Got: " + id.toString());
    assertTrue("Received BlockTokenIdentifier is wrong", ident.equals(id));
    sm.checkAccess(id, null, PBHelper.convert(req.getBlock()),
        BlockTokenSecretManager.AccessMode.WRITE);
    result = id.getBlockId();
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder().setLength(result)
      .build();
}
项目:hops    文件:TestBlockToken.java   
private static Server createMockDatanode(BlockTokenSecretManager sm,
    Token<BlockTokenIdentifier> token, Configuration conf)
    throws IOException, ServiceException {
  ClientDatanodeProtocolPB mockDN = mock(ClientDatanodeProtocolPB.class);

  BlockTokenIdentifier id = sm.createIdentifier();
  id.readFields(
      new DataInputStream(new ByteArrayInputStream(token.getIdentifier())));

  doAnswer(new GetLengthAnswer(sm, id)).when(mockDN)
      .getReplicaVisibleLength(any(RpcController.class),
          any(GetReplicaVisibleLengthRequestProto.class));

  RPC.setProtocolEngine(conf, ClientDatanodeProtocolPB.class,
      ProtobufRpcEngine.class);
  BlockingService service =
      ClientDatanodeProtocolService.newReflectiveBlockingService(mockDN);
  return new RPC.Builder(conf).setProtocol(ClientDatanodeProtocolPB.class)
      .setInstance(service).setBindAddress(ADDRESS).setPort(0)
      .setNumHandlers(5).setVerbose(true).setSecretManager(sm).build();
}
项目:hadoop-TCP    文件:TestBlockToken.java   
@Override
public GetReplicaVisibleLengthResponseProto answer(
    InvocationOnMock invocation) throws IOException {
  Object args[] = invocation.getArguments();
  assertEquals(2, args.length);
  GetReplicaVisibleLengthRequestProto req = 
      (GetReplicaVisibleLengthRequestProto) args[1];
  Set<TokenIdentifier> tokenIds = UserGroupInformation.getCurrentUser()
      .getTokenIdentifiers();
  assertEquals("Only one BlockTokenIdentifier expected", 1, tokenIds.size());
  long result = 0;
  for (TokenIdentifier tokenId : tokenIds) {
    BlockTokenIdentifier id = (BlockTokenIdentifier) tokenId;
    LOG.info("Got: " + id.toString());
    assertTrue("Received BlockTokenIdentifier is wrong", ident.equals(id));
    sm.checkAccess(id, null, PBHelper.convert(req.getBlock()),
        BlockTokenSecretManager.AccessMode.WRITE);
    result = id.getBlockId();
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder()
      .setLength(result).build();
}
项目:hadoop-TCP    文件:TestBlockToken.java   
private static Server createMockDatanode(BlockTokenSecretManager sm,
    Token<BlockTokenIdentifier> token, Configuration conf)
    throws IOException, ServiceException {
  ClientDatanodeProtocolPB mockDN = mock(ClientDatanodeProtocolPB.class);

  BlockTokenIdentifier id = sm.createIdentifier();
  id.readFields(new DataInputStream(new ByteArrayInputStream(token
      .getIdentifier())));

  doAnswer(new GetLengthAnswer(sm, id)).when(mockDN)
      .getReplicaVisibleLength(any(RpcController.class),
          any(GetReplicaVisibleLengthRequestProto.class));

  RPC.setProtocolEngine(conf, ClientDatanodeProtocolPB.class,
      ProtobufRpcEngine.class);
  BlockingService service = ClientDatanodeProtocolService
      .newReflectiveBlockingService(mockDN);
  return new RPC.Builder(conf).setProtocol(ClientDatanodeProtocolPB.class)
      .setInstance(service).setBindAddress(ADDRESS).setPort(0)
      .setNumHandlers(5).setVerbose(true).setSecretManager(sm).build();
}
项目:hardfs    文件:TestBlockToken.java   
@Override
public GetReplicaVisibleLengthResponseProto answer(
    InvocationOnMock invocation) throws IOException {
  Object args[] = invocation.getArguments();
  assertEquals(2, args.length);
  GetReplicaVisibleLengthRequestProto req = 
      (GetReplicaVisibleLengthRequestProto) args[1];
  Set<TokenIdentifier> tokenIds = UserGroupInformation.getCurrentUser()
      .getTokenIdentifiers();
  assertEquals("Only one BlockTokenIdentifier expected", 1, tokenIds.size());
  long result = 0;
  for (TokenIdentifier tokenId : tokenIds) {
    BlockTokenIdentifier id = (BlockTokenIdentifier) tokenId;
    LOG.info("Got: " + id.toString());
    assertTrue("Received BlockTokenIdentifier is wrong", ident.equals(id));
    sm.checkAccess(id, null, PBHelper.convert(req.getBlock()),
        BlockTokenSecretManager.AccessMode.WRITE);
    result = id.getBlockId();
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder()
      .setLength(result).build();
}
项目:hardfs    文件:TestBlockToken.java   
private static Server createMockDatanode(BlockTokenSecretManager sm,
    Token<BlockTokenIdentifier> token, Configuration conf)
    throws IOException, ServiceException {
  ClientDatanodeProtocolPB mockDN = mock(ClientDatanodeProtocolPB.class);

  BlockTokenIdentifier id = sm.createIdentifier();
  id.readFields(new DataInputStream(new ByteArrayInputStream(token
      .getIdentifier())));

  doAnswer(new GetLengthAnswer(sm, id)).when(mockDN)
      .getReplicaVisibleLength(any(RpcController.class),
          any(GetReplicaVisibleLengthRequestProto.class));

  RPC.setProtocolEngine(conf, ClientDatanodeProtocolPB.class,
      ProtobufRpcEngine.class);
  BlockingService service = ClientDatanodeProtocolService
      .newReflectiveBlockingService(mockDN);
  return new RPC.Builder(conf).setProtocol(ClientDatanodeProtocolPB.class)
      .setInstance(service).setBindAddress(ADDRESS).setPort(0)
      .setNumHandlers(5).setVerbose(true).setSecretManager(sm).build();
}
项目:hadoop-on-lustre2    文件:TestBlockToken.java   
@Override
public GetReplicaVisibleLengthResponseProto answer(
    InvocationOnMock invocation) throws IOException {
  Object args[] = invocation.getArguments();
  assertEquals(2, args.length);
  GetReplicaVisibleLengthRequestProto req = 
      (GetReplicaVisibleLengthRequestProto) args[1];
  Set<TokenIdentifier> tokenIds = UserGroupInformation.getCurrentUser()
      .getTokenIdentifiers();
  assertEquals("Only one BlockTokenIdentifier expected", 1, tokenIds.size());
  long result = 0;
  for (TokenIdentifier tokenId : tokenIds) {
    BlockTokenIdentifier id = (BlockTokenIdentifier) tokenId;
    LOG.info("Got: " + id.toString());
    assertTrue("Received BlockTokenIdentifier is wrong", ident.equals(id));
    sm.checkAccess(id, null, PBHelper.convert(req.getBlock()),
        BlockTokenSecretManager.AccessMode.WRITE);
    result = id.getBlockId();
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder()
      .setLength(result).build();
}
项目:hadoop-on-lustre2    文件:TestBlockToken.java   
private static Server createMockDatanode(BlockTokenSecretManager sm,
    Token<BlockTokenIdentifier> token, Configuration conf)
    throws IOException, ServiceException {
  ClientDatanodeProtocolPB mockDN = mock(ClientDatanodeProtocolPB.class);

  BlockTokenIdentifier id = sm.createIdentifier();
  id.readFields(new DataInputStream(new ByteArrayInputStream(token
      .getIdentifier())));

  doAnswer(new GetLengthAnswer(sm, id)).when(mockDN)
      .getReplicaVisibleLength(any(RpcController.class),
          any(GetReplicaVisibleLengthRequestProto.class));

  RPC.setProtocolEngine(conf, ClientDatanodeProtocolPB.class,
      ProtobufRpcEngine.class);
  BlockingService service = ClientDatanodeProtocolService
      .newReflectiveBlockingService(mockDN);
  return new RPC.Builder(conf).setProtocol(ClientDatanodeProtocolPB.class)
      .setInstance(service).setBindAddress(ADDRESS).setPort(0)
      .setNumHandlers(5).setVerbose(true).setSecretManager(sm).build();
}
项目:hadoop    文件:ClientDatanodeProtocolTranslatorPB.java   
@Override
public long getReplicaVisibleLength(ExtendedBlock b) throws IOException {
  GetReplicaVisibleLengthRequestProto req = GetReplicaVisibleLengthRequestProto
      .newBuilder().setBlock(PBHelper.convert(b)).build();
  try {
    return rpcProxy.getReplicaVisibleLength(NULL_CONTROLLER, req).getLength();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:hadoop    文件:ClientDatanodeProtocolServerSideTranslatorPB.java   
@Override
public GetReplicaVisibleLengthResponseProto getReplicaVisibleLength(
    RpcController unused, GetReplicaVisibleLengthRequestProto request)
    throws ServiceException {
  long len;
  try {
    len = impl.getReplicaVisibleLength(PBHelper.convert(request.getBlock()));
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder().setLength(len)
      .build();
}
项目:aliyun-oss-hadoop-fs    文件:ClientDatanodeProtocolTranslatorPB.java   
@Override
public long getReplicaVisibleLength(ExtendedBlock b) throws IOException {
  GetReplicaVisibleLengthRequestProto req =
      GetReplicaVisibleLengthRequestProto.newBuilder()
          .setBlock(PBHelperClient.convert(b)).build();
  try {
    return rpcProxy.getReplicaVisibleLength(NULL_CONTROLLER, req).getLength();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:aliyun-oss-hadoop-fs    文件:ClientDatanodeProtocolServerSideTranslatorPB.java   
@Override
public GetReplicaVisibleLengthResponseProto getReplicaVisibleLength(
    RpcController unused, GetReplicaVisibleLengthRequestProto request)
    throws ServiceException {
  long len;
  try {
    len = impl.getReplicaVisibleLength(PBHelperClient.convert(request.getBlock()));
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder().setLength(len)
      .build();
}
项目:big-c    文件:ClientDatanodeProtocolTranslatorPB.java   
@Override
public long getReplicaVisibleLength(ExtendedBlock b) throws IOException {
  GetReplicaVisibleLengthRequestProto req = GetReplicaVisibleLengthRequestProto
      .newBuilder().setBlock(PBHelper.convert(b)).build();
  try {
    return rpcProxy.getReplicaVisibleLength(NULL_CONTROLLER, req).getLength();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:big-c    文件:ClientDatanodeProtocolServerSideTranslatorPB.java   
@Override
public GetReplicaVisibleLengthResponseProto getReplicaVisibleLength(
    RpcController unused, GetReplicaVisibleLengthRequestProto request)
    throws ServiceException {
  long len;
  try {
    len = impl.getReplicaVisibleLength(PBHelper.convert(request.getBlock()));
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder().setLength(len)
      .build();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ClientDatanodeProtocolTranslatorPB.java   
@Override
public long getReplicaVisibleLength(ExtendedBlock b) throws IOException {
  GetReplicaVisibleLengthRequestProto req = GetReplicaVisibleLengthRequestProto
      .newBuilder().setBlock(PBHelper.convert(b)).build();
  try {
    return rpcProxy.getReplicaVisibleLength(NULL_CONTROLLER, req).getLength();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:hadoop-2.6.0-cdh5.4.3    文件:ClientDatanodeProtocolServerSideTranslatorPB.java   
@Override
public GetReplicaVisibleLengthResponseProto getReplicaVisibleLength(
    RpcController unused, GetReplicaVisibleLengthRequestProto request)
    throws ServiceException {
  long len;
  try {
    len = impl.getReplicaVisibleLength(PBHelper.convert(request.getBlock()));
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder().setLength(len)
      .build();
}
项目:hadoop-plus    文件:ClientDatanodeProtocolTranslatorPB.java   
@Override
public long getReplicaVisibleLength(ExtendedBlock b) throws IOException {
  GetReplicaVisibleLengthRequestProto req = GetReplicaVisibleLengthRequestProto
      .newBuilder().setBlock(PBHelper.convert(b)).build();
  try {
    return rpcProxy.getReplicaVisibleLength(NULL_CONTROLLER, req).getLength();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:hadoop-plus    文件:ClientDatanodeProtocolServerSideTranslatorPB.java   
@Override
public GetReplicaVisibleLengthResponseProto getReplicaVisibleLength(
    RpcController unused, GetReplicaVisibleLengthRequestProto request)
    throws ServiceException {
  long len;
  try {
    len = impl.getReplicaVisibleLength(PBHelper.convert(request.getBlock()));
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder().setLength(len)
      .build();
}
项目:FlexMap    文件:ClientDatanodeProtocolTranslatorPB.java   
@Override
public long getReplicaVisibleLength(ExtendedBlock b) throws IOException {
  GetReplicaVisibleLengthRequestProto req = GetReplicaVisibleLengthRequestProto
      .newBuilder().setBlock(PBHelper.convert(b)).build();
  try {
    return rpcProxy.getReplicaVisibleLength(NULL_CONTROLLER, req).getLength();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:FlexMap    文件:ClientDatanodeProtocolServerSideTranslatorPB.java   
@Override
public GetReplicaVisibleLengthResponseProto getReplicaVisibleLength(
    RpcController unused, GetReplicaVisibleLengthRequestProto request)
    throws ServiceException {
  long len;
  try {
    len = impl.getReplicaVisibleLength(PBHelper.convert(request.getBlock()));
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder().setLength(len)
      .build();
}
项目:hops    文件:ClientDatanodeProtocolTranslatorPB.java   
@Override
public long getReplicaVisibleLength(ExtendedBlock b) throws IOException {
  GetReplicaVisibleLengthRequestProto req =
      GetReplicaVisibleLengthRequestProto.newBuilder()
          .setBlock(PBHelper.convert(b)).build();
  try {
    return rpcProxy.getReplicaVisibleLength(NULL_CONTROLLER, req).getLength();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:hops    文件:ClientDatanodeProtocolServerSideTranslatorPB.java   
@Override
public GetReplicaVisibleLengthResponseProto getReplicaVisibleLength(
    RpcController unused, GetReplicaVisibleLengthRequestProto request)
    throws ServiceException {
  long len;
  try {
    len = impl.getReplicaVisibleLength(PBHelper.convert(request.getBlock()));
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder().setLength(len)
      .build();
}
项目:hadoop-TCP    文件:ClientDatanodeProtocolTranslatorPB.java   
@Override
public long getReplicaVisibleLength(ExtendedBlock b) throws IOException {
  GetReplicaVisibleLengthRequestProto req = GetReplicaVisibleLengthRequestProto
      .newBuilder().setBlock(PBHelper.convert(b)).build();
  try {
    return rpcProxy.getReplicaVisibleLength(NULL_CONTROLLER, req).getLength();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:hadoop-TCP    文件:ClientDatanodeProtocolServerSideTranslatorPB.java   
@Override
public GetReplicaVisibleLengthResponseProto getReplicaVisibleLength(
    RpcController unused, GetReplicaVisibleLengthRequestProto request)
    throws ServiceException {
  long len;
  try {
    len = impl.getReplicaVisibleLength(PBHelper.convert(request.getBlock()));
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder().setLength(len)
      .build();
}
项目:hardfs    文件:ClientDatanodeProtocolTranslatorPB.java   
@Override
public long getReplicaVisibleLength(ExtendedBlock b) throws IOException {
  GetReplicaVisibleLengthRequestProto req = GetReplicaVisibleLengthRequestProto
      .newBuilder().setBlock(PBHelper.convert(b)).build();
  try {
    return rpcProxy.getReplicaVisibleLength(NULL_CONTROLLER, req).getLength();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:hardfs    文件:ClientDatanodeProtocolServerSideTranslatorPB.java   
@Override
public GetReplicaVisibleLengthResponseProto getReplicaVisibleLength(
    RpcController unused, GetReplicaVisibleLengthRequestProto request)
    throws ServiceException {
  long len;
  try {
    len = impl.getReplicaVisibleLength(PBHelper.convert(request.getBlock()));
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder().setLength(len)
      .build();
}
项目:hadoop-on-lustre2    文件:ClientDatanodeProtocolTranslatorPB.java   
@Override
public long getReplicaVisibleLength(ExtendedBlock b) throws IOException {
  GetReplicaVisibleLengthRequestProto req = GetReplicaVisibleLengthRequestProto
      .newBuilder().setBlock(PBHelper.convert(b)).build();
  try {
    return rpcProxy.getReplicaVisibleLength(NULL_CONTROLLER, req).getLength();
  } catch (ServiceException e) {
    throw ProtobufHelper.getRemoteException(e);
  }
}
项目:hadoop-on-lustre2    文件:ClientDatanodeProtocolServerSideTranslatorPB.java   
@Override
public GetReplicaVisibleLengthResponseProto getReplicaVisibleLength(
    RpcController unused, GetReplicaVisibleLengthRequestProto request)
    throws ServiceException {
  long len;
  try {
    len = impl.getReplicaVisibleLength(PBHelper.convert(request.getBlock()));
  } catch (IOException e) {
    throw new ServiceException(e);
  }
  return GetReplicaVisibleLengthResponseProto.newBuilder().setLength(len)
      .build();
}