You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ne...@apache.org on 2022/11/04 01:00:39 UTC
[pinot] branch master updated: Remove leftover file before downloading segmentTar (#9719)
This is an automated email from the ASF dual-hosted git repository.
nehapawar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new d2fbcf6cca Remove leftover file before downloading segmentTar (#9719)
d2fbcf6cca is described below
commit d2fbcf6ccac18f7d9d61d2d9fbdafc4c823f5b00
Author: Neha Pawar <ne...@gmail.com>
AuthorDate: Thu Nov 3 18:00:34 2022 -0700
Remove leftover file before downloading segmentTar (#9719)
---
.../pinot/core/data/manager/realtime/RealtimeTableDataManager.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeTableDataManager.java b/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeTableDataManager.java
index d780daaed1..31e5baf08a 100644
--- a/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeTableDataManager.java
+++ b/pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeTableDataManager.java
@@ -468,6 +468,13 @@ public class RealtimeTableDataManager extends BaseTableDataManager {
private void downloadSegmentFromDeepStore(String segmentName, IndexLoadingConfig indexLoadingConfig, String uri) {
File segmentTarFile = new File(_indexDir, segmentName + TarGzCompressionUtils.TAR_GZ_FILE_EXTENSION);
+ if (segmentTarFile.exists()) {
+ _logger.warn(
+ "Segment tar file: {} already exists (possibly due to server restart/crash resulting in skipped cleanup). "
+ + "Deleting it before fetching again from uri: {}",
+ segmentName, uri);
+ FileUtils.deleteQuietly(segmentTarFile);
+ }
try {
SegmentFetcherFactory.fetchSegmentToLocal(uri, segmentTarFile);
_logger.info("Downloaded file from {} to {}; Length of downloaded file: {}", uri, segmentTarFile,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org