YARN-2668 yarn-registry JAR won't link against ZK 3.4.5. (stevel)
This commit is contained in:
parent
16710758f1
commit
38dedc2f07
|
@ -589,6 +589,8 @@ Release 2.6.0 - UNRELEASED
|
|||
|
||||
YARN-2652 Add hadoop-yarn-registry package under hadoop-yarn. (stevel)
|
||||
|
||||
YARN-2668 yarn-registry JAR won't link against ZK 3.4.5. (stevel)
|
||||
|
||||
YARN-2598 GHS should show N/A instead of null for the inaccessible information
|
||||
(Zhijie Shen via mayank)
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ import org.apache.hadoop.service.ServiceStateException;
|
|||
import org.apache.hadoop.util.ZKUtil;
|
||||
import org.apache.zookeeper.Environment;
|
||||
import org.apache.zookeeper.ZooDefs;
|
||||
import org.apache.zookeeper.client.ZooKeeperSaslClient;
|
||||
import org.apache.zookeeper.data.ACL;
|
||||
import org.apache.zookeeper.data.Id;
|
||||
import org.apache.zookeeper.server.auth.DigestAuthenticationProvider;
|
||||
|
@ -758,7 +757,7 @@ public class RegistrySecurity extends AbstractService {
|
|||
* <b>Important:</b>This is JVM-wide
|
||||
*/
|
||||
public static void disableZookeeperClientSASL() {
|
||||
System.setProperty(ZooKeeperSaslClient.ENABLE_CLIENT_SASL_KEY, "false");
|
||||
System.setProperty(ZookeeperConfigOptions.PROP_ZK_ENABLE_SASL_CLIENT, "false");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -766,7 +765,8 @@ public class RegistrySecurity extends AbstractService {
|
|||
* @return true if the SASL client system property is set.
|
||||
*/
|
||||
public static boolean isClientSASLEnabled() {
|
||||
return ZooKeeperSaslClient.isEnabled();
|
||||
return Boolean.valueOf(System.getProperty(
|
||||
ZookeeperConfigOptions.PROP_ZK_ENABLE_SASL_CLIENT, "true"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,7 +47,7 @@ public interface ZookeeperConfigOptions {
|
|||
* but revert to classic authentication/anonymous access on failure.
|
||||
*/
|
||||
String PROP_ZK_ENABLE_SASL_CLIENT =
|
||||
ZooKeeperSaslClient.ENABLE_CLIENT_SASL_KEY;
|
||||
"zookeeper.sasl.client";
|
||||
|
||||
/**
|
||||
* Default flag for the ZK client: {@value}.
|
||||
|
|
|
@ -138,8 +138,6 @@ public class TestSecureRMRegistryOperations extends AbstractSecureRegistryTest {
|
|||
|
||||
assertFalse("RegistrySecurity.isClientSASLEnabled()==true",
|
||||
RegistrySecurity.isClientSASLEnabled());
|
||||
assertFalse("ZooKeeperSaslClient.isEnabled()==true",
|
||||
ZooKeeperSaslClient.isEnabled());
|
||||
operations.list(PATH_SYSTEM_SERVICES);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue