Thank you very much Ted. I understand fetching the tags will fetch the associated attributes for a mutation. Will try out the same.
Regards, Sreeram On 29 Jan 2017 00:37, "Ted Yu" <[email protected]> wrote: 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); FYI On Sat, Jan 28, 2017 at 8:29 AM, Ted Yu <[email protected]> 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 <[email protected]> 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 >> > >
