GridGain Handler
Prerequisites
JDK 8.x
Install GoldenGate
-
Download GoldenGate for Big Data.
-
Extract the distribution and navigate to its root directory.
-
Check that GoldenGate is working by running Command Interpreter (
ggsci
).
Run Java Handler
-
Launch GoldenGate Command Interpreter (
ggsci
). -
Verify that Manager is running:
info manager
-
If the manager has stopped, start it:
start manager
-
Run the following command to start creating configuration for the
replicat
process (a.k.a.javarepl
):edit params javarepl
-
Copy the GridGain GoldenGate connector directory (available in
integration/gridgain-goldengate-19
) from the GridGain distribution to the GoldenGate distribution underggjava/lib
.Example configuration for the
replicat
process:REPLICAT javarepl TARGETDB LIBFILE libggjava.so SET property=dirprm/javarepl.props REPORTCOUNT EVERY 1 MINUTES, RATE GROUPTRANSOPS 1000 MAP MYSCHEMA.*, TARGET MYSCHEMA.*;
-
Create an additional configuration file for Java runtime in the
dirprm
directory, next tojavarepl.prm
created in the previous step:#javarepl.props gg.handlerlist=gridgain gg.handler.gridgain.type=org.gridgain.oracle.goldengate.GridGainHandler gg.handler.gridgain.configurationPath=dirprm/gridgain-config.xml gg.handler.gridgain.operationHandlerBeanName=fooHandler goldengate.userexit.writers=javawriter javawriter.stats.display=TRUE javawriter.stats.full=TRUE gg.log=log4j gg.log.level=INFO gg.report.time=30sec gg.classpath=ggjava/lib/gridgain-goldengate-19/* javawriter.bootoptions=-Xmx512m -Xms32m -Djava.class.path=.:./ggjava/ggjava.jar:./dirprm
-
Create a GridGain configuration file,
dirprm/gridgain-config.xml
. Example:<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="personOpHandler" name="personOpHandler" class="org.gridgain.oracle.goldengate.handler.PersonOperationHandler"/> <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> <property name="localHost" value="127.0.0.1"/> <property name="cacheConfiguration"> <list> <bean class="org.apache.ignite.configuration.CacheConfiguration"> <property name="name" value="person"/> <property name="atomicityMode" value="ATOMIC"/> <property name="backups" value="1"/> </bean> <bean class="org.apache.ignite.configuration.CacheConfiguration"> <property name="name" value="address"/> <property name="atomicityMode" value="TRANSACTIONAL"/> <property name="backups" value="1"/> </bean> </list> </property> </bean> </beans>
-
Add the
replicat
process:add replicat javarepl, exttrail dirdat/tr
-
Start the replication process:
start replicat javarepl
-
Check the process status using the
info javarepl
(basic) orview report javarepl
(verbose) command. -
For process log, see
dirrpt/JAVAREPL.LOG
.
Errors and Remedies
Problem:
The `./ggsci: error while loading shared libraries: "libjvm.so: cannot open shared object file: No such file or directory".
Reason:
Some Java variables are not configured correctly.
Remedy:
-
Set the variables as follows:
export JAVA_HOME=<valid-jdk-8-path> export PATH=$JAVA_HOME/bin:$PATH export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server:$LD_LIBRARY_PATH
-
Place the GoldenGate trail files into the
dirdat
directory.
© 2024 GridGain Systems, Inc. All Rights Reserved. Privacy Policy | Legal Notices. GridGain® is a registered trademark of GridGain Systems, Inc.
Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation.