@Override public void prepare(boolean reload) throws IOException { if (isCancelled()) return; if (Thread.interrupted()) { throw new InterruptedIOException(); } super.prepare(reload); }
@Override public T call(int operationTimeout) throws IOException { if (isCancelled()) return null; if (Thread.interrupted()) { throw new InterruptedIOException(); } // It is expected (it seems) that tracker.start can be called multiple times (on each trip // through the call when retrying). Also, we can call start and no need of a stop. this.tracker.start(); int remainingTime = tracker.getRemainingTime(operationTimeout); if (remainingTime <= 1) { // "1" is a special return value in RetryingTimeTracker, see its implementation. throw new DoNotRetryIOException("Operation rpcTimeout"); } return super.call(Math.min(rpcTimeout, remainingTime)); }
@Override protected void setStubByServiceName(ServerName serviceName) throws IOException { setStub(getConnection().getClient(serviceName)); }
protected ClientProtos.MutateResponse doMutate(ClientProtos.MutateRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException { return getStub().mutate(getRpcController(), request); } }
/** * @param reload force reload of server location * @throws IOException */ @Override public void prepare(boolean reload) throws IOException { if (Thread.interrupted()) { throw new InterruptedIOException(); } RegionLocations rl = RpcRetryingCallerWithReadReplicas.getRegionLocations(!reload, id, getConnection(), getTableName(), getRow()); location = id < rl.size() ? rl.getRegionLocation(id) : null; if (location == null || location.getServerName() == null) { // With this exception, there will be a retry. The location can be null for a replica // when the table is created or after a split. throw new HBaseIOException("There is no location for replica id #" + id); } ServerName dest = location.getServerName(); setStub(super.getConnection().getClient(dest)); if (!instantiated || reload) { checkIfRegionServerIsRemote(); instantiated = true; } cursor = null; // check how often we retry. if (reload) { incRPCRetriesMetrics(scanMetrics, isRegionServerRemote); } }
} catch (IOException e) { LOG.error("Encountered unrecoverable error from region server, additional details: " + serviceCallable.getExceptionMessageAdditionalDetail(), e); LOG.warn( "Received a " + e.getClass().getSimpleName() + " from region server: " + serviceCallable.getExceptionMessageAdditionalDetail(), e); if (getConf().getBoolean(RETRY_ON_IO_EXCEPTION, false) && numRetries.get() < getConf().getInt(
protected ClientProtos.GetResponse doGet(ClientProtos.GetRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException { return getStub().get(getRpcController(), request); }
/** * @param reload force reload of server location * @throws IOException */ @Override public void prepare(boolean reload) throws IOException { if (Thread.interrupted()) { throw new InterruptedIOException(); } RegionLocations rl = RpcRetryingCallerWithReadReplicas.getRegionLocations(!reload, id, getConnection(), getTableName(), getRow()); location = id < rl.size() ? rl.getRegionLocation(id) : null; if (location == null || location.getServerName() == null) { // With this exception, there will be a retry. The location can be null for a replica // when the table is created or after a split. throw new HBaseIOException("There is no location for replica id #" + id); } ServerName dest = location.getServerName(); setStub(super.getConnection().getClient(dest)); if (!instantiated || reload) { checkIfRegionServerIsRemote(); instantiated = true; } cursor = null; // check how often we retry. if (reload) { incRPCRetriesMetrics(scanMetrics, isRegionServerRemote); } }
protected ClientProtos.MutateResponse doMutate(ClientProtos.MutateRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException { return getStub().mutate(getRpcController(), request); } }
@Override protected void setStubByServiceName(ServerName serviceName) throws IOException { setStub(getConnection().getClient(serviceName)); }
@Override public void prepare(boolean reload) throws IOException { if (isCancelled()) return; if (Thread.interrupted()) { throw new InterruptedIOException(); } super.prepare(reload); }
@Override public T call(int operationTimeout) throws IOException { if (isCancelled()) return null; if (Thread.interrupted()) { throw new InterruptedIOException(); } // It is expected (it seems) that tracker.start can be called multiple times (on each trip // through the call when retrying). Also, we can call start and no need of a stop. this.tracker.start(); int remainingTime = tracker.getRemainingTime(operationTimeout); if (remainingTime <= 1) { // "1" is a special return value in RetryingTimeTracker, see its implementation. throw new DoNotRetryIOException("Operation rpcTimeout"); } return super.call(Math.min(rpcTimeout, remainingTime)); }
/** * @param reload force reload of server location * @throws IOException */ @Override public void prepare(boolean reload) throws IOException { if (Thread.interrupted()) { throw new InterruptedIOException(); } RegionLocations rl = RpcRetryingCallerWithReadReplicas.getRegionLocations(!reload, id, getConnection(), getTableName(), getRow()); location = id < rl.size() ? rl.getRegionLocation(id) : null; if (location == null || location.getServerName() == null) { // With this exception, there will be a retry. The location can be null for a replica // when the table is created or after a split. throw new HBaseIOException("There is no location for replica id #" + id); } ServerName dest = location.getServerName(); setStub(super.getConnection().getClient(dest)); if (!instantiated || reload) { checkIfRegionServerIsRemote(); instantiated = true; } cursor = null; // check how often we retry. if (reload) { incRPCRetriesMetrics(scanMetrics, isRegionServerRemote); } }
protected ClientProtos.GetResponse doGet(ClientProtos.GetRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException { return getStub().get(getRpcController(), request); }
@Override protected void setStubByServiceName(ServerName serviceName) throws IOException { setStub(getConnection().getClient(serviceName)); }
@Override public void prepare(boolean reload) throws IOException { if (isCancelled()) return; if (Thread.interrupted()) { throw new InterruptedIOException(); } super.prepare(reload); }
@Override public T call(int operationTimeout) throws IOException { if (isCancelled()) return null; if (Thread.interrupted()) { throw new InterruptedIOException(); } // It is expected (it seems) that tracker.start can be called multiple times (on each trip // through the call when retrying). Also, we can call start and no need of a stop. this.tracker.start(); int remainingTime = tracker.getRemainingTime(operationTimeout); if (remainingTime <= 1) { // "1" is a special return value in RetryingTimeTracker, see its implementation. throw new DoNotRetryIOException("Operation rpcTimeout"); } return super.call(Math.min(rpcTimeout, remainingTime)); }
protected ClientProtos.MutateResponse doMutate(ClientProtos.MutateRequest request) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException { return getStub().mutate(getRpcController(), request); } }