[
https://issues.apache.org/jira/browse/HBASE-16415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16076926#comment-16076926
]
Ted Yu commented on HBASE-16415:
--------------------------------
For RedirectingInterClusterReplicationEndpoint.java, please move the javadoc
starting with 'A {@link
org.apache.hadoop.hbase.replication.ReplicationEndpoint}' to just above 'public
class RedirectingInterClusterReplicationEndpoint'
Please add annotation for audience for
RedirectingInterClusterReplicationEndpoint (Private).
For redirectEntries(), tableRedirectionsMap is populated. This action can be
lifted outside redirectEntries() - redirection rules wouldn't change that often.
{code}
} catch (IllegalArgumentException e) {
LOG.info("Found unknown configuration key " key "in
ReplicationPeerConfiguration");
{code}
IllegalArgumentException can come from parsing val - adjust message
accordingly. This shouldn't be at INFO level.
{code}
int n = Math.min(Math.min(this.maxThreads, entries.size()/100 1),
numSinks);
{code}
How is 100 determined ?
{code}
int index =
Math.abs(Bytes.hashCode(e.getKey().getEncodedRegionName())%n);
{code}
Why is abs() needed ?
Please put patch on review board.
> 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)