You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Mohit Anchlia <mo...@gmail.com> on 2012/08/18 02:36:14 UTC

HBase replication

Are clients local to slave DC able to read data from HBase slave when
replicating data from one DC to remote DC? If not then is there a way to
design such a thing where clients are able to actively read/write from both
DCs?

Re: Base coprocessor arguments

Posted by Ben Kim <be...@gmail.com>.
thank you! that did the trick.

*Benjamin Kim*
*benkimkimben at gmail*


On Thu, Sep 12, 2013 at 8:23 AM, Gary Helmling <gh...@gmail.com> wrote:

> Ben & George,
>
> The arguments you provide when configuring the coprocessor should be
> present in the Configuration object exposed through
> CoprocessorEnvironment.  So, for example, in your RegionObserver.start()
> method, you should be able to do:
>
> *public void start(CoprocessorEnvironment e) throws IOException {
> *
> * *e.getConfiguration().get("arg1"); // should be "1"*
> *
> *}
> *
>
>
> On Wed, Sep 11, 2013 at 2:25 AM, Ben Kim <be...@gmail.com> wrote:
>
> > Hello George
> >
> > Have you found a solution to your question?
> >
> > I can't seem to get the arguments anywhere :(
> >
> > Best,
> > Ben
> >
> > *Benjamin Kim*
> > *benkimkimben at gmail*
> >
> >
> > On Mon, Aug 20, 2012 at 10:48 PM, George Forman
> > <ge...@hotmail.com>wrote:
> >
> > >
> > >
> > > Hi All,
> > > I have extended BaseRegionObservers coprocessor. I want to know how to
> > > access the arguments specified with the associated table: alter 't1',
> > > METHOD => 'table_att',
> > >
> > >
> >
> 'coprocessor'=>'hdfs:///foo.jar|com.foo.FooRegionObserver|1001|arg1=1,arg2=2'
> > > Are they available in postPut via
> > > ObserverContext<RegionCoprocessorEnvironment> ?
> > > Thanks
> > > George
> >
>

Re: Base coprocessor arguments

Posted by Gary Helmling <gh...@gmail.com>.
Ben & George,

The arguments you provide when configuring the coprocessor should be
present in the Configuration object exposed through
CoprocessorEnvironment.  So, for example, in your RegionObserver.start()
method, you should be able to do:

*public void start(CoprocessorEnvironment e) throws IOException {
*
* *e.getConfiguration().get("arg1"); // should be "1"*
*
*}
*


On Wed, Sep 11, 2013 at 2:25 AM, Ben Kim <be...@gmail.com> wrote:

> Hello George
>
> Have you found a solution to your question?
>
> I can't seem to get the arguments anywhere :(
>
> Best,
> Ben
>
> *Benjamin Kim*
> *benkimkimben at gmail*
>
>
> On Mon, Aug 20, 2012 at 10:48 PM, George Forman
> <ge...@hotmail.com>wrote:
>
> >
> >
> > Hi All,
> > I have extended BaseRegionObservers coprocessor. I want to know how to
> > access the arguments specified with the associated table: alter 't1',
> > METHOD => 'table_att',
> >
> >
> 'coprocessor'=>'hdfs:///foo.jar|com.foo.FooRegionObserver|1001|arg1=1,arg2=2'
> > Are they available in postPut via
> > ObserverContext<RegionCoprocessorEnvironment> ?
> > Thanks
> > George
>

Re: Base coprocessor arguments

Posted by Ben Kim <be...@gmail.com>.
Hello George

Have you found a solution to your question?

I can't seem to get the arguments anywhere :(

Best,
Ben

*Benjamin Kim*
*benkimkimben at gmail*


On Mon, Aug 20, 2012 at 10:48 PM, George Forman
<ge...@hotmail.com>wrote:

>
>
> Hi All,
> I have extended BaseRegionObservers coprocessor. I want to know how to
> access the arguments specified with the associated table: alter 't1',
> METHOD => 'table_att',
>
> 'coprocessor'=>'hdfs:///foo.jar|com.foo.FooRegionObserver|1001|arg1=1,arg2=2'
> Are they available in postPut via
> ObserverContext<RegionCoprocessorEnvironment> ?
> Thanks
> George

Base coprocessor arguments

Posted by George Forman <ge...@hotmail.com>.

Hi All,
I have extended BaseRegionObservers coprocessor. I want to know how to access the arguments specified with the associated table: alter 't1', METHOD => 'table_att', 
  'coprocessor'=>'hdfs:///foo.jar|com.foo.FooRegionObserver|1001|arg1=1,arg2=2'
