use of org.apache.nifi.hbase.scan.ResultCell in project nifi by apache.
the class TestJsonFullRowSerializer method getResultCell.
private ResultCell getResultCell(byte[] fam, byte[] qual, byte[] val, long timestamp) {
final ResultCell cell = new ResultCell();
cell.setFamilyArray(fam);
cell.setFamilyOffset(0);
cell.setFamilyLength((byte) fam.length);
cell.setQualifierArray(qual);
cell.setQualifierOffset(0);
cell.setQualifierLength(qual.length);
cell.setValueArray(val);
cell.setValueOffset(0);
cell.setValueLength(val.length);
cell.setTimestamp(timestamp);
return cell;
}
use of org.apache.nifi.hbase.scan.ResultCell in project nifi by apache.
the class TestJsonQualifierAndValueRowSerializer method getResultCell.
private ResultCell getResultCell(byte[] fam, byte[] qual, byte[] val, long timestamp) {
final ResultCell cell = new ResultCell();
cell.setFamilyArray(fam);
cell.setFamilyOffset(0);
cell.setFamilyLength((byte) fam.length);
cell.setQualifierArray(qual);
cell.setQualifierOffset(0);
cell.setQualifierLength(qual.length);
cell.setValueArray(val);
cell.setValueOffset(0);
cell.setValueLength(val.length);
cell.setTimestamp(timestamp);
return cell;
}
use of org.apache.nifi.hbase.scan.ResultCell in project nifi by apache.
the class TestJsonQualifierAndValueRowSerializer method setup.
@Before
public void setup() {
final byte[] cell1Fam = FAM1.getBytes(StandardCharsets.UTF_8);
final byte[] cell1Qual = QUAL1.getBytes(StandardCharsets.UTF_8);
final byte[] cell1Val = VAL1.getBytes(StandardCharsets.UTF_8);
final byte[] cell2Fam = FAM2.getBytes(StandardCharsets.UTF_8);
final byte[] cell2Qual = QUAL2.getBytes(StandardCharsets.UTF_8);
final byte[] cell2Val = VAL2.getBytes(StandardCharsets.UTF_8);
final ResultCell cell1 = getResultCell(cell1Fam, cell1Qual, cell1Val, TS1);
final ResultCell cell2 = getResultCell(cell2Fam, cell2Qual, cell2Val, TS2);
cells = new ResultCell[] { cell1, cell2 };
}
use of org.apache.nifi.hbase.scan.ResultCell in project nifi by apache.
the class TestJsonRowSerializer method setup.
@Before
public void setup() {
final byte[] cell1Fam = "colFam1".getBytes(StandardCharsets.UTF_8);
final byte[] cell1Qual = "colQual1".getBytes(StandardCharsets.UTF_8);
final byte[] cell1Val = "val1".getBytes(StandardCharsets.UTF_8);
final byte[] cell2Fam = "colFam2".getBytes(StandardCharsets.UTF_8);
final byte[] cell2Qual = "colQual2".getBytes(StandardCharsets.UTF_8);
final byte[] cell2Val = "val2".getBytes(StandardCharsets.UTF_8);
final ResultCell cell1 = getResultCell(cell1Fam, cell1Qual, cell1Val);
final ResultCell cell2 = getResultCell(cell2Fam, cell2Qual, cell2Val);
cells = new ResultCell[] { cell1, cell2 };
}
use of org.apache.nifi.hbase.scan.ResultCell in project nifi by apache.
the class HBase_1_1_2_ClientService method getResultCell.
private ResultCell getResultCell(Cell cell) {
final ResultCell resultCell = new ResultCell();
resultCell.setRowArray(cell.getRowArray());
resultCell.setRowOffset(cell.getRowOffset());
resultCell.setRowLength(cell.getRowLength());
resultCell.setFamilyArray(cell.getFamilyArray());
resultCell.setFamilyOffset(cell.getFamilyOffset());
resultCell.setFamilyLength(cell.getFamilyLength());
resultCell.setQualifierArray(cell.getQualifierArray());
resultCell.setQualifierOffset(cell.getQualifierOffset());
resultCell.setQualifierLength(cell.getQualifierLength());
resultCell.setTimestamp(cell.getTimestamp());
resultCell.setTypeByte(cell.getTypeByte());
resultCell.setSequenceId(cell.getSequenceId());
resultCell.setValueArray(cell.getValueArray());
resultCell.setValueOffset(cell.getValueOffset());
resultCell.setValueLength(cell.getValueLength());
resultCell.setTagsArray(cell.getTagsArray());
resultCell.setTagsOffset(cell.getTagsOffset());
resultCell.setTagsLength(cell.getTagsLength());
return resultCell;
}
Aggregations