hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: Question on WALEdit
Date Sat, 28 Jan 2017 19:07:12 GMT
In CellUtil, there is the following method:

  public static Tag getTag(Cell cell, byte type){

In MobUtils, you can find sample usage:

  public static Tag getTableNameTag(Cell cell) {

    if (cell.getTagsLength() > 0) {

      return CellUtil.getTag(cell, TagType.MOB_TABLE_NAME_TAG_TYPE);


On Sat, Jan 28, 2017 at 8:29 AM, Ted Yu <yuzhihong@gmail.com> wrote:

> I haven't found the API you were looking for.
> Which release of hbase are you using ?
> I assume it supports tags.
> If you use tag to pass event-id, you can retrieve thru this method of
> WALEdit:
>   public ArrayList<Cell> getCells() {
> From Cell, there're 3 methods for retrieving tag starting with:
>   byte[] getTagsArray();
> Cheers
> On Sat, Jan 28, 2017 at 4:23 AM, Sreeram <sreeram.v@gmail.com> wrote:
>> Hi,
>> TL;DR:  In my use case I am setting attributes for Puts and Deletes using
>> setAttribute(). I would like to know if it is possible to get the
>> attributes that I had set from the WALEdit ?
>> Here is my use case in detail: I have a replicated cluster A which gets
>> replicated to cluster B. From cluster B, I would like to track the events
>> as they get written to B. I set the event-id as an attribute to the
>> mutation in cluster A.
>> I will have a coProcessor in cluster B that gets invoked on postWALWrite,
>> If I can retrieve the event-id from the WALEdit, I would be able to track
>> those events that got replicated successfully in cluster B.
>> I went through the WALEdit API and it is not obvious to me if it is
>> possible to retrieve the attributes set on the row mutation.
>> Kindly let me know your suggestions.
>> Regards,
>> Sreeram

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message