Details
-
Improvement
-
Status: Closed
-
Critical
-
Resolution: Duplicate
-
1.0.0, 2.0.0
-
beginner
Description
After the switch to the new Cell based client API, and making KeyValue private (but especially as soon as DBB backed Cells land) it is rather difficult to create a Cell instance. I am using this now:
@Override public void postGetOp(ObserverContext<RegionCoprocessorEnvironment> e, Get get, List<Cell> results) throws IOException { Put put = new Put(get.getRow()); put.addColumn(get.getRow(), FIXED_COLUMN, Bytes.toBytes(counter.get())); CellScanner scanner = put.cellScanner(); scanner.advance(); Cell cell = scanner.current(); LOG.debug("Adding fake cell: " + cell); results.add(cell); }
That is, I have to create a Put instance to add a cell and then retrieve its instance. The KeyValue methods are private now and should not be used. Create a CellBuilder helper?
Attachments
Issue Links
- relates to
-
HBASE-18519 Use builder pattern to create cell
- Resolved