Data Replication

Cloudera Manager enables you to replicate data across datacenters for disaster recovery scenarios. Replications can include data stored in HDFS, data stored in Hive tables, Hive metastore data, and Impala metadata (catalog server metadata) associated with Impala tables registered in the Hive metastore. When critical data is stored on HDFS, Cloudera Manager helps to ensure that the data is available at all times, even in case of complete shutdown of a datacenter.

You can also replicate HDFS data to and from Amazon S3 and you can replicate Hive data and metadata to and from Amazon S3.

For an overview of data replication, view this video about Backing Up Data Using Cloudera Manager.

You can also use the HBase shell to replicate HBase data. (Cloudera Manager does not manage HBase replications.)

For recommendations on using data replication and Sentry authorization, see Configuring Sentry to Enable BDR Replication.

Cloudera License Requirements for Replication

Both the source and destination clusters must have a Cloudera Enterprise license.

Supported and Unsupported Replication Scenarios

Supported Replication Scenarios

In Cloudera Manager 5, replication is supported between CDH 5 or CDH 4 clusters. The following tables describe support for HDFS and Hive replication.

Service Source Destination
  Cloudera Manager Version CDH Version Comment Cloudera Manager Version CDH Version Comment
HDFS, Hive 4 4   5 4  
HDFS, Hive 4 4.4 or higher   5 5  
HDFS, Hive 4 or 5 5 SSL enabled on Hadoop services 4 or 5 5 SSL enabled on Hadoop services
HDFS, Hive 4 or 5 5 SSL enabled on Hadoop services 4 or 5 5 SSL not enabled on Hadoop services
HDFS, Hive 4 or 5 5.1 SSL enabled on Hadoop services and YARN 4 or 5 4 or 5  
HDFS, Hive 5 4   4.7.3 or higher 4  
HDFS, Hive 5 4   5 4  
HDFS, Hive 5 5   5 5  
HDFS, Hive 5 5   5 4.4 or higher  
HDFS, Hive 5.7 5.7, with Isilon storage See Supported Replication Scenarios for Clusters using Isilon Storage. 5.7 5.7, with Isilon storage See Supported Replication Scenarios for Clusters using Isilon Storage.
HDFS, Hive 5.7 5.7 5.7 5.7, with Isilon storage
HDFS, Hive 5.7 5.7, with Isilon storage 5.7 5.7
HDFS, Hive 5.8 5.8, with or without Isilon Storage 5.8 5.8, with or without Isilon Storage

Unsupported Replication Scenarios

Service Source Destination
  Cloudera Manager Version CDH Version Comment Cloudera Manager Version CDH Version Comment
Any 4 or 5 4 or 5 Kerberos enabled. 4 or 5 4 or 5 Kerberos not enabled
Any 4 or 5 4 or 5 Kerberos not enabled. 4 or 5 4 or 5 Kerberos enabled
HDFS, Hive 4 or 5 4 Where the replicated data includes a directory that contains a large number of files or subdirectories (several hundred thousand entries), causing out-of-memory errors.

To work around this issue, follow this procedure.

4 or 5 5  
Hive 4 or 5 4 Replicate HDFS Files is disabled. 4 or 5 4 or 5 Over-the-wire encryption is enabled.
Hive 4 or 5 4 Replication can fail if the NameNode fails over during replication. 4 or 5 5, with high availability enabled Replication can fail if the NameNode fails over during replication.
Hive 4 or 5 4 The clusters use different Kerberos realms. 4 or 5 5 An older JDK is deployed. (Upgrade the CDH 4 cluster to use JDK 7 or JDK6u34 to work around this issue.)
Any 4 or 5 4 SSL enabled on Hadoop services. 4 or 5 4 or 5  
Hive 4 or 5 4.2 or higher If the Hive schema contain views. 4 or 5 4  
HDFS 4 or 5 4, with high availability enabled Replications fail if NameNode failover occurs during replication. 4 or 5 5, without high availability Replications fail if NameNode failover occurs during replication.
HDFS 4 or 5 4 or 5 Over the wire encryption is enabled. 4 or 5 4  
HDFS 4 or 5 5 Clusters where there are URL-encoding characters such as % in file and directory names. 4 or 5 4  
Hive 4 or 5 4 or 5 Over the wire encryption is enabled and Replicate HDFS Files is enabled. 4 or 5 4  
Hive 4 or 5 4 or 5 From one cluster to the same cluster. 4 or 5 4 or 5 From one cluster to the same cluster.
HDFS, Hive 4 or 5 5 Where the replicated data includes a directory that contains a large number of files or subdirectories (several hundred thousand entries), causing out-of-memory errors.

