hbase git commit: Revert "HBASE-17249 Get/Scan's setTimeRange/setColumnFamilyTimeRange can take the TimeRange reference as the parameter instead of creating a new setColumnFamilyTimeRange instance. (h
Repository: hbase Updated Branches: refs/heads/branch-2 e58670683 -> f74cf679e Revert "HBASE-17249 Get/Scan's setTimeRange/setColumnFamilyTimeRange can take the TimeRange reference as the parameter instead of creating a new setColumnFamilyTimeRange instance. (huaxiang sun)" This reverts commit 61220e4d7c8d7e5fb8ed3bbe2469bc86632c48de. Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f74cf679 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f74cf679 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f74cf679 Branch: refs/heads/branch-2 Commit: f74cf679ecebed2ab5c95ccd678f48482644b829 Parents: e586706 Author: Huaxiang SunAuthored: Thu Aug 24 16:28:16 2017 -0700 Committer: Huaxiang Sun Committed: Fri Aug 25 11:19:46 2017 -0700 -- .../org/apache/hadoop/hbase/client/Get.java | 33 +++-- .../org/apache/hadoop/hbase/client/Query.java | 38 +--- .../org/apache/hadoop/hbase/client/Scan.java| 36 --- .../hadoop/hbase/protobuf/ProtobufUtil.java | 12 --- .../hbase/shaded/protobuf/ProtobufUtil.java | 12 --- 5 files changed, 43 insertions(+), 88 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/f74cf679/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java index 226ca85..d40e0f2 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java @@ -73,6 +73,7 @@ public class Get extends Query private boolean cacheBlocks = true; private int storeLimit = -1; private int storeOffset = 0; + private TimeRange tr = new TimeRange(); private boolean checkExistenceOnly = false; private boolean closestRowBefore = false; private Map> familyMap = new TreeMap<>(Bytes.BYTES_COMPARATOR); @@ -222,19 +223,9 @@ public class Get extends Query * @throws IOException * @return this for invocation chaining */ - @Override public Get setTimeRange(long minStamp, long maxStamp) throws IOException { -return (Get) super.setTimeRange(minStamp, maxStamp); - } - - /** - * Get versions of columns only within the specified timestamp range, - * @param tr Input TimeRange - * @return this for invocation chaining - */ - @Override - public Get setTimeRange(TimeRange tr) { -return (Get) super.setTimeRange(tr); +tr = new TimeRange(minStamp, maxStamp); +return this; } /** @@ -245,7 +236,7 @@ public class Get extends Query public Get setTimeStamp(long timestamp) throws IOException { try { - super.setTimeRange(timestamp, timestamp + 1); + tr = new TimeRange(timestamp, timestamp+1); } catch(Exception e) { // This should never happen, unless integer overflow or something extremely wrong... LOG.error("TimeRange failed, likely caused by integer overflow. ", e); @@ -254,16 +245,10 @@ public class Get extends Query return this; } - @Override - public Get setColumnFamilyTimeRange(byte[] cf, long minStamp, long maxStamp) { + @Override public Get setColumnFamilyTimeRange(byte[] cf, long minStamp, long maxStamp) { return (Get) super.setColumnFamilyTimeRange(cf, minStamp, maxStamp); } - @Override - public Get setColumnFamilyTimeRange(byte[] cf, TimeRange tr) { -return (Get) super.setColumnFamilyTimeRange(cf, tr); - } - /** * Get all available versions. * @return this for invocation chaining @@ -404,6 +389,14 @@ public class Get extends Query } /** + * Method for retrieving the get's TimeRange + * @return timeRange + */ + public TimeRange getTimeRange() { +return this.tr; + } + + /** * Method for retrieving the keys in the familyMap * @return keys in the current familyMap */ http://git-wip-us.apache.org/repos/asf/hbase/blob/f74cf679/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Query.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Query.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Query.java index cc9e9d4..a738c84 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Query.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Query.java @@ -17,7 +17,6 @@ */ package org.apache.hadoop.hbase.client; -import java.io.IOException; import java.util.Map; import org.apache.hadoop.hbase.shaded.com.google.common.collect.Maps; @@ -44,7 +43,6 @@ public
hbase git commit: Revert "HBASE-17249 Get/Scan's setTimeRange/setColumnFamilyTimeRange can take the TimeRange reference as the parameter instead of creating a new setColumnFamilyTimeRange instance. (h
Repository: hbase Updated Branches: refs/heads/master ac1fe07f4 -> 2e8739623 Revert "HBASE-17249 Get/Scan's setTimeRange/setColumnFamilyTimeRange can take the TimeRange reference as the parameter instead of creating a new setColumnFamilyTimeRange instance. (huaxiang sun)" This reverts commit 61220e4d7c8d7e5fb8ed3bbe2469bc86632c48de. Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/2e873962 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/2e873962 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/2e873962 Branch: refs/heads/master Commit: 2e87396236b4d142940b19250bacbef2c15af3d5 Parents: ac1fe07 Author: Huaxiang SunAuthored: Thu Aug 24 16:28:16 2017 -0700 Committer: Huaxiang Sun Committed: Fri Aug 25 10:53:18 2017 -0700 -- .../org/apache/hadoop/hbase/client/Get.java | 33 +++-- .../org/apache/hadoop/hbase/client/Query.java | 38 +--- .../org/apache/hadoop/hbase/client/Scan.java| 36 --- .../hadoop/hbase/protobuf/ProtobufUtil.java | 12 --- .../hbase/shaded/protobuf/ProtobufUtil.java | 12 --- 5 files changed, 43 insertions(+), 88 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/2e873962/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java index 226ca85..d40e0f2 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Get.java @@ -73,6 +73,7 @@ public class Get extends Query private boolean cacheBlocks = true; private int storeLimit = -1; private int storeOffset = 0; + private TimeRange tr = new TimeRange(); private boolean checkExistenceOnly = false; private boolean closestRowBefore = false; private Map> familyMap = new TreeMap<>(Bytes.BYTES_COMPARATOR); @@ -222,19 +223,9 @@ public class Get extends Query * @throws IOException * @return this for invocation chaining */ - @Override public Get setTimeRange(long minStamp, long maxStamp) throws IOException { -return (Get) super.setTimeRange(minStamp, maxStamp); - } - - /** - * Get versions of columns only within the specified timestamp range, - * @param tr Input TimeRange - * @return this for invocation chaining - */ - @Override - public Get setTimeRange(TimeRange tr) { -return (Get) super.setTimeRange(tr); +tr = new TimeRange(minStamp, maxStamp); +return this; } /** @@ -245,7 +236,7 @@ public class Get extends Query public Get setTimeStamp(long timestamp) throws IOException { try { - super.setTimeRange(timestamp, timestamp + 1); + tr = new TimeRange(timestamp, timestamp+1); } catch(Exception e) { // This should never happen, unless integer overflow or something extremely wrong... LOG.error("TimeRange failed, likely caused by integer overflow. ", e); @@ -254,16 +245,10 @@ public class Get extends Query return this; } - @Override - public Get setColumnFamilyTimeRange(byte[] cf, long minStamp, long maxStamp) { + @Override public Get setColumnFamilyTimeRange(byte[] cf, long minStamp, long maxStamp) { return (Get) super.setColumnFamilyTimeRange(cf, minStamp, maxStamp); } - @Override - public Get setColumnFamilyTimeRange(byte[] cf, TimeRange tr) { -return (Get) super.setColumnFamilyTimeRange(cf, tr); - } - /** * Get all available versions. * @return this for invocation chaining @@ -404,6 +389,14 @@ public class Get extends Query } /** + * Method for retrieving the get's TimeRange + * @return timeRange + */ + public TimeRange getTimeRange() { +return this.tr; + } + + /** * Method for retrieving the keys in the familyMap * @return keys in the current familyMap */ http://git-wip-us.apache.org/repos/asf/hbase/blob/2e873962/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Query.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Query.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Query.java index cc9e9d4..a738c84 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Query.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Query.java @@ -17,7 +17,6 @@ */ package org.apache.hadoop.hbase.client; -import java.io.IOException; import java.util.Map; import org.apache.hadoop.hbase.shaded.com.google.common.collect.Maps; @@ -44,7 +43,6 @@ public