@Test public void adaptResponse_null() { assertNull(instance.adaptResponse(null).rawCells()); }
@Override public Result adaptResponse(FlatRow flatRow) { if (flatRow == null || flatRow.getRowKey() == null) { return Result.EMPTY_RESULT; } byte[] RowKey = flatRow.getRowKey().toByteArray(); List<FlatRow.Cell> cells = flatRow.getCells(); List<Cell> hbaseCells = new ArrayList<>(cells.size()); byte[] previousFamilyBytes = null; String previousFamily = null; for (FlatRow.Cell cell : cells) { String family = cell.getFamily(); byte[] familyBytes = !Objects.equal(family, previousFamily) ? Bytes.toBytes(family) : previousFamilyBytes; hbaseCells.add(toRowCell(RowKey, cell, familyBytes)); previousFamily = family; previousFamilyBytes = familyBytes; } return Result.create(hbaseCells); }
FlatRowAdapter implements ResponseAdapter<FlatRow, Result> { @Override public Result adaptResponse(FlatRow flatRow) { if (flatRow == null || flatRow.getRowKey() == null) { return Result.EMPTY_RESULT; } byte[] RowKey = flatRow.getRowKey().toByteArray(); List<FlatRow.Cell> cells = flatRow.getCells(); List<Cell> hbaseCells = new ArrayList<>(cells.size()); byte[] previousFamilyBytes = null; String previousFamily = null; for (FlatRow.Cell cell : cells) { String family = cell.getFamily(); byte[] familyBytes = !Objects.equal(family, previousFamily) ? Bytes.toBytes(family) : previousFamilyBytes; hbaseCells.add(toRowCell(RowKey, cell, familyBytes)); previousFamily = family; previousFamilyBytes = familyBytes; } return Result.create(hbaseCells); } }
FlatRowAdapter implements ResponseAdapter<FlatRow, Result> { @Override public Result adaptResponse(FlatRow flatRow) { if (flatRow == null || flatRow.getRowKey() == null) { return Result.EMPTY_RESULT; } byte[] RowKey = flatRow.getRowKey().toByteArray(); List<FlatRow.Cell> cells = flatRow.getCells(); List<Cell> hbaseCells = new ArrayList<>(cells.size()); byte[] previousFamilyBytes = null; String previousFamily = null; for (FlatRow.Cell cell : cells) { String family = cell.getFamily(); byte[] familyBytes = !Objects.equal(family, previousFamily) ? Bytes.toBytes(family) : previousFamilyBytes; hbaseCells.add(toRowCell(RowKey, cell, familyBytes)); previousFamily = family; previousFamilyBytes = familyBytes; } return Result.create(hbaseCells); }  }
FlatRowAdapter implements ResponseAdapter<FlatRow, Result> { @Override public Result adaptResponse(FlatRow flatRow) { if (flatRow == null || flatRow.getRowKey() == null) { return Result.EMPTY_RESULT; } byte[] RowKey = flatRow.getRowKey().toByteArray(); List<FlatRow.Cell> cells = flatRow.getCells(); List<Cell> hbaseCells = new ArrayList<>(cells.size()); byte[] previousFamilyBytes = null; String previousFamily = null; for (FlatRow.Cell cell : cells) { String family = cell.getFamily(); byte[] familyBytes = !Objects.equal(family, previousFamily) ? Bytes.toBytes(family) : previousFamilyBytes; hbaseCells.add(toRowCell(RowKey, cell, familyBytes)); previousFamily = family; previousFamilyBytes = familyBytes; } return Result.create(hbaseCells); }  @Override Result adaptResponse(FlatRow flatRow); }
FlatRowAdapter implements ResponseAdapter<FlatRow, Result> { @Override public Result adaptResponse(FlatRow flatRow) { if (flatRow == null || flatRow.getRowKey() == null) { return Result.EMPTY_RESULT; } byte[] RowKey = flatRow.getRowKey().toByteArray(); List<FlatRow.Cell> cells = flatRow.getCells(); List<Cell> hbaseCells = new ArrayList<>(cells.size()); byte[] previousFamilyBytes = null; String previousFamily = null; for (FlatRow.Cell cell : cells) { String family = cell.getFamily(); byte[] familyBytes = !Objects.equal(family, previousFamily) ? Bytes.toBytes(family) : previousFamilyBytes; hbaseCells.add(toRowCell(RowKey, cell, familyBytes)); previousFamily = family; previousFamilyBytes = familyBytes; } return Result.create(hbaseCells); }  @Override Result adaptResponse(FlatRow flatRow);  }