Re: Given a Put object, is there any way to change the timestamp of it?

2015-01-21 Thread Ted Yu
Put is marked @InterfaceStability.Stable though Mutation is marked with @
InterfaceStability.Evolving

I doubt setTimeStamp() would be added.


Cheers

On Wed, Jan 21, 2015 at 4:18 AM, Liu, Ming (HPIT-GADSC) ming.l...@hp.com
wrote:

 Thanks Ted!
 This is exactly what I need.

 This will be a memory copy, but it solves my problem. Hope HBase can
 provide a setTimeStamp() method in future release.

 Best Regards,
 Ming

 -Original Message-
 From: Ted Yu [mailto:yuzhih...@gmail.com]
 Sent: Wednesday, January 21, 2015 11:30 AM
 To: user@hbase.apache.org
 Subject: Re: Given a Put object, is there any way to change the timestamp
 of it?

 bq. I have no way to get ALL its cells out Mutation has the following
 method:

   public NavigableMapbyte [], ListCell getFamilyCellMap() {

 FYI

 On Tue, Jan 20, 2015 at 5:43 PM, Liu, Ming (HPIT-GADSC) ming.l...@hp.com
 wrote:

  Hello, there,
 
  I am developing a coprocessor under HBase 0.98.6. The client send a
  Put object to the coprocessor in Protobuf, when the coprocessor
  receive the message , it invokes ProtobufUtil.toPut to convert it to a
  Put object. Do various checking  and then put it into HBase table.
  Now, I get a requirement to change the timestamp of that Put object,
  but I found no way to do this.
 
  I was first try to generate a new Put object with a new timestamp, and
  try to copy the old one into this new object. But I found given a Put
  object, I have no way to get ALL its cells out if I don't know the
  column family and column qualifier name in advance. In my case, those
  CF/Column names are random as user defined. So I stuck here. Could
  anyone have idea how to workaround this?
 
  The Mutation class has getTimestamp() method but no setTimestamp(). I
  wish there is a setTimestamp() for it. Is there any reason it is not
  provided? I hope in future release Mutation can expose a
  setTimestamp() method, is it possible? If so, my job will get much
 easier...
 
  Thanks,
  Ming
 



RE: Given a Put object, is there any way to change the timestamp of it?

2015-01-21 Thread Liu, Ming (HPIT-GADSC)
Thanks Ted!
This is exactly what I need. 

This will be a memory copy, but it solves my problem. Hope HBase can provide a 
setTimeStamp() method in future release.

Best Regards,
Ming

-Original Message-
From: Ted Yu [mailto:yuzhih...@gmail.com] 
Sent: Wednesday, January 21, 2015 11:30 AM
To: user@hbase.apache.org
Subject: Re: Given a Put object, is there any way to change the timestamp of it?

bq. I have no way to get ALL its cells out Mutation has the following method:

  public NavigableMapbyte [], ListCell getFamilyCellMap() {

FYI

On Tue, Jan 20, 2015 at 5:43 PM, Liu, Ming (HPIT-GADSC) ming.l...@hp.com
wrote:

 Hello, there,

 I am developing a coprocessor under HBase 0.98.6. The client send a 
 Put object to the coprocessor in Protobuf, when the coprocessor 
 receive the message , it invokes ProtobufUtil.toPut to convert it to a 
 Put object. Do various checking  and then put it into HBase table.
 Now, I get a requirement to change the timestamp of that Put object, 
 but I found no way to do this.

 I was first try to generate a new Put object with a new timestamp, and 
 try to copy the old one into this new object. But I found given a Put 
 object, I have no way to get ALL its cells out if I don't know the 
 column family and column qualifier name in advance. In my case, those 
 CF/Column names are random as user defined. So I stuck here. Could 
 anyone have idea how to workaround this?

 The Mutation class has getTimestamp() method but no setTimestamp(). I 
 wish there is a setTimestamp() for it. Is there any reason it is not 
 provided? I hope in future release Mutation can expose a 
 setTimestamp() method, is it possible? If so, my job will get much easier...

 Thanks,
 Ming



Re: Given a Put object, is there any way to change the timestamp of it?

2015-01-20 Thread Ted Yu
bq. I have no way to get ALL its cells out
Mutation has the following method:

  public NavigableMapbyte [], ListCell getFamilyCellMap() {

FYI

On Tue, Jan 20, 2015 at 5:43 PM, Liu, Ming (HPIT-GADSC) ming.l...@hp.com
wrote:

 Hello, there,

 I am developing a coprocessor under HBase 0.98.6. The client send a Put
 object to the coprocessor in Protobuf, when the coprocessor receive the
 message , it invokes ProtobufUtil.toPut to convert it to a Put object. Do
 various checking  and then put it into HBase table.
 Now, I get a requirement to change the timestamp of that Put object, but I
 found no way to do this.

 I was first try to generate a new Put object with a new timestamp, and try
 to copy the old one into this new object. But I found given a Put object, I
 have no way to get ALL its cells out if I don't know the column family and
 column qualifier name in advance. In my case, those CF/Column names are
 random as user defined. So I stuck here. Could anyone have idea how to
 workaround this?

 The Mutation class has getTimestamp() method but no setTimestamp(). I wish
 there is a setTimestamp() for it. Is there any reason it is not provided? I
 hope in future release Mutation can expose a setTimestamp() method, is it
 possible? If so, my job will get much easier...

 Thanks,
 Ming



Given a Put object, is there any way to change the timestamp of it?

2015-01-20 Thread Liu, Ming (HPIT-GADSC)
Hello, there,

I am developing a coprocessor under HBase 0.98.6. The client send a Put object 
to the coprocessor in Protobuf, when the coprocessor receive the message , it 
invokes ProtobufUtil.toPut to convert it to a Put object. Do various checking  
and then put it into HBase table.
Now, I get a requirement to change the timestamp of that Put object, but I 
found no way to do this.

I was first try to generate a new Put object with a new timestamp, and try to 
copy the old one into this new object. But I found given a Put object, I have 
no way to get ALL its cells out if I don't know the column family and column 
qualifier name in advance. In my case, those CF/Column names are random as user 
defined. So I stuck here. Could anyone have idea how to workaround this?

The Mutation class has getTimestamp() method but no setTimestamp(). I wish 
there is a setTimestamp() for it. Is there any reason it is not provided? I 
hope in future release Mutation can expose a setTimestamp() method, is it 
possible? If so, my job will get much easier...

Thanks,
Ming