You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by jl...@apache.org on 2020/09/09 22:06:45 UTC

[incubator-pinot] branch add-ingestion-descriptor created (now 469e7b8)

This is an automated email from the ASF dual-hosted git repository.

jlli pushed a change to branch add-ingestion-descriptor
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git.


      at 469e7b8  Add ingestion descriptor in the header

This branch includes the following new commits:

     new 469e7b8  Add ingestion descriptor in the header

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[incubator-pinot] 01/01: Add ingestion descriptor in the header

Posted by jl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jlli pushed a commit to branch add-ingestion-descriptor
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 469e7b8e07f646cea5399f1c0c8012d9edebb8d6
Author: Jack Li(Analytics Engineering) <jl...@jlli-mn1.linkedin.biz>
AuthorDate: Wed Sep 9 15:06:15 2020 -0700

    Add ingestion descriptor in the header
---
 .../main/java/org/apache/pinot/common/utils/CommonConstants.java   | 1 +
 .../api/resources/PinotSegmentUploadDownloadRestletResource.java   | 7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/pinot-common/src/main/java/org/apache/pinot/common/utils/CommonConstants.java b/pinot-common/src/main/java/org/apache/pinot/common/utils/CommonConstants.java
index ac3a796..cae177e 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/utils/CommonConstants.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/utils/CommonConstants.java
@@ -292,6 +292,7 @@ public class CommonConstants {
     public static final String VERSION_HTTP_HEADER = "Pinot-Controller-Version";
     public static final String SEGMENT_NAME_HTTP_HEADER = "Pinot-Segment-Name";
     public static final String TABLE_NAME_HTTP_HEADER = "Pinot-Table-Name";
+    public static final String INGESTION_DESCRIPTOR = "Pinot-Ingestion-Descriptor";
     public static final String PREFIX_OF_CONFIG_OF_PINOT_CRYPTER = "pinot.controller.crypter";
 
     public static final String CONFIG_OF_CONTROLLER_METRICS_PREFIX = "controller.metrics.prefix";
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 eef4f9f..8da5b53 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
@@ -186,9 +186,11 @@ public class PinotSegmentUploadDownloadRestletResource {
     String uploadTypeStr = null;
     String crypterClassNameInHeader = null;
     String downloadUri = null;
+    String ingestionDescriptor = null;
     if (headers != null) {
       extractHttpHeader(headers, CommonConstants.Controller.SEGMENT_NAME_HTTP_HEADER);
       extractHttpHeader(headers, CommonConstants.Controller.TABLE_NAME_HTTP_HEADER);
+      ingestionDescriptor = extractHttpHeader(headers, CommonConstants.Controller.INGESTION_DESCRIPTOR);
       uploadTypeStr = extractHttpHeader(headers, FileUploadDownloadClient.CustomHeaders.UPLOAD_TYPE);
       crypterClassNameInHeader = extractHttpHeader(headers, FileUploadDownloadClient.CustomHeaders.CRYPTER);
       downloadUri = extractHttpHeader(headers, FileUploadDownloadClient.CustomHeaders.DOWNLOAD_URI);
@@ -242,9 +244,8 @@ public class PinotSegmentUploadDownloadRestletResource {
 
       String offlineTableName = TableNameBuilder.OFFLINE.tableNameWithType(rawTableName);
       String clientAddress = InetAddress.getByName(request.getRemoteAddr()).getHostName();
-      LOGGER
-          .info("Processing upload request for segment: {} of table: {} from client: {}", segmentName, offlineTableName,
-              clientAddress);
+      LOGGER.info("Processing upload request for segment: {} of table: {} from client: {}, ingestion descriptor: {}",
+          segmentName, offlineTableName, clientAddress, ingestionDescriptor);
 
       // Validate segment
       new SegmentValidator(_pinotHelixResourceManager, _controllerConf, _executor, _connectionManager,


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org