Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
oracle_goldengate_hadoop_hbase [2020/11/11 15:43] – andonovj | oracle_goldengate_hadoop_hbase [2020/11/22 15:08] (current) – [Configure HBase Handler] andonovj | ||
---|---|---|---|
Line 2: | Line 2: | ||
Again, we have to configure: | Again, we have to configure: | ||
+ | * Start HBase | ||
* Replicat config | * Replicat config | ||
* HBase Handler Properties File | * HBase Handler Properties File | ||
Line 8: | Line 9: | ||
So let's get going. | So let's get going. | ||
+ | |||
+ | ====Start HBase==== | ||
+ | < | ||
+ | [oracle@hostname ~]$ start-dfs.sh | ||
+ | Starting namenodes on [localhost] | ||
+ | localhost: starting namenode, logging to / | ||
+ | edvmr1p0.out | ||
+ | localhost: starting datanode, logging to / | ||
+ | edvmr1p0.out | ||
+ | Starting secondary namenodes [0.0.0.0] | ||
+ | 0.0.0.0: starting secondarynamenode, | ||
+ | secondarynamenode-edvmr1p0.out | ||
+ | [oracle@hostname ~]$ start-yarn.sh | ||
+ | starting yarn daemons | ||
+ | starting resourcemanager, | ||
+ | edvmr1p0.out | ||
+ | localhost: starting nodemanager, | ||
+ | edvmr1p0.out | ||
+ | [oracle@hostname ~]$ start-hbase.sh | ||
+ | localhost: starting zookeeper, logging to / | ||
+ | edvmr1p0.out | ||
+ | starting master, logging to / | ||
+ | starting regionserver, | ||
+ | out | ||
+ | [oracle@hostname ~]$ | ||
+ | [oracle@hostname ~]$ $JAVA_HOME/ | ||
+ | 21538 SecondaryNameNode | ||
+ | 21346 DataNode | ||
+ | 22148 NodeManager | ||
+ | 22613 HMaster | ||
+ | 22502 HQuorumPeer | ||
+ | 21159 NameNode | ||
+ | 23386 Jps | ||
+ | 21851 ResourceManager | ||
+ | 22747 HRegionServer | ||
+ | [oracle@hostname ~]$ | ||
+ | </ | ||
+ | |||
+ | ====Configure HBase Handler==== | ||
< | < | ||
gg.handlerlist=hbase | gg.handlerlist=hbase | ||
Line 43: | Line 83: | ||
Copyright (C) 1995, 2016, Oracle and/or its affiliates. All rights reserved. | Copyright (C) 1995, 2016, Oracle and/or its affiliates. All rights reserved. | ||
- | |||
- | |||
GGSCI (edvmr1p0) 1> info all | GGSCI (edvmr1p0) 1> info all | ||
Line 64: | Line 102: | ||
REPLICAT rhbase | REPLICAT rhbase | ||
- | TARGETDB LIBFILE libggjava.so SET property= | + | TARGETDB LIBFILE libggjava.so SET property=dirprm/ |
- | dirprm/ | + | |
REPORTCOUNT EVERY 1 MINUTES, RATE | REPORTCOUNT EVERY 1 MINUTES, RATE | ||
GROUPTRANSOPS 10000 | GROUPTRANSOPS 10000 | ||
Line 90: | Line 127: | ||
GGSCI (edvmr1p0) 7> | GGSCI (edvmr1p0) 7> | ||
+ | </ | ||
+ | |||
+ | |||
+ | =====Test===== | ||
+ | So let's check if that will work. We will do two tests: | ||
+ | |||
+ | - Test on Insert Operation | ||
+ | - Test on Update Operation | ||
+ | |||
+ | |||
+ | |||
+ | ====Test on Insert Operation==== | ||
+ | < | ||
+ | [oracle@edvmr1p0 oggsrc]$ sqlplus oggsrc/ | ||
+ | |||
+ | SQL*Plus: Release 12.1.0.2.0 Production on Wed Nov 11 15:45:59 2020 | ||
+ | |||
+ | Copyright (c) 1982, 2014, Oracle. | ||
+ | |||
+ | Last Successful login time: Wed Nov 11 2020 15:24:15 +00:00 | ||
+ | |||
+ | Connected to: | ||
+ | Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production | ||
+ | With the Partitioning, | ||
+ | |||
+ | SQL> insert into product_prod select * from product where product_id < 1001; | ||
+ | |||
+ | 1000 rows created. | ||
+ | |||
+ | SQL> commit; | ||
+ | |||
+ | Commit complete. | ||
+ | |||
+ | SQL> | ||
+ | </ | ||
+ | |||
+ | Check on HBase: | ||
+ | |||
+ | < | ||
+ | [oracle@edvmr1p0 ~]$ hbase shell | ||
+ | SLF4J: Class path contains multiple SLF4J bindings. | ||
+ | SLF4J: Found binding in [jar: | ||
+ | SLF4J: Found binding in [jar: | ||
+ | SLF4J: See http:// | ||
+ | SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] | ||
+ | HBase Shell; enter ' | ||
+ | Type " | ||
+ | Version 1.2.3, rbd63744624a26dc3350137b564fe746df7a721a4, | ||
+ | |||
+ | hbase(main): | ||
+ | TABLE | ||
+ | OGGSRC: | ||
+ | 1 row(s) in 0.2120 seconds | ||
+ | |||
+ | => [" | ||
+ | hbase(main): | ||
+ | base(main): | ||
+ | ROW COLUMN+CELL | ||
+ | 1 column=cf: | ||
+ | value=RJM75LEM3UY | ||
+ | 1 column=cf: | ||
+ | value=1 | ||
+ | 1 column=cf: | ||
+ | value=eu, eleifend nec, malesuada | ||
+ | 1 column=cf: | ||
+ | value=1 | ||
+ | 10 column=cf: | ||
+ | value=IEF94KVH9EU | ||
+ | 10 column=cf: | ||
+ | .............................................................. | ||
+ | </ | ||
+ | |||
+ | ====Test on Update Operation==== | ||
+ | |||
+ | |||
+ | On the Source database, update the table in any way you want: | ||
+ | |||
+ | < | ||
+ | SQL> update product_prod set product_name = 'OGG Big Data HBase' where product_id=999; | ||
+ | |||
+ | 1 row updated. | ||
+ | |||
+ | SQL> commit; | ||
+ | |||
+ | Commit complete. | ||
+ | |||
+ | SQL> | ||
+ | </ | ||
+ | |||
+ | On the HBase that should be visible: | ||
+ | |||
+ | < | ||
+ | hbase(main): | ||
+ | COLUMN | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | 4 row(s) in 0.0100 seconds | ||
+ | |||
+ | hbase(main): | ||
</ | </ | ||