9.1 Automatic Heartbeat for Big Data
This chapter describes how to enable Heartbeat for Oracle GoldenGate for Big Data and how to manage and modify heartbeat across the replication environment.
Parent topic: Administer
9.1.1 Overview
HEARTBEATTABLE
for Oracle GoldenGate for BigData,
you need to:
- Specify
GGSCHEMA
inGLOBALS
with any value, for example,GGSCHEMA GGADMIN
. - Enable
ENABLE_HEARTBEAT_TABLE
inGLOBALS
. - Execute
ADD HEARTBEATTABLE
fromGGSCI
.
In Oracle GoldenGate for RDBMS, the HEARTBEATTABLE
records are applied
to the following target HEARTBEATTABLE
tables:
GGADMIN.GG_HEARTBEAT
and
GGADMIN.GG_HEARBEAT_HISTORY
.
Two Modes of HEARTBEATTABLE
in Oracle GoldenGate for Big
Data:
In Mode 1 (as user data), the records that are handled by Oracle GoldenGate
for Big Data are written to HEARTBEATTABLE
files. For example, table
GGADMIN.GG_HEARTBEAT
is stored in file dirtmp/<replicat
name>-hb.json
. Here, the records are written to the replicat file
hb.json.
Table GGADMIN.GG_HEARTBEAT_HISTORY
is
stored in dirtmp/<replicat-name>hb <date>.json
. Here, the
History records re written to thehb-<date>.json
file.
To apply HEARTBEATTABLE as user data:
- Disable
HEARTBEATTABLE
by specifyingDISABLEHEARTBEATTABLE
in the replicat parameter file. - Specify
HEARTBEATTABLE
tables in the replicat MAP statements:MAP GGADMIN.GG_HEARTBEAT, TARGET GGADMIN.GG_HEARTBEAT; MAP GGADMIN.GG_HEARTBEAT_HISTORY, TARGET GGADMIN.GG_HEARTBEAT_HISTORY;
When applied as user data, the HEARTBEAT
records
GG_HEARTBEAT
and GG_HEARTBEAT_HISTORY
are
written to the handler as if they are user tables. The HEARTBEAT
records are not stored in tables like RDBMS, but in .json
files.
Mode 2 (as passthrough) enables you to send a statement directly to a non-Oracle
system, such as Kafka without first being interpreted by Big Data. You do not need
to explicitly add MAP for GG_HEARTBEAT
,
GG_HEARTBEAT_HISTORY
tables in replicate parameter file. You must add
ENABLE_HEARTBEAT_TABLE
in GLOBALS
file.
Restart of ggsci, manager and other child processes are recommended after any
changes in GLOBALS
file.
Parent topic: Automatic Heartbeat for Big Data
9.1.2 Automatic Heartbeat Tables
Parent topic: Automatic Heartbeat for Big Data
9.1.2.1 ADD HEARTBEATTABLE
ADD HEARTBEATTABLE
[, RETENTION_TIME number in days] |
[, PURGE_FREQUENCY number in days]
- RETENTION_TIME
-
Specifies when heartbeat entries older than the retention time in the history table are purged. The default is 30 days.
- PURGE FREQUENCY
-
Specifies how often the purge scheduler is run to delete table entries that are older than the retention time from the heartbeat history. The default is 1 day.
GGSCI > ADD HEARTBEATTABLE HEARTBEAT is now enabled: HEARTBEAT configuration file in dirprm\heartbeat.properties heartbeat.enabled=true heartbeat.frequency=60 heartbeat.retention_time=30 heartbeat.purge.frequency=1 heartbeat.db.name=BigData
Note:
Ensure to run theADD HEARTBEATTABLE
command before processing the trail
file through the replicat.
Parent topic: Automatic Heartbeat Tables
9.1.2.2 ALTER HEARTBEAT TABLE
ALTER HEARTBEATTABLE
[, RETENTION_TIME number in days] |
[, PURGE_FREQUENCY number in days]
Parent topic: Automatic Heartbeat Tables
9.1.2.3 INFO HEARTBEATTABLE
Example
HEARTBEAT configuration file dirprm\heartbeat.properties heartbeat.enabled=true heartbeat.frequency=60 heartbeat.retention_time=30 heartbeat.purge.frequency=1 heartbeat.db.name=BigData
Parent topic: Automatic Heartbeat Tables
9.1.2.4 LAG
LAG <replicat name>
Example
GGSCI> LAG rtpc Lag Information From Heartbeat Table LAG AGE FROM TO PATH 5.77s 10m 22.87s ORCL BIGDATA ETPC ==> PTPC ==> RTPC
LAG <replicat name> HISTORY
GGSCI> LAG rtpc HISTORY
Example
Lag Information From Heartbeat Table
LAG AGE FROM TO PATH
5.77s 10m 22.87s ORCL ORCL ETPC ==> PTPC ==> RTPC
Lag History
DATE MIN AVG MAX
2018-07-01 5.77s 5.90s 6.20s
2018-07-02 6.77s 6.90s 7.20s
2018-07-03 7.77s 7.90s 8.20s
2018-07-04 8.77s 9.90s 9.20s
Parent topic: Automatic Heartbeat Tables
9.1.2.5 DELETE HEARTBEATTABLE
DELETE HEARTBEATTABLE
Example
GGSCI> DELETE HEARTBEATTABLE
Parent topic: Automatic Heartbeat Tables