Skip to content

Commit 4acbc42

Browse files
committed
Merge branch 'KYUUBI-5594-approach2' of https://github.com/AngersZhuuuu/incubator-kyuubi into KYUUBI-5594-approach2
2 parents 266f7e8 + d785d5f commit 4acbc42

File tree

33 files changed

+458
-226
lines changed

33 files changed

+458
-226
lines changed

bin/beeline

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
## Kyuubi BeeLine Entrance
2020
CLASS="org.apache.hive.beeline.KyuubiBeeLine"
2121

22-
export KYUUBI_HOME="$(cd "$(dirname "$0")"/..; pwd)"
22+
if [ -z "${KYUUBI_HOME}" ]; then
23+
KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)"
24+
fi
2325

2426
. "${KYUUBI_HOME}/bin/load-kyuubi-env.sh" -s
2527

bin/kyuubi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ function kyuubi_rotate_log() {
6262
fi
6363
}
6464

65-
export KYUUBI_HOME="$(cd "$(dirname "$0")"/..; pwd)"
65+
if [ -z "${KYUUBI_HOME}" ]; then
66+
KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)"
67+
fi
6668

6769
if [[ $1 == "start" ]] || [[ $1 == "run" ]]; then
6870
. "${KYUUBI_HOME}/bin/load-kyuubi-env.sh"

bin/kyuubi-admin

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
## Kyuubi Admin Control Client Entrance
2020
CLASS="org.apache.kyuubi.ctl.cli.AdminControlCli"
2121

22-
export KYUUBI_HOME="$(cd "$(dirname "$0")"/..; pwd)"
22+
if [ -z "${KYUUBI_HOME}" ]; then
23+
KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)"
24+
fi
2325

2426
. "${KYUUBI_HOME}/bin/load-kyuubi-env.sh" -s
2527

bin/kyuubi-ctl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
## Kyuubi Control Client Entrance
2020
CLASS="org.apache.kyuubi.ctl.cli.ControlCli"
2121

22-
export KYUUBI_HOME="$(cd "$(dirname "$0")"/..; pwd)"
22+
if [ -z "${KYUUBI_HOME}" ]; then
23+
KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)"
24+
fi
2325

2426
. "${KYUUBI_HOME}/bin/load-kyuubi-env.sh" -s
2527

bin/kyuubi-zk-cli

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
## Zookeeper Shell Client Entrance
2020
CLASS="org.apache.kyuubi.shaded.zookeeper.ZooKeeperMain"
2121

22-
export KYUUBI_HOME="$(cd "$(dirname "$0")"/..; pwd)"
23-
22+
if [ -z "${KYUUBI_HOME}" ]; then
23+
KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)"
24+
fi
2425
. "${KYUUBI_HOME}/bin/load-kyuubi-env.sh" -s
2526

2627
if [[ -z ${JAVA_HOME} ]]; then

bin/load-kyuubi-env.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
#
1818

1919

20-
export KYUUBI_HOME="${KYUUBI_HOME:-"$(cd "$(dirname "$0")"/.. || exit; pwd)"}"
21-
20+
if [ -z "${KYUUBI_HOME}" ]; then
21+
export KYUUBI_HOME="$(cd "$(dirname "$0")"/.. || exit; pwd)"
22+
fi
2223
export KYUUBI_CONF_DIR="${KYUUBI_CONF_DIR:-"${KYUUBI_HOME}"/conf}"
2324

2425
silent=0

