Skip to content

Commit

Permalink
Merge branch 'apache:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuan1223 authored Oct 10, 2023
2 parents 2beccb6 + e1d213e commit c8eb9a2
Show file tree
Hide file tree
Showing 79 changed files with 7,408 additions and 80 deletions.
115 changes: 115 additions & 0 deletions .github/ISSUE_TEMPLATE/code-contrib-task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#
# This is a dedicated issue template for 2023 Kyuubi Code Contribution Program, all proposed
# tasks will be listed at https://github.com/orgs/apache/projects/296 after approval
#
name: 2023 Kyuubi Code Contribution Task
title: "[TASK][<LEVEL>] <The Task Title>"
description: Propose a task for 2023 Kyuubi Code Contribution Program
labels: [ "hacktoberfest" ]
body:
- type: markdown
attributes:
value: |
You are very welcome to propose new task for 2023 Kyuubi Code Contribution Program.
Your brilliant ideas keep Apache Kyuubi evolving.
Please replace the placeholder `<LEVEL>` in the issue title with one of the following options:
- TRIVIAL - it's usually for new contributors to learn the contributor process, e.g. how to cut branch,
how to use GitHub to send PR, how to response with reviewers, the contributor should not stay at this
stage too long.
- EASY - tasks like minor bugs, or simple features without requirements of knowledge for whole Kyuubi
architecture.
- MEDIUM - tasks typical requires that contributors have knowledge on one or more Kyuubi components,
normally, unit tests and integration tests is also required to verify the implementations.
- CHALLENGE - tasks requires that contributors have deep knowledge on one or more Kyuubi components,
have good logical thinking and the ability to solve complex problems, be proficient in programming
skills or algorithms
- type: checkboxes
attributes:
label: Code of Conduct
description: The Code of Conduct helps create a safe space for everyone. We require that everyone agrees to it.
options:
- label: >
I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
required: true
- type: checkboxes
attributes:
label: Search before creating
options:
- label: >
I have searched in the [task list](https://github.com/orgs/apache/projects/296) and found no similar
tasks.
required: true
- type: checkboxes
attributes:
label: Mentor
description: Mentor is required for MEDIUM and CHALLENGE tasks, to guide contributors to complete the task.
options:
- label: >
I have sufficient knowledge and experience of this task, and I volunteer to be the mentor of this task
to guide contributors to complete the task.
required: false
- type: textarea
attributes:
label: Skill requirements
description: Which stills are required for contributors who want to take this task?
placeholder: |
e.g.
- Basic knowledge on Scala Programing Language
- Familiar with Apache Maven, Docker and GitHub Action
- Basic knowledge on network programing and Apache Thrift RPC framework
- Familiar with Apache Spark
- ...
validations:
required: true

- type: textarea
attributes:
label: Background and Goals
description: What's the current problem, and what's the final status should be after the task is completed?
placeholder: >
Please describe the background and your goal for requesting this task.
validations:
required: true

- type: textarea
attributes:
label: Implementation steps
description: How could it be implemented?
placeholder: >
Please list the implementation steps in as much detail as possible so that contributors who meet
the skill requirements could complete the task quickly and independently.
validations:
required: true

- type: textarea
attributes:
label: Additional context
placeholder: >
Anything else that related to this task that the contributors need to know.
validations:
required: false

- type: markdown
attributes:
value: "Thanks for taking the time to fill out this task form!"
2 changes: 1 addition & 1 deletion .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- run: >-
build/mvn org.apache.rat:apache-rat-plugin:check
-Ptpcds -Pspark-block-cleaner -Pkubernetes-it
-Pspark-3.1 -Pspark-3.2 -Pspark-3.3 -Pspark-3.4
-Pspark-3.1 -Pspark-3.2 -Pspark-3.3 -Pspark-3.4 -Pspark-3.5
- name: Upload rat report
if: failure()
uses: actions/upload-artifact@v3
Expand Down
33 changes: 23 additions & 10 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
- '3.2'
- '3.3'
- '3.4'
- '3.5'
spark-archive: [""]
exclude-tags: [""]
comment: ["normal"]
Expand Down Expand Up @@ -169,16 +170,18 @@ jobs:
**/target/unit-tests.log
**/kyuubi-spark-sql-engine.log*
scala213:
name: Scala Compilation Test
scala-test:
name: Scala Test
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
java:
- '8'
scala:
- '2.13'
java:
- '8'
spark:
- '3.4'
steps:
- uses: actions/checkout@v3
- name: Tune Runner VM
Expand All @@ -192,14 +195,24 @@ jobs:
check-latest: false
- name: Setup Maven
uses: ./.github/actions/setup-maven
- name: Cache Engine Archives
uses: ./.github/actions/cache-engine-archives
- name: Build on Scala ${{ matrix.scala }}
run: |
MODULES='!externals/kyuubi-flink-sql-engine'
./build/mvn clean install -pl ${MODULES} -am \
-DskipTests -Pflink-provided,hive-provided,spark-provided \
-Pjava-${{ matrix.java }} \
-Pscala-${{ matrix.scala }} \
-Pspark-3.3
TEST_MODULES="!externals/kyuubi-flink-sql-engine,!integration-tests/kyuubi-flink-it"
./build/mvn clean install ${MVN_OPT} -pl ${TEST_MODULES} -am \
-Pscala-${{ matrix.scala }} -Pjava-${{ matrix.java }} -Pspark-${{ matrix.spark }}
- name: Upload test logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: unit-tests-log-scala-${{ matrix.scala }}-java-${{ matrix.java }}-spark-${{ matrix.spark }}
path: |
**/target/unit-tests.log
**/kyuubi-spark-sql-engine.log*
**/kyuubi-spark-batch-submit.log*
**/kyuubi-jdbc-engine.log*
**/kyuubi-hive-sql-engine.log*
flink-it:
name: Flink Test
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
build/mvn clean install ${MVN_OPT} -pl extensions/spark/kyuubi-extension-spark-3-1 -Pspark-3.1
build/mvn clean install ${MVN_OPT} -pl extensions/spark/kyuubi-extension-spark-3-3,extensions/spark/kyuubi-spark-connector-hive -Pspark-3.3
build/mvn clean install ${MVN_OPT} -pl extensions/spark/kyuubi-extension-spark-3-4 -Pspark-3.4
build/mvn clean install ${MVN_OPT} -pl extensions/spark/kyuubi-extension-spark-3-5 -Pspark-3.5
- name: Scalastyle with maven
id: scalastyle-check
Expand Down
2 changes: 1 addition & 1 deletion build/dist
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ if [[ -f "$KYUUBI_HOME/tools/spark-block-cleaner/target/spark-block-cleaner_${SC
fi

# Copy Kyuubi Spark extension
SPARK_EXTENSION_VERSIONS=('3-1' '3-2' '3-3' '3-4')
SPARK_EXTENSION_VERSIONS=('3-1' '3-2' '3-3' '3-4' '3-5')
# shellcheck disable=SC2068
for SPARK_EXTENSION_VERSION in ${SPARK_EXTENSION_VERSIONS[@]}; do
if [[ -f $"$KYUUBI_HOME/extensions/spark/kyuubi-extension-spark-$SPARK_EXTENSION_VERSION/target/kyuubi-extension-spark-${SPARK_EXTENSION_VERSION}_${SCALA_VERSION}-${VERSION}.jar" ]]; then
Expand Down
10 changes: 10 additions & 0 deletions dev/kyuubi-codecov/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,15 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>spark-3.5</id>
<dependencies>
<dependency>
<groupId>org.apache.kyuubi</groupId>
<artifactId>kyuubi-extension-spark-3-5_${scala.binary.version}</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
2 changes: 1 addition & 1 deletion dev/reformat
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set -x

KYUUBI_HOME="$(cd "`dirname "$0"`/.."; pwd)"

PROFILES="-Pflink-provided,hive-provided,spark-provided,spark-block-cleaner,spark-3.4,spark-3.3,spark-3.2,spark-3.1,tpcds"
PROFILES="-Pflink-provided,hive-provided,spark-provided,spark-block-cleaner,spark-3.5,spark-3.4,spark-3.3,spark-3.2,spark-3.1,tpcds"

# python style checks rely on `black` in path
if ! command -v black &> /dev/null
Expand Down
8 changes: 4 additions & 4 deletions docs/quick_start/quick_start_with_jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The driver is available from Maven Central:

## Connect to non-kerberized Kyuubi Server

The below java code is using a keytab file to login and connect to Kyuubi server by JDBC.
The following java code connects directly to the Kyuubi Server by JDBC without using kerberos authentication.

```java
package org.apache.kyuubi.examples;
Expand All @@ -50,7 +50,7 @@ public class KyuubiJDBC {
public static void main(String[] args) throws SQLException {
try (Connection conn = DriverManager.getConnection(kyuubiJdbcUrl)) {
try (Statement stmt = conn.createStatement()) {
try (ResultSet rs = st.executeQuery("show databases")) {
try (ResultSet rs = stmt.executeQuery("show databases")) {
while (rs.next()) {
System.out.println(rs.getString(1));
}
Expand Down Expand Up @@ -79,11 +79,11 @@ public class KyuubiJDBCDemo {
public static void main(String[] args) throws SQLException {
String clientPrincipal = args[0]; // Kerberos principal
String clientKeytab = args[1]; // Keytab file location
String serverPrincipal = arg[2]; // Kerberos principal used by Kyuubi Server
String serverPrincipal = args[2]; // Kerberos principal used by Kyuubi Server
String kyuubiJdbcUrl = String.format(kyuubiJdbcUrlTemplate, clientPrincipal, clientKeytab, serverPrincipal);
try (Connection conn = DriverManager.getConnection(kyuubiJdbcUrl)) {
try (Statement stmt = conn.createStatement()) {
try (ResultSet rs = st.executeQuery("show databases")) {
try (ResultSet rs = stmt.executeQuery("show databases")) {
while (rs.next()) {
System.out.println(rs.getString(1));
}
Expand Down
Loading

0 comments on commit c8eb9a2

Please sign in to comment.