QiangCai commented on a change in pull request #3826:
URL: https://github.com/apache/carbondata/pull/3826#discussion_r456257306
##########
File path:
streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java
##########
@@ -155,38 +160,21 @@ public static String close(CarbonTable table, String
segmentId)
break;
}
}
-
- int newSegmentId = SegmentStatusManager.createNewSegmentId(details);
- LoadMetadataDetails newDetail = new LoadMetadataDetails();
- newDetail.setLoadName(String.valueOf(newSegmentId));
- newDetail.setFileFormat(FileFormat.ROW_V1);
- newDetail.setLoadStartTime(System.currentTimeMillis());
- newDetail.setSegmentStatus(SegmentStatus.STREAMING);
-
- LoadMetadataDetails[] newDetails = new
LoadMetadataDetails[details.length + 1];
- int i = 0;
- for (; i < details.length; i++) {
- newDetails[i] = details[i];
- }
- newDetails[i] = newDetail;
- SegmentStatusManager
- .writeLoadDetailsIntoFile(CarbonTablePath.getTableStatusFilePath(
- table.getTablePath()), newDetails);
- return newDetail.getLoadName();
+ return createNewSegment(table, details);
} else {
LOGGER.error(
- "Not able to acquire the lock for stream table status updation for
table " + table
+ "Not able to acquire the lock for stream table status update for
table " + table
Review comment:
done
----------------------------------------------------------------
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]