CDAP Setup (Replication)
CDAP requires that you provide an extension that will perform HBase-related DDL operations on both clusters instead of only on a single cluster. To create the extension, you must implement the HBaseDDLExecutor
class. Details on implementing this class, a sample implementation, and example files are available in the Appendix: HBaseDDLExecutor.
CDAP must have invalid transaction list pruning disabled, as this cannot be used with replication.
To deploy your extension (once compiled and packaged as a JAR file, such as my-extension.jar), run these steps on both your master and slave clusters. These steps assume <cdap-home>
is /opt/cdap
:
Create an extension directory, such as:
$ mkdir -p /opt/cdap/master/ext/hbase/repl
Copy your JAR to the directory:
$ cp my-extension.jar /opt/cdap/master/ext/hbase/repl/
Modify
cdap-site.xml
to use your implementation ofHBaseDDLExecutor
:<property> <name>hbase.ddlexecutor.extension.dir</name> <value>/opt/cdap/master/ext/hbase</value> </property>
Modify
cdap-site.xml
with any properties required by your executor. Any property prefixed withcdap.hbase.spi.hbase.
will be available through theHBaseDDLExecutorContext
object passed into your executor's initialize method:Modify
cdap-site.xml
to disable invalid transaction list pruning, as it cannot be used with replication:Before starting CDAP on the master cluster, run a command on the slave cluster to load the HBase coprocessors required by CDAP onto the slave's HDFS:
Start CDAP on the master cluster:
Related content
Created in 2020 by Google Inc.