diff --git a/CHANGES.txt b/CHANGES.txt index d2ef373b875..d6f403e9599 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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 diff --git a/src/java/org/apache/hadoop/hbase/master/RegionManager.java b/src/java/org/apache/hadoop/hbase/master/RegionManager.java index b9c9b58db6e..a0633a86715 100644 --- a/src/java/org/apache/hadoop/hbase/master/RegionManager.java +++ b/src/java/org/apache/hadoop/hbase/master/RegionManager.java @@ -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 diff --git a/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index a79c2ba0eb8..ff3a5f768a5 100644 --- a/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -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();) { diff --git a/src/java/org/apache/hadoop/hbase/regionserver/Store.java b/src/java/org/apache/hadoop/hbase/regionserver/Store.java index 2641416ff41..b4a2d36c92f 100644 --- a/src/java/org/apache/hadoop/hbase/regionserver/Store.java +++ b/src/java/org/apache/hadoop/hbase/regionserver/Store.java @@ -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();