Skip to content

PXF configuration templates

$PXF_HOME/templates holds a template site XML file for each connector. Copy the template for your connector into a server directory under $PXF_BASE/servers/<server_name>, then edit it as described on the relevant connector page, for example Object stores or Hadoop. Reference <server_name> as the SERVER parameter in an external table's LOCATION clause.

core-site.xml

PropertyDefaultDescription
fs.defaultFShdfs://0.0.0.0:8020The address of the HDFS NameNode.

hdfs-site.xml

PropertyDefaultDescription
dfs.permissions.enabledtrueEnforces HDFS file permission checks.
dfs.block.access.token.enabletrueRequires a block access token for datanode communication.
dfs.support.appendtrueAllows appending to existing files.
hadoop.proxyuser.gpadmin.hosts*The hosts gpadmin can proxy from when impersonation is enabled.
hadoop.proxyuser.gpadmin.groups*The groups gpadmin can impersonate when impersonation is enabled.
hadoop.security.authorizationtrueEnables service-level authorization checks.

hive-site.xml

PropertyDefaultDescription
hive.metastore.uristhrift://localhost:9083The URI PXF uses to reach the Hive metastore.
hive.metastore.integral.jdo.pushdowntruePushes down predicates on integral partition columns to the metastore, improving performance for tables with many partitions.

hbase-site.xml

PropertyDefaultDescription
hbase.rootdirhdfs://0.0.0.0:8020/hbaseThe location on HDFS where HBase stores its data.
hbase.zookeeper.quorum127.0.0.1The ZooKeeper ensemble HBase uses for coordination.

mapred-site.xml

PropertyDefaultDescription
mapreduce.framework.namelocalThe MapReduce execution framework.
mapreduce.input.fileinputformat.input.dir.recursivetrueReads files in subdirectories recursively.

yarn-site.xml

PropertyDefaultDescription
yarn.resourcemanager.address0.0.0.0:8032The address of the YARN ResourceManager.

s3-site.xml

For Amazon S3 itself, without the endpoint or path-style properties MinIO and other S3-compatible stores need. See minio-site.xml for those.

PropertyDefaultDescription
fs.s3a.access.keyRequired, no defaultYour AWS access key ID.
fs.s3a.secret.keyRequired, no defaultYour AWS secret access key.
fs.s3a.fast.uploadtrueUses fast upload buffering for writes.

minio-site.xml

For MinIO and other S3-compatible object stores.

PropertyDefaultDescription
fs.s3a.endpointRequired, no defaultThe object store's endpoint URL, including the URI scheme.
fs.s3a.access.keyRequired, no defaultThe access key for the object store.
fs.s3a.secret.keyRequired, no defaultThe secret key for the object store.
fs.s3a.fast.uploadtrueUses fast upload buffering for writes.
fs.s3a.path.style.accesstrueUses path-style bucket addressing, required by MinIO and most non-AWS S3-compatible stores.

Both s3-site.xml and minio-site.xml also accept any other Hadoop S3A property, such as fs.s3a.buffer.dir for local buffering during upload, fs.s3a.multipart.size for the multipart upload threshold, or fs.s3a.connection.maximum for connection pooling. See the S3A section of the Hadoop-AWS module documentation for the full list of available properties. See Connecting to an S3-compatible object store for the properties specific to each authentication method.

gs-site.xml

For Google Cloud Storage.

PropertyDefaultDescription
google.cloud.auth.service.account.enabletrueAuthenticates using a Google Cloud service account.
google.cloud.auth.service.account.json.keyfileRequired, no defaultThe path to your Google Cloud service account JSON key file.
fs.AbstractFileSystem.gs.implcom.google.cloud.hadoop.fs.gcs.GoogleHadoopFSThe file system implementation class for Google Cloud Storage.

abfss-site.xml

For Azure Data Lake Storage Gen2.

PropertyDefaultDescription
fs.azure.account.auth.typeOAuthThe authentication type.
fs.azure.account.oauth.provider.typeorg.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProviderThe OAuth token provider class.
fs.azure.account.oauth2.client.endpointRequired, no defaultYour Azure OAuth client endpoint.
fs.azure.account.oauth2.client.idRequired, no defaultYour Azure OAuth client ID.
fs.azure.account.oauth2.client.secretRequired, no defaultYour Azure OAuth client secret.

wasbs-site.xml

For Azure Blob Storage.

PropertyDefaultDescription
fs.adl.oauth2.access.token.provider.typeClientCredentialThe OAuth token provider type.
fs.azure.account.key.<storage_account>.blob.core.windows.netRequired, no defaultThe access key for your Azure Blob Storage account. Replace <storage_account> in the property name with your account name.
fs.AbstractFileSystem.wasbs.implorg.apache.hadoop.fs.azure.WasbsThe file system implementation class for Azure Blob Storage.

