Changing PXF settings
The PXF settings you can configure using the Yandex Cloud tools match those in the Greenplum® pxf-application.properties
To change the PXF settings:
-
Go to the folder page
and select Managed Service for Greenplum. -
Click the cluster name and select
PXF in the left-hand panel. -
Click
Edit PXF settings at the top of the page. -
Change the settings:
-
Connection Timeout: Timeout for connection to the Apache Tomcat® server when making read queries. The value range is from
5
to600
seconds. You can specify the values in various time units. -
Upload Timeout: Timeout for connection to the Apache Tomcat® server when making write queries. The value range is from
5
to600
seconds. You can specify the values in various time units. -
Max Threads: Maximum number of the Apache Tomcat® threads. The value range is from
1
to1024
.To prevent situations when requests get stuck or fail due to running out of memory or malfunctioning of the Java garbage collector, specify the number of the Apache Tomcat® threads. Learn more about adjusting the number of threads in the VMware Greenplum® Platform Extension Framework
documentation. -
Pool Allow Core Thread Timeout: Determines whether a timeout for core streaming threads is allowed.
-
Pool Core Size: Number of core streaming threads per pool. The value range is from
1
to1024
. -
Pool Queue Capacity: Maximum number of queries you can add to a pool queue after core streaming threads. The values may range from zero upward. If
0
, no pool queue is generated. -
Pool Max Size: Maximum allowed number of core streaming threads. The value range is from
1
to1024
. -
Xmx: Initial size of the JVM heap for the PXF daemon. The value range is from
64
to16384
MB. You can specify the values in various units. -
Xms: Maximum size of the JVM heap for the PXF daemon. The value range is from
64
to16384
MB. You can specify the values in various units.
-
-
Click Save.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To change the PXF settings:
-
View a description of the update cluster configuration CLI command:
yc managed-greenplum cluster update --help
-
Specify PXF settings:
yc managed-greenplum cluster update <cluster_name_or_ID> \ --pxf-connection-timeout=<read_queries_timeout> \ --pxf-upload-timeout=<write_queries_timeout> \ --pxf-max-threads=<Maximum_number_of_the_Apache_Tomcat®_threads> \ --pxf-pool-allow-core-thread-timeout=<whether_a_timeout_for_core_streaming_threads_is_allowed> \ --pxf-poll-core-size=<number_of_streaming_threads> \ --pxf-pool-queue-capacity=<pool_queue_capacity_for_streaming_threads> \ --pxf-pool-max-size=<maximum_number_of_streaming_threads> \ --pxf-xmx=<initial_size_of_the_JVM_heap> \ --pxf-xms=<maximum_size_of_the_JVM_heap>
Where:
-
pxf-connection-timeout
: Timeout for connection to the Apache Tomcat® server when making read queries, in seconds. The value range is from5
to600
. -
pxf-upload-timeout
: Timeout for connection to the Apache Tomcat® server when making write requests, in seconds. The value range is from5
to600
. -
pxf-max-threads
: Maximum number of the Apache Tomcat® threads. The value range is from1
to1024
.To prevent situations when requests get stuck or fail due to running out of memory or malfunctioning of the Java garbage collector, specify the number of the Apache Tomcat® threads. Learn more about adjusting the number of threads in the VMware Greenplum® Platform Extension Framework
documentation. -
pxf-pool-allow-core-thread-timeout
: Determines whether a timeout for core streaming threads is allowed. The default value isfalse
. -
pxf-poll-core-size
: Number of core streaming threads per pool. The value range is from1
to1024
. -
pxf-pool-queue-capacity
: Maximum number of queries you can add to a pool queue after core streaming threads. The values may range from zero upward. If0
, no pool queue is generated. -
pxf-pool-max-size
: Maximum allowed number of core streaming threads. The value range is from1
to1024
. -
pxf-xmx
: Initial size of the JVM heap for the PXF daemon, in megabytes. The value range is from64
to16384
. -
pxf-xms
: Maximum size of the JVM heap for the PXF daemon, in megabytes. The value range is from64
to16384
.
You can get the cluster name with a list of clusters in the folder.
-
To change the PXF settings:
-
Open the current Terraform configuration file with an infrastructure plan.
For more information about creating this file, see Creating an Greenplum® cluster.
For a complete list of available Managed Service for Greenplum® cluster configuration fields, see the Terraform provider documentation
. -
In the cluster description, under
pxf_config
, configure the PXF settings:resource "yandex_mdb_greenplum_cluster" "<cluster_name>" { ... pxf_config { connection_timeout = <read_queries_timeout> upload_timeout = <write_queries_timeout> max_threads = <Maximum_number_of_the_Apache_Tomcat®_threads> pool_allow_core_thread_timeout = <whether_a_timeout_for_core_streaming_threads_is_allowed> pool_core_size = <number_of_streaming_threads> pool_queue_capacity = <pool_queue_capacity_for_streaming_threads> pool_max_size = <maximum_number_of_streaming_threads> xmx = <initial_size_of_the_JVM_heap> xms = <maximum_size_of_the_JVM_heap> } }
Where:
-
connection_timeout
: Timeout for connection to the Apache Tomcat® server when making read queries, in seconds. The value range is from5
to600
. -
upload_timeout
: Timeout for connection to the Apache Tomcat® server when making write queries, in seconds. The value range is from5
to600
. -
max_threads
: Maximum number of the Apache Tomcat® threads. The value range is from1
to1024
.To prevent situations when requests get stuck or fail due to running out of memory or malfunctioning of the Java garbage collector, specify the number of the Apache Tomcat® threads. Learn more about adjusting the number of threads in the VMware Greenplum® Platform Extension Framework
documentation. -
pool_allow_core_thread_timeout
: Determines whether a timeout for core streaming threads is allowed. The default value isfalse
. -
pool_core_size
: Number of core streaming threads per pool. The value range is from1
to1024
. -
pool_queue_capacity
: Maximum number of queries you can add to a pool queue after core streaming threads. The values may range from zero upward. If0
, no pool queue is generated. -
pool_max_size
: Maximum allowed number of core streaming threads. The value range is from1
to1024
. -
xmx
: Initial size of the JVM heap for the PXF daemon, in megabytes. The value range is from64
to16384
. -
xms
: Maximum size of the JVM heap for the PXF daemon, in megabytes. The value range is from64
to16384
.
-
-
Make sure the settings are correct.
-
Using the command line, navigate to the folder that contains the up-to-date Terraform configuration files with an infrastructure plan.
-
Run the command:
terraform validate
If there are errors in the configuration files, Terraform will point to them.
-
-
Confirm updating the resources.
-
Run the command to view planned changes:
terraform plan
If the resource configuration descriptions are correct, the terminal will display a list of the resources to modify and their parameters. This is a test step. No resources are updated.
-
If you are happy with the planned changes, apply them:
-
Run the command:
terraform apply
-
Confirm the update of resources.
-
Wait for the operation to complete.
-
-
To change PXF settings, use the update REST API method for the Cluster resource or the ClusterService/Update gRPC API call and provide the following in the request:
-
Cluster ID in the
clusterId
parameter. To find out the cluster ID, get a list of clusters in the folder. -
List of updatable PXF settings in the
configSpec.pxfConfig
parameter:-
connectionTimeout
: Timeout for connection to the Apache Tomcat® server when making read queries, in seconds. The value range is from5
to600
. -
uploadTimeout
: Timeout for connection to the Apache Tomcat® server when making write queries, in seconds. The value range is from5
to600
. -
maxThreads
: Maximum number of the Apache Tomcat® threads. The value range is from1
to1024
.To prevent situations when requests get stuck or fail due to running out of memory or malfunctioning of the Java garbage collector, specify the number of the Apache Tomcat® threads. Learn more about adjusting the number of threads in the VMware Greenplum® Platform Extension Framework
documentation. -
poolAllowCoreThreadTimeout
: Determines whether a timeout for core streaming threads is allowed. The default value isfalse
. -
poolCoreSize
: Number of core streaming threads per pool. The value range is from1
to1024
. -
poolQueueCapacity
: Maximum number of queries you can add to a pool queue after core streaming threads. The values may range from zero upward. If0
, no pool queue is generated. -
poolMaxSize
: Maximum allowed number of core streaming threads. The value range is from1
to1024
. -
xmx
: Initial size of the JVM heap for the PXF daemon, in megabytes. The value range is from64
to16384
. -
xms
: Maximum size of the JVM heap for the PXF daemon, in megabytes. The value range is from64
to16384
.
-
-
List of cluster configuration fields to update in the
updateMask
parameter.
Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the updateMask
parameter as a single comma-separated string.
Greenplum® and Greenplum Database® are registered trademarks or trademarks of VMware, Inc. in the United States and/or other countries.