Java 类org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ClientService.BlockingInterface 实例源码

项目:ditb    文件:TestClientNoCluster.java   
ScanOpenNextThenExceptionThenRecoverConnection(Configuration conf,
    boolean managed, ExecutorService pool) throws IOException {
  super(conf, managed);
  // Mock up my stub so open scanner returns a scanner id and then on next, we throw
  // exceptions for three times and then after that, we return no more to scan.
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  long sid = 12345L;
  try {
    Mockito.when(stub.scan((RpcController)Mockito.any(),
        (ClientProtos.ScanRequest)Mockito.any())).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).build()).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito"))).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).
          setMoreResults(false).build());
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:ditb    文件:TestClientNoCluster.java   
RegionServerStoppedOnScannerOpenConnection(Configuration conf, boolean managed,
    ExecutorService pool, User user) throws IOException {
  super(conf, managed);
  // Mock up my stub so open scanner returns a scanner id and then on next, we throw
  // exceptions for three times and then after that, we return no more to scan.
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  long sid = 12345L;
  try {
    Mockito.when(stub.scan((RpcController)Mockito.any(),
        (ClientProtos.ScanRequest)Mockito.any())).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).build()).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito"))).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).
          setMoreResults(false).build());
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:pbase    文件:TestClientNoCluster.java   
ScanOpenNextThenExceptionThenRecoverConnection(Configuration conf,
    boolean managed, ExecutorService pool) throws IOException {
  super(conf, managed);
  // Mock up my stub so open scanner returns a scanner id and then on next, we throw
  // exceptions for three times and then after that, we return no more to scan.
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  long sid = 12345L;
  try {
    Mockito.when(stub.scan((RpcController)Mockito.any(),
        (ClientProtos.ScanRequest)Mockito.any())).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).build()).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito"))).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).
          setMoreResults(false).build());
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:pbase    文件:TestClientNoCluster.java   
RegionServerStoppedOnScannerOpenConnection(Configuration conf, boolean managed,
    ExecutorService pool, User user) throws IOException {
  super(conf, managed);
  // Mock up my stub so open scanner returns a scanner id and then on next, we throw
  // exceptions for three times and then after that, we return no more to scan.
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  long sid = 12345L;
  try {
    Mockito.when(stub.scan((RpcController)Mockito.any(),
        (ClientProtos.ScanRequest)Mockito.any())).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).build()).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito"))).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).
          setMoreResults(false).build());
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:HIndex    文件:TestClientNoCluster.java   
ScanOpenNextThenExceptionThenRecoverConnection(Configuration conf,
    boolean managed, ExecutorService pool) throws IOException {
  super(conf, managed);
  // Mock up my stub so open scanner returns a scanner id and then on next, we throw
  // exceptions for three times and then after that, we return no more to scan.
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  long sid = 12345L;
  try {
    Mockito.when(stub.scan((RpcController)Mockito.any(),
        (ClientProtos.ScanRequest)Mockito.any())).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).build()).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito"))).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).
          setMoreResults(false).build());
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:HIndex    文件:TestClientNoCluster.java   
RegionServerStoppedOnScannerOpenConnection(Configuration conf, boolean managed,
    ExecutorService pool, User user) throws IOException {
  super(conf, managed);
  // Mock up my stub so open scanner returns a scanner id and then on next, we throw
  // exceptions for three times and then after that, we return no more to scan.
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  long sid = 12345L;
  try {
    Mockito.when(stub.scan((RpcController)Mockito.any(),
        (ClientProtos.ScanRequest)Mockito.any())).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).build()).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito"))).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).
          setMoreResults(false).build());
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:PyroDB    文件:TestClientNoCluster.java   
ScanOpenNextThenExceptionThenRecoverConnection(Configuration conf,
    boolean managed, ExecutorService pool) throws IOException {
  super(conf, managed);
  // Mock up my stub so open scanner returns a scanner id and then on next, we throw
  // exceptions for three times and then after that, we return no more to scan.
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  long sid = 12345L;
  try {
    Mockito.when(stub.scan((RpcController)Mockito.any(),
        (ClientProtos.ScanRequest)Mockito.any())).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).build()).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito"))).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).
          setMoreResults(false).build());
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:PyroDB    文件:TestClientNoCluster.java   
RegionServerStoppedOnScannerOpenConnection(Configuration conf, boolean managed,
    ExecutorService pool, User user) throws IOException {
  super(conf, managed);
  // Mock up my stub so open scanner returns a scanner id and then on next, we throw
  // exceptions for three times and then after that, we return no more to scan.
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  long sid = 12345L;
  try {
    Mockito.when(stub.scan((RpcController)Mockito.any(),
        (ClientProtos.ScanRequest)Mockito.any())).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).build()).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito"))).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).
          setMoreResults(false).build());
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:c5    文件:TestClientNoCluster.java   
ScanOpenNextThenExceptionThenRecoverConnection(Configuration conf,
    boolean managed, ExecutorService pool) throws IOException {
  super(conf, managed);
  // Mock up my stub so open scanner returns a scanner id and then on next, we throw
  // exceptions for three times and then after that, we return no more to scan.
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  long sid = 12345L;
  try {
    Mockito.when(stub.scan((RpcController)Mockito.any(),
        (ClientProtos.ScanRequest)Mockito.any())).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).build()).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito"))).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).
          setMoreResults(false).build());
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:c5    文件:TestClientNoCluster.java   
RegionServerStoppedOnScannerOpenConnection(Configuration conf, boolean managed,
    ExecutorService pool, User user) throws IOException {
  super(conf, managed);
  // Mock up my stub so open scanner returns a scanner id and then on next, we throw
  // exceptions for three times and then after that, we return no more to scan.
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  long sid = 12345L;
  try {
    Mockito.when(stub.scan((RpcController)Mockito.any(),
        (ClientProtos.ScanRequest)Mockito.any())).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).build()).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito"))).
      thenReturn(ClientProtos.ScanResponse.newBuilder().setScannerId(sid).
          setMoreResults(false).build());
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:ditb    文件:TestClientNoCluster.java   
RpcTimeoutConnection(Configuration conf, boolean managed, ExecutorService pool, User user)
throws IOException {
  super(conf, managed);
  // Mock up my stub so an exists call -- which turns into a get -- throws an exception
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  try {
    Mockito.when(stub.get((RpcController)Mockito.any(),
        (ClientProtos.GetRequest)Mockito.any())).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito")));
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:ditb    文件:TestClientNoCluster.java   
ManyServersManyRegionsConnection(Configuration conf, boolean managed,
    ExecutorService pool, User user)
throws IOException {
  super(conf, managed, pool, user);
  int serverCount = conf.getInt("hbase.test.servers", 10);
  this.serversByClient =
    new HashMap<ServerName, ClientService.BlockingInterface>(serverCount);
  this.meta = makeMeta(Bytes.toBytes(
    conf.get("hbase.test.tablename", Bytes.toString(BIG_USER_TABLE))),
    conf.getInt("hbase.test.regions", 100),
    conf.getLong("hbase.test.namespace.span", 1000),
    serverCount);
  this.conf = conf;
}
项目:ditb    文件:TestClientNoCluster.java   
@Override
public ClientService.BlockingInterface getClient(ServerName sn) throws IOException {
  // if (!sn.toString().startsWith("meta")) LOG.info(sn);
  ClientService.BlockingInterface stub = null;
  synchronized (this.serversByClient) {
    stub = this.serversByClient.get(sn);
    if (stub == null) {
      stub = new FakeServer(this.conf, meta, sequenceids);
      this.serversByClient.put(sn, stub);
    }
  }
  return stub;
}
项目:pbase    文件:TestClientNoCluster.java   
RpcTimeoutConnection(Configuration conf, boolean managed, ExecutorService pool, User user)
throws IOException {
  super(conf, managed);
  // Mock up my stub so an exists call -- which turns into a get -- throws an exception
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  try {
    Mockito.when(stub.get((RpcController)Mockito.any(),
        (ClientProtos.GetRequest)Mockito.any())).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito")));
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:pbase    文件:TestClientNoCluster.java   
ManyServersManyRegionsConnection(Configuration conf, boolean managed,
    ExecutorService pool, User user)
throws IOException {
  super(conf, managed, pool, user);
  int serverCount = conf.getInt("hbase.test.servers", 10);
  this.serversByClient =
    new HashMap<ServerName, ClientService.BlockingInterface>(serverCount);
  this.meta = makeMeta(Bytes.toBytes(
    conf.get("hbase.test.tablename", Bytes.toString(BIG_USER_TABLE))),
    conf.getInt("hbase.test.regions", 100),
    conf.getLong("hbase.test.namespace.span", 1000),
    serverCount);
  this.conf = conf;
}
项目:pbase    文件:TestClientNoCluster.java   
@Override
public ClientService.BlockingInterface getClient(ServerName sn) throws IOException {
  // if (!sn.toString().startsWith("meta")) LOG.info(sn);
  ClientService.BlockingInterface stub = null;
  synchronized (this.serversByClient) {
    stub = this.serversByClient.get(sn);
    if (stub == null) {
      stub = new FakeServer(this.conf, meta, sequenceids);
      this.serversByClient.put(sn, stub);
    }
  }
  return stub;
}
项目:HIndex    文件:TestClientNoCluster.java   
RpcTimeoutConnection(Configuration conf, boolean managed, ExecutorService pool, User user)
throws IOException {
  super(conf, managed);
  // Mock up my stub so an exists call -- which turns into a get -- throws an exception
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  try {
    Mockito.when(stub.get((RpcController)Mockito.any(),
        (ClientProtos.GetRequest)Mockito.any())).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito")));
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:HIndex    文件:TestClientNoCluster.java   
ManyServersManyRegionsConnection(Configuration conf, boolean managed,
    ExecutorService pool, User user)
throws IOException {
  super(conf, managed, pool, user);
  int serverCount = conf.getInt("hbase.test.servers", 10);
  this.serversByClient =
    new HashMap<ServerName, ClientService.BlockingInterface>(serverCount);
  this.meta = makeMeta(Bytes.toBytes(
    conf.get("hbase.test.tablename", Bytes.toString(BIG_USER_TABLE))),
    conf.getInt("hbase.test.regions", 100),
    conf.getLong("hbase.test.namespace.span", 1000),
    serverCount);
  this.conf = conf;
}
项目:HIndex    文件:TestClientNoCluster.java   
@Override
public ClientService.BlockingInterface getClient(ServerName sn) throws IOException {
  // if (!sn.toString().startsWith("meta")) LOG.info(sn);
  ClientService.BlockingInterface stub = null;
  synchronized (this.serversByClient) {
    stub = this.serversByClient.get(sn);
    if (stub == null) {
      stub = new FakeServer(this.conf, meta, sequenceids);
      this.serversByClient.put(sn, stub);
    }
  }
  return stub;
}
项目:PyroDB    文件:TestClientNoCluster.java   
RpcTimeoutConnection(Configuration conf, boolean managed, ExecutorService pool, User user)
throws IOException {
  super(conf, managed);
  // Mock up my stub so an exists call -- which turns into a get -- throws an exception
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  try {
    Mockito.when(stub.get((RpcController)Mockito.any(),
        (ClientProtos.GetRequest)Mockito.any())).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito")));
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:PyroDB    文件:TestClientNoCluster.java   
ManyServersManyRegionsConnection(Configuration conf, boolean managed,
    ExecutorService pool, User user)
throws IOException {
  super(conf, managed, pool, user);
  int serverCount = conf.getInt("hbase.test.servers", 10);
  this.serversByClient =
    new HashMap<ServerName, ClientService.BlockingInterface>(serverCount);
  this.meta = makeMeta(Bytes.toBytes(
    conf.get("hbase.test.tablename", Bytes.toString(BIG_USER_TABLE))),
    conf.getInt("hbase.test.regions", 100),
    conf.getLong("hbase.test.namespace.span", 1000),
    serverCount);
  this.conf = conf;
}
项目:PyroDB    文件:TestClientNoCluster.java   
@Override
public ClientService.BlockingInterface getClient(ServerName sn) throws IOException {
  // if (!sn.toString().startsWith("meta")) LOG.info(sn);
  ClientService.BlockingInterface stub = null;
  synchronized (this.serversByClient) {
    stub = this.serversByClient.get(sn);
    if (stub == null) {
      stub = new FakeServer(this.conf, meta, sequenceids);
      this.serversByClient.put(sn, stub);
    }
  }
  return stub;
}
项目:c5    文件:TestClientNoCluster.java   
RpcTimeoutConnection(Configuration conf, boolean managed, ExecutorService pool, User user)
throws IOException {
  super(conf, managed);
  // Mock up my stub so an exists call -- which turns into a get -- throws an exception
  this.stub = Mockito.mock(ClientService.BlockingInterface.class);
  try {
    Mockito.when(stub.get((RpcController)Mockito.any(),
        (ClientProtos.GetRequest)Mockito.any())).
      thenThrow(new ServiceException(new RegionServerStoppedException("From Mockito")));
  } catch (ServiceException e) {
    throw new IOException(e);
  }
}
项目:c5    文件:TestClientNoCluster.java   
ManyServersManyRegionsConnection(Configuration conf, boolean managed,
    ExecutorService pool, User user)
throws IOException {
  super(conf, managed, pool, user);
  int serverCount = conf.getInt("hbase.test.servers", 10);
  this.serversByClient =
    new HashMap<ServerName, ClientService.BlockingInterface>(serverCount);
  this.meta = makeMeta(Bytes.toBytes(
    conf.get("hbase.test.tablename", Bytes.toString(BIG_USER_TABLE))),
    conf.getInt("hbase.test.regions", 100),
    conf.getLong("hbase.test.namespace.span", 1000),
    serverCount);
  this.conf = conf;
}
项目:c5    文件:TestClientNoCluster.java   
@Override
public ClientService.BlockingInterface getClient(ServerName sn) throws IOException {
  // if (!sn.toString().startsWith("meta")) LOG.info(sn);
  ClientService.BlockingInterface stub = null;
  synchronized (this.serversByClient) {
    stub = this.serversByClient.get(sn);
    if (stub == null) {
      stub = new FakeServer(this.conf, meta, sequenceids);
      this.serversByClient.put(sn, stub);
    }
  }
  return stub;
}
项目:ditb    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}
项目:ditb    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}
项目:ditb    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}
项目:pbase    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}
项目:pbase    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}
项目:pbase    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}
项目:HIndex    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}
项目:HIndex    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}
项目:HIndex    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}
项目:PyroDB    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}
项目:PyroDB    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}
项目:PyroDB    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}
项目:c5    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}
项目:c5    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}
项目:c5    文件:TestClientNoCluster.java   
@Override
public BlockingInterface getClient(ServerName sn) throws IOException {
  return this.stub;
}