HBASE-3545 Possible liveness issue with MasterServerAddress in HRegionServer getMaster
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1071725 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6e5f3c7024
commit
e9bfa72555
|
@ -101,6 +101,10 @@ Release 0.90.2 - Unreleased
|
||||||
TASK
|
TASK
|
||||||
HBASE-3520 Update our bundled hadoop from branch-0.20-append to latest
|
HBASE-3520 Update our bundled hadoop from branch-0.20-append to latest
|
||||||
(rpc version 43)
|
(rpc version 43)
|
||||||
|
|
||||||
|
BUG FIXES
|
||||||
|
HBASE-3545 Possible liveness issue with MasterServerAddress in
|
||||||
|
HRegionServer getMaster (Greg Bowyer via Stack)
|
||||||
|
|
||||||
Release 0.90.1 - Unreleased
|
Release 0.90.1 - Unreleased
|
||||||
|
|
||||||
|
|
|
@ -1433,15 +1433,12 @@ public class HRegionServer implements HRegionInterface, HBaseRPCErrorHandler,
|
||||||
*/
|
*/
|
||||||
private HServerAddress getMaster() {
|
private HServerAddress getMaster() {
|
||||||
HServerAddress masterAddress = null;
|
HServerAddress masterAddress = null;
|
||||||
while ((masterAddress = masterAddressManager.getMasterAddress()) == null) {
|
|
||||||
if (stopped) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
LOG.debug("No master found, will retry");
|
|
||||||
sleeper.sleep();
|
|
||||||
}
|
|
||||||
HMasterRegionInterface master = null;
|
HMasterRegionInterface master = null;
|
||||||
|
|
||||||
while (!stopped && master == null) {
|
while (!stopped && master == null) {
|
||||||
|
|
||||||
|
masterAddress = getMasterAddress();
|
||||||
|
LOG.info("Attempting connect to Master server at " + masterAddress);
|
||||||
try {
|
try {
|
||||||
// Do initial RPC setup. The final argument indicates that the RPC
|
// Do initial RPC setup. The final argument indicates that the RPC
|
||||||
// should retry indefinitely.
|
// should retry indefinitely.
|
||||||
|
@ -1465,6 +1462,18 @@ public class HRegionServer implements HRegionInterface, HBaseRPCErrorHandler,
|
||||||
return masterAddress;
|
return masterAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private HServerAddress getMasterAddress() {
|
||||||
|
HServerAddress masterAddress = null;
|
||||||
|
while ((masterAddress = masterAddressManager.getMasterAddress()) == null) {
|
||||||
|
if (stopped) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
LOG.debug("No master found, will retry");
|
||||||
|
sleeper.sleep();
|
||||||
|
}
|
||||||
|
return masterAddress;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return True if successfully invoked {@link #reportForDuty()}
|
* @return True if successfully invoked {@link #reportForDuty()}
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
|
|
Loading…
Reference in New Issue