Starting, Stopping, and Restarting PXF

PXF provides two management commands:

  • pxf cluster - manage all PXF service instances in the Greenplum Database cluster
  • pxf - manage the PXF service instance on a specific Greenplum Database host

The pxf cluster command supports init, start, status, stop, and sync subcommands. When you run a pxf cluster subcommand on the Greenplum Database master host, you perform the operation on all segment hosts in the Greenplum Database cluster. PXF also runs the init and sync commands on the standby master host.

The pxf command supports init, start, stop, restart, and status operations. These operations run locally. That is, if you want to start or stop the PXF agent on a specific Greenplum Database segment host, you log in to the host and run the command.

Starting PXF

After initializing PXF, you must start PXF on each segment host in your Greenplum Database cluster. The PXF service, once started, runs as the gpadmin user on default port 5888. Only the gpadmin user can start and stop the PXF service.

If you want to change the default PXF configuration, you must update the configuration before you start PXF.

$PXF_CONF/conf includes these user-customizable configuration files:

  • pxf-env.sh - runtime configuration parameters
  • pxf-log4j.properties - logging configuration parameters
  • pxf-profiles.xml - custom profile definitions

The pxf-env.sh file exposes the following PXF runtime configuration parameters:

Parameter Description Default Value
JAVA_HOME The Java JRE home directory. /usr/java/default
PXF_LOGDIR The PXF log directory. $PXF_CONF/logs
PXF_JVM_OPTS Default options for the PXF Java virtual machine. -Xmx2g -Xms1g
PXF_KEYTAB The absolute path to the PXF service Kerberos principal keytab file. $PXF_CONF/keytabs/pxf.service.keytab
PXF_PRINCIPAL The PXF service Kerberos principal. gpadmin/_HOST@EXAMPLE.COM

You must synchronize any changes that you make to pxf-env.sh, pxf-log4j.properties, or pxf-profiles.xml to the Greenplum Database cluster, and (re)start PXF on each segment host.

Prerequisites

Before you start PXF in your Greenplum Database cluster, ensure that:

  • Your Greenplum Database cluster is up and running.
  • You have previously initialized PXF.

Procedure

Perform the following procedure to start PXF on each segment host in your Greenplum Database cluster.

  1. Log in to the Greenplum Database master node:

    $ ssh gpadmin@<gpmaster>
    
  2. Run the pxf cluster start command to start PXF on each segment host. For example:

    gpadmin@gpmaster$ $GPHOME/pxf/bin/pxf cluster start
    

Stopping PXF

If you must stop PXF, for example if you are upgrading PXF, you must stop PXF on each segment host in your Greenplum Database cluster. Only the gpadmin user can stop the PXF service.

Prerequisites

Before you stop PXF in your Greenplum Database cluster, ensure that your Greenplum Database cluster is up and running.

Procedure

Perform the following procedure to stop PXF on each segment host in your Greenplum Database cluster.

  1. Log in to the Greenplum Database master node:

    $ ssh gpadmin@<gpmaster>
    
  2. Run the pxf cluster stop command to stop PXF on each segment host. For example:

    gpadmin@gpmaster$ $GPHOME/pxf/bin/pxf cluster stop
    

Restarting PXF

If you must restart PXF, for example if you updated PXF user configuration files in $PXF_CONF/conf, you can stop, and then start, PXF in your Greenplum Database cluster.

Only the gpadmin user can restart the PXF service.

Prerequisites

Before you restart PXF in your Greenplum Database cluster, ensure that your Greenplum Database cluster is up and running.

Procedure

Perform the following procedure to restart PXF in your Greenplum Database cluster.

  1. Log in to the Greenplum Database master node:

    $ ssh gpadmin@<gpmaster>
    
  2. Restart PXF:

    gpadmin@gpmaster$ $GPHOME/pxf/bin/pxf cluster stop
    gpadmin@gpmaster$ $GPHOME/pxf/bin/pxf cluster start