hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsamj...@apache.org
Subject hbase git commit: HBASE-13347 Deprecate FirstKeyValueMatchingQualifiersFilter. (Abhishek)
Date Tue, 24 Nov 2015 04:23:14 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 2ce27951b -> 81e7eb280


HBASE-13347 Deprecate FirstKeyValueMatchingQualifiersFilter. (Abhishek)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/81e7eb28
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/81e7eb28
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/81e7eb28

Branch: refs/heads/branch-1
Commit: 81e7eb2805656021a016431d3470e6685d863b6b
Parents: 2ce2795
Author: anoopsjohn <anoopsamjohn@gmail.com>
Authored: Tue Nov 24 09:52:37 2015 +0530
Committer: anoopsjohn <anoopsamjohn@gmail.com>
Committed: Tue Nov 24 09:52:37 2015 +0530

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/mapreduce/RowCounter.java  | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/81e7eb28/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java
index 04450f8..3531b16 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/RowCounter.java
@@ -19,8 +19,6 @@
 package org.apache.hadoop.hbase.mapreduce;
 
 import java.io.IOException;
-import java.util.Set;
-import java.util.TreeSet;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.hbase.HConstants;
@@ -31,7 +29,6 @@ import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.client.Result;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.filter.FirstKeyOnlyFilter;
-import org.apache.hadoop.hbase.filter.FirstKeyValueMatchingQualifiersFilter;
 import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.mapreduce.Job;
@@ -134,7 +131,6 @@ public class RowCounter {
     job.setJarByClass(RowCounter.class);
     Scan scan = new Scan();
     scan.setCacheBlocks(false);
-    Set<byte []> qualifiers = new TreeSet<byte[]>(Bytes.BYTES_COMPARATOR);
     if (startKey != null && !startKey.equals("")) {
       scan.setStartRow(Bytes.toBytes(startKey));
     }
@@ -154,14 +150,7 @@ public class RowCounter {
         }
       }
     }
-    // specified column may or may not be part of first key value for the row.
-    // Hence do not use FirstKeyOnlyFilter if scan has columns, instead use
-    // FirstKeyValueMatchingQualifiersFilter.
-    if (qualifiers.size() == 0) {
-      scan.setFilter(new FirstKeyOnlyFilter());
-    } else {
-      scan.setFilter(new FirstKeyValueMatchingQualifiersFilter(qualifiers));
-    }
+    scan.setFilter(new FirstKeyOnlyFilter()); 
     scan.setTimeRange(startTime, endTime == 0 ? HConstants.LATEST_TIMESTAMP : endTime);
     job.setOutputFormatClass(NullOutputFormat.class);
     TableMapReduceUtil.initTableMapperJob(tableName, scan,


Mime
View raw message