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/06/02 21:38:30 UTC
[pinot] 01/01: Revert "Allow moveToFinalLocation in METADATA push based on config (#8815)"
This is an automated email from the ASF dual-hosted git repository.
nehapawar pushed a commit to branch revert-8815-metadata_push
in repository https://gitbox.apache.org/repos/asf/pinot.git
commit cdfc4db57476be05b2fcc5dfc5fbaa45a2fd1bd4
Author: Neha Pawar <ne...@gmail.com>
AuthorDate: Thu Jun 2 14:38:21 2022 -0700
Revert "Allow moveToFinalLocation in METADATA push based on config (#8815)"
This reverts commit 8788f1c0c31006b4610993397a6272a25097d0da.
---
.../apache/pinot/common/utils/FileUploadDownloadClient.java | 2 --
.../PinotSegmentUploadDownloadRestletResource.java | 10 +---------
.../apache/pinot/segment/local/utils/SegmentPushUtils.java | 4 ----
.../apache/pinot/spi/ingestion/batch/spec/PushJobSpec.java | 13 -------------
4 files changed, 1 insertion(+), 28 deletions(-)
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/utils/FileUploadDownloadClient.java b/pinot-common/src/main/java/org/apache/pinot/common/utils/FileUploadDownloadClient.java
index 34cc5656ae..ac4413ff35 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/utils/FileUploadDownloadClient.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/utils/FileUploadDownloadClient.java
@@ -73,8 +73,6 @@ public class FileUploadDownloadClient implements AutoCloseable {
public static final String UPLOAD_TYPE = "UPLOAD_TYPE";
public static final String REFRESH_ONLY = "REFRESH_ONLY";
public static final String DOWNLOAD_URI = "DOWNLOAD_URI";
-
- public static final String MOVE_SEGMENT_TO_DEEP_STORE = "MOVE_SEGMENT_TO_DEEP_STORE";
public static final String SEGMENT_ZK_METADATA_CUSTOM_MAP_MODIFIER = "Pinot-SegmentZKMetadataCustomMapModifier";
public static final String CRYPTER = "CRYPTER";
}
diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
index ab1e9fd572..5a86d46642 100644
--- a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
+++ b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
@@ -256,15 +256,7 @@ public class PinotSegmentUploadDownloadRestletResource {
throw new ControllerApplicationException(LOGGER, "Download URI is required for METADATA upload mode",
Response.Status.BAD_REQUEST);
}
- // override moveSegmentToFinalLocation if override provided in headers:moveSegmentToDeepStore
- // else set to false for backward compatibility
- String moveSegmentToDeepStore =
- extractHttpHeader(headers, FileUploadDownloadClient.CustomHeaders.MOVE_SEGMENT_TO_DEEP_STORE);
- if (moveSegmentToDeepStore != null) {
- moveSegmentToFinalLocation = Boolean.parseBoolean(moveSegmentToDeepStore);
- } else {
- moveSegmentToFinalLocation = false;
- }
+ moveSegmentToFinalLocation = false;
createSegmentFileFromMultipart(multiPart, destFile);
try {
URI segmentURI = new URI(downloadURI);
diff --git a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/SegmentPushUtils.java b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/SegmentPushUtils.java
index ae1655e972..1d91e5bb4e 100644
--- a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/SegmentPushUtils.java
+++ b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/SegmentPushUtils.java
@@ -264,10 +264,6 @@ public class SegmentPushUtils implements Serializable {
headers.add(new BasicHeader(FileUploadDownloadClient.CustomHeaders.DOWNLOAD_URI, segmentUriPath));
headers.add(new BasicHeader(FileUploadDownloadClient.CustomHeaders.UPLOAD_TYPE,
FileUploadDownloadClient.FileUploadType.METADATA.toString()));
- if (spec.getPushJobSpec() != null) {
- headers.add(new BasicHeader(FileUploadDownloadClient.CustomHeaders.MOVE_SEGMENT_TO_DEEP_STORE,
- String.valueOf(spec.getPushJobSpec().getMoveToDeepStoreForMetadataPush())));
- }
headers.addAll(AuthProviderUtils.toRequestHeaders(authProvider));
SimpleHttpResponse response = FILE_UPLOAD_DOWNLOAD_CLIENT
diff --git a/pinot-spi/src/main/java/org/apache/pinot/spi/ingestion/batch/spec/PushJobSpec.java b/pinot-spi/src/main/java/org/apache/pinot/spi/ingestion/batch/spec/PushJobSpec.java
index bdb5d4c960..40944978ca 100644
--- a/pinot-spi/src/main/java/org/apache/pinot/spi/ingestion/batch/spec/PushJobSpec.java
+++ b/pinot-spi/src/main/java/org/apache/pinot/spi/ingestion/batch/spec/PushJobSpec.java
@@ -41,11 +41,6 @@ public class PushJobSpec implements Serializable {
*/
private long _pushRetryIntervalMillis = 1000;
- /**
- * Applicable for URI and METADATA push types.
- * If true, and if segment was not already in the deep store, move it to deep store.
- */
- private boolean _moveToDeepStoreForMetadataPush;
/**
* Used in SegmentUriPushJobRunner, which is used to composite the segment uri to send to pinot controller.
* The URI sends to controller is in the format ${segmentUriPrefix}${segmentPath}${segmentUriSuffix}
@@ -126,12 +121,4 @@ public class PushJobSpec implements Serializable {
public void setPushParallelism(int pushParallelism) {
_pushParallelism = pushParallelism;
}
-
- public boolean getMoveToDeepStoreForMetadataPush() {
- return _moveToDeepStoreForMetadataPush;
- }
-
- public void setMoveToDeepStoreForMetadataPush(boolean moveToDeepStoreForMetadataPush) {
- _moveToDeepStoreForMetadataPush = moveToDeepStoreForMetadataPush;
- }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org