You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2017/05/02 18:38:48 UTC
[1/2] hbase git commit: HBASE-12870 "Major compaction triggered" and
"Skipping major compaction" messages lack the region information
Repository: hbase
Updated Branches:
refs/heads/branch-1 3a3cb48e2 -> d2fcfd74d
refs/heads/master c0f265384 -> 30d0c3fdd
HBASE-12870 "Major compaction triggered" and "Skipping major compaction" messages lack the region information
Signed-off-by: Andrew Purtell <ap...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/30d0c3fd
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/30d0c3fd
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/30d0c3fd
Branch: refs/heads/master
Commit: 30d0c3fdde39a351912af8484fe48035f4cd9189
Parents: c0f2653
Author: ckulkarni <ck...@salesforce.com>
Authored: Tue Apr 11 14:32:55 2017 -0700
Committer: Andrew Purtell <ap...@apache.org>
Committed: Tue May 2 10:54:15 2017 -0700
----------------------------------------------------------------------
.../compactions/RatioBasedCompactionPolicy.java | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/30d0c3fd/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java
index a3e10f8..ddc07cd 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java
@@ -28,6 +28,7 @@ import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.classification.InterfaceAudience;
+import org.apache.hadoop.hbase.regionserver.HStore;
import org.apache.hadoop.hbase.regionserver.RSRpcServices;
import org.apache.hadoop.hbase.regionserver.StoreConfigInformation;
import org.apache.hadoop.hbase.regionserver.StoreFile;
@@ -64,6 +65,12 @@ public class RatioBasedCompactionPolicy extends SortedCompactionPolicy {
long lowTimestamp = StoreUtils.getLowestTimestamp(filesToCompact);
long now = EnvironmentEdgeManager.currentTime();
if (lowTimestamp > 0L && lowTimestamp < (now - mcTime)) {
+ String regionInfo;
+ if (this.storeConfigInfo != null && this.storeConfigInfo instanceof HStore) {
+ regionInfo = ((HStore)this.storeConfigInfo).getRegionInfo().getRegionNameAsString();
+ } else {
+ regionInfo = this.toString();
+ }
// Major compaction time has elapsed.
long cfTTL = this.storeConfigInfo.getStoreFileTtl();
if (filesToCompact.size() == 1) {
@@ -76,24 +83,24 @@ public class RatioBasedCompactionPolicy extends SortedCompactionPolicy {
sf.getHDFSBlockDistribution().getBlockLocalityIndex(
RSRpcServices.getHostname(comConf.conf, false));
if (blockLocalityIndex < comConf.getMinLocalityToForceCompact()) {
- LOG.debug("Major compaction triggered on only store " + this
+ LOG.debug("Major compaction triggered on only store " + regionInfo
+ "; to make hdfs blocks local, current blockLocalityIndex is "
+ blockLocalityIndex + " (min " + comConf.getMinLocalityToForceCompact() + ")");
result = true;
} else {
- LOG.debug("Skipping major compaction of " + this
+ LOG.debug("Skipping major compaction of " + regionInfo
+ " because one (major) compacted file only, oldestTime " + oldest
+ "ms is < TTL=" + cfTTL + " and blockLocalityIndex is " + blockLocalityIndex
+ " (min " + comConf.getMinLocalityToForceCompact() + ")");
}
} else if (cfTTL != HConstants.FOREVER && oldest > cfTTL) {
- LOG.debug("Major compaction triggered on store " + this
+ LOG.debug("Major compaction triggered on store " + regionInfo
+ ", because keyvalues outdated; time since last major compaction "
+ (now - lowTimestamp) + "ms");
result = true;
}
} else {
- LOG.debug("Major compaction triggered on store " + this
+ LOG.debug("Major compaction triggered on store " + regionInfo
+ "; time since last major compaction " + (now - lowTimestamp) + "ms");
}
result = true;
[2/2] hbase git commit: HBASE-12870 "Major compaction triggered" and
"Skipping major compaction" messages lack the region information
Posted by ap...@apache.org.
HBASE-12870 "Major compaction triggered" and "Skipping major compaction" messages lack the region information
Signed-off-by: Andrew Purtell <ap...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d2fcfd74
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d2fcfd74
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d2fcfd74
Branch: refs/heads/branch-1
Commit: d2fcfd74d94b5cd478fb79a1b7fb21cd8902feed
Parents: 3a3cb48
Author: ckulkarni <ck...@salesforce.com>
Authored: Tue Apr 11 14:32:55 2017 -0700
Committer: Andrew Purtell <ap...@apache.org>
Committed: Tue May 2 10:54:37 2017 -0700
----------------------------------------------------------------------
.../compactions/RatioBasedCompactionPolicy.java | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/d2fcfd74/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java
index b378be7..9f476d3 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java
@@ -28,6 +28,7 @@ import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.classification.InterfaceAudience;
+import org.apache.hadoop.hbase.regionserver.HStore;
import org.apache.hadoop.hbase.regionserver.RSRpcServices;
import org.apache.hadoop.hbase.regionserver.StoreConfigInformation;
import org.apache.hadoop.hbase.regionserver.StoreFile;
@@ -64,6 +65,12 @@ public class RatioBasedCompactionPolicy extends SortedCompactionPolicy {
long lowTimestamp = StoreUtils.getLowestTimestamp(filesToCompact);
long now = EnvironmentEdgeManager.currentTime();
if (lowTimestamp > 0L && lowTimestamp < (now - mcTime)) {
+ String regionInfo;
+ if (this.storeConfigInfo != null && this.storeConfigInfo instanceof HStore) {
+ regionInfo = ((HStore)this.storeConfigInfo).getRegionInfo().getRegionNameAsString();
+ } else {
+ regionInfo = this.toString();
+ }
// Major compaction time has elapsed.
long cfTTL = this.storeConfigInfo.getStoreFileTtl();
if (filesToCompact.size() == 1) {
@@ -76,24 +83,24 @@ public class RatioBasedCompactionPolicy extends SortedCompactionPolicy {
sf.getHDFSBlockDistribution().getBlockLocalityIndex(
RSRpcServices.getHostname(comConf.conf, false));
if (blockLocalityIndex < comConf.getMinLocalityToForceCompact()) {
- LOG.debug("Major compaction triggered on only store " + this
+ LOG.debug("Major compaction triggered on only store " + regionInfo
+ "; to make hdfs blocks local, current blockLocalityIndex is "
+ blockLocalityIndex + " (min " + comConf.getMinLocalityToForceCompact() + ")");
result = true;
} else {
- LOG.debug("Skipping major compaction of " + this
+ LOG.debug("Skipping major compaction of " + regionInfo
+ " because one (major) compacted file only, oldestTime " + oldest
+ "ms is < TTL=" + cfTTL + " and blockLocalityIndex is " + blockLocalityIndex
+ " (min " + comConf.getMinLocalityToForceCompact() + ")");
}
} else if (cfTTL != HConstants.FOREVER && oldest > cfTTL) {
- LOG.debug("Major compaction triggered on store " + this
+ LOG.debug("Major compaction triggered on store " + regionInfo
+ ", because keyvalues outdated; time since last major compaction "
+ (now - lowTimestamp) + "ms");
result = true;
}
} else {
- LOG.debug("Major compaction triggered on store " + this
+ LOG.debug("Major compaction triggered on store " + regionInfo
+ "; time since last major compaction " + (now - lowTimestamp) + "ms");
}
result = true;