Once PXF is running, you manage it from the coordinator host using the pxf cluster commands.
Understanding PXF directories and configuration files
PXF uses two main directories:
$PXF_HOMEis the read-only directory where PXF is installed, for example/usr/local/pxf. It holds the PXF service itself, along with the connector site templates undertemplates/that you copy into a server configuration.$PXF_BASEis the writable runtime directory you create when you initialize your cluster, for example$HOME/pxf-base. It holds your configuration, including your server configurations underservers/. Keeping$PXF_BASEseparate from$PXF_HOMEmeans a PXF upgrade doesn't overwrite your configuration.
See Connecting to external data for how PXF servers and profiles work.
Relocating $PXF_BASE
Move $PXF_BASE to a new location if you're running low on disk space or reorganizing storage across hosts:
Stop PXF on every host:
bashpxf cluster stopOn the coordinator, move
$PXF_BASEto the new location and update the environment variable, including in~/.bashrc:bashmv $PXF_BASE /new/path/to/pxf-base export PXF_BASE=/new/path/to/pxf-baseSync the relocated directory out to every segment host, then start PXF:
bashpxf cluster sync pxf cluster startOnce PXF is confirmed running from the new location, clean up the old
$PXF_BASEdirectory on each segment host.
Starting, stopping, and restarting PXF
Start, stop, or restart PXF across the whole cluster with a single command, rather than repeating it on every host. Only the gpadmin user can run these commands:
pxf cluster start
pxf cluster stop
pxf cluster restartApplying a configuration change
Sync any change to a file under $PXF_BASE/conf, or to a server configuration, out to every segment host, then restart PXF. For example, to increase the PXF Java heap size:
Edit
PXF_JVM_OPTSin$PXF_BASE/conf/pxf-env.shon the coordinator:bashexport PXF_JVM_OPTS="-Xmx4g -Xms2g"Sync the change to every segment host:
bashpxf cluster syncRestart PXF to apply it. Changes made only on the coordinator have no effect until you sync and restart:
bashpxf cluster restart
Configuring advanced settings
Adjust settings under $PXF_BASE/conf to fit your environment, the same way as any other configuration change:
- Change the listen address, overall log level, or thread limit by editing
pxf-application.properties. - Change the JVM heap size by editing
pxf-env.sh. - Set the hostname or port WHPG uses to reach PXF by setting the
PXF_HOSTandPXF_PORTenvironment variables in~/.bashrcon the relevant host. This change also requires restarting WHPG itself, not just PXF. - Fine-tune logging for individual loggers by editing
pxf-log4j2.xml. - Define a custom PXF profile in
pxf-profiles.xml, pairing a profile name with Java classes that implement PXF's plugin interfaces to read or write it.
See PXF configuration files for the full list of properties in each file.
Monitoring PXF
pxf cluster status confirms PXF is both running and responsive on every host:
pxf cluster statusPXF also exposes HTTP endpoints on each host for monitoring tools, at http://<host>:5888/<endpoint>:
| Endpoint | Description |
|---|---|
actuator/health | The status of the PXF service. |
actuator/info | Build information for the PXF service. |
actuator/metrics | JVM, Tomcat, system, and PXF-specific metrics. |
actuator/prometheus | The same metrics, in a format a Prometheus server can scrape. |
