Platform Extension Framework (PXF) uses the mechanism of Foreign Data Wrapper (FDW) to access data stored in an external source of the YMatrix database.
$JAVA_HOME
to be set./usr/local/pxf-matrixdb3
.Notes!
The PXF feature is only supported in Enterprise Edition. If you need it, please contact: [email protected].
The installation steps are as follows:
Notes!
This step needs to be performed on all nodes using a root user or a normal user with sudo permissions.
Install the RPM package.
$ sudo yum install pxf-matrixdb3-5.16.0-1.el7.x86_64.rpm
Notes!
This step needs to be performed on all nodes using a root user or a normal user with sudo permissions.
Configure environment variables.
$ sudo vim /etc/profile
export PXF_HOME=/usr/local/pxf-matrixdb3
export PXF_CONF=/usr/local/pxfconf
export PATH=$PXF_HOME/bin:$PATH
Notes!
Starting from PXF 6.0, the environment variablePXF_CONF
was renamed toPXF_BASE
, and if this variable is not specified, the configuration file inPXF_HOME
is used.
Refresh environment variables.
$ source /etc/profile
$PXF_HOME
file permissionsNotes!
This step needs to be performed on all nodes using a root user or a normal user with sudo permissions.
Change the owner and group permissions of the $PXF_HOME
file to mxadmin
.
$ sudo chown -R mxadmin:mxadmin $PXF_HOME
After ensuring that the cluster is started, execute under the mxadmin user of Master:
$ pxf cluster init
As shown below, the PXF configuration file has been initialized successfully.
Initializing PXF on master host and 2 segment hosts...
PXF initialized successfully on 3 out of 3 hosts
Notes!
Starting with PXF 6.0, theinit
option is deprecated and replaced with theprepare
option.
First, install rsync
under all nodes** using root user or ordinary users with sudo permissions.
$ sudo yum install -y rsync
In Master, use the mxadmin user to execute the following commands to synchronize the PXF configuration file to all nodes of the cluster.
$ pxf cluster sync
As shown below, the PXF configuration file has been synchronized successfully.
Syncing PXF configuration files from master host to 2 segment hosts...
PXF configs synced successfully on 2 out of 2 hosts
Notes!
You need to check the corresponding directories of other nodes to check whether their configuration files are synchronized successfully.
In Master, use the mxadmin user to execute the following command to start the PXF service.
$ pxf cluster start
As shown below, it is stated that PXF is started successfully.
Starting PXF on 2 segment hosts...
PXF started successfully on 2 out of 2 hosts
In Master, use the mxadmin user to execute the following command to detect the PXF status.
$ pxf cluster status
Confirm that the PXF cluster starts successfully.
Checking status of PXF servers on 2 segment hosts...
PXF is running on 2 out of 2 hosts
The PXF instance needs to be started separately using the mxadmin user on the Master of the YMatrix cluster.
$ pxf start
As shown below, it means that PXF has been started successfully. The path of the PXF-related log file is /usr/local/pxfconf/logs
. If an error is reported during use, you can go to the corresponding directory to view the log.
Using CATALINA_BASE: /usr/local/pxf-matrixdb3/pxf-service
Using CATALINA_HOME: /usr/local/pxf-matrixdb3/pxf-service
Using CATALINA_TMPDIR: /usr/local/pxf-matrixdb3/pxf-service/temp
Using JRE_HOME: /data/jdk1.8.0_151/jre
Using CLASSPATH: /usr/local/pxf-matrixdb3/pxf-service/bin/bootstrap.jar:/usr/local/pxf-matrixdb3/pxf-service/bin/tomcat-juli.jar
Using CATALINA_PID: /usr/local/pxf-matrixdb3/run/catalina.pid
Existing PID file found during start.
Removing/clearing stale PID file.
Tomcat started.
Checking if tomcat is up and running...
Server: PXF Server
Checking if PXF webapp is up and running...
PXF webapp is listening on port 5888