HBASE-3195 Binary row keys in hbck and other miscellaneous binary key display issues
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1126872 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2fcf225f3e
commit
b488975ddd
|
@ -283,6 +283,8 @@ Release 0.90.4 - Unreleased
|
|||
HBASE-3905 HBaseAdmin.createTableAsync() should check for invalid split
|
||||
keys (Ted Yu)
|
||||
HBASE-3908 TableSplit not implementing "hashCode" problem (Daniel Iancu)
|
||||
HBASE-3915 Binary row keys in hbck and other miscellaneous binary key
|
||||
display issues
|
||||
|
||||
IMPROVEMENT
|
||||
HBASE-3882 hbase-config.sh needs to be updated so it can auto-detects the
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
# see http://wiki.apache.org/hadoop/PerformanceTuning
|
||||
export HBASE_OPTS="-ea -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode"
|
||||
|
||||
# Uncomment below to enable java garbage collection logging.
|
||||
# export HBASE_OPTS="$HBASE_OPTS -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$HBASE_HOME/logs/gc-hbase.log"
|
||||
# Uncomment below to enable java garbage collection logging in the .out file.
|
||||
# export HBASE_OPTS="$HBASE_OPTS -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
|
||||
|
||||
# Uncomment and adjust to enable JMX exporting
|
||||
# See jmxremote.password and jmxremote.access in $JRE_HOME/lib/management to configure remote password access.
|
||||
|
|
|
@ -243,7 +243,7 @@ public class RegionTransitionData implements Writable {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "region=" + Bytes.toString(regionName) + ", origin=" + this.origin +
|
||||
return "region=" + Bytes.toStringBinary(regionName) + ", origin=" + this.origin +
|
||||
", state=" + eventType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1943,7 +1943,11 @@ public class AssignmentManager extends ZooKeeperListener {
|
|||
case OPEN:
|
||||
LOG.error("Region has been OPEN for too long, " +
|
||||
"we don't know where region was opened so can't do anything");
|
||||
synchronized(regionState) {
|
||||
regionState.updateTimestampToNow();
|
||||
}
|
||||
break;
|
||||
|
||||
case PENDING_CLOSE:
|
||||
LOG.info("Region has been PENDING_CLOSE for too " +
|
||||
"long, running forced unassign again on region=" +
|
||||
|
|
|
@ -51,7 +51,6 @@ import org.apache.hadoop.hbase.UnknownRegionException;
|
|||
import org.apache.hadoop.hbase.catalog.CatalogTracker;
|
||||
import org.apache.hadoop.hbase.catalog.MetaEditor;
|
||||
import org.apache.hadoop.hbase.catalog.MetaReader;
|
||||
import org.apache.hadoop.hbase.client.HConnectionManager;
|
||||
import org.apache.hadoop.hbase.client.MetaScanner;
|
||||
import org.apache.hadoop.hbase.client.MetaScanner.MetaScannerVisitor;
|
||||
import org.apache.hadoop.hbase.client.Result;
|
||||
|
@ -915,13 +914,17 @@ implements HMasterInterface, HMasterRegionInterface, MasterServices, Server {
|
|||
region.getLog().closeAndDelete();
|
||||
}
|
||||
|
||||
// 5. Trigger immediate assignment of the regions in round-robin fashion
|
||||
List<ServerName> servers = serverManager.getOnlineServersList();
|
||||
try {
|
||||
this.assignmentManager.assignUserRegions(Arrays.asList(newRegions), servers);
|
||||
} catch (InterruptedException ie) {
|
||||
LOG.error("Caught " + ie + " during round-robin assignment");
|
||||
throw new IOException(ie);
|
||||
if (newRegions.length == 1) {
|
||||
this.assignmentManager.assign(newRegions[0], true);
|
||||
} else {
|
||||
// 5. Trigger immediate assignment of the regions in round-robin fashion
|
||||
List<ServerName> servers = serverManager.getOnlineServersList();
|
||||
try {
|
||||
this.assignmentManager.assignUserRegions(Arrays.asList(newRegions), servers);
|
||||
} catch (InterruptedException ie) {
|
||||
LOG.error("Caught " + ie + " during round-robin assignment");
|
||||
throw new IOException(ie);
|
||||
}
|
||||
}
|
||||
|
||||
// 6. If sync, wait for assignment of regions
|
||||
|
|
|
@ -422,12 +422,8 @@ public class HBaseFsck {
|
|||
if (inMeta && inHdfs && isDeployed && deploymentMatchesMeta && shouldBeDeployed) {
|
||||
return;
|
||||
} else if (inMeta && !isDeployed && splitParent) {
|
||||
// Offline regions shouldn't cause complaints
|
||||
LOG.debug("Region " + descriptiveName + " offline, split, parent, ignoring.");
|
||||
return;
|
||||
} else if (inMeta && !shouldBeDeployed && !isDeployed) {
|
||||
// offline regions shouldn't cause complaints
|
||||
LOG.debug("Region " + descriptiveName + " offline, ignoring.");
|
||||
return;
|
||||
} else if (recentlyModified) {
|
||||
LOG.warn("Region " + descriptiveName + " was recently modified -- skipping");
|
||||
|
@ -444,7 +440,7 @@ public class HBaseFsck {
|
|||
} else if (!inMeta && inHdfs && !isDeployed) {
|
||||
errors.reportError(ERROR_CODE.NOT_IN_META_OR_DEPLOYED, "Region "
|
||||
+ descriptiveName + " on HDFS, but not listed in META " +
|
||||
"or deployed on any region server.");
|
||||
"or deployed on any region server");
|
||||
} else if (!inMeta && inHdfs && isDeployed) {
|
||||
errors.reportError(ERROR_CODE.NOT_IN_META, "Region " + descriptiveName
|
||||
+ " not in META, but deployed on " + Joiner.on(", ").join(hbi.deployedOn));
|
||||
|
@ -584,6 +580,7 @@ public class HBaseFsck {
|
|||
public boolean checkRegionChain() {
|
||||
Collections.sort(regions);
|
||||
HbckInfo last = null;
|
||||
int originalErrorsCount = errors.getErrorList().size();
|
||||
|
||||
for (HbckInfo r : regions) {
|
||||
if (last == null) {
|
||||
|
@ -607,8 +604,8 @@ public class HBaseFsck {
|
|||
errors.reportError(ERROR_CODE.REGION_CYCLE,
|
||||
String.format("The endkey for this region comes before the "
|
||||
+ "startkey, startkey=%s, endkey=%s",
|
||||
Bytes.toString(r.metaEntry.getStartKey()),
|
||||
Bytes.toString(r.metaEntry.getEndKey())),
|
||||
Bytes.toStringBinary(r.metaEntry.getStartKey()),
|
||||
Bytes.toStringBinary(r.metaEntry.getEndKey())),
|
||||
this, r, last);
|
||||
}
|
||||
}
|
||||
|
@ -617,7 +614,7 @@ public class HBaseFsck {
|
|||
if (Bytes.equals(r.metaEntry.getStartKey(), last.metaEntry.getStartKey())) {
|
||||
errors.reportError(ERROR_CODE.DUPE_STARTKEYS,
|
||||
"Two regions have the same startkey: "
|
||||
+ Bytes.toString(r.metaEntry.getStartKey()),
|
||||
+ Bytes.toStringBinary(r.metaEntry.getStartKey()),
|
||||
this, r, last);
|
||||
} else {
|
||||
// Check that the startkey is the same as the previous end key
|
||||
|
@ -641,7 +638,7 @@ public class HBaseFsck {
|
|||
last = r;
|
||||
}
|
||||
|
||||
return errors.getErrorList().size() == 0;
|
||||
return errors.getErrorList().size() == originalErrorsCount;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1021,6 +1021,6 @@ public class ZKUtil {
|
|||
(data == null? "null": data.length == 0? "empty": (
|
||||
znode.startsWith(zkw.assignmentZNode) ?
|
||||
RegionTransitionData.fromBytes(data).toString()
|
||||
: StringUtils.abbreviate(Bytes.toString(data), 32)))));
|
||||
: StringUtils.abbreviate(Bytes.toStringBinary(data), 32)))));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue