* split pairs by delimiter.
*/
private Object uncheckedGetField(int id) {
if (!getFieldInited()[id]) {
ByteArrayRef ref;
ColumnMapping columnMapping = columnMappings.get(id);
if (columnMapping instanceof HiveAccumuloMapColumnMapping) {
HiveAccumuloMapColumnMapping mapColumnMapping = (HiveAccumuloMapColumnMapping) columnMapping;
LazyAccumuloMap map = (LazyAccumuloMap) getFields()[id];
map.init(row, mapColumnMapping);
} else {
if (columnMapping instanceof HiveAccumuloRowIdColumnMapping) {
// Use the rowID directly
ref = new ByteArrayRef();
ref.setData(row.getRowId().getBytes());
} else if (columnMapping instanceof HiveAccumuloColumnMapping) {
HiveAccumuloColumnMapping accumuloColumnMapping = (HiveAccumuloColumnMapping) columnMapping;
// Use the colfam and colqual to get the value
byte[] val = row.getValue(new Text(accumuloColumnMapping.getColumnFamily()), new Text(
accumuloColumnMapping.getColumnQualifier()));
if (val == null) {
return null;
} else {
ref = new ByteArrayRef();
ref.setData(val);
}
} else {
log.error("Could not process ColumnMapping of type " + columnMapping.getClass()
+ " at offset " + id + " in column mapping: " + columnMapping.getMappingSpec());
throw new IllegalArgumentException("Cannot process ColumnMapping of type "
+ columnMapping.getClass());
}
getFields()[id].init(ref, 0, ref.getData().length);
}