bvaradar commented on a change in pull request #600: Timeline Service with
Incremental View Syncing support
URL: https://github.com/apache/incubator-hudi/pull/600#discussion_r275559080
##########
File path:
hoodie-client/src/main/java/com/uber/hoodie/io/HoodieAppendHandle.java
##########
@@ -110,15 +110,15 @@ private void init(HoodieRecord record) {
if (doInit) {
this.partitionPath = record.getPartitionPath();
// extract some information from the first record
- Optional<FileSlice> fileSlice =
fileSystemView.getLatestFileSlices(partitionPath)
- .filter(fileSlice1 ->
fileSlice1.getFileId().equals(fileId)).findFirst();
+ RealtimeView rtView = hoodieTable.getRTFileSystemView();
+ Option<FileSlice> fileSlice = rtView.getLatestFileSlice(partitionPath,
fileId);
// Set the base commit time as the current commitTime for new inserts
into log files
String baseInstantTime = commitTime;
if (fileSlice.isPresent()) {
baseInstantTime = fileSlice.get().getBaseInstantTime();
} else {
// This means there is no base data file, start appending to a new log
file
- fileSlice = Optional.of(new FileSlice(partitionPath, baseInstantTime,
this.fileId));
+ fileSlice = Option.of(new FileSlice(partitionPath, baseInstantTime,
this.fileId));
Review comment:
this is com.uber.hoodie.common.util.Option. Since, we have our own
implementation of Optional, I have made this change to use our version.
----------------------------------------------------------------
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]
With regards,
Apache Git Services