xubo245 commented on a change in pull request #3834:
URL: https://github.com/apache/carbondata/pull/3834#discussion_r460375833
##########
File path:
hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonTableOutputFormat.java
##########
@@ -559,4 +564,50 @@ public void close(TaskAttemptContext taskAttemptContext)
throws InterruptedExcep
super.close(taskAttemptContext);
}
}
+
+ public static RecordWriter<NullWritable, ObjectArrayWritable>
getDeleteDeltaRecordWriter(String path) {
+ return (new RecordWriter<NullWritable, ObjectArrayWritable>() {
+ private final ArrayList<String> tupleId = new ArrayList<>();
+
+ @Override
+ public void write(NullWritable aVoid, ObjectArrayWritable objects) {
+ this.tupleId.add((String) objects.get()[0]);
+ }
+
+ @Override
+ public void close(TaskAttemptContext taskAttemptContext) throws
IOException {
+ Map<String, DeleteDeltaBlockDetails> blockToDeleteDeltaBlockMapping =
new HashMap<>();
+ DeleteDeltaBlockDetails blockDetails;
+ String blockName;
+ for (String tuple : tupleId) {
+ blockName = CarbonUpdateUtil.getBlockName(
+
(tuple.split(CarbonCommonConstants.FILE_SEPARATOR)[TupleIdEnum.BLOCK_ID
Review comment:
Suggestion: File.separator
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]