You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by ad...@apache.org on 2019/05/23 18:16:14 UTC

[kudu] branch master updated (6a8d1d2 -> d29af67)

This is an automated email from the ASF dual-hosted git repository.

adar pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git.


    from 6a8d1d2  hms: Adjust external table handling
     new 2b5b737  [java] Fix handling of SERVICE_UNAVAILABLE errors
     new d29af67  [backup] Publish the backup jars in the next release

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/kudu-backup-tools/build.gradle                        |  5 +----
 java/kudu-backup/build.gradle                              |  5 +----
 .../main/java/org/apache/kudu/client/AsyncKuduClient.java  |  3 ++-
 .../src/main/java/org/apache/kudu/client/RpcProxy.java     | 14 ++++++++++++--
 4 files changed, 16 insertions(+), 11 deletions(-)


[kudu] 02/02: [backup] Publish the backup jars in the next release

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit d29af67ab06204292ab0ea23fe16a79fe46df169
Author: Grant Henke <gr...@apache.org>
AuthorDate: Fri May 17 09:38:28 2019 -0500

    [backup] Publish the backup jars in the next release
    
    Now that the backup and restore jobs have been
    well tested and are ready for long term support, enable
    publishing of the jars.
    
    Change-Id: I58a5e30208cfeb4f6152b6626facf7dceeec0694
    Reviewed-on: http://gerrit.cloudera.org:8080/13359
    Tested-by: Grant Henke <gr...@apache.org>
    Reviewed-by: Mike Percy <mp...@apache.org>
---
 java/kudu-backup-tools/build.gradle | 5 +----
 java/kudu-backup/build.gradle       | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/java/kudu-backup-tools/build.gradle b/java/kudu-backup-tools/build.gradle
index cb2a744..d6ae503 100644
--- a/java/kudu-backup-tools/build.gradle
+++ b/java/kudu-backup-tools/build.gradle
@@ -60,7 +60,4 @@ sourceSets {
 // kudu-backup-tools has no public Javadoc.
 javadoc {
   enabled = false
-}
-
-// Skip publishing kudu-backup-tools until it's ready to be supported long-term.
-uploadArchives.enabled = false
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/java/kudu-backup/build.gradle b/java/kudu-backup/build.gradle
index f303e52..8988aa7 100644
--- a/java/kudu-backup/build.gradle
+++ b/java/kudu-backup/build.gradle
@@ -53,7 +53,4 @@ archivesBaseName = "kudu-backup${versions.sparkBase}_${versions.scalaBase}"
 // kudu-backup has no public Javadoc.
 javadoc {
   enabled = false
-}
-
-// Skip publishing kudu-backup until it's ready to be supported long-term.
-uploadArchives.enabled = false
\ No newline at end of file
+}
\ No newline at end of file


[kudu] 01/02: [java] Fix handling of SERVICE_UNAVAILABLE errors

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 2b5b7372f27a1009209bd30f86b2a725e9ba58eb
Author: Will Berkeley <wd...@gmail.com>
AuthorDate: Fri May 10 10:07:48 2019 -0700

    [java] Fix handling of SERVICE_UNAVAILABLE errors
    
    When the Java client sends a write, and it is rejected due to, e.g., a
    soft memory limit error, it causes the client to invalidate the leader's
    location for the tablet. The client then has to do a GetTableLocations
    lookup on the master to refresh the cache. This is silly because the
    location is valid and the leader is where the write must go. This patch
    corrects the handling of certain RPC-level errors including the handling
    of SERVICE_UNAVAILABLE. It will reduce greatly the number of unnecessary
    calls to the master. These usually aren't a problem because master
    lookups are fast, but it's a waste of time and resources nonetheless.
    
    Change-Id: Id3437c779322e756a6e1fbc19f464f765741d58b
    Reviewed-on: http://gerrit.cloudera.org:8080/13308
    Tested-by: Kudu Jenkins
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
    Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
 .../main/java/org/apache/kudu/client/AsyncKuduClient.java  |  3 ++-
 .../src/main/java/org/apache/kudu/client/RpcProxy.java     | 14 ++++++++++++--
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java b/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
index 6440702..1c909bf 100644
--- a/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
+++ b/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
@@ -2063,7 +2063,8 @@ public class AsyncKuduClient implements AutoCloseable {
    * Remove the tablet server from the RemoteTablet's locations. Right now nothing is removing
    * the tablet itself from the caches.
    */
-  private void invalidateTabletCache(RemoteTablet tablet, ServerInfo info,
+  private void invalidateTabletCache(RemoteTablet tablet,
+                                     ServerInfo info,
                                      String errorMessage) {
     final String uuid = info.getUuid();
     LOG.info("Invalidating location {} for tablet {}: {}",
diff --git a/java/kudu-client/src/main/java/org/apache/kudu/client/RpcProxy.java b/java/kudu-client/src/main/java/org/apache/kudu/client/RpcProxy.java
index 606cfd8..7b2f254 100644
--- a/java/kudu-client/src/main/java/org/apache/kudu/client/RpcProxy.java
+++ b/java/kudu-client/src/main/java/org/apache/kudu/client/RpcProxy.java
@@ -409,11 +409,21 @@ class RpcProxy {
         .build());
 
     RemoteTablet tablet = rpc.getTablet();
-    // Note As of the time of writing (03/11/16), a null tablet doesn't make sense, if we see a null
-    // tablet it's because we didn't set it properly before calling sendRpc().
+    // Note: As of the time of writing (03/11/16), a null tablet doesn't make sense, if we see a
+    // null tablet it's because we didn't set it properly before calling sendRpc().
     if (tablet == null) {  // Can't retry, dunno where this RPC should go.
       rpc.errback(exception);
+      return;
+    }
+    if (exception instanceof InvalidAuthnTokenException) {
+      client.handleInvalidAuthnToken(rpc);
+    } else if (exception instanceof InvalidAuthzTokenException) {
+      client.handleInvalidAuthzToken(rpc, exception);
+    } else if (exception.getStatus().isServiceUnavailable()) {
+      client.handleRetryableError(rpc, exception);
     } else {
+      // If we don't really know anything about the exception, invalidate the location for the
+      // tablet, opening the possibility of retrying on a different server.
       client.handleTabletNotFound(rpc, exception, connection.getServerInfo());
     }
   }