$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
| Property | Default | Description |
|---|---|---|
fs.defaultFS | hdfs://0.0.0.0:8020 | The address of the HDFS NameNode. |
hdfs-site.xml
| Property | Default | Description |
|---|---|---|
dfs.permissions.enabled | true | Enforces HDFS file permission checks. |
dfs.block.access.token.enable | true | Requires a block access token for datanode communication. |
dfs.support.append | true | Allows 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.authorization | true | Enables service-level authorization checks. |
hive-site.xml
| Property | Default | Description |
|---|---|---|
hive.metastore.uris | thrift://localhost:9083 | The URI PXF uses to reach the Hive metastore. |
hive.metastore.integral.jdo.pushdown | true | Pushes down predicates on integral partition columns to the metastore, improving performance for tables with many partitions. |
hbase-site.xml
| Property | Default | Description |
|---|---|---|
hbase.rootdir | hdfs://0.0.0.0:8020/hbase | The location on HDFS where HBase stores its data. |
hbase.zookeeper.quorum | 127.0.0.1 | The ZooKeeper ensemble HBase uses for coordination. |
mapred-site.xml
| Property | Default | Description |
|---|---|---|
mapreduce.framework.name | local | The MapReduce execution framework. |
mapreduce.input.fileinputformat.input.dir.recursive | true | Reads files in subdirectories recursively. |
yarn-site.xml
| Property | Default | Description |
|---|---|---|
yarn.resourcemanager.address | 0.0.0.0:8032 | The 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.
| Property | Default | Description |
|---|---|---|
fs.s3a.access.key | Required, no default | Your AWS access key ID. |
fs.s3a.secret.key | Required, no default | Your AWS secret access key. |
fs.s3a.fast.upload | true | Uses fast upload buffering for writes. |
minio-site.xml
For MinIO and other S3-compatible object stores.
| Property | Default | Description |
|---|---|---|
fs.s3a.endpoint | Required, no default | The object store's endpoint URL, including the URI scheme. |
fs.s3a.access.key | Required, no default | The access key for the object store. |
fs.s3a.secret.key | Required, no default | The secret key for the object store. |
fs.s3a.fast.upload | true | Uses fast upload buffering for writes. |
fs.s3a.path.style.access | true | Uses 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.
| Property | Default | Description |
|---|---|---|
google.cloud.auth.service.account.enable | true | Authenticates using a Google Cloud service account. |
google.cloud.auth.service.account.json.keyfile | Required, no default | The path to your Google Cloud service account JSON key file. |
fs.AbstractFileSystem.gs.impl | com.google.cloud.hadoop.fs.gcs.GoogleHadoopFS | The file system implementation class for Google Cloud Storage. |
abfss-site.xml
For Azure Data Lake Storage Gen2.
| Property | Default | Description |
|---|---|---|
fs.azure.account.auth.type | OAuth | The authentication type. |
fs.azure.account.oauth.provider.type | org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider | The OAuth token provider class. |
fs.azure.account.oauth2.client.endpoint | Required, no default | Your Azure OAuth client endpoint. |
fs.azure.account.oauth2.client.id | Required, no default | Your Azure OAuth client ID. |
fs.azure.account.oauth2.client.secret | Required, no default | Your Azure OAuth client secret. |
wasbs-site.xml
For Azure Blob Storage.
| Property | Default | Description |
|---|---|---|
fs.adl.oauth2.access.token.provider.type | ClientCredential | The OAuth token provider type. |
fs.azure.account.key.<storage_account>.blob.core.windows.net | Required, no default | The access key for your Azure Blob Storage account. Replace <storage_account> in the property name with your account name. |
fs.AbstractFileSystem.wasbs.impl | org.apache.hadoop.fs.azure.Wasbs | The file system implementation class for Azure Blob Storage. |
jdbc-site.xml
Connection properties
| Property | Default | Description |
|---|---|---|
jdbc.driver | Required, no default | The JDBC driver class name, for example org.postgresql.Driver. |
jdbc.url | Required, no default | The JDBC connection URL, for example jdbc:postgresql://localhost/postgres. |
jdbc.user | Required, no default | The username for connecting to the external database. |
jdbc.password | Required, no default | The 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.
| Property | Default | Description |
|---|---|---|
jdbc.pool.enabled | true | Enables connection pooling. |
jdbc.pool.property.maximumPoolSize | 15 | The maximum number of pooled connections to the external database. |
jdbc.pool.property.connectionTimeout | 30000 | The maximum time, in milliseconds, to wait for a connection from the pool. |
jdbc.pool.property.idleTimeout | 30000 | The maximum time, in milliseconds, a connection sits idle in the pool. |
jdbc.pool.property.minimumIdle | 0 | The minimum number of idle connections to maintain in the pool. |
jdbc.pool.qualifier | None | Creates 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.writeSize | 100 | The number of rows batched together before writing. |
jdbc.statement.fetchSize | 1000 | The number of rows fetched at a time when reading. The MySQL JDBC driver instead streams rows one at a time by default. |
jdbc.connection.transactionIsolation | None | The transaction isolation level: READ_UNCOMMITTED, READ_COMMITTED, REPEATABLE_READ, or SERIALIZABLE. Confirm your database supports the level you choose. |
jdbc.session.property.<name> | None | Sets 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> | None | Sets a JDBC connection property. Add one property per value, replacing <name> in the property name. |
pxf.service.user.impersonation | false | Impersonates the connecting WHPG user when connecting to the external database. |
hadoop.security.authentication | None | Set to kerberos when connecting to a Kerberized Hive metastore. |
jdbc.read.prepared-statement | false | Uses 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.
| Property | Default | Description |
|---|---|---|
pxf.service.kerberos.principal | gpadmin/_HOST@EXAMPLE.COM | The 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.keytab | The path to the Kerberos keytab file. |
pxf.service.user.impersonation | true | Impersonates the connecting WHPG user when accessing the external system. |
pxf.service.kerberos.constrained-delegation | false | Uses 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-window | 0.8 | The 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.basePath | None | The 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.hive | true | Enables predicate pushdown for Hive profiles. |
pxf.sasl.connection.retries | 5 | The number of retries when a NameNode refuses a SASL connection with a GSS initiate failed error. |
pxf.orc.write.decimal.overflow | round | The 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.utc | true | Writes ORC timestamp values using UTC instead of the PXF JVM's local timezone. |
pxf.parquet.write.decimal.overflow | round | The 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. |