To work around this issue, follow this procedure.

4 or 5 4  
HDFS 4 or 5 5 The clusters use different Kerberos realms. 4 or 5 4 An older JDK is deployed. (Upgrade the CDH 4 cluster to use JDK 7 or JDK6u34 to work around this issue.)
Hive 4 or 5 5 Replicate HDFS Files is enabled and the clusters use different Kerberos realms. 4 or 5 4 An older JDK is deployed. (Upgrade the CDH 4 cluster to use JDK 7 or JDK6u34 to work around this issue.)
Any 4 or 5 5 SSL enabled on Hadoop services and YARN. 4 or 5 4 or 5  
Any 4 or 5 5 SSL enabled on Hadoop services. 4 or 5 4  
HDFS 4 or 5 5, with high availability enabled Replications fail if NameNode failover occurs during replication. 4 or 5 4, without high availability Replications fail if NameNode failover occurs during replication.
HDFS, Hive 5 5   4 4  
Hive 5.2 5.2 or lower Replication of Impala UDFs is skipped. 4 or 5 4 or 5  
Workaround for replicated data that includes a directory that contains several hundred thousand files or subdirectories:
  1. On the destination Cloudera Manager instance, go to the HDFS service page.
  2. Click the Configuration tab.
  3. Select Scope > HDFS service name (Service-Wide) and Category > Advanced.
  4. Locate the HDFS Replication Advanced Configuration Snippet property.
  5. Increase the heap size by adding a key-value pair, for instance, HADOOP_CLIENT_OPTS=-Xmx1g. In this example, 1g sets the heap size to 1 GB. This value should be adjusted depending on the number of files and directories being replicated.
  6. Click Save Changes to commit the changes.

HDFS Replication to Amazon S3

You can use Cloudera Manager to replicate HDFS data to and from Amazon S3, however you cannot replicate data from one Amazon S3 instance to another using Cloudera Manager. You must have the appropriate credentials to access the Amazon S3 account and you must create buckets in Amazon S3 to store the replicated files.

To configure HDFS replication to Amazon S3:
  1. Create an External Account using Amazon S3 credentials. See Configuring an External Account for Amazon S3 Replication.
  2. Create an HDFS Replication Schedule. See HDFS Replication.

Supported Replication Scenarios for Clusters using Isilon Storage

Note the following when scheduling replication jobs for clusters that use Isilon storage:
  • As of CDH 5.8 and higher, Replication is supported for clusters using Kerberos and Isilon storage on the source or destination cluster, or both. See Configuring Replication with Kerberos and Isilon. Replication between clusters using Isilon storage and Kerberos is not supported in CDH 5.7.
  • Make sure that the hdfs user is a superuser in the Isilon system. If you specify alternate users with the Run As option when creating replication schedules, those users must also be superusers.
  • Cloudera recommends that you use the Isilon root user for replication jobs. (Specify root in the Run As field when creating replication schedules.)
  • Select the Skip checksum checks property when creating replication schedules.
  • Clusters that use Isilon storage do not support snapshots. Snapshots are used to ensure data consistency during replications in scenarios where the source files are being modified. Therefore, when replicating from an Isilon cluster, Cloudera recommends that you do not replicate Hive tables or HDFS files that could be modified before the replication completes.

See Using CDH with Isilon Storage.