File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
sql/hive-thriftserver/src/main/java/org/apache/hive/service/server Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -203,9 +203,13 @@ private void addServerInstanceToZooKeeper(HiveConf hiveConf) throws Exception {
203203 ZOOKEEPER_PATH_SEPARATOR + queue + ZOOKEEPER_PATH_SEPARATOR + ephemeralPath ;
204204 LOG .info ("Add server instance to zookeeper on {}" , zkPath );
205205 try {
206+ String data = "{\" tag\" :[]}" ;
207+ String queueTag = hiveConf .get ("spark.yarn.queue.tag" , "" );
208+ if (StringUtils .isNotBlank (queueTag )) {
209+ data = "{\" tag\" :[\" " + queueTag + "\" ]}" ; // schedule
210+ }
206211 znode = new PersistentEphemeralNode (zooKeeperClient ,
207- PersistentEphemeralNode .Mode .EPHEMERAL , zkPath ,
208- ephemeralPath .getBytes (StandardCharsets .UTF_8 ));
212+ PersistentEphemeralNode .Mode .EPHEMERAL , zkPath , data .getBytes (StandardCharsets .UTF_8 ));
209213 znode .start ();
210214 // We'll wait for 120s for node creation
211215 long znodeCreationTimeout = 120 ;
You can’t perform that action at this time.
0 commit comments