HeartSaVioR opened a new pull request #27664: [SPARK-30915][SS] FileStreamSink: 
Avoid reading the metadata log file when finding the latest batch ID
URL: https://github.com/apache/spark/pull/27664
 
 
   ### What changes were proposed in this pull request?
   
   This patch adds the new method `getLatestBatchId()` in 
CompactibleFileStreamLog in complement of getLatest() which doesn't read the 
content of the latest batch metadata log file, and apply to 
`FileStreamSink.addBatch()` to avoid unnecessary latency on reading log file.
   
   ### Why are the changes needed?
   
   Once compacted metadata log file becomes huge, writing outputs for the 
compact + 1 batch is also affected due to unnecessarily reading the compacted 
metadata log file. This unnecessary latency can be simply avoided.
   
   ### Does this PR introduce any user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   New UT. Also manually tested under query which has huge metadata log on file 
stream sink:
   
   > before applying the patch
   
   ![Screen Shot 2020-02-21 at 4 20 19 
PM](https://user-images.githubusercontent.com/1317309/75016223-d3ffb180-54cd-11ea-9063-49405943049d.png)
   
   > after applying the patch
   
   ![Screen Shot 2020-02-21 at 4 06 18 
PM](https://user-images.githubusercontent.com/1317309/75016220-d235ee00-54cd-11ea-81a7-7c03a43c4db4.png)
   
   Peaks are compact batches - please compare the next batch after compact 
batches.

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to