Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pxf-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11', '17', '21' ]
java: [ '11', '17', '21' ]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ you get started with the contribution.

Everyone who participates in Apache Cloudberry, either as a user or a
contributor, is obliged to follow our community [Code of
Conduct](./CODE_OF_CONDUCT.md). Every violation against it will be reviewed
Conduct](./CODE-OF-CONDUCT.md). Every violation against it will be reviewed
and investigated and will result in a response that is deemed necessary and
appropriate to the circumstances. The moderator team is obligated to maintain
confidentiality regarding the reporter of an incident.
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,9 @@ To build PXF, you must have:
source /usr/local/cloudberry-db/cloudberry-env.sh # For Cloudberry 2.1+
```

3. A full JDK -- 1.8, 11, 17, or 21 -- to compile/run. A JRE is not enough, as the
3. A full JDK -- 11, 17, or 21 -- to compile/run. A JRE is not enough, as the
server module needs `javac`.

> [!NOTE]
> Support for JDK 1.8 will be removed in PXF 3.0. Use JDK 11 or later for new setups.

Export your `JAVA_HOME`:
```
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 # Debian/Ubuntu
Expand Down
29 changes: 5 additions & 24 deletions automation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ In order to run PXF automation tests the following are needed

1. Running Hadoop cluster
2. Running GPDB
3. JRE 1.8
3. JDK 11+

## Build & Test

Expand Down Expand Up @@ -246,9 +246,9 @@ You can read more about TestNG here <http://testng.org/doc/index.md>
@Test(groups = { "features" })
public void readDelimitedTextUsingTextFormat() throws Exception {
// set plugins and delimiter
exTable.setFragmenter("com.pivotal.pxf.plugins.hdfs.HdfsDataFragmenter");
exTable.setAccessor("com.pivotal.pxf.plugins.hdfs.LineBreakAccessor");
exTable.setResolver("com.pivotal.pxf.plugins.hdfs.StringPassResolver");
exTable.setFragmenter("org.apache.cloudberry.pxf.plugins.hdfs.HdfsDataFragmenter");
exTable.setAccessor("org.apache.cloudberry.pxf.plugins.hdfs.LineBreakAccessor");
exTable.setResolver("org.apache.cloudberry.pxf.plugins.hdfs.StringPassResolver");
exTable.setDelimiter(",");
// create external table
gpdb.createTableAndVerify(exTable);
Expand All @@ -258,31 +258,12 @@ You can read more about TestNG here <http://testng.org/doc/index.md>
runSqlTest("features/hdfs/readable/text/small_data");
}

/**
* Verify deprecated "LineReaderAccessor" gives required results.
*
* @throws Exception
*/
@Test(groups = "features")
public void deprecatedLineReaderAccessor() throws Exception {
// set plugins and delimiter
exTable.setFragmenter("com.pivotal.pxf.plugins.hdfs.HdfsDataFragmenter");
exTable.setAccessor("com.pivotal.pxf.plugins.hdfs.LineReaderAccessor");
exTable.setResolver("com.pivotal.pxf.plugins.hdfs.StringPassResolver");
exTable.setDelimiter(",");
// create external table
gpdb.createTableAndVerify(exTable);
// write data to HDFS
hdfs.writeTableToFile(hdfsFilePath, dataTable, ",");
// verify results
runSqlTest("features/hdfs/readable/text/small_data");
}
}
```

## Run reports and logs

Automation logs will be generated into `automation-logs`` directory and will be divided into directories according to run Java classes.
Automation logs are generated in `automation_logs/`, grouped by test class.

In every `<class>` directory, there will be files according to the following format: `<time-stamp>_<ran method name>.log`
<img src="images/72680961.png" class="confluence-embedded-image confluence-content-image-border" width="454" height="598" />
Expand Down
6 changes: 3 additions & 3 deletions automation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<java.version>11</java.version>
<gphd.home>${GPHD_ROOT}</gphd.home>
<pxf.lib>${user.home}/automation_tmp_lib</pxf.lib>
<hdp.hadoop.version>2.10.2</hdp.hadoop.version>
Expand Down Expand Up @@ -51,8 +51,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
Expand Down
4 changes: 2 additions & 2 deletions ci/docker/pxf-cbdb-dev/common/script/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export PXF_TEST_KEEP_DATA=${PXF_TEST_KEEP_DATA:-true}
export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-admin}
export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-password}

# Hadoop/Hive/HBase env
export JAVA_HOME="${JAVA_HADOOP}"
# Automation is built and run with Java 11; Hadoop daemons use JAVA_HADOOP.
export JAVA_HOME="${JAVA_BUILD}"
export PATH="$JAVA_HOME/bin:$PATH"
source "${GPHD_ROOT}/bin/gphd-env.sh"

Expand Down
20 changes: 6 additions & 14 deletions docs/administering/configuring/install_java.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ description: Installing Java for the PXF service.
sidebar_position: 4
---

PXF is a Java service. It requires a Java 8 or Java 11 installation on each Apache Cloudberry host.
PXF is a Java service. It requires a Java 11, 17 or 21 installation on each Apache Cloudberry host.


## Prerequisites

Ensure that you have access to, or superuser permissions to install, Java 8 or Java 11 on each Apache Cloudberry host.
Ensure that you have access to, or superuser permissions to install, Java on each Apache Cloudberry host.

## Procedure

