JAVA HBase: how to use CellUtil.getRowByte (Cell, int)

Can someone please help me how to use CellUtil.getRowByte (Cell, int)? I updated hbase from 0.94 to 0.99. I used to use cell.getRow (), but in hbase 0.99 it is already deprecated. Thank!

+4
source share
2 answers

Instead, you can use a combination of getRowArray (), getRowOffset () and getRowLength () in the Cell class, for example.

String row = Bytes.toString(c.getRowArray(), c.getRowOffset(), c.getRowLength()); 
+3
source

You can try the following:

String row = Bytes.toString(CellUtil.cloneRow(cell));
+3
source

Source: https://habr.com/ru/post/1530568/


All Articles