[ 
https://issues.apache.org/jira/browse/HBASE-16415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Kunigk updated HBASE-16415:
-------------------------------
    Status: Patch Available  (was: In Progress)

Hi, I have submitted a patch in line with what has been discussed on this JIRA.
Along with RedirectingInterClusterReplicationEndpoint.java,
I have implemented a test class TestRedirectedReplication.java.

Some other (mostly minor or cosmetic) changes to additional classes were 
necessary to provide the functionality as discussed.

It is possible to redirect from one table to another or from one namespace to 
another or both at the same time. Multiple such redirection rules can be 
supplied in a given peer.
This also implies that 2 source tables can be replicated to a single 
destination table, by the way, but the opposite is of course not possible.

I am looking forward to feedback, best, Jan 

 

> Replication in different namespace
> ----------------------------------
>
>                 Key: HBASE-16415
>                 URL: https://issues.apache.org/jira/browse/HBASE-16415
>             Project: HBase
>          Issue Type: New Feature
>          Components: Replication
>            Reporter: Christian Guegi
>            Assignee: Jan Kunigk
>         Attachments: HBASE-16415.patch
>
>
> It would be nice to replicate tables from one namespace to another namespace.
> Example:
> Master cluster, namespace=default, table=bar
> Slave cluster, namespace=dr, table=bar
> Replication happens in class ReplicationSink:
>   public void replicateEntries(List<WALEntry> entries, final CellScanner 
> cells, ...){
>     ...
>     TableName table = 
> TableName.valueOf(entry.getKey().getTableName().toByteArray());
>     ...
>     addToHashMultiMap(rowMap, table, clusterIds, m);
>     ...
>     for (Entry<TableName, Map<List<UUID>, List<Row>>> entry : 
> rowMap.entrySet()) {
>       batch(entry.getKey(), entry.getValue().values());
>     }
>    }



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to