Skip to content

TEZ-4749: Support SSL/TLS connections to ZooKeeper in ZkAMRegistry and ZkAMRegistryClient - #532

Open
g3rg0 wants to merge 8 commits into
apache:masterfrom
g3rg0:TEZ-4749
Open

TEZ-4749: Support SSL/TLS connections to ZooKeeper in ZkAMRegistry and ZkAMRegistryClient#532
g3rg0 wants to merge 8 commits into
apache:masterfrom
g3rg0:TEZ-4749

Conversation

@g3rg0

@g3rg0 g3rg0 commented Aug 10, 2026

Copy link
Copy Markdown

Add explicit per-connection SSL/TLS configuration for Tez's ZooKeeper connections, removing the need to rely on JVM-wide system properties.

  • New configuration properties: tez.am.zookeeper.ssl.enable, keystore/truststore location and password
  • Uses Curator 5.x native zkClientConfig() with Netty-based client connection to configure SSL on the ZooKeeper client
  • When ssl.enable is "true", CuratorFramework is built with a secure ZKClientConfig; when "false", JVM-level secure properties are overridden to force insecure; when unset, existing JVM default behavior is preserved
  • Integration tests for secure/insecure ZK connections

…d ZkAMRegistryClient

Add explicit per-connection SSL/TLS configuration for Tez's ZooKeeper
connections, removing the need to rely on JVM-wide system properties.

- New configuration properties: tez.am.zookeeper.ssl.enable,
  keystore/truststore location and password
- New SSLZookeeperFactory using Netty-based secure ZK client connection
- When ssl.enable is "true", CuratorFramework uses SSLZookeeperFactory;
  when "false", JVM-level secure properties are overridden to force
  insecure; when unset, existing JVM default behavior is preserved
- Integration tests for secure/insecure ZK connections
@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 8m 32s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 2 new or modified test files.
_ master Compile Tests _
+0 🆗 mvndep 0m 32s Maven dependency ordering for branch
+1 💚 mvninstall 4m 49s master passed
+1 💚 compile 4m 1s master passed
+1 💚 checkstyle 0m 59s master passed
+1 💚 javadoc 1m 9s master passed
+0 🆗 spotbugs 1m 23s tez-api in master has 92 extant spotbugs warnings.
+0 🆗 spotbugs 0m 51s tez-tests in master has 6 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 9s Maven dependency ordering for patch
+1 💚 mvninstall 4m 0s the patch passed
+1 💚 codespell 1m 47s No new issues.
+1 💚 compile 3m 59s the patch passed
+1 💚 javac 3m 59s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 28s /results-checkstyle-tez-api.txt tez-api: The patch generated 5 new + 35 unchanged - 0 fixed = 40 total (was 35)
-0 ⚠️ checkstyle 0m 28s /results-checkstyle-tez-tests.txt tez-tests: The patch generated 12 new + 0 unchanged - 0 fixed = 12 total (was 0)
+1 💚 javadoc 1m 7s the patch passed
-1 ❌ spotbugs 1m 35s /new-spotbugs-tez-api.html tez-api generated 1 new + 92 unchanged - 0 fixed = 93 total (was 92)
_ Other Tests _
+1 💚 unit 74m 15s root in the patch passed.
+1 💚 asflicense 0m 58s The patch does not generate ASF License warnings.
114m 9s
Reason Tests
SpotBugs module:tez-api
org.apache.tez.client.registry.zookeeper.ZkConfig.isSslEnabled() has Boolean return type and returns explicit null At ZkConfig.java:and returns explicit null At ZkConfig.java:[line 146]
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-532/1/artifact/out/Dockerfile
Optional Tests dupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets xmllint
uname Linux 0eb3c2206632 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality tez-personality.sh
git revision master / d348bf1
Default Java Eclipse Adoptium-21.0.11+10-LTS
Test Results https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-532/1/testReport/
Max. process+thread count 1350 (vs. ulimit of 5500)
modules C: tez-api tez-tests U: .
Console output https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-532/1/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered by Apache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

Gergely Farkas added 3 commits August 10, 2026 16:37
- Expand single-line getter methods to multi-line (LeftCurly)
- Rename parameter in isValidSslEnabledValue to avoid field shadowing (HiddenField)
- Rename TEST_ROOT_DIR to testRootDir (StaticVariableName)
- Fix indentation of ImmutableMap.of arguments (Indentation)
- Break long AMRecord constructor line (LineLength > 120)
- Add period to Javadoc first sentence (JavadocStyle)
…indbugs check

