PXF is a Java service. It requires a Java 8 or Java 11 installation on each PXF host.
Prerequisites
Ensure that you have access to, or superuser permissions to install, Java 8 or Java 11 on each PXF host.
Procedure
Perform the following procedure to install Java on all hosts where PXF is expected to run. You will use the gpssh
utility where possible to run a command on multiple hosts.
-
Log in to your Greenplum coordinator host:
$ ssh gpadmin@<coordinator>
-
Determine the version(s) of Java installed on the system:
gpadmin@coordinator$ rpm -qa | grep java
-
If the system does not include a Java version 8 or 11 installation, install one of these Java versions on all the hosts to run PXF.
-
If your PXF cluster is collocated, create a text file that lists your Greenplum coordinator host, standby coordinator host and segment hosts, one host name per line. For example, a file named
hostfile_all
may include:coordinator mstandby seghost1 seghost2 seghost3
-
If your PXF cluster is not collocated (external), create a text file that lists your Greenplum coordinator host, standby coordinator host, segment hosts, and all the external PXF hosts, one host name per line. For example, a file named
hostfile_all
may include:coordinator mstandby seghost1 seghost2 seghost3 external-pxf-host1 external-pxf-host2 external-pxf-host3
Make sure all these hosts have already exchanged the SSH keys with the coordinator. If not, run
gpssh-exkeys -f hostfile_all
. Read more about gpssh-exkeys. -
Install the Java package on each host. For example, to install Java version 8:
gpadmin@coordinator$ gpssh -e -v -f hostfile_all sudo yum -y install java-1.8.0-openjdk-1.8.0*
-
-
Identify the Java 8 or 11
$JAVA_HOME
setting for PXF. For example:If you installed Java 8:
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.x86_64/jre
If you installed Java 11:
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-11.0.4.11-0.el8_0.x86_64
If the superuser configures the newly-installed Java alternative as the system default:
JAVA_HOME=/usr/lib/jvm/jre
-
Note the
$JAVA_HOME
setting; you will need this value when you configure PXF.
Content feedback and comments