Re: Hbase Coprocessor postPut not triggered for

2016-10-20 Thread Ted Yu
Do you mind describing in a bit more detail (so that other people
developing coprocessors can watch out) ?

Thanks

On Thu, Oct 20, 2016 at 7:12 PM, Begar, Veena <veena.be...@hpe.com> wrote:

> We found the issue in our code itself. These tests work fine too.
>
> Thanks,
> Veena.
>
> -Original Message-
> From: Ted Yu [mailto:yuzhih...@gmail.com]
> Sent: Monday, October 17, 2016 9:55 AM
> To: user@hbase.apache.org
> Subject: Re: Hbase Coprocessor postPut not triggered for
>
> Your scenario should be covered by unit tests already.
> Take a look
> at hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/
> SimpleRegionObserver.java
> which is used by the following tests:
>
> TestRegionObserverInterface
>
> TestIncrementTimeRange
>
> If you can show the issue through (modified) unit test, that would be nice.
>
> Thanks
>
> On Mon, Oct 17, 2016 at 6:30 AM, Begar, Veena <veena.be...@hpe.com> wrote:
>
> > We are using 1.1.2.2.4.0.0-169 version.
> >
> > Yes, by additional logging, I determined that postPut method is not
> > triggered for the update.
> >
> > Here is the code sinppet:
> >
> > List puts = new ArrayList<>(dataObjects.size()); Table table =
> > connection.getTable(TableName.valueOf(qualifiedTableName);
> > for (DataObjectType dataObject : dataObjects) {
> > Put put = new Put(..);
> >   //Create family
> > //Create qualifier
> > put.add(family, qualifier, dataObject.getRowKey());
> > puts.add(put);
> > }
> > table.put(puts);
> > table.close();
> >
> > thanks,
> > veena.
> >
> >
> >
> > -Original Message-
> > From: Anoop John [mailto:anoop.hb...@gmail.com]
> > Sent: Monday, October 17, 2016 2:06 AM
> > To: user@hbase.apache.org
> > Subject: Re: Hbase Coprocessor postPut not triggered for
> >
> > Ya what API used for this update op u mention?
> >
> > -Anoop-
> >
> > On Mon, Oct 17, 2016 at 9:25 AM, Ted Yu <yuzhih...@gmail.com> wrote:
> > > Which release of hbase are you using ?
> > >
> > > How did you determine that coprocessor's postPut method is not
> > > triggered for the update ? By additional logging ?
> > >
> > > Can you give code snippet around the update ?
> > >
> > > Thanks
> > >
> > > On Sun, Oct 16, 2016 at 8:48 PM, Begar, Veena <veena.be...@hpe.com>
> > wrote:
> > >
> > >> Hello,
> > >>
> > >> We are using coprocessor feature by extending BaseRegionServer class.
> > >>
> > >> In postPut method, we send a message to kafka. Soon after creating
> > >> a row, we update it. We see it triggering postPut for creating row,
> > >> but for the subsequent update, it doesn't trigger postPut method:
> > >> void createAndUpdate(.. )
> > >> {
> > >> //create new row - Hbase put method -- coprocessor's postPut is
> > >> triggered //update the row - Hbase put method -- coprocessor's
> > >> postPut method is not triggered .. . ...
> > >> }
> > >>
> > >> Please let me know why postPut method is not triggered for the 2nd
> > >> put call.
> > >>
> > >> Thanks,
> > >> Veena.
> > >>
> >
>


RE: Hbase Coprocessor postPut not triggered for

2016-10-20 Thread Begar, Veena
We found the issue in our code itself. These tests work fine too.

Thanks,
Veena.

-Original Message-
From: Ted Yu [mailto:yuzhih...@gmail.com] 
Sent: Monday, October 17, 2016 9:55 AM
To: user@hbase.apache.org
Subject: Re: Hbase Coprocessor postPut not triggered for

Your scenario should be covered by unit tests already.
Take a look
at 
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
which is used by the following tests:

TestRegionObserverInterface

TestIncrementTimeRange

If you can show the issue through (modified) unit test, that would be nice.

Thanks

On Mon, Oct 17, 2016 at 6:30 AM, Begar, Veena <veena.be...@hpe.com> wrote:

> We are using 1.1.2.2.4.0.0-169 version.
>
> Yes, by additional logging, I determined that postPut method is not 
> triggered for the update.
>
> Here is the code sinppet:
>
> List puts = new ArrayList<>(dataObjects.size()); Table table = 
> connection.getTable(TableName.valueOf(qualifiedTableName);
> for (DataObjectType dataObject : dataObjects) {
> Put put = new Put(..);
>   //Create family
> //Create qualifier
> put.add(family, qualifier, dataObject.getRowKey());
> puts.add(put);
> }
> table.put(puts);
> table.close();
>
> thanks,
> veena.
>
>
>
> -Original Message-
> From: Anoop John [mailto:anoop.hb...@gmail.com]
> Sent: Monday, October 17, 2016 2:06 AM
> To: user@hbase.apache.org
> Subject: Re: Hbase Coprocessor postPut not triggered for
>
> Ya what API used for this update op u mention?
>
> -Anoop-
>
> On Mon, Oct 17, 2016 at 9:25 AM, Ted Yu <yuzhih...@gmail.com> wrote:
> > Which release of hbase are you using ?
> >
> > How did you determine that coprocessor's postPut method is not 
> > triggered for the update ? By additional logging ?
> >
> > Can you give code snippet around the update ?
> >
> > Thanks
> >
> > On Sun, Oct 16, 2016 at 8:48 PM, Begar, Veena <veena.be...@hpe.com>
> wrote:
> >
> >> Hello,
> >>
> >> We are using coprocessor feature by extending BaseRegionServer class.
> >>
> >> In postPut method, we send a message to kafka. Soon after creating 
> >> a row, we update it. We see it triggering postPut for creating row, 
> >> but for the subsequent update, it doesn't trigger postPut method:
> >> void createAndUpdate(.. )
> >> {
> >> //create new row - Hbase put method -- coprocessor's postPut is 
> >> triggered //update the row - Hbase put method -- coprocessor's 
> >> postPut method is not triggered .. . ...
> >> }
> >>
> >> Please let me know why postPut method is not triggered for the 2nd 
> >> put call.
> >>
> >> Thanks,
> >> Veena.
> >>
>


Re: Hbase Coprocessor postPut not triggered for

2016-10-17 Thread Ted Yu
Your scenario should be covered by unit tests already.
Take a look
at 
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/SimpleRegionObserver.java
which is used by the following tests:

TestRegionObserverInterface

TestIncrementTimeRange

If you can show the issue through (modified) unit test, that would be nice.

Thanks

On Mon, Oct 17, 2016 at 6:30 AM, Begar, Veena <veena.be...@hpe.com> wrote:

> We are using 1.1.2.2.4.0.0-169 version.
>
> Yes, by additional logging, I determined that postPut method is not
> triggered for the update.
>
> Here is the code sinppet:
>
> List puts = new ArrayList<>(dataObjects.size());
> Table table = connection.getTable(TableName.valueOf(qualifiedTableName);
> for (DataObjectType dataObject : dataObjects) {
> Put put = new Put(..);
>   //Create family
> //Create qualifier
> put.add(family, qualifier, dataObject.getRowKey());
> puts.add(put);
> }
> table.put(puts);
> table.close();
>
> thanks,
> veena.
>
>
>
> -Original Message-
> From: Anoop John [mailto:anoop.hb...@gmail.com]
> Sent: Monday, October 17, 2016 2:06 AM
> To: user@hbase.apache.org
> Subject: Re: Hbase Coprocessor postPut not triggered for
>
> Ya what API used for this update op u mention?
>
> -Anoop-
>
> On Mon, Oct 17, 2016 at 9:25 AM, Ted Yu <yuzhih...@gmail.com> wrote:
> > Which release of hbase are you using ?
> >
> > How did you determine that coprocessor's postPut method is not
> > triggered for the update ? By additional logging ?
> >
> > Can you give code snippet around the update ?
> >
> > Thanks
> >
> > On Sun, Oct 16, 2016 at 8:48 PM, Begar, Veena <veena.be...@hpe.com>
> wrote:
> >
> >> Hello,
> >>
> >> We are using coprocessor feature by extending BaseRegionServer class.
> >>
> >> In postPut method, we send a message to kafka. Soon after creating a
> >> row, we update it. We see it triggering postPut for creating row, but
> >> for the subsequent update, it doesn't trigger postPut method:
> >> void createAndUpdate(.. )
> >> {
> >> //create new row - Hbase put method -- coprocessor's postPut is
> >> triggered //update the row - Hbase put method -- coprocessor's
> >> postPut method is not triggered .. . ...
> >> }
> >>
> >> Please let me know why postPut method is not triggered for the 2nd
> >> put call.
> >>
> >> Thanks,
> >> Veena.
> >>
>


RE: Hbase Coprocessor postPut not triggered for

2016-10-17 Thread Begar, Veena
We are using 1.1.2.2.4.0.0-169 version. 

Yes, by additional logging, I determined that postPut method is not triggered 
for the update. 

Here is the code sinppet:

List puts = new ArrayList<>(dataObjects.size());
Table table = connection.getTable(TableName.valueOf(qualifiedTableName);
for (DataObjectType dataObject : dataObjects) {
Put put = new Put(..);
  //Create family
//Create qualifier
put.add(family, qualifier, dataObject.getRowKey());
puts.add(put);
}
table.put(puts);
table.close();

thanks,
veena. 



-Original Message-
From: Anoop John [mailto:anoop.hb...@gmail.com] 
Sent: Monday, October 17, 2016 2:06 AM
To: user@hbase.apache.org
Subject: Re: Hbase Coprocessor postPut not triggered for

Ya what API used for this update op u mention?

-Anoop-

On Mon, Oct 17, 2016 at 9:25 AM, Ted Yu <yuzhih...@gmail.com> wrote:
> Which release of hbase are you using ?
>
> How did you determine that coprocessor's postPut method is not 
> triggered for the update ? By additional logging ?
>
> Can you give code snippet around the update ?
>
> Thanks
>
> On Sun, Oct 16, 2016 at 8:48 PM, Begar, Veena <veena.be...@hpe.com> wrote:
>
>> Hello,
>>
>> We are using coprocessor feature by extending BaseRegionServer class.
>>
>> In postPut method, we send a message to kafka. Soon after creating a 
>> row, we update it. We see it triggering postPut for creating row, but 
>> for the subsequent update, it doesn't trigger postPut method:
>> void createAndUpdate(.. )
>> {
>> //create new row - Hbase put method -- coprocessor's postPut is 
>> triggered //update the row - Hbase put method -- coprocessor's 
>> postPut method is not triggered .. . ...
>> }
>>
>> Please let me know why postPut method is not triggered for the 2nd 
>> put call.
>>
>> Thanks,
>> Veena.
>>


Re: Hbase Coprocessor postPut not triggered for

2016-10-17 Thread Anoop John
Ya what API used for this update op u mention?

-Anoop-

On Mon, Oct 17, 2016 at 9:25 AM, Ted Yu  wrote:
> Which release of hbase are you using ?
>
> How did you determine that coprocessor's postPut method is not triggered
> for the update ? By additional logging ?
>
> Can you give code snippet around the update ?
>
> Thanks
>
> On Sun, Oct 16, 2016 at 8:48 PM, Begar, Veena  wrote:
>
>> Hello,
>>
>> We are using coprocessor feature by extending BaseRegionServer class.
>>
>> In postPut method, we send a message to kafka. Soon after creating a row,
>> we update it. We see it triggering postPut for creating row, but for the
>> subsequent update, it doesn't trigger postPut method:
>> void createAndUpdate(.. )
>> {
>> //create new row - Hbase put method -- coprocessor's postPut is triggered
>> //update the row - Hbase put method -- coprocessor's postPut method is not
>> triggered
>> .. . ...
>> }
>>
>> Please let me know why postPut method is not triggered for the 2nd put
>> call.
>>
>> Thanks,
>> Veena.
>>


Re: Hbase Coprocessor postPut not triggered for

2016-10-16 Thread Ted Yu
Which release of hbase are you using ?

How did you determine that coprocessor's postPut method is not triggered
for the update ? By additional logging ?

Can you give code snippet around the update ?

Thanks

On Sun, Oct 16, 2016 at 8:48 PM, Begar, Veena  wrote:

> Hello,
>
> We are using coprocessor feature by extending BaseRegionServer class.
>
> In postPut method, we send a message to kafka. Soon after creating a row,
> we update it. We see it triggering postPut for creating row, but for the
> subsequent update, it doesn't trigger postPut method:
> void createAndUpdate(.. )
> {
> //create new row - Hbase put method -- coprocessor's postPut is triggered
> //update the row - Hbase put method -- coprocessor's postPut method is not
> triggered
> .. . ...
> }
>
> Please let me know why postPut method is not triggered for the 2nd put
> call.
>
> Thanks,
> Veena.
>