Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-22283 Print row and table information when failed to get region location #181

Merged
merged 3 commits into from
Apr 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
package org.apache.hadoop.hbase.client;


import static org.apache.hadoop.hbase.HConstants.PRIORITY_UNSET;

import java.io.IOException;
import java.io.InterruptedIOException;
import java.util.Collections;
Expand All @@ -34,17 +36,17 @@
import org.apache.hadoop.hbase.HRegionLocation;
import org.apache.hadoop.hbase.RegionLocations;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.ipc.HBaseRpcController;
import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
import org.apache.yetus.audience.InterfaceAudience;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.hadoop.hbase.ipc.HBaseRpcController;
import org.apache.hadoop.hbase.ipc.RpcControllerFactory;

import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter;
import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos;
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;

import static org.apache.hadoop.hbase.HConstants.PRIORITY_UNSET;

/**
* Caller that goes to replica if the primary region does no answer within a configurable
Expand Down Expand Up @@ -329,10 +331,12 @@ static RegionLocations getRegionLocations(boolean useCache, int replicaId,
} catch (DoNotRetryIOException | InterruptedIOException | RetriesExhaustedException e) {
throw e;
} catch (IOException e) {
throw new RetriesExhaustedException("Can't get the location for replica " + replicaId, e);
throw new RetriesExhaustedException("Cannot get the location for replica" + replicaId
+ " of region for " + Bytes.toStringBinary(row) + " in " + tableName, e);
}
if (rl == null) {
throw new RetriesExhaustedException("Can't get the location for replica " + replicaId);
throw new RetriesExhaustedException("Cannot get the location for replica" + replicaId
+ " of region for " + Bytes.toStringBinary(row) + " in " + tableName);
}

return rl;
Expand Down