You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/11/17 03:46:30 UTC

[GitHub] [incubator-pinot] Jackie-Jiang commented on a change in pull request #6270: Allow setting HTTP headers and parameters during schema upload

Jackie-Jiang commented on a change in pull request #6270:
URL: https://github.com/apache/incubator-pinot/pull/6270#discussion_r524866184



##########
File path: pinot-common/src/main/java/org/apache/pinot/common/utils/FileUploadDownloadClient.java
##########
@@ -243,8 +243,9 @@ private static HttpUriRequest constructDeleteRequest(URI uri) {
     return requestBuilder.build();
   }
 
-  private static HttpUriRequest getAddSchemaRequest(URI uri, String schemaName, File schemaFile) {
-    return getUploadFileRequest(HttpPost.METHOD_NAME, uri, getContentBody(schemaName, schemaFile), null, null,
+  private static HttpUriRequest getAddSchemaRequest(URI uri, String schemaName, File schemaFile, List<Header> headers,

Review comment:
       Add nullable annotation to headers and parameters

##########
File path: pinot-common/src/main/java/org/apache/pinot/common/utils/FileUploadDownloadClient.java
##########
@@ -419,7 +420,25 @@ public SimpleHttpResponse sendDeleteRequest(URI uri)
    */
   public SimpleHttpResponse addSchema(URI uri, String schemaName, File schemaFile)
       throws IOException, HttpErrorStatusException {
-    return sendRequest(getAddSchemaRequest(uri, schemaName, schemaFile));
+    return sendRequest(getAddSchemaRequest(uri, schemaName, schemaFile, null, null));
+  }
+
+  /**
+   * Add schema.
+   *
+   * @param uri URI
+   * @param schemaName Schema name
+   * @param schemaFile Schema file
+   * @param headers HTTP headers
+   * @param parameters HTTP parameters
+   * @return Response
+   * @throws IOException
+   * @throws HttpErrorStatusException
+   */
+  public SimpleHttpResponse addSchema(URI uri, String schemaName, File schemaFile, List<Header> headers,

Review comment:
       Add nullable annotation to headers and parameters




----------------------------------------------------------------
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:
users@infra.apache.org



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