jdbc-site.xml

Connection properties

PropertyDefaultDescription
jdbc.driverRequired, no defaultThe JDBC driver class name, for example org.postgresql.Driver.
jdbc.urlRequired, no defaultThe JDBC connection URL, for example jdbc:postgresql://localhost/postgres.
jdbc.userRequired, no defaultThe username for connecting to the external database.
jdbc.passwordRequired, no defaultThe password for connecting to the external database.

Optional properties

These properties are commented out in the template. Uncomment and set only the ones you need.

PropertyDefaultDescription
jdbc.pool.enabledtrueEnables connection pooling.
jdbc.pool.property.maximumPoolSize15The maximum number of pooled connections to the external database.
jdbc.pool.property.connectionTimeout30000The maximum time, in milliseconds, to wait for a connection from the pool.
jdbc.pool.property.idleTimeout30000The maximum time, in milliseconds, a connection sits idle in the pool.
jdbc.pool.property.minimumIdle0The minimum number of idle connections to maintain in the pool.
jdbc.pool.qualifierNoneCreates a separate connection pool for each value of this property. Useful for per-user pools alongside jdbc.session.property settings that switch users after connecting.
jdbc.statement.writeSize100The number of rows batched together before writing.
jdbc.statement.fetchSize1000The number of rows fetched at a time when reading. The MySQL JDBC driver instead streams rows one at a time by default.
jdbc.connection.transactionIsolationNoneThe transaction isolation level: READ_UNCOMMITTED, READ_COMMITTED, REPEATABLE_READ, or SERIALIZABLE. Confirm your database supports the level you choose.
jdbc.session.property.<name>NoneSets a session-level variable in the external database before running a query. Add one property per variable, replacing <name> in the property name.
jdbc.connection.property.<name>NoneSets a JDBC connection property. Add one property per value, replacing <name> in the property name.
pxf.service.user.impersonationfalseImpersonates the connecting WHPG user when connecting to the external database.
hadoop.security.authenticationNoneSet to kerberos when connecting to a Kerberized Hive metastore.
jdbc.read.prepared-statementfalseUses a PreparedStatement instead of a Statement when reading. Some drivers, such as Teradata's FastExport, require this.

pxf-site.xml

For Kerberos authentication, user impersonation, predicate pushdown, and ORC and Parquet write behavior. This template applies to any server, not only Hadoop connectors. See Authenticating with Kerberos for the Kerberos and impersonation properties in context.

PropertyDefaultDescription
pxf.service.kerberos.principalgpadmin/_HOST@EXAMPLE.COMThe Kerberos principal the PXF service uses. PXF replaces _HOST with the host's fully qualified domain name.
pxf.service.kerberos.keytab${pxf.base}/keytabs/pxf.service.keytabThe path to the Kerberos keytab file.
pxf.service.user.impersonationtrueImpersonates the connecting WHPG user when accessing the external system.
pxf.service.kerberos.constrained-delegationfalseUses Kerberos constrained delegation (S4U2Self/Proxy) for impersonation instead of requiring PXF to be a Hadoop proxy user. Requires additional Active Directory or IPA server configuration.
pxf.service.kerberos.ticket-renew-window0.8The fraction of a Kerberos ticket's lifespan PXF waits through before refreshing it.
pxf.service.user.name${user.name}Overrides the proxy user PXF presents to the external system. Set this on unsecured clusters with a proxy user already configured, or to make every WHPG user appear as this one user.
pxf.fs.basePathNoneThe base path PXF uses when building a file URI for a file:* profile. Required for any server that accesses data using a file:* profile.
pxf.ppd.hivetrueEnables predicate pushdown for Hive profiles.
pxf.sasl.connection.retries5The number of retries when a NameNode refuses a SASL connection with a GSS initiate failed error.
pxf.orc.write.decimal.overflowroundThe behavior when writing a bare NUMERIC column, mapped internally to DECIMAL(38, 10), and a value's integer digit count exceeds what that precision and scale allow: error fails the write, round rounds the value to fit, or ignore writes NULL. Define the column as NUMERIC(<precision>, <scale>) instead of a bare NUMERIC for more control over when an overflow happens.
pxf.orc.write.timezone.utctrueWrites ORC timestamp values using UTC instead of the PXF JVM's local timezone.
pxf.parquet.write.decimal.overflowroundThe behavior when writing a bare NUMERIC column, mapped internally to DECIMAL(38, 18), and a value's integer digit count exceeds what that precision and scale allow: error fails the write, round rounds the value to fit, or ignore writes NULL. Define the column as NUMERIC(<precision>, <scale>) instead of a bare NUMERIC for more control over when an overflow happens.