HBASE-670 Historian deadlocks if regionserver is at global memory boundary and is hosting .META.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@664105 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-06-06 19:52:24 +00:00
parent be8ef48869
commit a55aa0c517
2 changed files with 18 additions and 10 deletions

View File

@ -41,6 +41,8 @@ Hbase Change Log
HBASE-654 API HTable.getMetadata().addFamily shouldn't be exposed to user HBASE-654 API HTable.getMetadata().addFamily shouldn't be exposed to user
HBASE-666 UnmodifyableHRegionInfo gives the wrong encoded name HBASE-666 UnmodifyableHRegionInfo gives the wrong encoded name
HBASE-668 HBASE-533 broke build HBASE-668 HBASE-533 broke build
HBASE-670 Historian deadlocks if regionserver is at global memory boundary
and is hosting .META.
IMPROVEMENTS IMPROVEMENTS
HBASE-559 MR example job to count table rows HBASE-559 MR example job to count table rows

View File

@ -180,22 +180,22 @@ public class RegionHistorian implements HConstants {
* Method to add a compaction event to the row in the .META table * Method to add a compaction event to the row in the .META table
* @param info * @param info
*/ */
public void addRegionCompaction(HRegionInfo info, String timeTaken) { public void addRegionCompaction(HRegionInfo info,
if (LOG.isDebugEnabled()) { @SuppressWarnings("unused") String timeTaken) {
add(HistorianColumnKey.REGION_COMPACTION.key, // Disabled. Noop. If this regionserver is hosting the .META. AND is
"Region compaction completed in " + timeTaken, info); // holding the reclaimMemcacheMemory global lock, we deadlock. For now,
} // just disable logging of flushes and compactions.
} }
/** /**
* Method to add a flush event to the row in the .META table * Method to add a flush event to the row in the .META table
* @param info * @param info
*/ */
public void addRegionFlush(HRegionInfo info, String timeTaken) { public void addRegionFlush(HRegionInfo info,
if (LOG.isDebugEnabled()) { @SuppressWarnings("unused") String timeTaken) {
add(HistorianColumnKey.REGION_FLUSH.key, "Region flush completed in " // Disabled. Noop. If this regionserver is hosting the .META. AND is
+ timeTaken, info); // holding the reclaimMemcacheMemory global lock, we deadlock. For now,
} // just disable logging of flushes and compactions.
} }
/** /**
@ -296,6 +296,9 @@ public class RegionHistorian implements HConstants {
public void online(final HBaseConfiguration c) { public void online(final HBaseConfiguration c) {
try { try {
this.metaTable = new HTable(c, META_TABLE_NAME); this.metaTable = new HTable(c, META_TABLE_NAME);
if (LOG.isDebugEnabled()) {
LOG.debug("Onlined");
}
} catch (IOException ioe) { } catch (IOException ioe) {
LOG.error("Unable to create RegionHistorian", ioe); LOG.error("Unable to create RegionHistorian", ioe);
} }
@ -307,5 +310,8 @@ public class RegionHistorian implements HConstants {
*/ */
public void offline() { public void offline() {
this.metaTable = null; this.metaTable = null;
if (LOG.isDebugEnabled()) {
LOG.debug("Offlined");
}
} }
} }