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
|
data to be used
|
||||||
HBASE-1573 Holes in master state change; updated startcode and server
|
HBASE-1573 Holes in master state change; updated startcode and server
|
||||||
go into .META. but catalog scanner just got old values (redux)
|
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
|
IMPROVEMENTS
|
||||||
HBASE-1089 Add count of regions on filesystem to master UI; add percentage
|
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 nRegionsToAssign = regionsToAssign.size();
|
||||||
int nregions = regionsPerServer(nRegionsToAssign, thisServersLoad);
|
int nregions = regionsPerServer(nRegionsToAssign, thisServersLoad);
|
||||||
LOG.debug("multi assing for " + info + ": nregions to assign: "
|
LOG.debug("Assigning for " + info + ": total nregions to assign=" +
|
||||||
+ nRegionsToAssign
|
nRegionsToAssign + ", nregions to reach balance=" + nregions +
|
||||||
+" and nregions: " + nregions
|
", isMetaAssign=" + isMetaAssign);
|
||||||
+ " metaAssign: " + isMetaAssign);
|
|
||||||
nRegionsToAssign -= nregions;
|
nRegionsToAssign -= nregions;
|
||||||
if (nRegionsToAssign > 0 || isMetaAssign) {
|
if (nRegionsToAssign > 0 || isMetaAssign) {
|
||||||
// We still have more regions to assign. See how many we can assign
|
// 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();
|
regionServerThread = Thread.currentThread();
|
||||||
boolean quiesceRequested = false;
|
boolean quiesceRequested = false;
|
||||||
try {
|
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;
|
long lastMsg = 0;
|
||||||
// Now ask master what it wants us to do and tell it what we have done
|
// Now ask master what it wants us to do and tell it what we have done
|
||||||
for (int tries = 0; !stopRequested.get() && isHealthy();) {
|
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
|
// TODO: This could grow large and blow heap out. Need to get it into
|
||||||
// general memory usage accounting.
|
// general memory usage accounting.
|
||||||
long maxSeqIdInLog = -1;
|
long maxSeqIdInLog = -1;
|
||||||
|
long firstSeqIdInLog = -1;
|
||||||
// TODO: Move this memstoring over into MemStore.
|
// TODO: Move this memstoring over into MemStore.
|
||||||
KeyValueSkipListSet reconstructedCache =
|
KeyValueSkipListSet reconstructedCache =
|
||||||
new KeyValueSkipListSet(this.comparator);
|
new KeyValueSkipListSet(this.comparator);
|
||||||
|
@ -309,6 +310,9 @@ public class Store implements HConstants, HeapSize {
|
||||||
int reportInterval =
|
int reportInterval =
|
||||||
this.conf.getInt("hbase.hstore.report.interval.edits", 2000);
|
this.conf.getInt("hbase.hstore.report.interval.edits", 2000);
|
||||||
while (logReader.next(key, val)) {
|
while (logReader.next(key, val)) {
|
||||||
|
if (firstSeqIdInLog == -1) {
|
||||||
|
firstSeqIdInLog = key.getLogSeqNum();
|
||||||
|
}
|
||||||
maxSeqIdInLog = Math.max(maxSeqIdInLog, key.getLogSeqNum());
|
maxSeqIdInLog = Math.max(maxSeqIdInLog, key.getLogSeqNum());
|
||||||
if (key.getLogSeqNum() <= maxSeqID) {
|
if (key.getLogSeqNum() <= maxSeqID) {
|
||||||
skippedEdits++;
|
skippedEdits++;
|
||||||
|
@ -335,7 +339,9 @@ public class Store implements HConstants, HeapSize {
|
||||||
}
|
}
|
||||||
if (LOG.isDebugEnabled()) {
|
if (LOG.isDebugEnabled()) {
|
||||||
LOG.debug("Applied " + editsCount + ", skipped " + skippedEdits +
|
LOG.debug("Applied " + editsCount + ", skipped " + skippedEdits +
|
||||||
" because sequence id <= " + maxSeqID);
|
"; store maxSeqID=" + maxSeqID +
|
||||||
|
", firstSeqIdInLog=" + firstSeqIdInLog +
|
||||||
|
", maxSeqIdInLog=" + maxSeqIdInLog);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
logReader.close();
|
logReader.close();
|
||||||
|
|
Loading…
Reference in New Issue