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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2edc075930e HIVE-28844: Drop the property 
hive.metastore.server.tcp.keepalive and hive.server.tcp.keepalive (#5988)
2edc075930e is described below

commit 2edc075930e20c0f08e1e74f09748c4d335793c5
Author: ramitg254 <97451167+ramitg...@users.noreply.github.com>
AuthorDate: Fri Jul 25 05:10:18 2025 +0530

    HIVE-28844: Drop the property hive.metastore.server.tcp.keepalive and 
hive.server.tcp.keepalive (#5988)
---
 common/src/java/org/apache/hadoop/hive/conf/HiveConf.java      | 10 ----------
 .../service/cli/thrift/RetryingThriftCLIServiceClient.java     |  5 -----
 .../org/apache/hadoop/hive/metastore/conf/MetastoreConf.java   |  4 ----
 .../java/org/apache/hadoop/hive/metastore/HiveMetaStore.java   |  2 --
 4 files changed, 21 deletions(-)

diff --git a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 
b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
index aad949d3688..a9330289977 100644
--- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
+++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
@@ -283,7 +283,6 @@ private static URL checkConfigFile(File f) {
       HiveConf.ConfVars.METASTORE_CONNECT_URL_KEY,
       HiveConf.ConfVars.METASTORE_SERVER_MIN_THREADS,
       HiveConf.ConfVars.METASTORE_SERVER_MAX_THREADS,
-      HiveConf.ConfVars.METASTORE_TCP_KEEP_ALIVE,
       HiveConf.ConfVars.METASTORE_INT_ORIGINAL,
       HiveConf.ConfVars.METASTORE_INT_ARCHIVED,
       HiveConf.ConfVars.METASTORE_INT_EXTRACTED,
@@ -1096,13 +1095,6 @@ public static enum ConfVars {
     @Deprecated
     METASTORE_SERVER_MAX_THREADS("hive.metastore.server.max.threads", 1000,
         "Maximum number of worker threads in the Thrift server's pool."),
-    /**
-     * @deprecated Use MetastoreConf.TCP_KEEP_ALIVE
-     */
-    @Deprecated
-    METASTORE_TCP_KEEP_ALIVE("hive.metastore.server.tcp.keepalive", true,
-        "Whether to enable TCP keepalive for the metastore server. Keepalive 
will prevent accumulation of half-open connections."),
-
     /**
      * @deprecated Use MetastoreConf.WM_DEFAULT_POOL_SIZE
      */
@@ -4605,8 +4597,6 @@ public static enum ConfVars {
     SERVER_READ_SOCKET_TIMEOUT("hive.server.read.socket.timeout", "10s",
         new TimeValidator(TimeUnit.SECONDS),
         "Timeout for the HiveServer to close the connection if no response 
from the client. By default, 10 seconds."),
-    SERVER_TCP_KEEP_ALIVE("hive.server.tcp.keepalive", true,
-        "Whether to enable TCP keepalive for the Hive Server. Keepalive will 
prevent accumulation of half-open connections."),
 
     HIVE_DECODE_PARTITION_NAME("hive.decode.partition.name", false,
         "Whether to show the unquoted partition names in query results."),
diff --git 
a/service/src/java/org/apache/hive/service/cli/thrift/RetryingThriftCLIServiceClient.java
 
b/service/src/java/org/apache/hive/service/cli/thrift/RetryingThriftCLIServiceClient.java
index e75922287ec..64861afaae5 100644
--- 
a/service/src/java/org/apache/hive/service/cli/thrift/RetryingThriftCLIServiceClient.java
+++ 
b/service/src/java/org/apache/hive/service/cli/thrift/RetryingThriftCLIServiceClient.java
@@ -317,11 +317,6 @@ protected synchronized TTransport connect(HiveConf conf) 
throws HiveSQLException
     transport = HiveAuthUtils.getSocketTransport(host, port, 0, 
maxThriftMessageSize);
     ((TSocket) transport).setTimeout((int) 
conf.getTimeVar(HiveConf.ConfVars.SERVER_READ_SOCKET_TIMEOUT,
       TimeUnit.SECONDS) * 1000);
-    try {
-      ((TSocket) 
transport).getSocket().setKeepAlive(conf.getBoolVar(HiveConf.ConfVars.SERVER_TCP_KEEP_ALIVE));
-    } catch (SocketException e) {
-      LOG.error("Error setting keep alive to " + 
conf.getBoolVar(HiveConf.ConfVars.SERVER_TCP_KEEP_ALIVE), e);
-    }
 
     String userName = 
conf.getVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_CLIENT_USER);
     String passwd = 
conf.getVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_CLIENT_PASSWORD);
diff --git 
a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
 
b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
index 7911e8ddac2..50992936f98 100644
--- 
a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
+++ 
b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
@@ -190,7 +190,6 @@ public String toString() {
       ConfVars.CONNECT_URL_KEY,
       ConfVars.SERVER_MIN_THREADS,
       ConfVars.SERVER_MAX_THREADS,
-      ConfVars.TCP_KEEP_ALIVE,
       ConfVars.KERBEROS_KEYTAB_FILE,
       ConfVars.KERBEROS_PRINCIPAL,
       ConfVars.USE_THRIFT_SASL,
@@ -1533,9 +1532,6 @@ public enum ConfVars {
         "hive.metastore.server.thrift.http.path",
         "metastore",
         "Path component of URL endpoint when in HTTP mode"),
-    TCP_KEEP_ALIVE("metastore.server.tcp.keepalive",
-        "hive.metastore.server.tcp.keepalive", true,
-        "Whether to enable TCP keepalive for the metastore server. Keepalive 
will prevent accumulation of half-open connections."),
     THREAD_POOL_SIZE("metastore.thread.pool.size", "no.such", 15,
         "Number of threads in the thread pool.  These will be used to execute 
all background " +
             "processes."),
diff --git 
a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
 
b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
index 35b76e1e967..180baef67bf 100644
--- 
a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
+++ 
b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
@@ -498,7 +498,6 @@ private static ThriftServer startBinaryMetastore(int port, 
HadoopThriftAuthBridg
     long maxMessageSize = MetastoreConf.getLongVar(conf, 
ConfVars.SERVER_MAX_MESSAGE_SIZE);
     int minWorkerThreads = MetastoreConf.getIntVar(conf, 
ConfVars.SERVER_MIN_THREADS);
     int maxWorkerThreads = MetastoreConf.getIntVar(conf, 
ConfVars.SERVER_MAX_THREADS);
-    boolean tcpKeepAlive = MetastoreConf.getBoolVar(conf, 
ConfVars.TCP_KEEP_ALIVE);
     boolean useCompactProtocol = MetastoreConf.getBoolVar(conf, 
ConfVars.USE_THRIFT_COMPACT_PROTOCOL);
     boolean useSSL = MetastoreConf.getBoolVar(conf, ConfVars.USE_SSL);
     HMSHandler baseHandler = new HMSHandler("new db based metaserver", conf);
@@ -634,7 +633,6 @@ public void start() throws Throwable {
         HMSHandler.LOG.info("Started the new metaserver on port [{}]...", 
port);
         HMSHandler.LOG.info("Options.minWorkerThreads = {}", minWorkerThreads);
         HMSHandler.LOG.info("Options.maxWorkerThreads = {}", maxWorkerThreads);
-        HMSHandler.LOG.info("TCP keepalive = {}", tcpKeepAlive);
         HMSHandler.LOG.info("Enable SSL = {}", useSSL);
         tServer.serve();
       }

Reply via email to