}
private HCatRecord convertToHCatRecord(SqoopRecord sqr)
throws IOException {
Map<String, Object> fieldMap = sqr.getFieldMap();
HCatRecord result = new DefaultHCatRecord(fieldCount);
for (Map.Entry<String, Object> entry : fieldMap.entrySet()) {
String key = entry.getKey();
Object val = entry.getValue();
String hfn = key.toLowerCase();
if (staticPartitionKey != null && staticPartitionKey.equals(hfn)) {
continue;
}
HCatFieldSchema hfs = hCatFullTableSchema.get(hfn);
if (debugHCatImportMapper) {
LOG.debug("SqoopRecordVal: field = " + key + " Val " + val
+ " of type " + (val == null ? null : val.getClass().getName())
+ ", hcattype " + hfs.getTypeString());
}
Object hCatVal = toHCat(val, hfs.getType(), hfs.getTypeString());
result.set(hfn, hCatFullTableSchema, hCatVal);
}
return result;
}