Are they available in postPut via ObserverContext<RegionCoprocessorEnvironment> ?
Thanks
George 		 	   		  

Re: HBase replication

Posted by Jean-Daniel Cryans <jd...@apache.org>.
It's not different, treat each cluster as a slave to the other.

J-D

On Mon, Aug 20, 2012 at 4:06 PM, Mohit Anchlia <mo...@gmail.com> wrote:
> On Mon, Aug 20, 2012 at 3:06 PM, Jean-Daniel Cryans <jd...@apache.org>wrote:
>
>> On Sat, Aug 18, 2012 at 1:30 PM, Mohit Anchlia <mo...@gmail.com>
>> wrote:
>> > Is it also possible to setup bi-directional replication? In other words
>> is
>> > it possible to write to the same table to both HBase instances locally in
>> > each DC and still be able to replicate between them?
>>
>> Only starting with 0.92.0
>
>
> Thanks! could you please point me to relevant docs? On the replication page
> all I see is Master-Slave configuration and I don't see Master-Master
> configuration.
>
>>
>> J-D
>>

Re: HBase replication

Posted by lars hofhansl <lh...@yahoo.com>.
Reading through HBASE-2195/HBASE-4517 might provide some clues.
Some doc is available here: http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/replication/package-summary.html


-- Lars



________________________________
 From: Mohit Anchlia <mo...@gmail.com>
To: user@hbase.apache.org 
Sent: Monday, August 20, 2012 4:06 PM
Subject: Re: HBase replication
 
On Mon, Aug 20, 2012 at 3:06 PM, Jean-Daniel Cryans <jd...@apache.org>wrote:

> On Sat, Aug 18, 2012 at 1:30 PM, Mohit Anchlia <mo...@gmail.com>
> wrote:
> > Is it also possible to setup bi-directional replication? In other words
> is
> > it possible to write to the same table to both HBase instances locally in
> > each DC and still be able to replicate between them?
>
> Only starting with 0.92.0


Thanks! could you please point me to relevant docs? On the replication page
all I see is Master-Slave configuration and I don't see Master-Master
configuration.

>
> J-D
>

Re: HBase replication

Posted by Mohit Anchlia <mo...@gmail.com>.
On Mon, Aug 20, 2012 at 3:06 PM, Jean-Daniel Cryans <jd...@apache.org>wrote:

> On Sat, Aug 18, 2012 at 1:30 PM, Mohit Anchlia <mo...@gmail.com>
> wrote:
> > Is it also possible to setup bi-directional replication? In other words
> is
> > it possible to write to the same table to both HBase instances locally in
> > each DC and still be able to replicate between them?
>
> Only starting with 0.92.0


Thanks! could you please point me to relevant docs? On the replication page
all I see is Master-Slave configuration and I don't see Master-Master
configuration.

>
> J-D
>

Re: HBase replication

Posted by Jean-Daniel Cryans <jd...@apache.org>.
On Sat, Aug 18, 2012 at 1:30 PM, Mohit Anchlia <mo...@gmail.com> wrote:
> Is it also possible to setup bi-directional replication? In other words is
> it possible to write to the same table to both HBase instances locally in
> each DC and still be able to replicate between them?

Only starting with 0.92.0

J-D

Re: HBase replication

Posted by Mohit Anchlia <mo...@gmail.com>.
On Sat, Aug 18, 2012 at 12:35 PM, Stack <st...@duboce.net> wrote:

> On Fri, Aug 17, 2012 at 5:36 PM, Mohit Anchlia <mo...@gmail.com>
> wrote:
> > Are clients local to slave DC able to read data from HBase slave when
> > replicating data from one DC to remote DC?
>
> Yes.
>
> Is it also possible to setup bi-directional replication? In other words is
it possible to write to the same table to both HBase instances locally in
each DC and still be able to replicate between them?
> If not then is there a way to
> design such a thing where clients are able to actively read/write from
both
> DCs?

You could do this too.  Depends on your zk config (ensemble and where
> you home the client in the ensemble).
>
> St.Ack
>

Re: HBase replication

Posted by Stack <st...@duboce.net>.
On Fri, Aug 17, 2012 at 5:36 PM, Mohit Anchlia <mo...@gmail.com> wrote:
> Are clients local to slave DC able to read data from HBase slave when
> replicating data from one DC to remote DC?

Yes.

> If not then is there a way to
> design such a thing where clients are able to actively read/write from both
> DCs?

You could do this too.  Depends on your zk config (ensemble and where
you home the client in the ensemble).

St.Ack