docs/configuration/settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ You can configure the Kyuubi properties in `$KYUUBI_HOME/conf/kyuubi-defaults.co
3333

3434
| Key | Default | Meaning | Type | Since |
3535
|-----------------------------------------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|-------|
36-
| kyuubi.authentication | NONE | A comma-separated list of client authentication types.<ul> <li>NOSASL: raw transport.</li> <li>NONE: no authentication check.</li> <li>KERBEROS: Kerberos/GSSAPI authentication.</li> <li>CUSTOM: User-defined authentication.</li> <li>JDBC: JDBC query authentication.</li> <li>LDAP: Lightweight Directory Access Protocol authentication.</li></ul>The following tree describes the catalog of each option.<ul> <li><code>NOSASL</code></li> <li>SASL <ul> <li>SASL/PLAIN</li> <ul> <li><code>NONE</code></li> <li><code>LDAP</code></li> <li><code>JDBC</code></li> <li><code>CUSTOM</code></li> </ul> <li>SASL/GSSAPI <ul> <li><code>KERBEROS</code></li> </ul> </li> </ul> </li></ul> Note that: for SASL authentication, KERBEROS and PLAIN auth types are supported at the same time, and only the first specified PLAIN auth type is valid. | set | 1.0.0 |
36+
| kyuubi.authentication | NONE | A comma-separated list of client authentication types.<ul> <li>NOSASL: raw transport.</li> <li>NONE: no authentication check.</li> <li>KERBEROS: Kerberos/GSSAPI authentication.</li> <li>CUSTOM: User-defined authentication.</li> <li>JDBC: JDBC query authentication.</li> <li>LDAP: Lightweight Directory Access Protocol authentication.</li></ul>The following tree describes the catalog of each option.<ul> <li><code>NOSASL</code></li> <li>SASL <ul> <li>SASL/PLAIN</li> <ul> <li><code>NONE</code></li> <li><code>LDAP</code></li> <li><code>JDBC</code></li> <li><code>CUSTOM</code></li> </ul> <li>SASL/GSSAPI <ul> <li><code>KERBEROS</code></li> </ul> </li> </ul> </li></ul> Note that: for SASL authentication, KERBEROS and PLAIN auth types are supported at the same time, and only the first specified PLAIN auth type is valid. | seq | 1.0.0 |
3737
| kyuubi.authentication.custom.class | &lt;undefined&gt; | User-defined authentication implementation of org.apache.kyuubi.service.authentication.PasswdAuthenticationProvider | string | 1.3.0 |
3838
| kyuubi.authentication.jdbc.driver.class | &lt;undefined&gt; | Driver class name for JDBC Authentication Provider. | string | 1.6.0 |
3939
| kyuubi.authentication.jdbc.password | &lt;undefined&gt; | Database password for JDBC Authentication Provider. | string | 1.6.0 |

extensions/spark/kyuubi-spark-authz/src/main/resources/table_command_spec.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,11 +1398,7 @@
13981398
"classname" : "org.apache.spark.sql.execution.command.InsertIntoDataSourceDirCommand",
13991399
"tableDescs" : [ ],
14001400
"opType" : "QUERY",
1401-
"queryDescs" : [ {
1402-
"fieldName" : "query",
1403-
"fieldExtractor" : "LogicalPlanQueryExtractor",
1404-
"comment" : ""
1405-
} ],
1401+
"queryDescs" : [ ],
14061402
"uriDescs" : [ {
14071403
"fieldName" : "storage",
14081404
"fieldExtractor" : "CatalogStorageFormatURIExtractor",
@@ -1625,11 +1621,7 @@
16251621
"comment" : ""
16261622
} ],
16271623
"opType" : "QUERY",
1628-
"queryDescs" : [ {
1629-
"fieldName" : "query",
1630-
"fieldExtractor" : "LogicalPlanQueryExtractor",
1631-
"comment" : ""
1632-
} ],
1624+
"queryDescs" : [ ],
16331625
"uriDescs" : [ ]
16341626
}, {
16351627
"classname" : "org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelationCommand",

extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/AccessResource.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class AccessResource private (val objectType: ObjectType, val catalog: Option[St
3838
val columnStr = getColumn
3939
if (columnStr == null) Nil else columnStr.split(",").filter(_.nonEmpty)
4040
}
41-
def getUrl: String = getValue("url")
4241
}
4342

4443
object AccessResource {

extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/rule/RuleEliminateTypeOf.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@ import org.apache.kyuubi.plugin.spark.authz.rule.expression.TypeOfPlaceHolder
2525

2626
object RuleEliminateTypeOf extends Rule[LogicalPlan] {
2727
override def apply(plan: LogicalPlan): LogicalPlan = {
28-
plan.transformUp { case p =>
29-
p.transformExpressionsUp {
30-
case toph: TypeOfPlaceHolder => TypeOf(toph.expr)
31-
}
28+
plan.transformExpressionsUp {
29+
case toph: TypeOfPlaceHolder => TypeOf(toph.expr)
3230
}
3331
}
3432
}

0 commit comments

Comments
 (0)