-
Notifications
You must be signed in to change notification settings - Fork 996
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
951 changed files
with
37,828 additions
and
9,874 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
################################################################################ | ||
# 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. | ||
################################################################################ | ||
|
||
name: UTCase and ITCase Spark 3.x | ||
|
||
on: | ||
push: | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**/*.md' | ||
|
||
env: | ||
JDK_VERSION: 8 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up JDK ${{ env.JDK_VERSION }} | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: ${{ env.JDK_VERSION }} | ||
distribution: 'adopt' | ||
- name: Build Spark | ||
run: mvn -T 1C -B clean install -DskipTests | ||
- name: Test Spark | ||
timeout-minutes: 60 | ||
run: | | ||
# run tests with random timezone to find out timezone related bugs | ||
. .github/workflows/utils.sh | ||
jvm_timezone=$(random_timezone) | ||
echo "JVM timezone is set to $jvm_timezone" | ||
test_modules="" | ||
for suffix in common_2.12 3.5 3.4 3.3 3.2; do | ||
test_modules+="org.apache.paimon:paimon-spark-${suffix}," | ||
done | ||
test_modules="${test_modules%,}" | ||
mvn -T 1C -B test -pl "${test_modules}" -Duser.timezone=$jvm_timezone | ||
env: | ||
MAVEN_OPTS: -Xmx4096m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
################################################################################ | ||
# 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. | ||
################################################################################ | ||
|
||
name: UTCase and ITCase Spark 4.x | ||
|
||
on: | ||
push: | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**/*.md' | ||
|
||
env: | ||
JDK_VERSION: 17 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up JDK ${{ env.JDK_VERSION }} | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: ${{ env.JDK_VERSION }} | ||
distribution: 'adopt' | ||
- name: Build Spark | ||
run: mvn -T 1C -B clean install -DskipTests -Pspark4 | ||
- name: Test Spark | ||
timeout-minutes: 60 | ||
run: | | ||
# run tests with random timezone to find out timezone related bugs | ||
. .github/workflows/utils.sh | ||
jvm_timezone=$(random_timezone) | ||
echo "JVM timezone is set to $jvm_timezone" | ||
test_modules="" | ||
for suffix in common_2.13 4.0; do | ||
test_modules+="org.apache.paimon:paimon-spark-${suffix}," | ||
done | ||
test_modules="${test_modules%,}" | ||
mvn -T 1C -B test -pl "${test_modules}" -Duser.timezone=$jvm_timezone -Pspark4 | ||
env: | ||
MAVEN_OPTS: -Xmx4096m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,5 @@ target | |
.DS_Store | ||
*.ipr | ||
*.iws | ||
.java-version | ||
dependency-reduced-pom.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
docs/content/flink/cdc-ingestion/_index.md → docs/content/cdc-ingestion/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
title: "Catalog" | ||
weight: 4 | ||
type: docs | ||
aliases: | ||
- /concepts/catalog.html | ||
--- | ||
<!-- | ||
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. | ||
--> | ||
|
||
# Catalog | ||
|
||
Paimon provides a Catalog abstraction to manage the table of contents and metadata. The Catalog abstraction provides | ||
a series of ways to help you better integrate with computing engines. We always recommend that you use Catalog to | ||
access the Paimon table. | ||
|
||
## Catalogs | ||
|
||
Paimon catalogs currently support three types of metastores: | ||
|
||
* `filesystem` metastore (default), which stores both metadata and table files in filesystems. | ||
* `hive` metastore, which additionally stores metadata in Hive metastore. Users can directly access the tables from Hive. | ||
* `jdbc` metastore, which additionally stores metadata in relational databases such as MySQL, Postgres, etc. | ||
|
||
## Filesystem Catalog | ||
|
||
Metadata and table files are stored under `hdfs:///path/to/warehouse`. | ||
|
||
```sql | ||
-- Flink SQL | ||
CREATE CATALOG my_catalog WITH ( | ||
'type' = 'paimon', | ||
'warehouse' = 'hdfs:///path/to/warehouse' | ||
); | ||
``` | ||
|
||
## Hive Catalog | ||
|
||
By using Paimon Hive catalog, changes to the catalog will directly affect the corresponding Hive metastore. Tables | ||
created in such catalog can also be accessed directly from Hive. Metadata and table files are stored under | ||
`hdfs:///path/to/warehouse`. In addition, schema is also stored in Hive metastore. | ||
|
||
```sql | ||
-- Flink SQL | ||
CREATE CATALOG my_hive WITH ( | ||
'type' = 'paimon', | ||
'metastore' = 'hive', | ||
-- 'warehouse' = 'hdfs:///path/to/warehouse', default use 'hive.metastore.warehouse.dir' in HiveConf | ||
); | ||
``` | ||
|
||
By default, Paimon does not synchronize newly created partitions into Hive metastore. Users will see an unpartitioned | ||
table in Hive. Partition push-down will be carried out by filter push-down instead. | ||
|
||
If you want to see a partitioned table in Hive and also synchronize newly created partitions into Hive metastore, | ||
please set the table option `metastore.partitioned-table` to true. | ||
|
||
## JDBC Catalog | ||
|
||
By using the Paimon JDBC catalog, changes to the catalog will be directly stored in relational databases such as SQLite, | ||
MySQL, postgres, etc. | ||
|
||
```sql | ||
-- Flink SQL | ||
CREATE CATALOG my_jdbc WITH ( | ||
'type' = 'paimon', | ||
'metastore' = 'jdbc', | ||
'uri' = 'jdbc:mysql://<host>:<port>/<databaseName>', | ||
'jdbc.user' = '...', | ||
'jdbc.password' = '...', | ||
'catalog-key'='jdbc', | ||
'warehouse' = 'hdfs:///path/to/warehouse' | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.