Build whpg-pxf from source, then distribute the build to every host in your WarehousePG (WHPG) cluster, including the coordinator, standby coordinator, and all segment hosts.
Prerequisites
- Build host: GCC,
make,unzip, a cURL development package (libcurl-develon RHEL; use a version from source instead if you're on an older OS whose package only provides cURL 7.19), Go 1.9 or later, and JDK 8 or 11. Building directly on the WarehousePG coordinator avoids a cross-compile step, since it's already running the same OS as your segment hosts. - Every host in the cluster: JDK 8 or 11 to run. The PXF service is a Java process that runs on every host, not only the one you build on.
- WarehousePG installed on every host in the cluster, running on RHEL 7, 8, or 9.
Building from source
Build PXF on the coordinator, from the release-6.x branch, which matches WHPG 6.x.
Clone the repository and check out the
release-6.xbranch:bashgit clone https://github.com/warehouse-pg/whpg-pxf.git cd whpg-pxf git checkout release-6.xSet
JAVA_HOME, and source your WarehousePG environment so the build can find it:bashexport JAVA_HOME=<path-to-your-jdk> source /usr/local/greenplum-db/greenplum_path.shBuild PXF:
bashmakeThis command compiles the PXF service, the
pxfandpxf clusterCLI, and the WHPG extension, and runs PXF's unit tests.
Installing on the cluster
Set
GPHOME,PXF_HOME, andPXF_BASE, then install the build locally on the coordinator:bashexport GPHOME=/usr/local/greenplum-db export PXF_HOME=/usr/local/pxf export PXF_BASE=$HOME/pxf-base sudo mkdir -p "$PXF_HOME" sudo chown -R gpadmin:gpadmin "$GPHOME" "$PXF_HOME" make installmake installplaces the PXF service and CLI under$PXF_HOME, and copies the WHPG extension's control, SQL, and shared library files under$GPHOMEon the coordinator. If you don't setPXF_BASE, it defaults toPXF_HOME, and a later PXF upgrade can delete your server configurations along with it, so always set it to a separate directory.Create a file
all_hostslisting the coordinator, standby coordinator, and all segment hosts:inicdw scdw sdw1 sdw2 sdw3Copy the built
$PXF_HOMEdirectory to every other host in the cluster:bashgpsync -f all_hosts $PXF_HOME =:$PXF_HOMESet ownership of
$PXF_HOMEon every host, sogpadmincan run PXF:bashgpssh -f all_hosts -u gpadmin -e "sudo chown -R gpadmin:gpadmin $PXF_HOME"Install the WHPG extension files under
$GPHOMEon every host, sincemake installonly did this on the coordinator:bashpxf cluster register
Next steps
See Configuring and starting PXF to set up and start the PXF service across your cluster.
