You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/12/10 09:35:25 UTC

[GitHub] [hive] kgyrtkirk commented on a change in pull request #2675: HIVE-24289: RetryingMetaStoreClient should not retry connecting to HMS on genuine errors

kgyrtkirk commented on a change in pull request #2675:
URL: https://github.com/apache/hive/pull/2675#discussion_r766511427



##########
File path: standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java
##########
@@ -333,4 +352,9 @@ private boolean hasConnectionLifeTimeReached(Method method) {
     return shouldReconnect;
   }
 
+  @VisibleForTesting
+  public int getRetriesMade(){
+    return this.retriesMade;
+  }
+
 }

Review comment:
       please undo this `retriesMade` to field variable conversion; 
   instead you could probably try to:
   * check the exception being thrown - if that should be different
   * or introduce a specialized `HiveMetaStoreClient` in your test
   
   

##########
File path: standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java
##########
@@ -226,6 +239,11 @@ public Object run() throws MetaException {
         Throwable t = e.getCause();
         if (t instanceof TApplicationException) {
           TApplicationException tae = (TApplicationException)t;
+          if(tae.getMessage().contains("Internal error processing")){

Review comment:
       I think we should not retry any `InvocationTargetException` - or do we have some which should be retried?
   
   or probably you may want to add `TApplicationException.INTERNAL_ERROR` to the `switch` below?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org