HBASE-1534 Got ZooKeeper event, state: Disconnected on HRS and then NPE on reinit
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@799117 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
21d54c0c8c
commit
4267838a0c
|
@ -304,6 +304,8 @@ Release 0.20.0 - Unreleased
|
|||
data to be used
|
||||
HBASE-1573 Holes in master state change; updated startcode and server
|
||||
go into .META. but catalog scanner just got old values (redux)
|
||||
HBASE-1534 Got ZooKeeper event, state: Disconnected on HRS and then NPE
|
||||
on reinit
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-1089 Add count of regions on filesystem to master UI; add percentage
|
||||
|
|
|
@ -240,10 +240,9 @@ class RegionManager implements HConstants {
|
|||
|
||||
int nRegionsToAssign = regionsToAssign.size();
|
||||
int nregions = regionsPerServer(nRegionsToAssign, thisServersLoad);
|
||||
LOG.debug("multi assing for " + info + ": nregions to assign: "
|
||||
+ nRegionsToAssign
|
||||
+" and nregions: " + nregions
|
||||
+ " metaAssign: " + isMetaAssign);
|
||||
LOG.debug("Assigning for " + info + ": total nregions to assign=" +
|
||||
nRegionsToAssign + ", nregions to reach balance=" + nregions +
|
||||
", isMetaAssign=" + isMetaAssign);
|
||||
nRegionsToAssign -= nregions;
|
||||
if (nRegionsToAssign > 0 || isMetaAssign) {
|
||||
// We still have more regions to assign. See how many we can assign
|
||||
|
|
|
@ -417,7 +417,17 @@ public class HRegionServer implements HConstants, HRegionInterface,
|
|||
regionServerThread = Thread.currentThread();
|
||||
boolean quiesceRequested = false;
|
||||
try {
|
||||
init(reportForDuty());
|
||||
MapWritable w = null;
|
||||
while (!stopRequested.get()) {
|
||||
w = reportForDuty();
|
||||
if (w != null) {
|
||||
init(w);
|
||||
break;
|
||||
}
|
||||
sleeper.sleep();
|
||||
LOG.warn("No response from master on reportForDuty. Sleeping and " +
|
||||
"then trying again.");
|
||||
}
|
||||
long lastMsg = 0;
|
||||
// Now ask master what it wants us to do and tell it what we have done
|
||||
for (int tries = 0; !stopRequested.get() && isHealthy();) {
|
||||
|
|
|
@ -295,6 +295,7 @@ public class Store implements HConstants, HeapSize {
|
|||
// TODO: This could grow large and blow heap out. Need to get it into
|
||||
// general memory usage accounting.
|
||||
long maxSeqIdInLog = -1;
|
||||
long firstSeqIdInLog = -1;
|
||||
// TODO: Move this memstoring over into MemStore.
|
||||
KeyValueSkipListSet reconstructedCache =
|
||||
new KeyValueSkipListSet(this.comparator);
|
||||
|
@ -309,6 +310,9 @@ public class Store implements HConstants, HeapSize {
|
|||
int reportInterval =
|
||||
this.conf.getInt("hbase.hstore.report.interval.edits", 2000);
|
||||
while (logReader.next(key, val)) {
|
||||
if (firstSeqIdInLog == -1) {
|
||||
firstSeqIdInLog = key.getLogSeqNum();
|
||||
}
|
||||
maxSeqIdInLog = Math.max(maxSeqIdInLog, key.getLogSeqNum());
|
||||
if (key.getLogSeqNum() <= maxSeqID) {
|
||||
skippedEdits++;
|
||||
|
@ -335,7 +339,9 @@ public class Store implements HConstants, HeapSize {
|
|||
}
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Applied " + editsCount + ", skipped " + skippedEdits +
|
||||
" because sequence id <= " + maxSeqID);
|
||||
"; store maxSeqID=" + maxSeqID +
|
||||
", firstSeqIdInLog=" + firstSeqIdInLog +
|
||||
", maxSeqIdInLog=" + maxSeqIdInLog);
|
||||
}
|
||||
} finally {
|
||||
logReader.close();
|
||||
|
|
Loading…
Reference in New Issue