Member since
12-16-2015
1
Post
0
Kudos Received
0
Solutions
12-16-2015
08:42 AM
Hello, So the Cell TTL is stored via Cell TTL tags.When I retrive it fails to get Cell Tags for TTL but the Cell TTL feature does work . Can you point me to what I am doing wrong to retrieve the Cell TTL . We are using hbase-1.0.0-cdh5.4.2. I fail to get the Cell Tag for TTL when I iterate over the cell Tags. During PUT we do put.setTTL( ); Table table.. Get get = new Get(Bytes.toBytes(<key>)); Result rs = table.get(get); if (rs!=null) { Cell cell = rs.getColumnCells(..); Iterator<Tag> i = CellUtil.tagsIterator(cell.getTagsArray(), cell.getTagsOffset(), cell.getTagsLength()); while (i.hasNext()) { Tag t = i.next(); if (TagType.TTL_TAG_TYPE == t.getType()) { long ts = cell.getTimestamp(); assert t.getTagLength() == Bytes.SIZEOF_LONG; long ttl = Bytes.toLong(t.getBuffer(), t.getTagOffset(), t.getTagLength()); System.out.println(ttl); } } Thanks in advance.
... View more