chenboat commented on a change in pull request #4914: [POC] By-passing
deep-store requirement for Realtime segment completion
URL: https://github.com/apache/incubator-pinot/pull/4914#discussion_r360610944
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeTableDataManager.java
##########
@@ -257,21 +280,78 @@ public void downloadAndReplaceSegment(String
segmentName, LLCRealtimeSegmentZKMe
final File segmentFolder = new File(_indexDir, segmentName);
FileUtils.deleteQuietly(segmentFolder);
try {
-
SegmentFetcherFactory.getInstance().getSegmentFetcherBasedOnURI(uri).fetchSegmentToLocal(uri,
tempFile);
- _logger.info("Downloaded file from {} to {}; Length of downloaded file:
{}", uri, tempFile, tempFile.length());
+ boolean downloadResult = downloadFromURI(uri, tempFile);
+ if (!downloadResult) {
+ String peerServerUri = getPeerServerURI(segmentName);
+ if (peerServerUri == null || !downloadFromURI(peerServerUri,
tempFile)) {
+ _logger.warn("Download segment {} from {} failed.", segmentName,
peerServerUri);
+ return;
+ }
+ }
TarGzCompressionUtils.unTar(tempFile, tempSegmentFolder);
- _logger.info("Uncompressed file {} into tmp dir {}", tempFile,
tempSegmentFolder);
+ _logger.warn("Uncompressed file {} into tmp dir {}", tempFile,
tempSegmentFolder);
Review comment:
should be a INFO-- it is a leftover when I tried to verify the behavior
during tests.
----------------------------------------------------------------
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]