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 2022/02/25 02:24:29 UTC

[GitHub] [hive] dengzhhu653 commented on a change in pull request #3017: HIVE-25896: Remove getThreadId from IHMSHandler

dengzhhu653 commented on a change in pull request #3017:
URL: https://github.com/apache/hive/pull/3017#discussion_r814427240



##########
File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
##########
@@ -287,29 +287,7 @@ PartitionExpressionProxy getExpressionProxy() {
     return expressionProxy;
   }
 
-  /**
-   * Use {@link #getThreadId()} instead.
-   * @return thread id
-   */
-  @Deprecated
-  public static Integer get() {
-    return HMSHandlerContext.getThreadId();
-  }
-
-  @Override
-  public int getThreadId() {
-    return HMSHandlerContext.getThreadId();
-  }
-
-  public HMSHandler(String name) throws MetaException {
-    this(name, MetastoreConf.newMetastoreConf(), true);
-  }
-
-  public HMSHandler(String name, Configuration conf) throws MetaException {
-    this(name, conf, true);
-  }
-
-  public HMSHandler(String name, Configuration conf, boolean init) throws MetaException {

Review comment:
       In our production(standalone or embeded metastore),  the `init` is always set to false:
   standalone: main -> https://github.com/apache/hive/blob/4909ba369cc331a1b490e23b73cbb2cb43f29bd9/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java#L314 -> https://github.com/apache/hive/blob/4909ba369cc331a1b490e23b73cbb2cb43f29bd9/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java#L370
   
   embeded: https://github.com/apache/hive/blob/4909ba369cc331a1b490e23b73cbb2cb43f29bd9/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java#L118-L134
   
   then we init the handler in RetryingHMSHandler,
   https://github.com/apache/hive/blob/4909ba369cc331a1b490e23b73cbb2cb43f29bd9/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java#L80
   




-- 
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