Skip to content

Commit d8b4399

Browse files
xingchaozhGitHub Enterprise
authored andcommitted
[CARMEL-6525][MINOR] Support tag different drivers in the queue (#1237)
1 parent c493098 commit d8b4399

File tree

1 file changed

+4
-1
lines changed
  • sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/server

1 file changed

+4
-1
lines changed

sql/hive-thriftserver/v2.3/src/main/java/org/apache/hive/service/server/HiveServer2.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,11 @@ private void addServerInstanceToZooKeeper(HiveConf hiveConf) throws Exception {
185185
+ ZOOKEEPER_PATH_SEPARATOR + queue + ZOOKEEPER_PATH_SEPARATOR + ephemeralPath;
186186
LOG.info("Add server instance to zookeeper on {}", zkPath);
187187
try {
188+
String data = "{\"tag\":[]}";
188189
String queueTag = hiveConf.get("spark.yarn.queue.tag", "");
189-
String data = "{\"tag\":[\"" + queueTag + "\"]}"; // schedule
190+
if (StringUtils.isNotBlank(queueTag)) {
191+
data = "{\"tag\":[\"" + queueTag + "\"]}"; // schedule
192+
}
190193
znode = new PersistentEphemeralNode(zooKeeperClient,
191194
Mode.EPHEMERAL, zkPath, data.getBytes(StandardCharsets.UTF_8));
192195
znode.start();

0 commit comments

Comments
 (0)