You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2016/04/08 07:45:16 UTC
[1/3] hbase git commit: HBASE-15366 Add doc, trace-level logging,
and test around hfileblock
Repository: hbase
Updated Branches:
refs/heads/Master [created] 90d3b03b6
HBASE-15366 Add doc, trace-level logging, and test around hfileblock
Signed-off-by: stack <st...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/954ff607
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/954ff607
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/954ff607
Branch: refs/heads/Master
Commit: 954ff6075704716e93d2a951052933daeb1f16f0
Parents: 9cba3ac
Author: stack <st...@apache.org>
Authored: Thu Apr 7 10:32:28 2016 -0700
Committer: stack <st...@apache.org>
Committed: Thu Apr 7 22:34:01 2016 -0700
----------------------------------------------------------------------
.../main/java/org/apache/hadoop/hbase/regionserver/HStore.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/954ff607/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
index 4cb2fb4..f7ad4ae 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
@@ -1808,7 +1808,9 @@ public class HStore implements Store {
// Not split-able if we find a reference store file present in the store.
boolean result = !hasReferences();
if (!result) {
- if (LOG.isTraceEnabled()) LOG.trace("Not splittable; has references: " + this);
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("Not splittable; has references: " + this);
+ }
}
return result;
} finally {
[2/3] hbase git commit: HBASE-15380 Purge rollback support in Store
etc. Purge rollback from MemStore Interface. No longer necessary since
HBASE-15380
Posted by st...@apache.org.
HBASE-15380 Purge rollback support in Store etc. Purge rollback from MemStore Interface. No longer necessary since HBASE-15380
Signed-off-by: stack <st...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9cba3ac6
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9cba3ac6
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9cba3ac6
Branch: refs/heads/Master
Commit: 9cba3ac6abb9aaafa96ab9c9673684a8f0eae739
Parents: 394b89d
Author: stack <st...@apache.org>
Authored: Thu Apr 7 10:32:28 2016 -0700
Committer: stack <st...@apache.org>
Committed: Thu Apr 7 22:34:01 2016 -0700
----------------------------------------------------------------------
.../hbase/regionserver/AbstractMemStore.java | 17 -----------------
.../apache/hadoop/hbase/regionserver/HStore.java | 14 ++------------
.../apache/hadoop/hbase/regionserver/MemStore.java | 7 -------
.../apache/hadoop/hbase/regionserver/Store.java | 8 --------
4 files changed, 2 insertions(+), 44 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/9cba3ac6/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMemStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMemStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMemStore.java
index 08e3f5e..7f1a6bb 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMemStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMemStore.java
@@ -226,23 +226,6 @@ public abstract class AbstractMemStore implements MemStore {
return getSnapshot().getSize();
}
- /**
- * Remove n key from the memstore. Only cells that have the same key and the
- * same memstoreTS are removed. It is ok to not update timeRangeTracker
- * in this call. It is possible that we can optimize this method by using
- * tailMap/iterator, but since this method is called rarely (only for
- * error recovery), we can leave those optimization for the future.
- * @param cell
- */
- @Override
- public void rollback(Cell cell) {
- // If the key is in the active, delete it. Update this.size.
- long sz = active.rollback(cell);
- if (sz != 0) {
- setOldestEditTimeToNow();
- }
- }
-
@Override
public String toString() {
StringBuffer buf = new StringBuffer();
http://git-wip-us.apache.org/repos/asf/hbase/blob/9cba3ac6/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
index 9524c5b..4cb2fb4 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
@@ -646,16 +646,6 @@ public class HStore implements Store {
}
}
- @Override
- public void rollback(final Cell cell) {
- lock.readLock().lock();
- try {
- this.memstore.rollback(cell);
- } finally {
- lock.readLock().unlock();
- }
- }
-
/**
* @return All store files.
*/
@@ -1817,8 +1807,8 @@ public class HStore implements Store {
try {
// Not split-able if we find a reference store file present in the store.
boolean result = !hasReferences();
- if (!result && LOG.isDebugEnabled()) {
- LOG.debug("Cannot split region due to reference files being there");
+ if (!result) {
+ if (LOG.isTraceEnabled()) LOG.trace("Not splittable; has references: " + this);
}
return result;
} finally {
http://git-wip-us.apache.org/repos/asf/hbase/blob/9cba3ac6/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java
index 6bb7081..ea72b7f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java
@@ -87,13 +87,6 @@ public interface MemStore extends HeapSize {
long timeOfOldestEdit();
/**
- * Remove n key from the memstore. Only kvs that have the same key and the same memstoreTS are
- * removed. It is ok to not update timeRangeTracker in this call.
- * @param cell
- */
- void rollback(final Cell cell);
-
- /**
* Write a delete
* @param deleteCell
* @return approximate size of the passed key and value.
http://git-wip-us.apache.org/repos/asf/hbase/blob/9cba3ac6/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
index 1cffaad..4cca4a1 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
@@ -154,14 +154,6 @@ public interface Store extends HeapSize, StoreConfigInformation, PropagatingConf
*/
long timeOfOldestEdit();
- /**
- * Removes a Cell from the memstore. The Cell is removed only if its key
- * & memstoreTS match the key & memstoreTS value of the cell
- * parameter.
- * @param cell
- */
- void rollback(final Cell cell);
-
FileSystem getFileSystem();
[3/3] hbase git commit: HBASE-15612: Minor improvements to
CellCounter and RowCounter documentation
Posted by st...@apache.org.
HBASE-15612: Minor improvements to CellCounter and RowCounter documentation
Signed-off-by: stack <st...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/90d3b03b
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/90d3b03b
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/90d3b03b
Branch: refs/heads/Master
Commit: 90d3b03b674e6718ffcd3eaef00845be5e77656f
Parents: 954ff60
Author: Esteban Gutierrez <es...@apache.org>
Authored: Thu Apr 7 10:04:07 2016 -0700
Committer: stack <st...@apache.org>
Committed: Thu Apr 7 22:45:08 2016 -0700
----------------------------------------------------------------------
.../org/apache/hadoop/hbase/mapreduce/CellCounter.java | 5 +++--
src/main/asciidoc/_chapters/ops_mgt.adoc | 10 ++++++++--
2 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/90d3b03b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/CellCounter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/CellCounter.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/CellCounter.java
index 00f197c..ffc4ded 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/CellCounter.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/CellCounter.java
@@ -64,10 +64,11 @@ import com.google.common.base.Preconditions;
* 6. Total number of versions of each qualifier.
* </pre>
*
- * The cellcounter takes two optional parameters one to use a user
+ * The cellcounter can take optional parameters to use a user
* supplied row/family/qualifier string to use in the report and
* second a regex based or prefix based row filter to restrict the
- * count operation to a limited subset of rows from the table.
+ * count operation to a limited subset of rows from the table or a
+ * start time and/or end time to limit the count to a time range.
*/
@InterfaceAudience.Public
@InterfaceStability.Stable
http://git-wip-us.apache.org/repos/asf/hbase/blob/90d3b03b/src/main/asciidoc/_chapters/ops_mgt.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/_chapters/ops_mgt.adoc b/src/main/asciidoc/_chapters/ops_mgt.adoc
index 53aee33..4cb346c 100644
--- a/src/main/asciidoc/_chapters/ops_mgt.adoc
+++ b/src/main/asciidoc/_chapters/ops_mgt.adoc
@@ -304,12 +304,15 @@ The following utilities are available:
`RowCounter`::
Count rows in an HBase table.
+`CellCounter`::
+ Count cells in an HBase table.
+
`replication.VerifyReplication`::
Compare the data from tables in two different clusters.
WARNING: It doesn't work for incrementColumnValues'd cells since the timestamp is changed.
Note that this command is in a different package than the others.
-Each command except `RowCounter` accepts a single `--help` argument to print usage instructions.
+Each command except `RowCounter` and `CellCounter` accept a single `--help` argument to print usage instructions.
[[hbck]]
=== HBase `hbck`
@@ -619,7 +622,8 @@ To NOT run WALPlayer as a mapreduce job on your cluster, force it to run all in
link:http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/mapreduce/RowCounter.html[RowCounter] is a mapreduce job to count all the rows of a table.
This is a good utility to use as a sanity check to ensure that HBase can read all the blocks of a table if there are any concerns of metadata inconsistency.
-It will run the mapreduce all in a single process but it will run faster if you have a MapReduce cluster in place for it to exploit.
+It will run the mapreduce all in a single process but it will run faster if you have a MapReduce cluster in place for it to exploit. It is also possible to limit
+the time range of data to be scanned by using the `--starttime=[starttime]` and `--endtime=[endtime]` flags.
----
$ bin/hbase org.apache.hadoop.hbase.mapreduce.RowCounter <tablename> [<column1> <column2>...]
@@ -642,6 +646,8 @@ The statistics gathered by RowCounter are more fine-grained and include:
The program allows you to limit the scope of the run.
Provide a row regex or prefix to limit the rows to analyze.
+Specify a time range to scan the table by using the `--starttime=[starttime]` and `--endtime=[endtime]` flags.
+
Use `hbase.mapreduce.scan.column.family` to specify scanning a single column family.
----