abstractdog commented on code in PR #6343:
URL: https://github.com/apache/hive/pull/6343#discussion_r3010721940


##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/ZookeeperExternalSessionsRegistryClient.java:
##########
@@ -0,0 +1,161 @@
+/*
+ * 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.ql.exec.tez;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.framework.imps.CuratorFrameworkState;
+import org.apache.curator.framework.recipes.cache.ChildData;
+import org.apache.curator.framework.recipes.cache.CuratorCache;
+import org.apache.curator.framework.recipes.cache.CuratorCacheListener;
+import org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent;
+import org.apache.curator.framework.recipes.cache.PathChildrenCacheListener;
+import org.apache.curator.retry.ExponentialBackoffRetry;
+import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.base.Preconditions;
+
+// TODO: tez should provide this registry
+public class ZookeeperExternalSessionsRegistryClient implements 
ExternalSessionsRegistry {
+  private static final Logger LOG = 
LoggerFactory.getLogger(ZookeeperExternalSessionsRegistryClient.class);
+
+  // TODO: internal only for now to start and reconnect to external session
+  private static final String ZK_PATH = "/tez_am/server";

Review Comment:
   this is not needed at all
   
   actually, this is the default of `tez.am.registry.namespace`: 
https://github.com/apache/tez/blob/bc265069fe42041aaa8640b65b77c7c51d315ed2/tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java#L2364
   
   but we're doing it wrong to append it to the already configured 
`/tez-external-sessions` string (configured as 
`hive.server2.tez.external.sessions.namespace`), because it leads to paths like:
   ```
   2026-03-07 21:06:46,693 [INFO] [ServiceThread:DAGClientRPCServer] 
|zookeeper.ZkAMRegistry|: Added AMRecord to zkpath 
/tez-external-sessions/tez_am/server/application_1769280834537_0000
   ```
   
   whatever is configured as `hive.server2.tez.external.sessions.namespace`, 
should be used without concatenation



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to