kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [3/4] kudu git commit: KUDU-2232. java: Remove deprecated call from KuduTable
Date Thu, 05 Apr 2018 05:19:01 GMT
KUDU-2232. java: Remove deprecated call from KuduTable

KuduTable.getFormattedRangePartitions(long deadline) called
KuduTable.getTabletsLocations(long deadline) which is deprecated.

Change-Id: I8c54d0483241166675c65a8002464d4bd9604a4f
Reviewed-on: http://gerrit.cloudera.org:8080/8749
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <todd@apache.org>


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

Branch: refs/heads/master
Commit: b7e2a3601731ad74804c011b6659534911ca6c05
Parents: c127477
Author: Attila Bukor <abukor@cloudera.com>
Authored: Fri Mar 23 14:22:57 2018 +0100
Committer: Todd Lipcon <todd@apache.org>
Committed: Thu Apr 5 05:11:57 2018 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/kudu/client/KuduTable.java        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/b7e2a360/java/kudu-client/src/main/java/org/apache/kudu/client/KuduTable.java
----------------------------------------------------------------------
diff --git a/java/kudu-client/src/main/java/org/apache/kudu/client/KuduTable.java b/java/kudu-client/src/main/java/org/apache/kudu/client/KuduTable.java
index e5a8e3f..028d842 100644
--- a/java/kudu-client/src/main/java/org/apache/kudu/client/KuduTable.java
+++ b/java/kudu-client/src/main/java/org/apache/kudu/client/KuduTable.java
@@ -221,8 +221,10 @@ public class KuduTable {
   @InterfaceStability.Unstable
   public List<String> getFormattedRangePartitions(long deadline) throws Exception {
     List<String> rangePartitions = new ArrayList<>();
-    for (LocatedTablet tablet : getTabletsLocations(deadline)) {
-      Partition partition = tablet.getPartition();
+    List<KuduScanToken> scanTokens = new KuduScanToken.KuduScanTokenBuilder(client,
this)
+        .setTimeout(deadline).build();
+    for (KuduScanToken token : scanTokens) {
+      Partition partition = token.getTablet().getPartition();
       // Filter duplicate range partitions by taking only the tablets whose hash
       // partitions are all 0s.
       if (!Iterators.all(partition.getHashBuckets().iterator(), Predicates.equalTo(0))) {


Mime
View raw message