[ 
https://issues.apache.org/jira/browse/HIVE-25892?focusedWorklogId=723538&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-723538
 ]

ASF GitHub Bot logged work on HIVE-25892:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Feb/22 09:58
            Start Date: 09/Feb/22 09:58
    Worklog Time Spent: 10m 
      Work Description: dengzhhu653 commented on a change in pull request #2967:
URL: https://github.com/apache/hive/pull/2967#discussion_r802481062



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandlerContext.java
##########
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.metastore;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.txn.TxnStore;
+import org.apache.hadoop.hive.metastore.txn.TxnUtils;
+
+/**
+ * When one hms client connects in, we create a handler context for it.
+ * We store session information here.
+ */
+public final class HMSHandlerContext {
+
+  private static final ThreadLocal<HMSHandlerContext> context = new 
ThreadLocal<>();

Review comment:
       Done




-- 
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-unsubscr...@hive.apache.org

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 723538)
    Time Spent: 4h 20m  (was: 4h 10m)

> Group HMSHandler's thread locals into a single context
> ------------------------------------------------------
>
>                 Key: HIVE-25892
>                 URL: https://issues.apache.org/jira/browse/HIVE-25892
>             Project: Hive
>          Issue Type: Improvement
>          Components: Standalone Metastore
>            Reporter: Zhihua Deng
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 4h 20m
>  Remaining Estimate: 0h
>
> There are more than six ThreadLocal variables in HMSHandler, we can group 
> them together into a single context to improve the management of variables 
> and the code readability.
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to