You must explicitly initialize the PXF service instance. This one-time initialization creates the PXF service web application and generates PXF configuration files and templates.
PXF provides two management commands that you can use for initialization:
pxf cluster init- initialize all PXF service instances in the Greenplum Database cluster
pxf init- initialize the PXF service instance on the current Greenplum Database host
PXF supports both internal and user-customizable configuration properties. Initializing PXF generates PXF internal configuration files, setting default properties specific to your configuration. Initializing PXF also generates configuration file templates for user-customizable settings such as custom profiles and PXF runtime and logging settings.
PXF internal configuration files are located in your Greenplum Database installation in the
$GPHOME/pxf/conf directory. You identify the PXF user configuration directory at PXF initialization time via an environment variable named
$PXF_CONF. If you do not set
$PXF_CONF prior to initializing PXF, PXF may prompt you to accept or decline the default user configuration directory,
$HOME/pxf, during the initialization process.
Note: Choose a
$PXF_CONF directory location that you can back up, and ensure that it resides outside of your Greenplum Database installation directory.
During initialization, PXF creates the
$PXF_CONF directory if necessary, and then populates it with subdirectories and template files. Refer to PXF User Configuration Directories for a list of these directories and their contents.
Before initializing PXF in your Greenplum Database cluster, ensure that:
- Your Greenplum Database cluster is up and running.
- You have identified the PXF user configuration directory filesystem location,
$PXF_CONF, and that the
gpadminuser has the necessary permissions to create, or write to, this directory.
Perform the following procedure to initialize PXF on each segment host in your Greenplum Database cluster.
Log in to the Greenplum Database master node:
$ ssh gpadmin@<gpmaster>
pxf cluster initcommand to initialize the PXF service on the master, standby master, and on each segment host. For example, the following command specifies
/usr/local/greenplum-pxfas the PXF user configuration directory for initialization:
gpadmin@gpmaster$ PXF_CONF=/usr/local/greenplum-pxf $GPHOME/pxf/bin/pxf cluster init
initcommand creates the PXF web application and initializes the internal PXF configuration. The
initcommand also creates the
$PXF_CONFuser configuration directory if it does not exist, and populates the
templatesdirectories with user-customizable configuration templates. If
$PXF_CONFexists, PXF updates only the
Note: The PXF service runs only on the segment hosts. However,
pxf cluster initalso sets up the PXF user configuration directories on the Greenplum Database master and standby master hosts.