该方法没试过,先记下再说
1、软件版本说明:
Goldengate 12c 12.2.0.1 for Oracle(源端)
Goldengate 12c 12.3.0.1 for Bigdata (目标端)
Hadoop 2.6.4(安装参考我的博客 https://blog.csdn.net/Return42/article/details/79786612)
Oracle 12c(安装参考我的博客 https://blog.csdn.net/return42/article/details/79786724)
HBase1.2.6(安装参考我的博客https://blog.csdn.net/return42/article/details/79786541)
Java1.8
2、机器IP说明
源端IP地址(192.168.107.20)安装 Oracle12c,Oracle GoldenGate
目标端IP地址(192.168.107.23),安装Hbase,OracleGoldenGate for BigData
3、源端的配置
参考我的博客( https://blog.csdn.net/return42/article/details/79786879)
4、目标 端的配置
#在用户家目录下的 ~/.bash_profile中配置用户的JAVA_HOME,以及LIB_PATH 环境变量。
export PATH
export JAVA_HOME=/opt/jdk
exportLD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server/libjvm.so:$JAVA_HOME/jre/lib/amd64/server/libjsig.so:$JAVA_HOME/jre/lib/amd64/server:$JAVA_HOME/jre/lib/amd64
#使新加入的环境变量生效
source ~/.bash_profile
#进入 OGG安装目录
cd /opt/ogg
#复制 hbase对应的配置文件。
cp AdapterExamples/big-data/hbase/*dirprm/
cd/ogg/dirprm
编辑配置文件
vi hbase.props
gg.handlerlist=hbase
gg.handler.hbase.type=hbase
gg.handler.hbase.hBaseColumnFamilyName=cf
gg.handler.hbase.keyValueDelimiter=CDATA[=]
gg.handler.hbase.keyValuePairDelimiter=CDATA[,]
gg.handler.hbase.encoding=UTF-8
gg.handler.hbase.pkUpdateHandling=abend
gg.handler.hbase.nullValueRepresentation=CDATA[NULL]
gg.handler.hbase.authType=none
gg.handler.hbase.includeTokens=false
gg.handler.hbase.mode=tx
goldengate.userexit.timestamp=utc
goldengate.userexit.writers=javawriter
javawriter.stats.display=TRUE
javawriter.stats.full=TRUE
gg.log=log4j
gg.log.level=INFO
gg.report.time=30sec
#Sample gg.classpath for Apache HBase
#gg.classpath=/var/lib/hbase/lib/*:/var/lib/hbase/conf/:
#Sample gg.classpath for CDH
#gg.classpath=/opt/cloudera/parcels/CDH/lib/hbase/lib/*:/etc/hbase/conf
#Sample gg.classpath for HDP
#gg.classpath=/usr/hdp/current/hbase-client/lib/*:/etc/hbase/conf
gg.classpath=/opt/hbase-1.2.6/lib/*:/opt/hbase-1.2.6/conf/:
javawriter.bootoptions=-Xmx512m-Xms32m -Djava.class.path=ggjava/ggjava.jar
5、启动ogg
./ggsci
GGSCI(hbase)2>editparamsmgr
Port 7809
DynamicPortList 20100-20199
PurgeOldExtracts ./dirdat/*,UseCheckPoints, MinKeepHours 2
Autostart Replicat R*
AUTORESTART Replicat *, WaitMinutes 1,Retries 3
ACCESSRULE, PROG *, IPADDR192.168.107.*, ALLOW
#配置复制进程
GGSCI(hbase)5>editparam rinta
replicat rinta
TARGETDB LIBFILE libggjava.so SETproperty=dirprm/hbase.props
REPORTCOUNT EVERY 1 MINUTES, RATE
GROUPTRANSOPS 10000
MAP OGG.*, TARGET root.*;
添加进程
add extract pinta,exttrailsource ./dirdat/in
6、配置完成,启动源端和目标端的进程。
参考:https://www.cppentry.com/bencandy.php?fid=118&id=196166
原文地址:https://www.cnblogs.com/51python/p/10874137.html