Expand All @@ -27,7 +27,7 @@ Perform the following procedure to install Java on the coordinator host, standby
gpadmin@coordinator$ rpm -qa | grep java
```

3. If the system does not include a Java version 8 or 11 installation, install one of these Java versions on the coordinator host, standby coordinator host, and on each Apache Cloudberry segment host.
3. If the system does not include a Java installation, install it on the coordinator host, standby coordinator host, and on each Apache Cloudberry segment host.

1. Create a text file that lists your Apache Cloudberry standby coordinator host and segment hosts, one host name per line. For example, a file named `gphostfile` may include:

Expand All @@ -38,22 +38,14 @@ Perform the following procedure to install Java on the coordinator host, standby
seghost2
seghost3
```
2. Install the Java package on each host. For example, to install Java version 8:
2. Install the Java package on each host. For example:

``` shell
gpadmin@coordinator$ gpssh -e -v -f gphostfile sudo yum -y install java-1.8.0-openjdk-1.8.0*
gpadmin@coordinator$ gpssh -e -v -f gphostfile sudo yum -y install java-11-openjdk
```

4. Identify the Java 8 or 11 `$JAVA_HOME` setting for PXF. For example:
4. Identify the Java `$JAVA_HOME` setting for PXF. For example:

If you installed Java 8:

``` shell
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.x86_64/jre
```

If you installed Java 11:

``` shell
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.4.11-0.el7_6.x86_64
```
Expand Down
2 changes: 1 addition & 1 deletion docs/administering/configuring/instcfg_pxf.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PXF provides connectors to Hadoop, Hive, HBase, object stores, network file syst

To configure PXF, you must:

1. Install Java 8 or 11 on each Apache Cloudberry host as described in [Installing Java for PXF](./install_java.md). If your `JAVA_HOME` is different from `/usr/java/default`, you must inform PXF of the `$JAVA_HOME` setting by specifying its value in the `pxf-env.sh` [configuration file](./config_files.md).
1. Install Java 11, 17 or 21 on each Apache Cloudberry host as described in [Installing Java for PXF](./install_java.md). If your `JAVA_HOME` is different from `/usr/java/default`, you must inform PXF of the `$JAVA_HOME` setting by specifying its value in the `pxf-env.sh` [configuration file](./config_files.md).
- Edit the `$PXF_BASE/conf/pxf-env.sh` file on the Apache Cloudberry coordinator host.

``` shell
Expand Down
2 changes: 1 addition & 1 deletion docs/intro/intro_pxf.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PXF is compatible with these operating system platforms and Apache Cloudberry ve

### Java

PXF supports Java 8 and Java 11.
PXF supports Java 11, 17 and 21.


### Hadoop
Expand Down
10 changes: 10 additions & 0 deletions docs/troubleshooting/troubleshooting_pxf.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ Most PXF error messages include a `HINT` that you can use to resolve the error,

Refer to the [Logging](../administering/advanced-config/cfg_logging.md) topic for more information about logging levels, configuration, and the `pxf-app.out` and `pxf-service.log` log files.

## Java Version Errors After an Upgrade

The current PXF classes target Java 11 (class-file version 55). Starting them
with Java 8 can fail with `UnsupportedClassVersionError`, mentioning version
`55.0` and a runtime that only recognizes versions up to `52.0`.

Check `JAVA_HOME` in `$PXF_BASE/conf/pxf-env.sh` on every Apache Cloudberry host.
Install/select Java 11, synchronize the PXF configuration, and restart the service.
See [Installing Java for PXF](../administering/configuring/install_java.md).


## Addressing PXF JDBC Connector Time Zone Errors

Expand Down
7 changes: 6 additions & 1 deletion docs/upgrade/upgrade_pxf.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,14 @@ Perform this procedure before you upgrade to a new version of PXF:
gpadmin@coordinator$ cp -avi /usr/local/cloudberry-pxf pxf_base.bak
```


## Step 2: Install the New PXF

PXF requires **Java 11, 17, or 21**. Before installing the new PXF version,
install one of these Java versions on every Apache Cloudberry host and set
`JAVA_HOME` in `$PXF_BASE/conf/pxf-env.sh` to its installation directory.
Verify the configured executable with `"$JAVA_HOME/bin/java" -version`. See
[Installing Java for PXF](../administering/configuring/install_java.md).

Install the new version of PXF, and identify and note the new PXF version number.


Expand Down
4 changes: 2 additions & 2 deletions package/cloudberry-pxf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ Requires: procps-ng
# installing on Cloudberry node, so inherit Cloudberry's dependencies
# implicitly

# Weak dependencies either OpenJDK 8 or 11
Suggests: java-1.8.0-openjdk
# Weak dependencies: OpenJDK 11 or 17
Suggests: java-11-openjdk
Suggests: java-17-openjdk

%description
Apache Cloudberry PXF (Platform Extension Framework) is an advanced data
Expand Down
13 changes: 9 additions & 4 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ allprojects {

idea {
project {
jdkName = "1.8"
languageLevel = "8"
jdkName = "11"
languageLevel = "11"
vcs = "Git"
}
}
Expand All @@ -64,8 +64,13 @@ configure(javaProjects) {
group = 'org.apache.cloudberry.pxf'
version = "${version}"

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

tasks.withType(JavaCompile).configureEach {
// Keep the Java 11 API/bytecode baseline when building with newer JDKs.
options.release = 11
}

ext['log4j2.version'] = '2.25.4'

Expand Down
Loading