Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions llap-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@
<artifactId>hadoop-yarn-registry</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-standalone-metastore-common</artifactId>
<version>${project.version}</version>
</dependency>
<!-- test inter-project -->
<dependency>
<groupId>org.mockito</groupId>
Expand Down

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions standalone-metastore/metastore-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,16 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-yarn-registry</artifactId>
<version>${hadoop.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-yarn-api</artifactId>
<version>${hadoop.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-storage-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,30 @@ public static ZooKeeperHiveHelper.ZooKeeperHiveHelperBuilder builder() {
public ZooKeeperHiveHelper(ZooKeeperHiveHelperBuilder builder) {
// Get the ensemble server addresses in the format host1:port1, host2:port2, ... . Append
// the configured port to hostname if the hostname doesn't contain a port.
String[] hosts = builder.getQuorum().split(",");
String quorumInput = builder.getQuorum();
if (quorumInput == null || quorumInput.trim().isEmpty()) {
throw new IllegalArgumentException("ZooKeeper quorum cannot be null or empty");
}
// Clean up any protocol prefixes (thrift://, //, etc.)
quorumInput = quorumInput.trim();
if (quorumInput.startsWith("//")) {
quorumInput = quorumInput.substring(2);
}
int protocolIndex = quorumInput.indexOf("://");
if (protocolIndex >= 0) {
quorumInput = quorumInput.substring(protocolIndex + 3);
}

String[] hosts = quorumInput.split(",");
StringBuilder quorumServers = new StringBuilder();
for (int i = 0; i < hosts.length; i++) {
quorumServers.append(hosts[i].trim());
if (!hosts[i].contains(":")) {
String host = hosts[i].trim();
// Clean up any remaining protocol artifacts
if (host.startsWith("//")) {
host = host.substring(2);
}
quorumServers.append(host);
if (!host.contains(":")) {
quorumServers.append(":");
quorumServers.append(builder.getClientPort());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1942,6 +1942,23 @@ public enum ConfVars {
"hive.metastore.iceberg.catalog.cache.expiry", -1,
"HMS Iceberg Catalog cache expiry."
),
REST_CATALOG_HA_ENABLED("metastore.rest.catalog.ha.enabled",
"hive.metastore.rest.catalog.ha.enabled", false,
"Whether REST Catalog supports High Availability with ZooKeeper service discovery."
),
REST_CATALOG_HA_REGISTRY_NAMESPACE("metastore.rest.catalog.ha.registry.namespace",
"hive.metastore.rest.catalog.ha.registry.namespace", "restCatalogHA",
"The parent node in ZooKeeper used by REST Catalog when supporting HA."
),
REST_CATALOG_HA_MODE("metastore.rest.catalog.ha.mode",
"hive.metastore.rest.catalog.ha.mode", "active-passive",
new StringSetValidator("active-passive", "active-active"),
"REST Catalog HA mode: 'active-passive' for leader election, 'active-active' for load balancing."
),
REST_CATALOG_INSTANCE_URI("metastore.rest.catalog.instance.uri",
"hive.metastore.rest.catalog.instance.uri", "",
"REST Catalog instance URI (host:port) for service discovery registration."
),
HTTPSERVER_THREADPOOL_MIN("hive.metastore.httpserver.threadpool.min",
"hive.metastore.httpserver.threadpool.min", 8,
"HMS embedded HTTP server minimum number of threads."
Expand Down
Loading