Setting Java options for XDR Proxy
The Java options are passed to the connectors by setting the JAVA_OPTS
environment variable.
The JAVA_OPTS
environment variable is set differently for connectors running as systemd
services and
for connectors running as non-systemd
Docker instances.
Procedure for connector running as systemd service
Create a systemd
override file
The following command creates a systemd
override file for the connector.
sudo systemctl edit <connector-name>
connector-name: Name of the connector for which you want to create an override file.
Possible values aerospike-jms-inbound
, aerospike-jms-outbound
, aerospike-kafka-outbound
,
aerospike-pulsar-outbound
, aerospike-pubsub-outbound
, aerospike-xdr-proxy
.
Set the JAVA_OPTS
environment variable in the override file
In the override file that you created in the previous step, set the JAVA_OPTS
environment
variable in the Service section. Here is an example that sets a netty workdir and Java maximum
heap size:
[Service]
Environment=JAVA_OPTS="-Dio.netty.native.workdir=/connector/tmp -Xmx1024m"
Reload the systemd
manager configuration
Run the systemd
command to reload the manager configuration:
sudo systemctl daemon-reload
Restart connector
Restart the systemd
connector service.
sudo systemctl restart <connector-name>
Procedure for a connector running as a non-systemd
Docker container
Set the JAVA_OPTS
environment variable for the container on startup.
Here is an example that sets a netty workdir and Java maximum heap size:
Environment=JAVA_OPTS="Dio.netty.native.workdir=/connector/tmp -Xmx8G"