This is an automated email from the ASF dual-hosted git repository. djwang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/main by this push: new fed0458e0db License: add & clean up license headers and files fed0458e0db is described below commit fed0458e0db36a5ce00d463d479ac1c156f488d0 Author: Dianjin Wang <wangdian...@gmail.com> AuthorDate: Tue Jul 29 17:21:42 2025 +0800 License: add & clean up license headers and files This commit performs a comprehensive license compliance cleanup to align with release requirements, which are pointed out by Incubator PMC review. The main changes include: 1. Add License Headers: Added the standard Apache License Version 2.0 header to numerous source files that were missing it. This covers multiple file types, including YAML, Markdown, SQL, C/C++, Python, and shell scripts. These files are originally created by the cloudberry community. 2. Simplify LICENSE and NOTICE: - Restructured the root LICENSE file for better clarity. - Cleaned up the NOTICE file by removing redundant information which have been listed in the LICENSE. 3. Remove the unused deployment docs from the `deploy/build`, which can help us manage the file licenses. 4. Update RAT Configuration: Updated `pom.xml` to reflect the changes of the file license headers and attribution. See: https://github.com/apache/cloudberry/issues/1236 --- .../DISCUSSION_TEMPLATE/ideas-feature-requests.yml | 20 ++ .github/DISCUSSION_TEMPLATE/proposal.yml | 20 ++ .github/ISSUE_TEMPLATE/bug-report.yml | 20 ++ .github/ISSUE_TEMPLATE/config.yml | 20 ++ CODE_OF_CONDUCT.md | 19 ++ CONTRIBUTING.md | 19 ++ LICENSE | 78 ++++--- NOTICE | 17 +- README.apache.md | 19 ++ README.md | 19 ++ SECURITY.md | 19 ++ contrib/pax_storage/CMakeLists.txt | 16 ++ contrib/pax_storage/FindDependencies.cmake | 16 ++ contrib/pax_storage/Makefile | 16 ++ contrib/pax_storage/doc/README.catalog.md | 19 ++ contrib/pax_storage/doc/README.clustering.md | 19 ++ contrib/pax_storage/doc/README.dev.md | 19 ++ contrib/pax_storage/doc/README.filter.md | 19 ++ contrib/pax_storage/doc/README.format.md | 19 ++ contrib/pax_storage/doc/README.md | 19 ++ contrib/pax_storage/doc/README.toast.md | 19 ++ contrib/pax_storage/doc/performance.md | 19 +- contrib/pax_storage/init_file | 16 ++ contrib/pax_storage/src/api/python3/CMakeLists.txt | 17 ++ .../pax_storage/src/api/python3/paxfile_type.cc | 22 ++ .../src/api/python3/paxfilereader_type.cc | 22 ++ contrib/pax_storage/src/api/python3/paxpy_comm.h | 22 ++ .../pax_storage/src/api/python3/paxpy_modules.cc | 22 ++ contrib/pax_storage/src/api/python3/paxpy_types.h | 22 ++ .../pax_storage/src/api/python3/paxtype_cast.cc | 22 ++ contrib/pax_storage/src/api/python3/setup-debug.py | 19 ++ contrib/pax_storage/src/api/python3/setup.py | 19 ++ .../pax_storage/src/api/python3/test/paxpy_test.py | 17 ++ contrib/pax_storage/src/cpp/CMakeLists.txt | 17 ++ contrib/pax_storage/src/cpp/cmake/pax.cmake | 16 ++ contrib/pax_storage/src/cpp/cmake/pax_format.cmake | 16 ++ .../src/cpp/storage/README_CTID_in_pax.md | 19 ++ .../cpp/storage/proto/micro_partition_stats.proto | 22 ++ .../pax_storage/src/cpp/storage/proto/pax.proto | 23 +- contrib/pax_storage/tools/gen_sql.c | 37 +++- contrib/pgcrypto/sm4.h | 26 +++ deploy/README.md | 19 ++ deploy/build/README.CentOS.bash | 64 ------ deploy/build/README.Linux.md | 242 --------------------- deploy/build/README.Rhel-Rocky.bash | 101 --------- deploy/build/README.Ubuntu.bash | 73 ------- deploy/build/README.macOS.bash | 114 ---------- deploy/build/README.macOS.md | 132 ----------- deploy/build/README.md | 116 ---------- gpAux/gpdemo/gpdemo-defaults.sh | 16 ++ gpMgmt/bin/gpdemo | 16 ++ gpMgmt/bin/gpshrink | 16 +- pom.xml | 181 +++++---------- src/common/sm3.c | 27 ++- src/include/crypto/bufenc.h | 19 +- 55 files changed, 962 insertions(+), 1040 deletions(-) diff --git a/.github/DISCUSSION_TEMPLATE/ideas-feature-requests.yml b/.github/DISCUSSION_TEMPLATE/ideas-feature-requests.yml index 960289119cc..972ba48d79c 100644 --- a/.github/DISCUSSION_TEMPLATE/ideas-feature-requests.yml +++ b/.github/DISCUSSION_TEMPLATE/ideas-feature-requests.yml @@ -1,3 +1,23 @@ +# -------------------------------------------------------------------- +# +# 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. +# +# -------------------------------------------------------------------- + title: "[Ideas] " labels: ["type: Enhancement"] body: diff --git a/.github/DISCUSSION_TEMPLATE/proposal.yml b/.github/DISCUSSION_TEMPLATE/proposal.yml index 25cf78dbb0f..2048cb07191 100644 --- a/.github/DISCUSSION_TEMPLATE/proposal.yml +++ b/.github/DISCUSSION_TEMPLATE/proposal.yml @@ -1,3 +1,23 @@ +# -------------------------------------------------------------------- +# +# 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. +# +# -------------------------------------------------------------------- + title: "[Proposal] " labels: ["type: Proposal"] body: diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 7b310ad360e..bf9ef79c12d 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -1,3 +1,23 @@ +# -------------------------------------------------------------------- +# +# 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: "\U0001F41B Bug Report" description: Problems and issues with code in Apache Cloudberry core. title: "[Bug] " diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 74483115591..05a81306669 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,3 +1,23 @@ +# -------------------------------------------------------------------- +# +# 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. +# +# -------------------------------------------------------------------- + blank_issues_enabled: true contact_links: - name: 🙏🏻 Q&A diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index fba27afa81c..8c56ac85eb5 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + # Code of Conduct Apache Cloudberry (Incubating) follows the ASF [Code of diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6c22b84a0ff..6fed70b4a9a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + Apache Cloudberry (Incubating) welcomes contributions from anyone, new and experienced! We appreciate your interest in contributing. This guide will help you get started with the contribution. diff --git a/LICENSE b/LICENSE index 8d457fd6652..603400aa4cd 100644 --- a/LICENSE +++ b/LICENSE @@ -207,25 +207,17 @@ This product includes software from PostgreSQL, under the PostgreSQL License: The PostgreSQL software includes: ----------------------------- - Apache License - Version 2.0 - contrib/pax_storage/src/cpp/contrib/googlebench - see licenses/LICENSE-googlebench.txt - ---------------------------- BSD License src/bin/pg_controldata/pg_controldata.c copyright (c) Oliver Elphick <o...@lfix.co.uk>, 2001 - - ---------------------------- BSD-4-Clause (University of California-Specific) src/include/port/win32_msvc/glob.h src/port/glob.c - see licenses/LICENSE-glob.txt ---------------------------- @@ -246,24 +238,6 @@ The PostgreSQL software includes: src/backend/libpq/sha2.h see licenses/LICENSE-bsd3-sha2.txt - contrib/pax_storage/src/cpp/contrib/googletest - see licenses/LICENSE-googletest.txt - - gpcontrib/gpcloud/test/googletest - see licenses/LICENSE-googletest.txt - ----------------------------- - MIT LICENSE - - dependencies/yyjson - see licenses/LICENSE-yyjson.txt - - contrib/pax_storage/src/cpp/contrib/cpp-stub - see licenses/LICENSE-cpp-stub.txt - - contrib/pax_storage/src/cpp/contrib/tabulate - see licenses/LICENSE-tabulate.txt - ---------------------------- Internet Systems Consortium/Internet Software Consortium (ISC) LICENSE @@ -321,8 +295,7 @@ Copyright (c) 2004-2020 VMware, Inc. or its affiliates. All Rights Reserved. All Rights Reserved. Greenplum Database is licensed under the Apache License Version 2.0 -(see LICENSE & NOTICE) and is based on the PostgreSQL Database -Management System. +(see LICENSE) and is based on the PostgreSQL Database Management System. The Greenplum Database software includes: @@ -338,14 +311,47 @@ The Greenplum Database software includes: gpcontrib/orafce/* see licenses/LICENSE-orafce.txt + ---------------------------- + BSD 3 Clause License + + gpcontrib/gpcloud/test/googletest + see licenses/LICENSE-googletest.txt + ================================================================================ -This product includes code from pg_cron under PostgreSQL license: +Apache Cloudberry includes codes from - /src/include/task/pg_cron.h - /src/include/task/task_states.h - /src/include/task/job_metadata.h - /src/backend/task/task_states.c - /src/backend/task/job_metadata.c - /src/backend/task/pg_cron.c +---------------------------- + pg_cron under PostgreSQL license: - see licenses/LICENSE-citusdata.txt + /src/include/task/pg_cron.h + /src/include/task/task_states.h + /src/include/task/job_metadata.h + /src/backend/task/task_states.c + /src/backend/task/job_metadata.c + /src/backend/task/pg_cron.c + + see licenses/LICENSE-citusdata.txt + +---------------------------- + Apache License - Version 2.0 + + contrib/pax_storage/src/cpp/contrib/googlebench + see licenses/LICENSE-googlebench.txt + +---------------------------- + MIT LICENSE + + dependencies/yyjson + see licenses/LICENSE-yyjson.txt + + contrib/pax_storage/src/cpp/cpp-stub + see licenses/LICENSE-cpp-stub.txt + + contrib/pax_storage/src/cpp/contrib/tabulate + see licenses/LICENSE-tabulate.txt + + ---------------------------- + BSD 3 Clause License + + contrib/pax_storage/src/cpp/contrib/googletest + see licenses/LICENSE-googletest.txt diff --git a/NOTICE b/NOTICE index 9062c71b549..8003e980d0d 100644 --- a/NOTICE +++ b/NOTICE @@ -2,19 +2,4 @@ Apache Cloudberry (Incubating) Copyright 2024-2025 The Apache Software Foundation This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -This product contains significant parts that were originally based on software -from VMware, Inc. or its affiliates. (Greenplum Database -<https://www.greenplum.org/>). -Copyright (c) 2004-2020 VMware, Inc. or its affiliates. -License under the Apache License 2.0. - -This product contains significant parts that were orginally based on software -from PostgreSQL Global Development Group (PostgreSQL 14.4 -<https://www.postgresql.org/>). -PostgreSQL Database Management System -(formerly known as Postgres, then as Postgres95) -Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group -Portions Copyright (c) 1994, The Regents of the University of California -License under the PostgreSQL License. \ No newline at end of file +The Apache Software Foundation (http://www.apache.org/). \ No newline at end of file diff --git a/README.apache.md b/README.apache.md index 08a746bec0a..18772c9dbae 100644 --- a/README.apache.md +++ b/README.apache.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + # Apache Cloudberry (Incubating) License Audit Notes This file documents licensing clarifications and exceptions as part of ASF release readiness for Apache Cloudberry (Incubating). diff --git a/README.md b/README.md index 3d46d155e87..25771f24a10 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + # Apache Cloudberry (Incubating) <p align="center"> diff --git a/SECURITY.md b/SECURITY.md index c12a9bab134..81c7936cacc 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + # Security Policy The Apache Security Team handles all security issues across Apache projects and diff --git a/contrib/pax_storage/CMakeLists.txt b/contrib/pax_storage/CMakeLists.txt index f2f50c71f59..29c3a347dd8 100644 --- a/contrib/pax_storage/CMakeLists.txt +++ b/contrib/pax_storage/CMakeLists.txt @@ -1,3 +1,19 @@ +# 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. cmake_minimum_required (VERSION 3.11.0) project(Pax) set(CMAKE_CXX_STANDARD 17) diff --git a/contrib/pax_storage/FindDependencies.cmake b/contrib/pax_storage/FindDependencies.cmake index cf9758cb5be..3189d8e6697 100644 --- a/contrib/pax_storage/FindDependencies.cmake +++ b/contrib/pax_storage/FindDependencies.cmake @@ -1,3 +1,19 @@ +# 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. ## protobuf include(FindProtobuf) find_package(Protobuf 3.5.0 REQUIRED) diff --git a/contrib/pax_storage/Makefile b/contrib/pax_storage/Makefile index ff7042d8bd5..9f4061db9d7 100644 --- a/contrib/pax_storage/Makefile +++ b/contrib/pax_storage/Makefile @@ -1,3 +1,19 @@ +# 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. # contrib/pax_storage/Makefile MODULE_big = pax diff --git a/contrib/pax_storage/doc/README.catalog.md b/contrib/pax_storage/doc/README.catalog.md index f23feabd604..9cf41bb9a7c 100644 --- a/contrib/pax_storage/doc/README.catalog.md +++ b/contrib/pax_storage/doc/README.catalog.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + # PAX Catalog ## Overview diff --git a/contrib/pax_storage/doc/README.clustering.md b/contrib/pax_storage/doc/README.clustering.md index 63469b57eb9..95c6126227f 100644 --- a/contrib/pax_storage/doc/README.clustering.md +++ b/contrib/pax_storage/doc/README.clustering.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + # PAX Clustering # Overview diff --git a/contrib/pax_storage/doc/README.dev.md b/contrib/pax_storage/doc/README.dev.md index a8aa402efbd..744578a09e0 100644 --- a/contrib/pax_storage/doc/README.dev.md +++ b/contrib/pax_storage/doc/README.dev.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + # DEV README ## Overview diff --git a/contrib/pax_storage/doc/README.filter.md b/contrib/pax_storage/doc/README.filter.md index 5321ca050fa..bfdf923c3b8 100644 --- a/contrib/pax_storage/doc/README.filter.md +++ b/contrib/pax_storage/doc/README.filter.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + # PAX filter ## Overview diff --git a/contrib/pax_storage/doc/README.format.md b/contrib/pax_storage/doc/README.format.md index 90f1dc42550..807d4882624 100644 --- a/contrib/pax_storage/doc/README.format.md +++ b/contrib/pax_storage/doc/README.format.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + # PAX Storage Format # Overview diff --git a/contrib/pax_storage/doc/README.md b/contrib/pax_storage/doc/README.md index 409ffb9f0d8..760d1499cc0 100644 --- a/contrib/pax_storage/doc/README.md +++ b/contrib/pax_storage/doc/README.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + # PAX ## Overview diff --git a/contrib/pax_storage/doc/README.toast.md b/contrib/pax_storage/doc/README.toast.md index 70caddb3935..631680a7a9b 100644 --- a/contrib/pax_storage/doc/README.toast.md +++ b/contrib/pax_storage/doc/README.toast.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + # PAX toast ## Background diff --git a/contrib/pax_storage/doc/performance.md b/contrib/pax_storage/doc/performance.md index df55aae20e4..dd99ecb832a 100644 --- a/contrib/pax_storage/doc/performance.md +++ b/contrib/pax_storage/doc/performance.md @@ -1,4 +1,21 @@ - +<!-- + 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. +--> # PAX performance test report diff --git a/contrib/pax_storage/init_file b/contrib/pax_storage/init_file index 77411f3c711..5ae3f8edfa8 100644 --- a/contrib/pax_storage/init_file +++ b/contrib/pax_storage/init_file @@ -1,3 +1,19 @@ +# 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 file contains global patterns of messages that should be ignored or -- masked out, when comparing test results with the expected output. -- Individual tests can contain additional patterns specific to the test. diff --git a/contrib/pax_storage/src/api/python3/CMakeLists.txt b/contrib/pax_storage/src/api/python3/CMakeLists.txt index d4e49c12e79..7304263e551 100644 --- a/contrib/pax_storage/src/api/python3/CMakeLists.txt +++ b/contrib/pax_storage/src/api/python3/CMakeLists.txt @@ -1,3 +1,20 @@ +# 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. + project(paypy) cmake_minimum_required (VERSION 3.11.0) set(CMAKE_CXX_STANDARD 17) diff --git a/contrib/pax_storage/src/api/python3/paxfile_type.cc b/contrib/pax_storage/src/api/python3/paxfile_type.cc index 8db03a550f0..a1c014fdff7 100644 --- a/contrib/pax_storage/src/api/python3/paxfile_type.cc +++ b/contrib/pax_storage/src/api/python3/paxfile_type.cc @@ -1,3 +1,25 @@ +/*------------------------------------------------------------------------- + * + * 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. + * + *------------------------------------------------------------------------- + */ + #include "paxpy_types.h" static struct PyMemberDef paxfile_members[] = { diff --git a/contrib/pax_storage/src/api/python3/paxfilereader_type.cc b/contrib/pax_storage/src/api/python3/paxfilereader_type.cc index 3898aee2cab..262c49e592a 100644 --- a/contrib/pax_storage/src/api/python3/paxfilereader_type.cc +++ b/contrib/pax_storage/src/api/python3/paxfilereader_type.cc @@ -1,3 +1,25 @@ +/*------------------------------------------------------------------------- + * + * 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. + * + *------------------------------------------------------------------------- + */ + #include "paxpy_types.h" #include "comm/fmt.h" diff --git a/contrib/pax_storage/src/api/python3/paxpy_comm.h b/contrib/pax_storage/src/api/python3/paxpy_comm.h index f5cd3884989..084bdbe8b5d 100644 --- a/contrib/pax_storage/src/api/python3/paxpy_comm.h +++ b/contrib/pax_storage/src/api/python3/paxpy_comm.h @@ -1,3 +1,25 @@ +/*------------------------------------------------------------------------- + * + * 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. + * + *------------------------------------------------------------------------- + */ + #pragma once #include "paxpy_config_d.h" #define FORMAT_CODE_PY_SSIZE_T "%" PY_FORMAT_SIZE_T "d" diff --git a/contrib/pax_storage/src/api/python3/paxpy_modules.cc b/contrib/pax_storage/src/api/python3/paxpy_modules.cc index 092db511033..be4cb98390d 100644 --- a/contrib/pax_storage/src/api/python3/paxpy_modules.cc +++ b/contrib/pax_storage/src/api/python3/paxpy_modules.cc @@ -1,3 +1,25 @@ +/*------------------------------------------------------------------------- + * + * 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. + * + *------------------------------------------------------------------------- + */ + #include <Python.h> #include <structmember.h> diff --git a/contrib/pax_storage/src/api/python3/paxpy_types.h b/contrib/pax_storage/src/api/python3/paxpy_types.h index d88ac245a05..8bf708d1761 100644 --- a/contrib/pax_storage/src/api/python3/paxpy_types.h +++ b/contrib/pax_storage/src/api/python3/paxpy_types.h @@ -1,3 +1,25 @@ +/*------------------------------------------------------------------------- + * + * 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. + * + *------------------------------------------------------------------------- + */ + #pragma once #include <Python.h> #include <datetime.h> diff --git a/contrib/pax_storage/src/api/python3/paxtype_cast.cc b/contrib/pax_storage/src/api/python3/paxtype_cast.cc index 839fa8d416f..7d3239a6f42 100644 --- a/contrib/pax_storage/src/api/python3/paxtype_cast.cc +++ b/contrib/pax_storage/src/api/python3/paxtype_cast.cc @@ -1,3 +1,25 @@ +/*------------------------------------------------------------------------- + * + * 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. + * + *------------------------------------------------------------------------- + */ + #include "paxpy_types.h" #include "comm/fmt.h" diff --git a/contrib/pax_storage/src/api/python3/setup-debug.py b/contrib/pax_storage/src/api/python3/setup-debug.py index 60f259f6311..13eadaa357d 100644 --- a/contrib/pax_storage/src/api/python3/setup-debug.py +++ b/contrib/pax_storage/src/api/python3/setup-debug.py @@ -1,3 +1,22 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# 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. + from setuptools import find_packages from setuptools import setup, Extension diff --git a/contrib/pax_storage/src/api/python3/setup.py b/contrib/pax_storage/src/api/python3/setup.py index 4922d42552b..a60cc779fd9 100644 --- a/contrib/pax_storage/src/api/python3/setup.py +++ b/contrib/pax_storage/src/api/python3/setup.py @@ -1,3 +1,22 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# 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. + from setuptools import find_packages from setuptools import setup, Extension diff --git a/contrib/pax_storage/src/api/python3/test/paxpy_test.py b/contrib/pax_storage/src/api/python3/test/paxpy_test.py index e4d78faf445..df487226e12 100644 --- a/contrib/pax_storage/src/api/python3/test/paxpy_test.py +++ b/contrib/pax_storage/src/api/python3/test/paxpy_test.py @@ -1,4 +1,21 @@ # python3 +# 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. + import unittest import paxpy import datetime diff --git a/contrib/pax_storage/src/cpp/CMakeLists.txt b/contrib/pax_storage/src/cpp/CMakeLists.txt index 8b6cbe0fd29..87ff074e877 100644 --- a/contrib/pax_storage/src/cpp/CMakeLists.txt +++ b/contrib/pax_storage/src/cpp/CMakeLists.txt @@ -1,3 +1,20 @@ +# 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. + cmake_minimum_required (VERSION 3.11.0) # protobuf diff --git a/contrib/pax_storage/src/cpp/cmake/pax.cmake b/contrib/pax_storage/src/cpp/cmake/pax.cmake index 13451426a9e..71775bac2dd 100644 --- a/contrib/pax_storage/src/cpp/cmake/pax.cmake +++ b/contrib/pax_storage/src/cpp/cmake/pax.cmake @@ -1,3 +1,19 @@ +# 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. ## generate_sql add_executable(generate_sql_script_program "${CMAKE_CURRENT_SOURCE_DIR}/../../tools/gen_sql.c") diff --git a/contrib/pax_storage/src/cpp/cmake/pax_format.cmake b/contrib/pax_storage/src/cpp/cmake/pax_format.cmake index 9aa438ab5d5..4bdc25671f9 100644 --- a/contrib/pax_storage/src/cpp/cmake/pax_format.cmake +++ b/contrib/pax_storage/src/cpp/cmake/pax_format.cmake @@ -1,4 +1,20 @@ # paxformat.so +# 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. set(pax_comm_src comm/bitmap.cc diff --git a/contrib/pax_storage/src/cpp/storage/README_CTID_in_pax.md b/contrib/pax_storage/src/cpp/storage/README_CTID_in_pax.md index b1b770f8553..f2664a21ac7 100644 --- a/contrib/pax_storage/src/cpp/storage/README_CTID_in_pax.md +++ b/contrib/pax_storage/src/cpp/storage/README_CTID_in_pax.md @@ -1,3 +1,22 @@ +<!-- + 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. +--> + # CTID in PAX Pax table is different from heap/ao table, for the last two bytes, it does't has continuous logical address. So it can't be mapped to physical file through ctid. diff --git a/contrib/pax_storage/src/cpp/storage/proto/micro_partition_stats.proto b/contrib/pax_storage/src/cpp/storage/proto/micro_partition_stats.proto index 7687b72b9ef..9e3a8decb98 100644 --- a/contrib/pax_storage/src/cpp/storage/proto/micro_partition_stats.proto +++ b/contrib/pax_storage/src/cpp/storage/proto/micro_partition_stats.proto @@ -1,3 +1,25 @@ +/*------------------------------------------------------------------------- + * + * 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. + * + *------------------------------------------------------------------------- + */ + syntax = "proto2"; package pax.stats; diff --git a/contrib/pax_storage/src/cpp/storage/proto/pax.proto b/contrib/pax_storage/src/cpp/storage/proto/pax.proto index 7206725fd27..3e25710027d 100644 --- a/contrib/pax_storage/src/cpp/storage/proto/pax.proto +++ b/contrib/pax_storage/src/cpp/storage/proto/pax.proto @@ -1,6 +1,27 @@ -/** +/*------------------------------------------------------------------------- + * + * 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. + * * it's a common proto for pax column + * + *------------------------------------------------------------------------- */ + syntax = "proto2"; package pax; diff --git a/contrib/pax_storage/tools/gen_sql.c b/contrib/pax_storage/tools/gen_sql.c index e00a455cf03..e10abe74ecb 100644 --- a/contrib/pax_storage/tools/gen_sql.c +++ b/contrib/pax_storage/tools/gen_sql.c @@ -1,12 +1,31 @@ -// -// This program is used to generate sql script file for PAX. -// Build and run of this program is automatically done in the -// cmake script. -// -// The command to build this program alone is: -// gcc -I`pg_config --includedir-server` -I<pax_dir>/src/cpp -o generate_sql gen_sql.c -// -// +/*------------------------------------------------------------------------- + * + * 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 program is used to generate sql script file for PAX. + * Build and run of this program is automatically done in the + * cmake script. + * + * The command to build this program alone is: + * gcc -I`pg_config --includedir-server` -I<pax_dir>/src/cpp -o generate_sql gen_sql.c + * + *------------------------------------------------------------------------- + */ #include "postgres.h" // NOLINT diff --git a/contrib/pgcrypto/sm4.h b/contrib/pgcrypto/sm4.h index 5af5fe53b2b..b8cafb94b07 100644 --- a/contrib/pgcrypto/sm4.h +++ b/contrib/pgcrypto/sm4.h @@ -1,3 +1,29 @@ +/*------------------------------------------------------------------------- + * + * 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. + * + * sm4.h + * + * IDENTIFICATION + * contrib/pgcrypto/sm4.h + * + *------------------------------------------------------------------------- + */ #ifndef _SM4_H_ #define _SM4_H_ diff --git a/deploy/README.md b/deploy/README.md index b1d3af47176..b8da77a0521 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -1,2 +1,21 @@ +<!-- + 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. +--> + > [!WARNING] > The files are still in progress and will be revised in the following months. diff --git a/deploy/build/README.CentOS.bash b/deploy/build/README.CentOS.bash deleted file mode 100755 index 44f81407e44..00000000000 --- a/deploy/build/README.CentOS.bash +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -# Install needed packages. Please add to this list if you discover additional prerequisites. -sudo yum install -y epel-release -sudo yum install -y \ - apr-devel \ - bison \ - bzip2-devel \ - cmake3 \ - flex \ - gcc \ - gcc-c++ \ - krb5-devel \ - libcurl-devel \ - libevent-devel \ - libkadm5 \ - libyaml-devel \ - libxml2-devel \ - libzstd-devel \ - openssl-devel \ - perl-ExtUtils-Embed \ - python3-devel \ - python3-pip \ - readline-devel \ - xerces-c-devel \ - zlib-devel - -# Needed for pygresql, or you can source cloudberry-env.sh after compiling database and installing python-dependencies then -sudo yum install -y \ - postgresql \ - postgresql-devel - -sudo pip3 install conan -sudo pip3 install -r ../../python-dependencies.txt - -sudo tee -a /etc/sysctl.conf << EOF -kernel.shmmax = 5000000000000 -kernel.shmmni = 32768 -kernel.shmall = 40000000000 -kernel.sem = 1000 32768000 1000 32768 -kernel.msgmnb = 1048576 -kernel.msgmax = 1048576 -kernel.msgmni = 32768 - -net.core.netdev_max_backlog = 80000 -net.core.rmem_default = 2097152 -net.core.rmem_max = 16777216 -net.core.wmem_max = 16777216 - -vm.overcommit_memory = 2 -vm.overcommit_ratio = 95 -EOF - -sudo sysctl -p - -sudo mkdir -p /etc/security/limits.d -sudo tee -a /etc/security/limits.d/90-greenplum.conf << EOF -* soft nofile 1048576 -* hard nofile 1048576 -* soft nproc 1048576 -* hard nproc 1048576 -EOF - -ulimit -n 65536 65536 diff --git a/deploy/build/README.Linux.md b/deploy/build/README.Linux.md deleted file mode 100644 index 283c4faf17e..00000000000 --- a/deploy/build/README.Linux.md +++ /dev/null @@ -1,242 +0,0 @@ -# Compile and Install Apache Cloudberry on Linux - -This document shares how to compile and install Apache Cloudberry on Linux systems (CentOS 7, RHEL, and Ubuntu). Note that this document is for developers to try out Apache Cloudberry in a single-node environments. DO NOT use this document for production environments. - -Take the following steps to set up the development environments: - -1. [Clone the GitHub repo](#step-1-clone-the-github-repo). -2. [Install dependencies](#step-2-install-dependencies). -3. [Perform prerequisite platform tasks](#step-3-perform-prerequisite-platform-tasks). -4. [Build Apache Cloudberry](#step-4-build-apache-cloudberry). -5. [Verify the cluster](#step-5-verify-the-cluster). - -## Step 1. Clone the GitHub repo - -Clone the GitHub repository `apache/cloudberry` to the target machine: - -```shell -git clone https://github.com/apache/cloudberry.git -``` - -## Step 2. Install dependencies - -Enter the repository and install dependencies according to your operating systems: - -- [For CentOS 7](#for-centos-7) -- [For RHEL 8 or Rocky Linux 8](#for-rhel-8-or-rocky-linux-8) -- [For Ubuntu 18.04 or later](#for-ubuntu-1804-or-later) - -### For CentOS 7 - -> [!WARNING] -> CentOS Linux 7 reached the end of life (EOL) on June 30, 2024. You can change the mirror to vault.centos.org to install software. - -The following steps work on CentOS 7. For other CentOS versions, these steps might work but are not guaranteed to work. - -1. Run the bash script `README.CentOS.bash` in the `deploy/build` directory of the `apache/cloudberry` repository. To run this script, password is required. Then, some required dependencies will be automatically downloaded. - - ```bash - cd cloudberry/deploy/build - ./README.CentOS.bash - ``` - -2. Install additional packages required for configurations. - - ```bash - yum -y install R apr apr-devel apr-util automake autoconf bash bison bison-devel bzip2 bzip2-devel centos-release-scl curl flex flex-devel gcc gcc-c++ git gdb iproute krb5-devel less libcurl libcurl-devel libevent libevent-devel libxml2 libxml2-devel libyaml libzstd-devel libzstd make openldap openssh openssh-clients openssh-server openssl openssl-devel openssl-libs perl python3-devel readline readline-devel rsync sed sudo tar vim wget which xerces-c-devel zip zlib && \ - yum -y install epel-release - ``` - -3. Update the GNU Compiler Collection (GCC) to version `devtoolset-10` to support C++ 14. - - ```bash - yum install centos-release-scl - yum -y install devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-binutils - scl enable devtoolset-10 bash - source /opt/rh/devtoolset-10/enable - echo "source /opt/rh/devtoolset-10/enable" >> /etc/bashrc - source /etc/bashrc - gcc -v - ``` - -4. Link cmake3 to cmake: - - ```bash - sudo ln -sf /usr/bin/cmake3 /usr/local/bin/cmake - ``` - -### For RHEL 8 or Rocky Linux 8 - -1. Install Development Tools. - - ```bash - sudo yum group install -y "Development Tools" - ``` - -2. Install dependencies: - - ```bash - sudo yum install -y epel-release - - sudo yum install -y apr-devel bison bzip2-devel cmake3 flex gcc gcc-c++ krb5-devel libcurl-devel libevent-devel libkadm5 libxml2-devel libzstd-devel openssl-devel perl-ExtUtils-Embed python3-devel python3-pip readline-devel xerces-c-devel zlib-devel - ``` - -3. Install more dependencies by running the `README.Rhel-Rocky.bash` script. - - ```bash - ~/cloudberry/deploy/build/README.Rhel-Rocky.bash - ``` - -### For Ubuntu 18.04 or later - -1. Install dependencies by running the `README.Ubuntu.bash` script in the `deploy/build` directory. - - ```shell - # You need to enter your password to run. - sudo ~/cloudberry/deploy/build/README.Ubuntu.bash - ``` - - > [!Note] - > - When you run the `README.Ubuntu.bash` script for dependencies, you will be asked to configure `realm` for Kerberos. You can enter any realm, because this is just for testing, and during testing, it will reconfigure a local server/client. If you want to skip this manual configuration, run `export DEBIAN_FRONTEND=noninteractive`. - > - If the script fails to download packages, we recommend that you can try another one software source for Ubuntu. - -2. Install GCC 10. Ubuntu 18.04 and later versions should use GCC 10 or later: - - ```bash - # Install gcc-10. - sudo apt install software-properties-common - sudo add-apt-repository ppa:ubuntu-toolchain-r/test - sudo apt install gcc-10 g++-10 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 - ``` - -## Step 3. Perform prerequisite platform tasks - -After you have installed all the dependencies for your operating system, it is time to do some prerequisite platform tasks before you go on building Apache Cloudberry. These operations include manually running `ldconfig`, creating the `gpadmin` user, and setting up a password to start the Apache Cloudberry and test. - -1. Make sure that you add `/usr/local/lib` and `/usr/local/lib64` to the `/etc/ld.so.conf` file. - - ```bash - echo -e "/usr/local/lib \n/usr/local/lib64" >> /etc/ld.so.conf - ldconfig - ``` - -2. Create the `gpadmin` user and set up the SSH key. Manually create SSH keys based on different operating systems, so that you can run `ssh localhost` without a password. - - - For CentOS, RHEL, and Rocky Linux: - - ```bash - useradd gpadmin # Creates gpadmin user - su - gpadmin # Uses the gpadmin user - ssh-keygen # Creates SSH key - cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys - chmod 600 ~/.ssh/authorized_keys - exit - ``` - - - For Ubuntu: - - ```bash - useradd -r -m -s /bin/bash gpadmin # Creates gpadmin user - su - gpadmin # Uses the gpadmin user - ssh-keygen # Creates SSH key - cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys - chmod 600 ~/.ssh/authorized_keys - exit - ``` - -## Step 4. Build Apache Cloudberry - -After you have installed all the dependencies and performed the prerequisite platform tasks, you can start to build Apache Cloudberry. Run the following commands in sequence. - -1. Configure the build environment. Enter the `cloudberry` directory and run the `configure` script. - - ```bash - cd cloudberry - ./configure --with-perl --with-python --with-libxml --with-gssapi --prefix=/usr/local/cloudberry - ``` - - > [!Note] - > Cloudberry is built with GPORCA by default. If you want to build Cloudberry without GPORCA, add the `--disable-orca` flag in the `./configure` command. - > - > ```bash - > ./configure --disable-orca --with-perl --with-python --with-libxml --prefix=/usr/local/cloudberry - > ``` - -2. Compile the code and install the database. - - ```bash - make -j8 - make -j8 install - ``` - -3. Bring in the Cloudberry environment for your running shell. - - ```bash - cd .. - cp -r cloudberry/ /home/gpadmin/ - cd /home/gpadmin/ - chown -R gpadmin:gpadmin cloudberry/ - su - gpadmin - cd cloudberry/ - source /usr/local/cloudberry/cloudberry-env.sh - ``` - -4. Start the demo cluster. - - - For CentOS: - - ```bash - scl enable devtoolset-10 bash - source /opt/rh/devtoolset-10/enable - make create-demo-cluster - ``` - - - For Ubuntu, Rocky, and RHEL: - - ```bash - make create-demo-cluster - ``` - -5. Prepare the test by running the following command. This command will configure the port and environment variables for the test. - - Environment variables such as `PGPORT` and `MASTER_DATA_DIRECTORY` will be configured, which are the default port and the data directory of the master node. - - ```bash - source gpAux/gpdemo/gpdemo-env.sh - ``` - -## Step 5. Verify the cluster - -1. You can verify whether the cluster has started successfully by running the following command. If successful, you can see multiple active `postgres` processes with ports ranging from `7000` to `7007`. - - ```bash - ps -ef | grep postgres - ``` - -2. Connect to the Apache Cloudberry and see the active segment information by querying the system table `gp_segement_configuration`. For detailed description of this table, see the Greenplum document [here](https://docs.vmware.com/en/VMware-Greenplum/6/greenplum-database/ref_guide-system_catalogs-gp_segment_configuration.html). - - ```sql - $ psql -p 7000 postgres - psql (14.4, server 14.4) - Type "help" for help. - - postgres=# select version(); - version - ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - PostgreSQL 14.4 (Apache Cloudberry 1.0.0+1c0d6e2224 build dev) on x86_64( GCC 13.2.0) 13.2.0, 64-bit compiled on Sep 22 2023 10:56:01 - (1 row) - - postgres=# select * from gp_segment_configuration; - dbid | content | role | preferred_role | mode | status | port | hostname | address | datadir | warehouseid - ------+---------+------+----------------+------+--------+------+------------+------------+------------------------------------------------------------------------------+------------- - 1 | -1 | p | p | n | u | 7000 | i-6wvpa9wt | i-6wvpa9wt | /home/gpadmin/cloudberry/gpAux/gpdemo/datadirs/qddir/demoDataDir-1 | 0 - 8 | -1 | m | m | s | u | 7001 | i-6wvpa9wt | i-6wvpa9wt | /home/gpadmin/cloudberry/gpAux/gpdemo/datadirs/standby | 0 - 3 | 1 | p | p | s | u | 7003 | i-6wvpa9wt | i-6wvpa9wt | /home/gpadmin/cloudberry/gpAux/gpdemo/datadirs/dbfast2/demoDataDir1 | 0 - 6 | 1 | m | m | s | u | 7006 | i-6wvpa9wt | i-6wvpa9wt | /home/gpadmin/cloudberry/gpAux/gpdemo/datadirs/dbfast_mirror2/demoDataDir1 | 0 - 2 | 0 | p | p | s | u | 7002 | i-6wvpa9wt | i-6wvpa9wt | /home/gpadmin/cloudberry/gpAux/gpdemo/datadirs/dbfast1/demoDataDir0 | 0 - 5 | 0 | m | m | s | u | 7005 | i-6wvpa9wt | i-6wvpa9wt | /home/gpadmin/cloudberry/gpAux/gpdemo/datadirs/dbfast_mirror1/demoDataDir0 | 0 - 4 | 2 | p | p | s | u | 7004 | i-6wvpa9wt | i-6wvpa9wt | /home/gpadmin/cloudberry/gpAux/gpdemo/datadirs/dbfast3/demoDataDir2 | 0 - 7 | 2 | m | m | s | u | 7007 | i-6wvpa9wt | i-6wvpa9wt | /home/gpadmin/cloudberry/gpAux/gpdemo/datadirs/dbfast_mirror3/demoDataDir2 | 0 - (8 rows) - ``` diff --git a/deploy/build/README.Rhel-Rocky.bash b/deploy/build/README.Rhel-Rocky.bash deleted file mode 100755 index 8fdf57c781e..00000000000 --- a/deploy/build/README.Rhel-Rocky.bash +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash - -# Install needed packages. Please add to this list if you discover additional prerequisites -sudo yum group install -y "Development Tools" -INSTALL_PKGS="apr-devel bison bzip2-devel cmake3 epel-release flex gcc gcc-c++ krb5-devel libcurl-devel libevent-devel libkadm5 libxml2-devel libzstd-devel openssl-devel python39 python39-devel python39-psutil python3-pip perl-ExtUtils-MakeMaker.noarch perl-ExtUtils-Embed.noarch readline-devel rsync xerces-c-devel zlib-devel python3-psutil python3-pyyaml python3-psycopg2" - -sudo yum install -y $INSTALL_PKGS - -sudo yum --enablerepo=powertools install -y libyaml-devel - -sudo yum install -y postgresql -sudo yum install -y postgresql-devel - -pip3.9 install -r ../../python-dependencies.txt - -#Remove the python3 softlink because on Rocky8 its pointing to python3.6 by default. We need python3.9 for gpdb7. -sudo rm -rf /usr/bin/python3 -sudo ln -s /usr/bin/python3.9 /usr/bin/python3 - -#For all Greenplum Database host systems running RHEL, CentOs or Rocky8, SELinux must either be Disabled or configured to allow unconfined access to Greenplum processes, directories, and the gpadmin user. -setenforce 0 -sudo tee -a /etc/selinux/config << EOF -SELINUX=disabled -EOF - -#To prevent SELinux-related SSH authentication denials that could occur even with SELinux deactivated -sudo tee -a /etc/sssd/sssd.conf << EOF -selinux_provider=none -EOF - -sudo systemctl stop firewalld.service - -#Configure kernel settings so the system is optimized for Greenplum Database. -sudo tee -a /etc/sysctl.d/10-gpdb.conf << EOF -kernel.msgmax = 65536 -kernel.msgmnb = 65536 -kernel.msgmni = 2048 -kernel.sem = 500 2048000 200 8192 -kernel.shmmni = 1024 -kernel.core_uses_pid = 1 -kernel.core_pattern=/var/core/core.%h.%t -kernel.sysrq = 1 -net.core.netdev_max_backlog = 2000 -net.core.rmem_max = 4194304 -net.core.wmem_max = 4194304 -net.core.rmem_default = 4194304 -net.core.wmem_default = 4194304 -net.ipv4.tcp_rmem = 4096 4224000 16777216 -net.ipv4.tcp_wmem = 4096 4224000 16777216 -net.core.optmem_max = 4194304 -net.core.somaxconn = 10000 -net.ipv4.ip_forward = 0 -net.ipv4.tcp_congestion_control = cubic -net.ipv4.tcp_tw_recycle = 0 -net.core.default_qdisc = fq_codel -net.ipv4.tcp_mtu_probing = 0 -net.ipv4.conf.all.arp_filter = 1 -net.ipv4.conf.default.accept_source_route = 0 -net.ipv4.ip_local_port_range = 10000 65535 -net.ipv4.tcp_max_syn_backlog = 4096 -net.ipv4.tcp_syncookies = 1 -net.ipv4.ipfrag_high_thresh = 41943040 -net.ipv4.ipfrag_low_thresh = 31457280 -net.ipv4.ipfrag_time = 60 -net.ipv4.ip_local_reserved_ports=65330 -vm.overcommit_memory = 2 -vm.overcommit_ratio = 95 -vm.swappiness = 10 -vm.dirty_expire_centisecs = 500 -vm.dirty_writeback_centisecs = 100 -vm.zone_reclaim_mode = 0 -EOF - -RAM_IN_KB=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'` -RAM_IN_BYTES=$(($RAM_IN_KB*1024)) -echo "vm.min_free_kbytes = $(($RAM_IN_BYTES*3/100/1024))" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null -echo "kernel.shmall = $(($RAM_IN_BYTES/2/4096))" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null -echo "kernel.shmmax = $(($RAM_IN_BYTES/2))" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null -if [ $RAM_IN_BYTES -le $((64*1024*1024*1024)) ]; then - echo "vm.dirty_background_ratio = 3" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null - echo "vm.dirty_ratio = 10" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null -else - echo "vm.dirty_background_ratio = 0" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null - echo "vm.dirty_ratio = 0" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null - echo "vm.dirty_background_bytes = 1610612736 # 1.5GB" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null - echo "vm.dirty_bytes = 4294967296 # 4GB" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null -fi - -sudo sysctl -p - -sudo tee -a /etc/security/limits.d/10-nproc.conf << EOF -* soft nofile 524288 -* hard nofile 524288 -* soft nproc 131072 -* hard nproc 131072 -* soft core unlimited -EOF - - -ulimit -n 65536 65536 - diff --git a/deploy/build/README.Ubuntu.bash b/deploy/build/README.Ubuntu.bash deleted file mode 100755 index ec9ca3ee752..00000000000 --- a/deploy/build/README.Ubuntu.bash +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -sudo apt-get update -sudo apt-get install -y \ - bison \ - ccache \ - cmake \ - curl \ - flex \ - git-core \ - gcc \ - g++ \ - inetutils-ping \ - krb5-kdc \ - krb5-admin-server \ - libapr1-dev \ - libbz2-dev \ - libcurl4-gnutls-dev \ - libevent-dev \ - libkrb5-dev \ - libpam-dev \ - libperl-dev \ - libreadline-dev \ - libssl-dev \ - libxerces-c-dev \ - libxml2-dev \ - libyaml-dev \ - libzstd-dev \ - locales \ - net-tools \ - ninja-build \ - openssh-client \ - openssh-server \ - openssl \ - pkg-config \ - python3-dev \ - python3-pip \ - python3-psutil \ - python3-pygresql \ - python3-yaml \ - zlib1g-dev - -pip3 install conan - -sudo tee -a /etc/sysctl.conf << EOF -kernel.shmmax = 5000000000000 -kernel.shmmni = 32768 -kernel.shmall = 40000000000 -kernel.sem = 1000 32768000 1000 32768 -kernel.msgmnb = 1048576 -kernel.msgmax = 1048576 -kernel.msgmni = 32768 - -net.core.netdev_max_backlog = 80000 -net.core.rmem_default = 2097152 -net.core.rmem_max = 16777216 -net.core.wmem_max = 16777216 - -vm.overcommit_memory = 2 -vm.overcommit_ratio = 95 -EOF - -sudo sysctl -p - -sudo mkdir -p /etc/security/limits.d -sudo tee -a /etc/security/limits.d/90-greenplum.conf << EOF -* soft nofile 1048576 -* hard nofile 1048576 -* soft nproc 1048576 -* hard nproc 1048576 -EOF - -ulimit -n 65536 65536 diff --git a/deploy/build/README.macOS.bash b/deploy/build/README.macOS.bash deleted file mode 100755 index 1d32bc29ee7..00000000000 --- a/deploy/build/README.macOS.bash +++ /dev/null @@ -1,114 +0,0 @@ -#!/bin/bash - -echo "Caching password..." -sudo -K -sudo true; - -if [ ! -d /tmp/cbdb-devenv ] ; then - mkdir /tmp/cbdb-devenv && cd /tmp/cbdb-devenv || exit -fi - -if hash brew 2>/dev/null; then - echo "Homebrew is already installed!" -else - echo "Installing Homebrew..." - echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - if [ $? -eq 1 ]; then - echo "ERROR : Homebrew Installation Failed, fix the failure and re-run the script." - exit 1 - fi -fi - -brew install bash-completion -brew install conan -brew install cmake # gporca -#brew install xerces-c #gporca -brew install libyaml # enables `--enable-mapreduce` -brew install libevent # gpfdist -brew install apr # gpfdist -brew install apr-util # gpfdist -brew install zstd -brew install pkg-config -brew install perl -brew link --force apr -brew link --force apr-util -brew install gcc@13 -brew install gnu-sed - -#Install xerces-c library -if [ ! -d /tmp/cbdb-devenv/gp-xerces ] ; then - echo "INFO: xerces is not installed, Installing...." - git clone https://github.com/greenplum-db/gp-xerces.git -v /tmp/cbdb-devenv/gp-xerces - mkdir /tmp/cbdb-devenv/gp-xerces/build - cd /tmp/cbdb-devenv/gp-xerces/build || exit - /tmp/cbdb-devenv/gp-xerces/configure --prefix="$(brew --prefix)" - make -j"$(nproc)" - make install - cd - || exit -fi - -# Needed for pygresql, or you can source cloudberry-env.sh after compiling database and installing python-dependencies then -brew install postgresql@14 - -brew install python3 - -# Due to recent update on OS net-tools package. Mac doesn't have support for ss and ip by default. -# Hence as a workaround installing iproute2mac for ip support and creating soft link for ss support -brew install iproute2mac -sudo ln -s /usr/sbin/netstat "$(brew --prefix)"/bin/ss - -echo 127.0.0.1$'\t'$HOSTNAME | sudo tee -a /etc/hosts - -# OS settings -sudo sysctl -w kern.sysv.shmmax=2147483648 -sudo sysctl -w kern.sysv.shmmin=1 -sudo sysctl -w kern.sysv.shmmni=64 -sudo sysctl -w kern.sysv.shmseg=16 -sudo sysctl -w kern.sysv.shmall=524288 -sudo sysctl -w net.inet.tcp.msl=60 - -sudo sysctl -w net.local.dgram.recvspace=262144 -sudo sysctl -w net.local.dgram.maxdgram=16384 -sudo sysctl -w kern.maxfiles=131072 -sudo sysctl -w kern.maxfilesperproc=131072 -sudo sysctl -w net.inet.tcp.sendspace=262144 -sudo sysctl -w net.inet.tcp.recvspace=262144 -sudo sysctl -w kern.ipc.maxsockbuf=8388608 - -sudo tee -a /etc/sysctl.conf << EOF -kern.sysv.shmmax=2147483648 -kern.sysv.shmmin=1 -kern.sysv.shmmni=64 -kern.sysv.shmseg=16 -kern.sysv.shmall=524288 -net.inet.tcp.msl=60 - -net.local.dgram.recvspace=262144 -net.local.dgram.maxdgram=16384 -kern.maxfiles=131072 -kern.maxfilesperproc=131072 -net.inet.tcp.sendspace=262144 -net.inet.tcp.recvspace=262144 -kern.ipc.maxsockbuf=8388608 -EOF - -# Configure -cat >> ~/.bashrc << EOF -ulimit -n 131072 131072 # Increases the number of open files -export PGHOST="$(hostname)" -export LC_CTYPE="en_US.UTF-8" -EOF - -cat >> ~/.zshrc << EOF -source ~/.bashrc -EOF - -cat << EOF - -================ - -Please source cloudberry-env.sh after compiling database, then - -pip3 install --user -r ../../python-dependencies.txt - -EOF diff --git a/deploy/build/README.macOS.md b/deploy/build/README.macOS.md deleted file mode 100644 index 51e99e40947..00000000000 --- a/deploy/build/README.macOS.md +++ /dev/null @@ -1,132 +0,0 @@ -# Compile and Install Apache Cloudberry on macOS - -This document shares how to build, compile, and install Apache Cloudberry on macOS for development purposes. Follow the steps below. - -According to our test, these steps work well on macOS Ventura 13.4+ with both Intel and Apple silicon processors (M1 or M2). If you have an older version of macOS, upgrading is recommended. - -## Step 1. Install needed dependencies - -Run the following command to install the needed dependencies. You will be asked to enter the `sudo` password of your macOS system. - -```bash -source deploy/build/README.macOS.bash -``` - -> [!NOTE] -> This will install [Homebrew](https://brew.sh/) if missing. - -## Step 2. Enable password-free SSH connection to localhost - -1. Enable **Remote Login** on your macOS system by navigating to **System Preferences** \> **Sharing** \> **Remote Login**. -2. Run the following command to verify whether password-free SSH connection to localhost has been enabled on your operating system. - - ```bash - ssh $(hostname) - ``` - - - If this command runs without error or requiring you to enter a password, run `exit` and go to [Step 3. Configure, compile, and install](#step-3-configure-compile-and-install). - - If you are required to enter a password, take the following steps to set up password-free SSH connection. - - 1. Run `ssh-keygen` and then `cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys`. - 2. Run `ssh $(hostname)` again to check whether password-free connection is ready. - 3. If ready, run `exit` and go to [Step 3. Configure, compile, and install](#step-3-configure-compile-and-install). - -> [!NOTE] -> -> - If it is the first time you are using `ssh` connection to localhost, you might need to accept the trust on the first use prompt: -> -> ```bash -> The authenticity of host '<your hostname>' can't be established. -> ECDSA key fingerprint is SHA256:<fingerprint here>. -> Are you sure you want to continue connecting (yes/no)? -> ``` -> -> - If your hostname does not resolve, try adding your machine name to `/etc/hosts`: -> -> ```bash -> echo -e "127.0.0.1\t$HOSTNAME" | sudo tee -a /etc/hosts -> ``` - -## Step 3. Configure, compile, and install - -```bash -# Run the following commands under the `cloudberry/` dir. -# 1. Configure the build environment. - -BREWPREFIX=$(brew --prefix); export PATH="$BREWPREFIX/opt/gnu-sed/libexec/gnubin:$BREWPREFIX/opt/apr/bin:$PATH"; CXXFLAGS="-I $BREWPREFIX/include" CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer -I $BREWPREFIX/include" LDFLAGS="-L $BREWPREFIX/lib" CC=$(which gcc-13) CXX=$(which g++-13) ./configure --enable-debug --prefix=$(cd ~; pwd)/install/cbdb; - -# 2. Compile and install Apache Cloudberry. - -make -j8 -make -j8 install - -# 3. Bring in Cloudberry environment for Apache Cloudberry into your running shell. - -source $(cd ~; pwd)/install/cbdb/cloudberry-env.sh - -# 4. Install the Python dependencies. - -pip3 install --user -r python-dependencies.txt - -# 5. Start a demo cluster. - -PORT_BASE=8000 make create-demo-cluster - -# gpdemo-env.sh contains PGPORT, COORDINATOR_DATA_DIRECTORY and MASTER_DATA_DIRECTORY values -source gpAux/gpdemo/gpdemo-env.sh -``` - -## Step 4. Verify the cluster - -1. You can verify whether the cluster has started successfully by running the following command. You will see many active `postgres` processes with ports ranging from `8000` to `8007`. - - ```bash - ps -ef | grep postgres - ``` - -2. Connect to the Apache Cloudberry and see the active segment information by querying the system table `gp_segement_configuration`. For detailed description of this table, see the Greenplum document [here](https://docs.vmware.com/en/VMware-Greenplum/6/greenplum-database/ref_guide-system_catalogs-gp_segment_configuration.html). - - ```sql - $ psql -p 8000 postgres - postgres=# select version(); - postgres=# select * from gp_segment_configuration; - ``` - - Example output: - - ```shell - $ psql -p 8000 postgres - psql (14.4, server 14.4) - Type "help" for help. - - postgres=# select version(); - version - ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - PostgreSQL 14.4 (Apache Cloudberry 1.0.0+1c0d6e2224 build dev) on x86_64-apple-darwin22.4.0, compiled by gcc-13 (Homebrew GCC 13.2.0) 13.2.0, 64-bit compiled on Sep 22 2023 10:56:01 - (1 row) - - postgres=# select * from gp_segment_configuration; - dbid | content | role | preferred_role | mode | status | port | hostname | address | datadir | warehouseid - ------+---------+------+----------------+------+--------+------+-----------------------------+-----------------------------+----------------------------------------------------------------------------------------------------------+------------- - 1 | -1 | p | p | n | u | 8000 | hashdatas-MacBook-Pro.local | hashdatas-MacBook-Pro.local | /Users/hashdata/Documents/GitHub/upstream/cloudberry/gpAux/gpdemo/datadirs/qddir/demoDataDir-1 | 0 - 8 | -1 | m | m | s | u | 8001 | hashdatas-MacBook-Pro.local | hashdatas-MacBook-Pro.local | /Users/hashdata/Documents/GitHub/upstream/cloudberry/gpAux/gpdemo/datadirs/standby | 0 - 3 | 1 | p | p | s | u | 8003 | hashdatas-MacBook-Pro.local | hashdatas-MacBook-Pro.local | /Users/hashdata/Documents/GitHub/upstream/cloudberry/gpAux/gpdemo/datadirs/dbfast2/demoDataDir1 | 0 - 6 | 1 | m | m | s | u | 8006 | hashdatas-MacBook-Pro.local | hashdatas-MacBook-Pro.local | /Users/hashdata/Documents/GitHub/upstream/cloudberry/gpAux/gpdemo/datadirs/dbfast_mirror2/demoDataDir1 | 0 - 2 | 0 | p | p | s | u | 8002 | hashdatas-MacBook-Pro.local | hashdatas-MacBook-Pro.local | /Users/hashdata/Documents/GitHub/upstream/cloudberry/gpAux/gpdemo/datadirs/dbfast1/demoDataDir0 | 0 - 5 | 0 | m | m | s | u | 8005 | hashdatas-MacBook-Pro.local | hashdatas-MacBook-Pro.local | /Users/hashdata/Documents/GitHub/upstream/cloudberry/gpAux/gpdemo/datadirs/dbfast_mirror1/demoDataDir0 | 0 - 4 | 2 | p | p | s | u | 8004 | hashdatas-MacBook-Pro.local | hashdatas-MacBook-Pro.local | /Users/hashdata/Documents/GitHub/upstream/cloudberry/gpAux/gpdemo/datadirs/dbfast3/demoDataDir2 | 0 - 7 | 2 | m | m | s | u | 8007 | hashdatas-MacBook-Pro.local | hashdatas-MacBook-Pro.local | /Users/hashdata/Documents/GitHub/upstream/cloudberry/gpAux/gpdemo/datadirs/dbfast_mirror3/demoDataDir2 | 0 - (8 rows) - - postgres=# - ``` - -3. Now we can finally run `installcheck-world` to test everything works fine: - - ```bash - # In the folder where your cloned the source code - make installcheck-world - ``` - -Congratulations 🎉! You've successfully installed and created a Cloudberry cluster. Happy Hacking! 😉 - diff --git a/deploy/build/README.md b/deploy/build/README.md deleted file mode 100644 index 0d9cf57eb9b..00000000000 --- a/deploy/build/README.md +++ /dev/null @@ -1,116 +0,0 @@ -<!-- For a better file structure, we moved this guide from original -Greenplum Database READE.md here. Thanks all the original writers.--> - -# Build Apache Cloudberry from Source Code - -This guides describes how to build Apache Cloudberry from source code. - -- For building on Linux systems, see [Compile and Install Apache Cloudberry on Linux](./README.Linux.md). -- For building on macOS system, see [Compile and Install Apache Cloudberry on macOS](./README.macOS.md). - -## Build the database - -``` -# Configure build environment to install at /usr/local/cloudberry -./configure --with-perl --with-python --with-libxml --with-gssapi --prefix=/usr/local/cloudberry - -# Compile and install -make -j8 -make -j8 install - -# Bring in cloudberry environment for CBDB into your running shell -source /usr/local/cloudberry/cloudberry-env.sh - -# Start demo cluster -make create-demo-cluster -# (gpdemo-env.sh contains __PGPORT__, __COORDINATOR_DATA_DIRECTORY__ and __MASTER_DATA_DIRECTORY__ values) -source gpAux/gpdemo/gpdemo-env.sh -``` - -- The directory and the TCP ports for the demo cluster can be changed on the fly. -Instead of `make cluster`, consider: - -``` -DATADIRS=/tmp/cbdb-cluster PORT_BASE=5555 make cluster -``` - -- The TCP port for the regression test can be changed on the fly: - -``` -PGPORT=5555 make installcheck-world -``` - -- To turn GPORCA off and use Postgres planner for query optimization: -``` -set optimizer=off; -``` - -- If you want to clean all generated files -``` -make distclean -``` - -## Running tests - -* The default regression tests - -``` -make installcheck-world -``` - -* The top-level target __installcheck-world__ will run all regression - tests in CBDB against the running cluster. For testing individual - parts, the respective targets can be run separately. - -* The PostgreSQL __check__ target does not work. Setting up a - Apache Cloudberry cluster is more complicated than a single-node - PostgreSQL installation, and no-one's done the work to have __make - check__ create a cluster. Create a cluster manually or use - gpAux/gpdemo/ (example below) and run the toplevel __make - installcheck-world__ against that. Patches are welcome! - -* The PostgreSQL __installcheck__ target does not work either, because - some tests are known to fail with Apache Cloudberry. The - __installcheck-good__ schedule in __src/test/regress__ excludes - those tests. - -* When adding a new test, please add it to one of the CBDB-specific tests, - in greenplum_schedule, rather than the PostgreSQL tests inherited from the - upstream. We try to keep the upstream tests identical to the upstream - versions, to make merging with newer PostgreSQL releases easier. - -# Alternative Configurations - -## Building Apache Cloudberry without GPORCA - -Currently, CBDB is built with GPORCA by default. If you want to build CBDB -without GPORCA, configure requires `--disable-orca` flag to be set. - -``` -# Clean environment -make distclean - -# Configure build environment to install at /usr/local/cloudberry -./configure --disable-orca --with-perl --with-python --with-libxml --prefix=/usr/local/cloudberry -``` - -## Building Apache Cloudberry with PXF - -PXF is an extension framework for Greenplum Database/Apache Cloudberry -to enable fast access to external Hadoop datasets. Refer to -[PXF extension](../../gpcontrib/pxf_fdw/README.md) for more information. - -Currently, Cloudberry is built with PXF by default (--enable-pxf is on). -In order to build Cloudberry without pxf, simply invoke `./configure` with additional option `--disable-pxf`. -PXF requires curl, so `--enable-pxf` is not compatible with the `--without-libcurl` option. - -## Building Apache Cloudberry with Python3 enabled - -Apache Cloudberry supports Python3 with plpython3u UDF - -See [how to enable Python3](../../src/pl/plpython/README.md) for details. - - -# Development with Vagrant - -There is a Vagrant-based [quickstart guide for developers](../vagrant/README.md). diff --git a/gpAux/gpdemo/gpdemo-defaults.sh b/gpAux/gpdemo/gpdemo-defaults.sh index 12ffa40b2d3..8823a19c966 100755 --- a/gpAux/gpdemo/gpdemo-defaults.sh +++ b/gpAux/gpdemo/gpdemo-defaults.sh @@ -1,4 +1,20 @@ #!/usr/bin/env bash +# 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. USAGE() { echo "" diff --git a/gpMgmt/bin/gpdemo b/gpMgmt/bin/gpdemo index 0717136d20a..39f0ae50669 100755 --- a/gpMgmt/bin/gpdemo +++ b/gpMgmt/bin/gpdemo @@ -1,4 +1,20 @@ #!/usr/bin/env bash +# 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. WORKDIR=$(dirname "$0") GPDEMO_LIB=$WORKDIR/lib/gpdemo diff --git a/gpMgmt/bin/gpshrink b/gpMgmt/bin/gpshrink index 05b4966ee19..6a8d8f5a11f 100644 --- a/gpMgmt/bin/gpshrink +++ b/gpMgmt/bin/gpshrink @@ -1,8 +1,22 @@ #!/usr/bin/env python3 # Line too long - pylint: disable=C0301 # Invalid name - pylint: disable=C0103 +# 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 # -# Copyright (c) Greenplum Inc 2008. All Rights Reserved. +# 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. # from gppylib.mainUtils import getProgramName diff --git a/pom.xml b/pom.xml index 0284a510fce..ef1a10a6c7f 100644 --- a/pom.xml +++ b/pom.xml @@ -157,16 +157,10 @@ code or new licensing patterns. <exclude>.git-blame-ignore-revs</exclude> <exclude>.dir-locals.el</exclude> <exclude>GNUmakefile.in</exclude> - <exclude>.github/DISCUSSION_TEMPLATE/ideas-feature-requests.yml</exclude> - <exclude>.github/DISCUSSION_TEMPLATE/proposal.yml</exclude> - <exclude>.github/full_color_black.svg</exclude> - <exclude>.github/ISSUE_TEMPLATE/bug-report.yml</exclude> - <exclude>.github/ISSUE_TEMPLATE/config.yml</exclude> - <exclude>.github/full_color_white.svg</exclude> <exclude>.gitattributes</exclude> <exclude>gpMgmt/demo/gpfdist_transform/**</exclude> - + <exclude>gpMgmt/demo/gppkg/sample-sources.tar.gz</exclude> <exclude>gpMgmt/demo/gppkg/sample.control</exclude> <exclude>gpMgmt/demo/gppkg/sample.spec</exclude> <exclude>gpMgmt/demo/gppkg/gppkg_spec.yml.in</exclude> @@ -179,7 +173,6 @@ code or new licensing patterns. <exclude>gpMgmt/bin/gpload_test/gpload2/*.ans</exclude> <exclude>gpMgmt/bin/gpload_test/gpload2/data/**</exclude> - <exclude>gpMgmt/bin/gpdemo</exclude> <exclude>gpMgmt/bin/gpcheckperf</exclude> <exclude>gpMgmt/bin/test/gpinitsystem_test.bash</exclude> <exclude>gpMgmt/bin/test/suite.bash</exclude> @@ -338,14 +331,11 @@ code or new licensing patterns. <exclude>.abi-check/**</exclude> - <exclude>deploy/**</exclude> - <exclude>.clang-tidy</exclude> <exclude>putversion</exclude> <exclude>.gitmodules</exclude> <exclude>.editorconfig</exclude> - <exclude>sonar-project.properties</exclude> - + <exclude>contrib/**/Makefile</exclude> <exclude>contrib/**/*.control</exclude> <exclude>contrib/**/*.source</exclude> @@ -382,37 +372,6 @@ code or new licensing patterns. <exclude>contrib/unaccent/unaccent.rules</exclude> <exclude>contrib/unaccent/generate_unaccent_rules.py</exclude> - <exclude>contrib/pax_storage/src/test/**</exclude> - - <exclude>contrib/pax_storage/init_file</exclude> - <exclude>contrib/pax_storage/tools/gen_sql.c</exclude> - <exclude>contrib/pax_storage/CMakeLists.txt</exclude> - <exclude>contrib/pax_storage/hd-ci/clang_tidy_pax.bash</exclude> - <exclude>contrib/pax_storage/hd-ci/compile_pax.bash</exclude> - <exclude>contrib/pax_storage/.clang-tidy</exclude> - <exclude>contrib/pax_storage/pax_schedule</exclude> - <exclude>contrib/pax_storage/FindDependencies.cmake</exclude> - <exclude>contrib/pax_storage/.clang-format</exclude> - <exclude>contrib/pax_storage/src/cpp/CMakeLists.txt</exclude> - <exclude>contrib/pax_storage/src/cpp/cmake/pax_format.cmake</exclude> - <exclude>contrib/pax_storage/src/cpp/cmake/pax.cmake</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/CPPLINT.cfg</exclude> - <exclude>contrib/pax_storage/src/cpp/storage/proto/micro_partition_stats.proto</exclude> - <exclude>contrib/pax_storage/src/cpp/storage/proto/pax.proto</exclude> - <exclude>contrib/pax_storage/src/cpp/storage/proto/CPPLINT.cfg</exclude> - <exclude>contrib/pax_storage/src/api/python3/paxfile_type.cc</exclude> - <exclude>contrib/pax_storage/src/api/python3/CMakeLists.txt</exclude> - <exclude>contrib/pax_storage/src/api/python3/test/paxpy_test.py</exclude> - <exclude>contrib/pax_storage/src/api/python3/paxpy_modules.cc</exclude> - <exclude>contrib/pax_storage/src/api/python3/paxpy_comm.h</exclude> - <exclude>contrib/pax_storage/src/api/python3/setup-debug.py</exclude> - <exclude>contrib/pax_storage/src/api/python3/MANIFEST.in</exclude> - <exclude>contrib/pax_storage/src/api/python3/paxfilereader_type.cc</exclude> - <exclude>contrib/pax_storage/src/api/python3/setup.py</exclude> - <exclude>contrib/pax_storage/src/api/python3/paxtype_cast.cc</exclude> - <exclude>contrib/pax_storage/src/api/python3/setup.cfg</exclude> - <exclude>contrib/pax_storage/src/api/python3/paxpy_types.h</exclude> - <exclude>contrib/cube/cubeparse.y</exclude> <exclude>contrib/cube/CHANGES</exclude> <exclude>contrib/cube/cubedata.h</exclude> @@ -510,7 +469,6 @@ code or new licensing patterns. <exclude>contrib/pgcrypto/rijndael.tbl</exclude> <exclude>contrib/pgcrypto/rijndael.h</exclude> <exclude>contrib/pgcrypto/crypt-blowfish.c</exclude> - <exclude>contrib/pgcrypto/sm4.h</exclude> <exclude>contrib/pgcrypto/package/gppkg_spec.yml.in</exclude> <exclude>contrib/pgcrypto/package/pgcrypto.spec</exclude> @@ -581,7 +539,6 @@ code or new licensing patterns. <exclude>contrib/formatter_fixedwidth/fixedwidth.c</exclude> - <exclude>gpAux/gpdemo/gpdemo-defaults.sh</exclude> <exclude>gpAux/gpdemo/Makefile</exclude> <exclude>gpAux/gpdemo/demo_cluster.sh</exclude> <exclude>gpAux/gpdemo/lalshell</exclude> @@ -997,11 +954,6 @@ code or new licensing patterns. <exclude>src/include/gpopt/utils/COptTasks.h</exclude> <exclude>src/include/gpopt/.clang-format</exclude> <exclude>src/include/pg_config.h.win32</exclude> - <exclude>src/include/task/bitstring.h</exclude> - <exclude>src/include/task/cron.h</exclude> - <exclude>src/include/task/pg_cron.h</exclude> - <exclude>src/include/task/task_states.h</exclude> - <exclude>src/include/task/job_metadata.h</exclude> <exclude>src/include/libpq/hba.h</exclude> <exclude>src/include/gppc/gppc_config.h</exclude> <exclude>src/include/commands/extprotocolcmds.h</exclude> @@ -1264,7 +1216,6 @@ code or new licensing patterns. <exclude>src/makefiles/Makefile.netbsd</exclude> <exclude>src/fe_utils/log.c</exclude> <exclude>src/fe_utils/test/print_test.c</exclude> - <exclude>src/common/sm3.c</exclude> <exclude>src/common/digit_table.h</exclude> <exclude>src/common/etcdutils.c</exclude> <exclude>src/nls-global.mk</exclude> @@ -1285,10 +1236,52 @@ code or new licensing patterns. <exclude>BUILD_NUMBER</exclude> <exclude>Makefile</exclude> - <exclude>.gitmessage</exclude> <exclude>aclocal.m4</exclude> <exclude>python-dependencies.txt</exclude> + + <!-- Finally we exclude a few file types (based on + extension) for which comments are tough to + maintain. Note that this is a combination of files + licensed to ASF and files that came from PostgreSQL + and other projects (under compatible licenses). + You may need to engage in software archaeology to + find out the origins of these. + --> + + <exclude>**/*.gif</exclude> + <exclude>**/*.md</exclude> + <exclude>**/*.json</exclude> + <exclude>**/*.sql</exclude> + <exclude>**/*.out</exclude> + <exclude>**/Thumbs.db</exclude> + <exclude>.github/full_color_black.svg</exclude> + <exclude>.github/full_color_white.svg</exclude> + <exclude>sonar-project.properties</exclude> + <exclude>.gitmessage</exclude> + + <!-- The following files are from pg_cron under PostgreSQL + license, introduced by Cloudberry. + --> + <exclude>src/include/task/bitstring.h</exclude> + <exclude>src/include/task/cron.h</exclude> + <exclude>src/include/task/pg_cron.h</exclude> + <exclude>src/include/task/task_states.h</exclude> + <exclude>src/include/task/job_metadata.h</exclude> + + <!-- The following files are used by PAX as the + submodules or created originally by Cloudberry. + --> + <exclude>contrib/pax_storage/src/test/**</exclude> + <exclude>contrib/pax_storage/init_file</exclude> + <exclude>contrib/pax_storage/.clang-tidy</exclude> + <exclude>contrib/pax_storage/pax_schedule</exclude> + <exclude>contrib/pax_storage/.clang-format</exclude> + <exclude>contrib/pax_storage/src/cpp/contrib/CPPLINT.cfg</exclude> + <exclude>contrib/pax_storage/src/cpp/storage/proto/CPPLINT.cfg</exclude> + <exclude>contrib/pax_storage/src/api/python3/MANIFEST.in</exclude> + <exclude>contrib/pax_storage/src/api/python3/setup.cfg</exclude> + <exclude>dependency/yyjson/.gitattributes</exclude> <exclude>dependency/yyjson/.github/codecov.yml</exclude> <exclude>dependency/yyjson/.github/workflows/cmake.yml</exclude> @@ -1703,66 +1696,11 @@ code or new licensing patterns. <exclude>contrib/pax_storage/src/cpp/contrib/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h</exclude> <exclude>contrib/pax_storage/src/cpp/contrib/googletest/googletest_deps.bzl</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test_cpp17/test_private_member.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/src_linux/addr_any.h</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/Makefile.linux64.gcc</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_private_member_function_win.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_object_member_function_linux.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_constructor_function_linux.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_virtual_overload_function_linux.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_virtual_function_linux.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_function.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_variadic_function.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/Makefile.win32</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/Makefile.linux64.clang</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_addr_lambda_linux.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_class_member_function.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_addr_lambda_win.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_addr_any_win.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_private_member_function_linux.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/Makefile.linux32.gcc</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_dynamic_library_linux.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_template_function_win.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_template_function_linux.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/Makefile.linux32.clang</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_constructor_function_x86_win.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_dtor_function_linux.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_overload_function_linux.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_functor_win.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_functor_linux.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_object_member_function_win.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/Makefile.win64</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_dtor_function_x86_win.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_dynamic_library_win.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_overload_function_win.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_virtual_function_x86_win.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_valgrind_discard_translation_linux.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/test/test_addr_any_linux.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/src_darwin/addr_any.h</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/.gitmodules</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/src_win/addr_any.h</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/.github/workflows/make-test-multi-platform.yml</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/gtest/ut/include/gmock/internal/gmock-pp.h</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/gtest/ut/include/gmock/internal/custom/gmock-generated-actions.h.pump</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/gtest/ut/src/mocks/mock_obj.hpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/gtest/ut/src/test_obj.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/gtest/ut/src/fixtures/strings.hpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/gtest/ut/src/main.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/gtest/src/obj_operations.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/gtest/src/obj.hpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/gtest/src/obj.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/gtest/src/main.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/gtest/src/obj_operations.hpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/catch2/ut/include/catch.hpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/catch2/ut/src/test_obj.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/catch2/ut/src/main.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/catch2/src/obj_operations.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/catch2/src/obj.hpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/catch2/src/obj.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/catch2/src/main.cpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/ut_examples/catch2/src/obj_operations.hpp</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/src/addr_pri.h</exclude> - <exclude>contrib/pax_storage/src/cpp/contrib/cpp-stub/src/stub.h</exclude> + <exclude>contrib/pax_storage/src/cpp/cpp-stub/src_linux/addr_any.h</exclude> + <exclude>contrib/pax_storage/src/cpp/cpp-stub/src_darwin/addr_any.h</exclude> + <exclude>contrib/pax_storage/src/cpp/cpp-stub/src_win/addr_any.h</exclude> + <exclude>contrib/pax_storage/src/cpp/cpp-stub/src/addr_pri.h</exclude> + <exclude>contrib/pax_storage/src/cpp/cpp-stub/src/stub.h</exclude> <exclude>contrib/pax_storage/src/cpp/contrib/tabulate/tabulateConfig.cmake.in</exclude> <exclude>contrib/pax_storage/src/cpp/contrib/tabulate/tabulate.pri</exclude> @@ -1798,25 +1736,6 @@ code or new licensing patterns. <exclude>contrib/pax_storage/src/cpp/contrib/tabulate/.clang-format</exclude> <exclude>contrib/pax_storage/src/cpp/contrib/tabulate/.travis.yml</exclude> - <!-- Finally we exclude a few file types (based on - extension) for which comments are tough to - maintain. Note that this is a combination of files - licensed to ASF and files that came from PostgreSQL - and other projects (under compatible licenses). - You may need to engage in software archaeology to - find out the origins of these. - --> - - <exclude>**/*.gif</exclude> - <exclude>**/*.md</exclude> - <exclude>**/*.json</exclude> - <exclude>**/*.sql</exclude> - <exclude>**/*.out</exclude> - <exclude>**/Thumbs.db</exclude> - - <!-- Exclude GPL-licensed archive that will be removed --> - <exclude>gpMgmt/bin/pythonSrc/ext/pylint-0.21.0.tar.gz</exclude> - </excludes> <!-- diff --git a/src/common/sm3.c b/src/common/sm3.c index e3c8dc15039..98ac98584b1 100644 --- a/src/common/sm3.c +++ b/src/common/sm3.c @@ -1,4 +1,29 @@ - +/*------------------------------------------------------------------------- + * + * 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. + * + * sm3.c + * + * IDENTIFICATION + * src/common/sm3.c + * + *------------------------------------------------------------------------- + */ #ifndef FRONTEND #include "postgres.h" #else diff --git a/src/include/crypto/bufenc.h b/src/include/crypto/bufenc.h index da371b7334d..085c24d1ac9 100644 --- a/src/include/crypto/bufenc.h +++ b/src/include/crypto/bufenc.h @@ -1,8 +1,23 @@ /*------------------------------------------------------------------------- * - * bufenc.h + * 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 * - * Portions Copyright (c) 2021, PostgreSQL Global Development Group + * 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. + * + * bufenc.h * * src/include/crypto/bufenc.h * --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org For additional commands, e-mail: commits-h...@cloudberry.apache.org