You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2021/10/12 13:33:30 UTC
[incubator-kyuubi] branch branch-1.3 updated (1a9bf36 -> b31ce17)
This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a change to branch branch-1.3
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git.
from 1a9bf36 [KYUUBI #1190] Enhance error log detection
new f2871e3 Revert "[KYUUBI #1176][FOLLOWUP] change configuration(ha.zookeeper.acl.engine.enabled) version"
new b31ce17 Revert "[KYUUBI #1176] InvalidACL appears in the engine when zookeeper acl is turned on"
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
docs/deployment/settings.md | 1 -
.../apache/kyuubi/ha/HighAvailabilityConf.scala | 7 ----
.../kyuubi/ha/client/ZooKeeperACLProvider.scala | 11 +------
.../kyuubi/ha/client/ServiceDiscoverySuite.scala | 38 +++++++---------------
4 files changed, 12 insertions(+), 45 deletions(-)
[incubator-kyuubi] 02/02: Revert "[KYUUBI #1176] InvalidACL appears
in the engine when zookeeper acl is turned on"
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch branch-1.3
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
commit b31ce17750c1441dc3fcde6e632225d0df320b80
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Tue Oct 12 21:17:50 2021 +0800
Revert "[KYUUBI #1176] InvalidACL appears in the engine when zookeeper acl is turned on"
This reverts commit 9ba2aac9f50fb4d0f85dfcfd45c3c2f39eaa8049.
---
docs/deployment/settings.md | 1 -
.../apache/kyuubi/ha/HighAvailabilityConf.scala | 7 ----
.../kyuubi/ha/client/ZooKeeperACLProvider.scala | 11 +------
.../kyuubi/ha/client/ServiceDiscoverySuite.scala | 38 +++++++---------------
4 files changed, 12 insertions(+), 45 deletions(-)
diff --git a/docs/deployment/settings.md b/docs/deployment/settings.md
index cb1679f..1ce18f6 100644
--- a/docs/deployment/settings.md
+++ b/docs/deployment/settings.md
@@ -192,7 +192,6 @@ kyuubi\.frontend<br>\.worker\.keepalive\.time|<div style='width: 65pt;word-wrap:
Key | Default | Meaning | Type | Since
--- | --- | --- | --- | ---
kyuubi\.ha\.zookeeper<br>\.acl\.enabled|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>false</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>Set to true if the zookeeper ensemble is kerberized</div>|<div style='width: 30pt'>boolean</div>|<div style='width: 20pt'>1.0.0</div>
-kyuubi\.ha\.zookeeper<br>\.acl\.engine\.enabled|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>false</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>Set to true if the zookeeper ensemble is kerberized at engine side.</div>|<div style='width: 30pt'>boolean</div>|<div style='width: 20pt'>1.4.0</div>
kyuubi\.ha\.zookeeper<br>\.connection\.base\.retry<br>\.wait|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>1000</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>Initial amount of time to wait between retries to the zookeeper ensemble</div>|<div style='width: 30pt'>int</div>|<div style='width: 20pt'>1.0.0</div>
kyuubi\.ha\.zookeeper<br>\.connection\.max<br>\.retries|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>3</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>Max retry times for connecting to the zookeeper ensemble</div>|<div style='width: 30pt'>int</div>|<div style='width: 20pt'>1.0.0</div>
kyuubi\.ha\.zookeeper<br>\.connection\.max\.retry<br>\.wait|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>30000</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>Max amount of time to wait between retries for BOUNDED_EXPONENTIAL_BACKOFF policy can reach, or max time until elapsed for UNTIL_ELAPSED policy to connect the zookeeper ensemble</div>|<div style='width: 30pt'>int</div>|<div style='width: 20pt'>1.0.0</div>
diff --git a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala
index 932c255..94fd916 100644
--- a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala
+++ b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala
@@ -48,13 +48,6 @@ object HighAvailabilityConf {
.booleanConf
.createWithDefault(UserGroupInformation.isSecurityEnabled)
- val HA_ZK_ACL_ENGINE_ENABLED: ConfigEntry[Boolean] =
- buildConf("ha.zookeeper.acl.engine.enabled")
- .doc("Set to true if the zookeeper ensemble is kerberized at engine side.")
- .version("1.4.0")
- .booleanConf
- .createWithDefault(false)
-
val HA_ZK_CONN_MAX_RETRIES: ConfigEntry[Int] =
buildConf("ha.zookeeper.connection.max.retries")
.doc("Max retry times for connecting to the zookeeper ensemble")
diff --git a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ZooKeeperACLProvider.scala b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ZooKeeperACLProvider.scala
index 9231690..582f982 100644
--- a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ZooKeeperACLProvider.scala
+++ b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ZooKeeperACLProvider.scala
@@ -33,20 +33,11 @@ class ZooKeeperACLProvider(conf: KyuubiConf) extends ACLProvider {
*/
override lazy val getDefaultAcl: java.util.List[ACL] = {
val nodeAcls = new java.util.ArrayList[ACL]
-
- def addACL(): Unit = {
+ if (conf.get(HighAvailabilityConf.HA_ZK_ACL_ENABLED)) {
// Read all to the world
nodeAcls.addAll(ZooDefs.Ids.READ_ACL_UNSAFE)
// Create/Delete/Write/Admin to the authenticated user
nodeAcls.addAll(ZooDefs.Ids.CREATOR_ALL_ACL)
- }
-
- if (conf.get(HighAvailabilityConf.HA_ZK_ACL_ENABLED) &&
- conf.get(HighAvailabilityConf.HA_ZK_ENGINE_REF_ID).isEmpty) {
- addACL()
- } else if (conf.get(HighAvailabilityConf.HA_ZK_ACL_ENGINE_ENABLED) &&
- conf.get(HighAvailabilityConf.HA_ZK_ENGINE_REF_ID).nonEmpty) {
- addACL()
} else {
// ACLs for znodes on a non-kerberized cluster
// Create/Read/Delete/Write/Admin to the world
diff --git a/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/ServiceDiscoverySuite.scala b/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/ServiceDiscoverySuite.scala
index 468bdb5..2217e80 100644
--- a/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/ServiceDiscoverySuite.scala
+++ b/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/ServiceDiscoverySuite.scala
@@ -19,14 +19,12 @@ package org.apache.kyuubi.ha.client
import java.io.{File, IOException}
import java.net.InetAddress
-import java.util
import javax.security.auth.login.Configuration
import scala.collection.JavaConverters._
import org.apache.hadoop.util.StringUtils
import org.apache.zookeeper.ZooDefs
-import org.apache.zookeeper.data.ACL
import org.scalatest.time.SpanSugar._
import org.apache.kyuubi.{KerberizedTestHelper, KYUUBI_VERSION}
@@ -99,31 +97,17 @@ class ServiceDiscoverySuite extends KerberizedTestHelper {
}
test("acl for zookeeper") {
- val expectedNoACL = new util.ArrayList[ACL](ZooDefs.Ids.OPEN_ACL_UNSAFE)
- val expectedEnableACL = new util.ArrayList[ACL](ZooDefs.Ids.READ_ACL_UNSAFE)
- expectedEnableACL.addAll(ZooDefs.Ids.CREATOR_ALL_ACL)
-
- def assertACL(expected: util.List[ACL], actual: util.List[ACL]): Unit = {
- assert(actual.size() == expected.size())
- assert(actual === expected)
- }
-
- val acl = new ZooKeeperACLProvider(conf).getDefaultAcl
- assertACL(expectedNoACL, acl)
-
- val serverConf = conf.clone.set(HA_ZK_ACL_ENABLED, true)
- val serverACL = new ZooKeeperACLProvider(serverConf).getDefaultAcl
- assertACL(expectedEnableACL, serverACL)
-
- val engineConf = serverConf.clone.set(HA_ZK_ENGINE_REF_ID, "ref")
- engineConf.set(HA_ZK_ACL_ENGINE_ENABLED, false)
- val engineACL = new ZooKeeperACLProvider(engineConf).getDefaultAcl
- assertACL(expectedNoACL, engineACL)
-
- val enableEngineACLConf = serverConf.clone.set(HA_ZK_ENGINE_REF_ID, "ref")
- enableEngineACLConf.set(HA_ZK_ACL_ENGINE_ENABLED, true)
- val enableEngineACL = new ZooKeeperACLProvider(enableEngineACLConf).getDefaultAcl
- assertACL(expectedEnableACL, enableEngineACL)
+ val provider = new ZooKeeperACLProvider(conf)
+ val acl = provider.getDefaultAcl
+ assert(acl.size() === 1)
+ assert(acl === ZooDefs.Ids.OPEN_ACL_UNSAFE)
+
+ val conf1 = conf.clone.set(HA_ZK_ACL_ENABLED, true)
+ val acl1 = new ZooKeeperACLProvider(conf1).getDefaultAcl
+ assert(acl1.size() === 2)
+ val expected = ZooDefs.Ids.READ_ACL_UNSAFE
+ expected.addAll(ZooDefs.Ids.CREATOR_ALL_ACL)
+ assert(acl1 === expected)
}
test("set up zookeeper auth") {
[incubator-kyuubi] 01/02: Revert "[KYUUBI #1176][FOLLOWUP] change
configuration(ha.zookeeper.acl.engine.enabled) version"
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch branch-1.3
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
commit f2871e3143e8146dd1d862cd6f308356f7246a7c
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Tue Oct 12 21:17:29 2021 +0800
Revert "[KYUUBI #1176][FOLLOWUP] change configuration(ha.zookeeper.acl.engine.enabled) version"
This reverts commit 547b270f0e14088c6f6363ef737a5841f052d4fd.
---
docs/deployment/settings.md | 2 +-
.../src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/deployment/settings.md b/docs/deployment/settings.md
index 4779dbd..cb1679f 100644
--- a/docs/deployment/settings.md
+++ b/docs/deployment/settings.md
@@ -192,7 +192,7 @@ kyuubi\.frontend<br>\.worker\.keepalive\.time|<div style='width: 65pt;word-wrap:
Key | Default | Meaning | Type | Since
--- | --- | --- | --- | ---
kyuubi\.ha\.zookeeper<br>\.acl\.enabled|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>false</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>Set to true if the zookeeper ensemble is kerberized</div>|<div style='width: 30pt'>boolean</div>|<div style='width: 20pt'>1.0.0</div>
-kyuubi\.ha\.zookeeper<br>\.acl\.engine\.enabled|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>false</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>Set to true if the zookeeper ensemble is kerberized at engine side.</div>|<div style='width: 30pt'>boolean</div>|<div style='width: 20pt'>1.3.1</div>
+kyuubi\.ha\.zookeeper<br>\.acl\.engine\.enabled|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>false</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>Set to true if the zookeeper ensemble is kerberized at engine side.</div>|<div style='width: 30pt'>boolean</div>|<div style='width: 20pt'>1.4.0</div>
kyuubi\.ha\.zookeeper<br>\.connection\.base\.retry<br>\.wait|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>1000</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>Initial amount of time to wait between retries to the zookeeper ensemble</div>|<div style='width: 30pt'>int</div>|<div style='width: 20pt'>1.0.0</div>
kyuubi\.ha\.zookeeper<br>\.connection\.max<br>\.retries|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>3</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>Max retry times for connecting to the zookeeper ensemble</div>|<div style='width: 30pt'>int</div>|<div style='width: 20pt'>1.0.0</div>
kyuubi\.ha\.zookeeper<br>\.connection\.max\.retry<br>\.wait|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>30000</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>Max amount of time to wait between retries for BOUNDED_EXPONENTIAL_BACKOFF policy can reach, or max time until elapsed for UNTIL_ELAPSED policy to connect the zookeeper ensemble</div>|<div style='width: 30pt'>int</div>|<div style='width: 20pt'>1.0.0</div>
diff --git a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala
index 1a5d2d4..932c255 100644
--- a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala
+++ b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala
@@ -51,7 +51,7 @@ object HighAvailabilityConf {
val HA_ZK_ACL_ENGINE_ENABLED: ConfigEntry[Boolean] =
buildConf("ha.zookeeper.acl.engine.enabled")
.doc("Set to true if the zookeeper ensemble is kerberized at engine side.")
- .version("1.3.1")
+ .version("1.4.0")
.booleanConf
.createWithDefault(false)