use of org.apache.nifi.hbase.put.PutColumn in project nifi by apache.
the class TestPutHBaseRecord method innertTest.
private void innertTest(PutColumn[] columns) {
PutColumn name = columns[0];
PutColumn code = columns[1];
String nameVal = Bytes.toString(name.getBuffer());
String codeVal = Bytes.toString(code.getBuffer());
Assert.assertTrue("Name was not found", NAMES.contains(nameVal));
Assert.assertTrue("Code was not found ", CODES.contains(new Long(codeVal)));
}
use of org.apache.nifi.hbase.put.PutColumn in project nifi by apache.
the class TestPutHBaseRecord method testByteEncodedPut.
@Test
public void testByteEncodedPut() throws Exception {
basicPutSetup(PutHBaseRecord.BYTES_ENCODING_VALUE, (PutColumn[] columns) -> {
PutColumn name = columns[0];
PutColumn code = columns[1];
String nameVal = Bytes.toString(name.getBuffer());
Long codeVal = Bytes.toLong(code.getBuffer());
Assert.assertTrue("Name was not found", NAMES.contains(nameVal));
Assert.assertTrue("Code was not found ", CODES.contains(codeVal));
});
}
Aggregations