The method intentionally returns null to indicate "not configured",
distinguishing it from explicit true/false.
@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 32s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 2 new or modified test files.
_ master Compile Tests _
+0 🆗 mvndep 0m 35s Maven dependency ordering for branch
+1 💚 mvninstall 4m 51s master passed
+1 💚 compile 3m 57s master passed
+1 💚 checkstyle 0m 59s master passed
+1 💚 javadoc 1m 8s master passed
+0 🆗 spotbugs 1m 25s tez-api in master has 92 extant spotbugs warnings.
+0 🆗 spotbugs 0m 50s tez-tests in master has 6 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 9s Maven dependency ordering for patch
+1 💚 mvninstall 4m 2s the patch passed
+1 💚 codespell 1m 48s No new issues.
+1 💚 compile 3m 58s the patch passed
+1 💚 javac 3m 58s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 55s the patch passed
+1 💚 javadoc 1m 6s the patch passed
+1 💚 spotbugs 2m 36s the patch passed
_ Other Tests _
+1 💚 unit 72m 50s root in the patch passed.
+1 💚 asflicense 0m 57s The patch does not generate ASF License warnings.
104m 46s
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-532/2/artifact/out/Dockerfile
Optional Tests dupname compile unit asflicense codespell detsecrets xmllint javac javadoc spotbugs checkstyle
uname Linux 2e674b99b72f 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality tez-personality.sh
git revision master / d348bf1
Default Java Eclipse Adoptium-21.0.11+10-LTS
Test Results https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-532/2/testReport/
Max. process+thread count 1341 (vs. ulimit of 5500)
modules C: tez-api tez-tests U: .
Console output https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-532/2/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered by Apache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

);
if (isSslEnabled() == null) {
return CuratorFrameworkFactory.newClient(
getZkQuorum(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use the built-in .zkClientConfig() method provided by Curator 5.x? It provides native support for managing these SSL properties. SSLZookeeperFactory.java can we entirely removed and just configure it inline inside ZkConfig.java like this:

ZKClientConfig zkClientConfig = new ZKClientConfig();
zkClientConfig.setProperty(ZKClientConfig.SECURE_CLIENT, "true");
.....
.....

return CuratorFrameworkFactory.builder()
    .connectString(getZkQuorum())
    // ... other settings ...
    .zkClientConfig(zkClientConfig) // Built-in Curator support
    .build();

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I've added a commit that removed SSLZookeeperFactory.java and uses the build-in curator config.

Comment thread tez-api/findbugs-exclude.xml Outdated
<!-- TEZ-4749 -->
<Match>
<Class name="org.apache.tez.client.registry.zookeeper.ZkConfig" />
<Method name="isSslEnabled" />

@Aggarwal-Raghav Aggarwal-Raghav Aug 11, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For NULL check , updating spotbugs configs seems overkill, can't we use java OPTIONAL ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works with Optional, too. I've added a commit with this change.

Gergely Farkas added 2 commits August 12, 2026 11:24
…f nullable Boolean

Replace nullable Boolean return with Optional<Boolean> to avoid the
NP_BOOLEAN_RETURN_NULL spotbugs warning without needing a findbugs
exclusion. Revert the findbugs-exclude.xml entry added previously.
…ookeeperFactory

Replace SSLZookeeperFactory with Curator's built-in .zkClientConfig()
builder method. The ZKClientConfig with SSL properties is now configured
inline in ZkConfig.createCuratorFramework(), eliminating the need for a
separate factory class.
@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 31s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 2 new or modified test files.
_ master Compile Tests _
+0 🆗 mvndep 0m 34s Maven dependency ordering for branch
+1 💚 mvninstall 4m 48s master passed
+1 💚 compile 3m 59s master passed
+1 💚 checkstyle 0m 59s master passed
+1 💚 javadoc 1m 8s master passed
+0 🆗 spotbugs 1m 24s tez-api in master has 92 extant spotbugs warnings.
+0 🆗 spotbugs 0m 51s tez-tests in master has 6 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 9s Maven dependency ordering for patch
+1 💚 mvninstall 4m 7s the patch passed
+1 💚 codespell 1m 48s No new issues.
+1 💚 compile 3m 57s the patch passed
+1 💚 javac 3m 57s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 55s the patch passed
+1 💚 javadoc 1m 7s the patch passed
+1 💚 spotbugs 2m 36s the patch passed
_ Other Tests _
+1 💚 unit 75m 15s root in the patch passed.
+1 💚 asflicense 0m 56s The patch does not generate ASF License warnings.
107m 7s
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-532/3/artifact/out/Dockerfile
Optional Tests dupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets xmllint
uname Linux 9c592ae21426 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality tez-personality.sh
git revision master / d348bf1
Default Java Eclipse Adoptium-21.0.11+10-LTS
Test Results https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-532/3/testReport/
Max. process+thread count 1457 (vs. ulimit of 5500)
modules C: tez-api tez-tests U: .
Console output https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-532/3/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered by Apache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

Comment thread tez-tests/pom.xml Outdated
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
<version>${curator.version}</version>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: No need for version tag here as dependencyManagement handles that.

if (StringUtils.isEmpty(getZookeeperTrustStoreLocation())) {
LOG.warn("Missing trustStoreLocation parameter");
}
zkClientConfig.setProperty(x509Util.getSslKeystoreLocationProperty(), getZookeeperKeyStoreLocation());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above 2 if statements feel wrong. We are LOGGING the warning that parameters are missing and then continuing the use them in 2nd arg in setProperty. that can lead to excpetions like NPE or IllegalArgs.

Instead of lgging we should throw the exception there itself. Maybe IllegalArgException.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we throw an exception here, these parameters will become mandatory instead of optional.
The keystore is only needed if zookeeper is configured for mTLS authentication, so I think it should remain optional. The truststore, on the other hand, is also optional, because if the system truststore trusts the zookeeper TLS cert, then this configuration would be redundant.

How about something like this?

    if (isSslEnabled().get()) {
      try (ClientX509Util x509Util = new ClientX509Util()) {
        if (StringUtils.isNotEmpty(getZookeeperKeyStoreLocation())) {
          zkClientConfig.setProperty(x509Util.getSslKeystoreLocationProperty(), getZookeeperKeyStoreLocation());
          zkClientConfig.setProperty(x509Util.getSslKeystorePasswdProperty(), getZookeeperKeyStorePassword());
        } else {
          LOG.info("No keystore location configured, using ZooKeeper client defaults");
        }
        if (StringUtils.isNotEmpty(getZookeeperTrustStoreLocation())) {
          zkClientConfig.setProperty(x509Util.getSslTruststoreLocationProperty(), getZookeeperTrustStoreLocation());
          zkClientConfig.setProperty(x509Util.getSslTruststorePasswdProperty(), getZookeeperTrustStorePassword());
        } else {
          LOG.info("No truststore location configured, using ZooKeeper client defaults");
        }
      }
    }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these parameters will become mandatory instead of optional

thats correct, I missed that part. What you are proposing looks good, wondering if we need to put isNotEmpty check on password as well. Making it a too much if nested code :-) . As I'm not a committer to this project, I would request @abstractdog , for suggestions here. Based on that we can push again.

rest all changes are good.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your above solution, just small refactor

From e6ca2489dc5179e0b0cc9e3bc90385e78c31af62 Mon Sep 17 00:00:00 2001
From: Raghav Aggarwal <raghavaggarwal03.ra@gmail.com>
Date: Wed, 12 Aug 2026 23:56:47 +0530
Subject: [PATCH] TEZ-4749: Refactor

---
 .../client/registry/zookeeper/ZkConfig.java   | 31 ++++++++++++-------
 tez-tests/pom.xml                             |  1 -
 2 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/tez-api/src/main/java/org/apache/tez/client/registry/zookeeper/ZkConfig.java b/tez-api/src/main/java/org/apache/tez/client/registry/zookeeper/ZkConfig.java
index 7c3807c7c..cb8380e51 100644
--- a/tez-api/src/main/java/org/apache/tez/client/registry/zookeeper/ZkConfig.java
+++ b/tez-api/src/main/java/org/apache/tez/client/registry/zookeeper/ZkConfig.java
@@ -165,7 +165,7 @@ public class ZkConfig {
   }
 
   public CuratorFramework createCuratorFramework() {
-    if (!isSslEnabled().isPresent()) {
+    if (isSslEnabled().isEmpty()) {
       return CuratorFrameworkFactory.newClient(
               getZkQuorum(),
               getSessionTimeoutMs(),
@@ -179,17 +179,13 @@ public class ZkConfig {
     zkClientConfig.setProperty(ZKClientConfig.ZOOKEEPER_CLIENT_CNXN_SOCKET,
             "org.apache.zookeeper.ClientCnxnSocketNetty");
     if (isSslEnabled().get()) {
-      ClientX509Util x509Util = new ClientX509Util();
-      if (StringUtils.isEmpty(getZookeeperKeyStoreLocation())) {
-        LOG.warn("Missing keystoreLocation parameter");
+      try (ClientX509Util x509Util = new ClientX509Util()) {
+        setStoreConfig(zkClientConfig, x509Util.getSslKeystoreLocationProperty(), getZookeeperKeyStoreLocation(),
+            x509Util.getSslKeystorePasswdProperty(), getZookeeperKeyStorePassword(), "keystore");
+
+        setStoreConfig(zkClientConfig, x509Util.getSslTruststoreLocationProperty(), getZookeeperTrustStoreLocation(),
+            x509Util.getSslTruststorePasswdProperty(), getZookeeperTrustStorePassword(), "truststore");
       }
-      if (StringUtils.isEmpty(getZookeeperTrustStoreLocation())) {
-        LOG.warn("Missing trustStoreLocation parameter");
-      }
-      zkClientConfig.setProperty(x509Util.getSslKeystoreLocationProperty(), getZookeeperKeyStoreLocation());
-      zkClientConfig.setProperty(x509Util.getSslKeystorePasswdProperty(), getZookeeperKeyStorePassword());
-      zkClientConfig.setProperty(x509Util.getSslTruststoreLocationProperty(), getZookeeperTrustStoreLocation());
-      zkClientConfig.setProperty(x509Util.getSslTruststorePasswdProperty(), getZookeeperTrustStorePassword());
     }
 
     return CuratorFrameworkFactory.builder()
@@ -201,6 +197,19 @@ public class ZkConfig {
             .build();
   }
 
+  private void setStoreConfig(ZKClientConfig config, String locationProp, String locationVal, String passwordProp,
+                              String passwordVal, String storeName) {
+    if (StringUtils.isEmpty(locationVal)) {
+      LOG.info("No {} location configured, using ZooKeeper client defaults", storeName);
+      return;
+    }
+
+    config.setProperty(locationProp, locationVal);
+    if (StringUtils.isNotEmpty(passwordVal)) {
+      config.setProperty(passwordProp, passwordVal);
+    }
+  }
+
   private boolean isValidSslEnabledValue(String value) {
     return value == null || value.isEmpty()
         || value.trim().equalsIgnoreCase("true")
diff --git a/tez-tests/pom.xml b/tez-tests/pom.xml
index 3b76ed090..8920c17e6 100644
--- a/tez-tests/pom.xml
+++ b/tez-tests/pom.xml
@@ -136,7 +136,6 @@
     <dependency>
       <groupId>org.apache.curator</groupId>
       <artifactId>curator-test</artifactId>
-      <version>${curator.version}</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
-- 
2.55.0

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added these. Thanks!

Gergely Farkas added 2 commits August 12, 2026 19:42
Version is already managed by dependencyManagement in the parent POM.
Extract setStoreConfig() helper to conditionally set keystore/truststore
properties only when a location is configured. Use try-with-resources
for ClientX509Util and Optional.isEmpty() for readability.
@Aggarwal-Raghav

Copy link
Copy Markdown
Contributor

LGTM +1, pending tests

@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 31s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 2 new or modified test files.
_ master Compile Tests _
+0 🆗 mvndep 0m 35s Maven dependency ordering for branch
+1 💚 mvninstall 4m 51s master passed
+1 💚 compile 4m 0s master passed
+1 💚 checkstyle 1m 0s master passed
+1 💚 javadoc 1m 8s master passed
+0 🆗 spotbugs 1m 24s tez-api in master has 92 extant spotbugs warnings.
+0 🆗 spotbugs 0m 51s tez-tests in master has 6 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 9s Maven dependency ordering for patch
+1 💚 mvninstall 4m 3s the patch passed
+1 💚 codespell 1m 49s No new issues.
+1 💚 compile 3m 59s the patch passed
+1 💚 javac 3m 59s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 54s the patch passed
+1 💚 javadoc 1m 6s the patch passed
+1 💚 spotbugs 2m 36s the patch passed
_ Other Tests _
+1 💚 unit 73m 4s root in the patch passed.
+1 💚 asflicense 0m 56s The patch does not generate ASF License warnings.
105m 3s
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-532/4/artifact/out/Dockerfile
Optional Tests dupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets xmllint
uname Linux 076f5578b3e1 5.15.0-185-generic #195-Ubuntu SMP Fri Jun 19 17:11:50 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality tez-personality.sh
git revision master / d348bf1
Default Java Eclipse Adoptium-21.0.11+10-LTS
Test Results https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-532/4/testReport/
Max. process+thread count 2110 (vs. ulimit of 5500)
modules C: tez-api tez-tests U: .
Console output https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-532/4/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered by Apache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

@abstractdog abstractdog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a few comments, basically nitpicking :)

public void testZkConfigSslDisabled() {
Configuration conf = new Configuration();
conf.set(TezConfiguration.TEZ_AM_ZOOKEEPER_QUORUM, "dummyZkQuorum");
conf.set(TezConfiguration.TEZ_AM_ZOOKEEPER_SSL_ENABLE, "False");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"False" looks strange, even if it's by design, I would keep using "false", and create a separate test case to show valid values

zkServer.stop();
}

public void enableZookeeperSecureClientWithJVMProperties() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be private I think

// information registered in registry eventually reaches the registry client
AMRecord amRecordFetched = registryClient.getRecord(appId);
while (amRecordFetched == null) {
Thread.sleep(1000);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be tightened to 500ms I believe for this scenario to lower the worst-case lost time for each test case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants