HBASE-2873 Minor clean up in basescanner; fix a log and make deletes of region processing run in order

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@967301 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-07-23 23:12:53 +00:00
parent 1415130b41
commit 13cd010140
2 changed files with 7 additions and 3 deletions

View File

@ -796,6 +796,8 @@ Release 0.21.0 - Unreleased
repeats info, too many numbers after the point, etc.
HBASE-2869 Regularize how we log sequenceids -- sometimes its myseqid,
other times its sequence id, etc.
HBASE-2873 Minor clean up in basescanner; fix a log and make deletes of
region processing run in order
NEW FEATURES
HBASE-1961 HBase EC2 scripts

View File

@ -50,6 +50,8 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.NavigableMap;
import java.util.TreeMap;
import java.util.concurrent.atomic.AtomicBoolean;
@ -168,7 +170,8 @@ abstract class BaseScanner extends Chore {
// Array to hold list of split parents found. Scan adds to list. After
// scan we go check if parents can be removed and that their daughters
// are in place.
Map<HRegionInfo, Result> splitParents = new HashMap<HRegionInfo, Result>();
NavigableMap<HRegionInfo, Result> splitParents =
new TreeMap<HRegionInfo, Result>();
List<byte []> emptyRows = new ArrayList<byte []>();
int rows = 0;
try {
@ -307,8 +310,7 @@ abstract class BaseScanner extends Chore {
parent, rowContent, HConstants.SPLITB_QUALIFIER);
if (!hasReferencesA && !hasReferencesB) {
LOG.info("Deleting region " + parent.getRegionNameAsString() +
" (encoded=" + parent.getEncodedName() +
") because daughter splits no longer hold references");
" because daughter splits no longer hold references");
HRegion.deleteRegion(this.master.getFileSystem(),
this.master.getRootDir(), parent);
HRegion.removeRegionFromMETA(srvr, metaRegionName,