}
}
private void insertRecordsNatively() throws Exception {
final HTablePool tablePool = _dataContext.getTablePool();
final HTableInterface hTable = tablePool.getTable(EXAMPLE_TABLE_NAME);
try {
final Put put1 = new Put("junit1".getBytes());
put1.add("foo".getBytes(), "hello".getBytes(), "world".getBytes());
put1.add("bar".getBytes(), "hi".getBytes(), "there".getBytes());
put1.add("bar".getBytes(), "hey".getBytes(), "yo".getBytes());
final Put put2 = new Put("junit2".getBytes());
put2.add("bar".getBytes(), "bah".getBytes(), new byte[] { 1, 2, 3 });
put2.add("bar".getBytes(), "hi".getBytes(), "you".getBytes());
hTable.batch(Arrays.asList(put1, put2));
} finally {
hTable.close();
tablePool.closeTablePool(EXAMPLE_TABLE_NAME);
tablePool.close();
}
}