@Override
public void putNext(Tuple t) throws IOException {
ResourceFieldSchema[] fieldSchemas = (schema == null) ? null : schema.getFields();
PhoenixRecord record = new PhoenixRecord(fieldSchemas);
for(int i=0; i<t.size(); i++) {
record.add(t.get(i));
}
try {
writer.write(null, record);
} catch (InterruptedException e) {