sajjad-moradi commented on a change in pull request #5617:
URL: https://github.com/apache/incubator-pinot/pull/5617#discussion_r447345710
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
##########
@@ -290,6 +300,28 @@ private String extractHttpHeader(HttpHeaders headers,
String name) {
return value;
}
+ private Pair<Boolean, String> encryptSegmentIfNeeded(String
offlineTableName, File tempDecryptedFile, File tempEncryptedFile,
+ boolean uploadedSegmentIsEncrypted) {
+
+ // get crypter class name from table config
+ String crypterClassName =
_pinotHelixResourceManager.getCrypterClassNameFromTableConfig(offlineTableName);
+
+ boolean segmentNeedsEncryption = !Strings.isNullOrEmpty(crypterClassName);
+ if (segmentNeedsEncryption && uploadedSegmentIsEncrypted) {
+ throw new ControllerApplicationException(LOGGER, String.format(
Review comment:
I went with rejecting the segment option. If we encounter users having
same crypter with different names, it'll be a small refactor to allow that
change.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]