Difference between peerData and configuration in ReplicationPeerConfig

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Difference between peerData and configuration in ReplicationPeerConfig

Jan Kunigk
Hi, I am aware this might be pretty much a newbie question but I struggle
to see any docs on the what peerData and or configuration in
ReplicationPeerConfig should be used for...

  private final Map<byte[], byte[]> peerData;
  private final Map<String, String> configuration;

I would like to use them in a way that I feel apt to support a JIRA I am
working on, but I want to make sure I do not miss the understanding of a
different designated use. The configuration field seems to be quite clear
from the context, but what about peerData?

src/main/ruby/shell/commands/add_peer.rb clarifies the syntax but not the
semantics...
 hbase> add_peer '9', ENDPOINT_CLASSNAME =>
'org.apache.hadoop.hbase.MyReplicationEndpoint',
    DATA => { "key1" => 1 }, CONFIG => { "config1" => "value1", "config2"
=> "value2" },

Again, I hope I am not missing something obvious and would appreciate any
pointer.


Best, J
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Difference between peerData and configuration in ReplicationPeerConfig

Guanghao Zhang
We have a ReplicationEndpoint implementation which replicate data to a
streaming system(similar to kafka). And only use the configuration for the
endpoint. I don't know the difference between DATA and CONFIG. I thought
use CONFIG is enough for most cases.

2017-06-18 22:01 GMT+08:00 Jan Kunigk <[hidden email]>:

> Hi, I am aware this might be pretty much a newbie question but I struggle
> to see any docs on the what peerData and or configuration in
> ReplicationPeerConfig should be used for...
>
>   private final Map<byte[], byte[]> peerData;
>   private final Map<String, String> configuration;
>
> I would like to use them in a way that I feel apt to support a JIRA I am
> working on, but I want to make sure I do not miss the understanding of a
> different designated use. The configuration field seems to be quite clear
> from the context, but what about peerData?
>
> src/main/ruby/shell/commands/add_peer.rb clarifies the syntax but not the
> semantics...
>  hbase> add_peer '9', ENDPOINT_CLASSNAME =>
> 'org.apache.hadoop.hbase.MyReplicationEndpoint',
>     DATA => { "key1" => 1 }, CONFIG => { "config1" => "value1", "config2"
> => "value2" },
>
> Again, I hope I am not missing something obvious and would appreciate any
> pointer.
>
>
> Best, J
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Difference between peerData and configuration in ReplicationPeerConfig

Enis Söztutar
Indeed, config and data are very similar for the purpose of carrying custom
information / metadata for the replication peer. Configuration is String ->
String, versus data is String -> binary. This is similar to how we handle
these in HTD etc.

Enis

On Sun, Jun 18, 2017 at 7:38 AM, Guanghao Zhang <[hidden email]> wrote:

> We have a ReplicationEndpoint implementation which replicate data to a
> streaming system(similar to kafka). And only use the configuration for the
> endpoint. I don't know the difference between DATA and CONFIG. I thought
> use CONFIG is enough for most cases.
>
> 2017-06-18 22:01 GMT+08:00 Jan Kunigk <[hidden email]>:
>
> > Hi, I am aware this might be pretty much a newbie question but I struggle
> > to see any docs on the what peerData and or configuration in
> > ReplicationPeerConfig should be used for...
> >
> >   private final Map<byte[], byte[]> peerData;
> >   private final Map<String, String> configuration;
> >
> > I would like to use them in a way that I feel apt to support a JIRA I am
> > working on, but I want to make sure I do not miss the understanding of a
> > different designated use. The configuration field seems to be quite clear
> > from the context, but what about peerData?
> >
> > src/main/ruby/shell/commands/add_peer.rb clarifies the syntax but not
> the
> > semantics...
> >  hbase> add_peer '9', ENDPOINT_CLASSNAME =>
> > 'org.apache.hadoop.hbase.MyReplicationEndpoint',
> >     DATA => { "key1" => 1 }, CONFIG => { "config1" => "value1", "config2"
> > => "value2" },
> >
> > Again, I hope I am not missing something obvious and would appreciate any
> > pointer.
> >
> >
> > Best, J
> >
>
Loading...