[
https://issues.apache.org/jira/browse/HBASE-16415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16055630#comment-16055630
]
Jan Kunigk edited comment on HBASE-16415 at 6/20/17 12:05 PM:
--------------------------------------------------------------
I mean that, adding the method to ReplicationEndpoint would define a general
interface for redirecting entries.
Other Endpoints (e.g. future subclasses of RegionReplicaReplicationEndpoint,
etc.) could implement a redirectEntries() method too if they want to provide
this, maybe with slightly different semantics.
Maybe those Endpoints would choose slightly different semantics for their own
implementation of redirectEntries().
If they do not provide an implementation, then the empty default implementation
from the interface will kick in.
If we implement redirection within
RedirectingInterClusterReplicationEndpoint.createBatches(), the concept of
redirection would not be exposed beyond
RedirectingInterClusterReplicationEndpoint.
I do not have enough experience with the HBase codebase to weigh the merits of
making this a general interface vs. encapsulating this functionality in the new
endpoint entirely and will rely on your guidance.
I hope I could clarify my idea though.
J
was (Author: [email protected]):
I mean that, adding the method to ReplicationEndpoint would define a general
interface for redirecting entries.
Other Endpoints (RegionReplicaReplicationEndpoint, or new future ones) could
implement a redirectEntries() method too if they want to provide this, maybe
with slightly different semantics.
Maybe those Endpoints would choose slightly different semantics for their own
implementation of redirectEntries().
If they do not provide an implementation, then the empty default implementation
from the interface will kick in.
If we implement redirection within
RedirectingInterClusterReplicationEndpoint.createBatches(), the concept of
redirection would not be exposed beyond
RedirectingInterClusterReplicationEndpoint.
I do not have enough experience with the HBase codebase to weigh the merits of
making this a general interface vs. encapsulating this functionality in the new
endpoint entirely and will rely on your guidance.
I hope I could clarify my idea though.
J
> 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
>
> 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)