Update Import.java

See https://issues.apache.org/jira/browse/HBASE-25839
 * CellSortImporter emits values wrapped inside MapReduceExtendedCell
 * CellWritableComparable serializes given cells using standard KeyValue serialization methods in order to fit with the used deserialization method
This commit is contained in:
offermannu 2021-05-05 11:22:37 +02:00 committed by GitHub
parent fda324b116
commit 9989a5035a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -135,9 +135,7 @@ public class Import extends Configured implements Tool {
@Override
public void write(DataOutput out) throws IOException {
out.writeInt(PrivateCellUtil.estimatedSerializedSizeOfKey(kv));
out.writeInt(0);
PrivateCellUtil.writeFlatKey(kv, out);
KeyValueUtil.write(new KeyValue(kv), out);
}
@Override
@ -219,7 +217,7 @@ public class Import extends Configured implements Tool {
// skip if we filtered it out
if (kv == null) continue;
Cell ret = convertKv(kv, cfRenameMap);
context.write(new CellWritableComparable(ret), ret);
context.write(new CellWritableComparable(ret), new MapReduceExtendedCell(ret));
}
}
} catch (InterruptedException e) {