You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "abhioncbr (via GitHub)" <gi...@apache.org> on 2023/08/06 02:31:54 UTC

[GitHub] [pinot] abhioncbr opened a new pull request, #11277: Remove commons-httpclient 3.1 library dependency.

abhioncbr opened a new pull request, #11277:
URL: https://github.com/apache/pinot/pull/11277

   As per the [issue](https://github.com/apache/pinot/issues/11118)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

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


[GitHub] [pinot] abhioncbr commented on pull request #11277: Remove commons-httpclient 3.1 library dependency.

Posted by "abhioncbr (via GitHub)" <gi...@apache.org>.
abhioncbr commented on PR #11277:
URL: https://github.com/apache/pinot/pull/11277#issuecomment-1670495244

   @Jackie-Jiang, please let me know if I need to cut this PR into small ones. This PR also covers the changes of the [PR](https://github.com/apache/pinot/pull/11246) 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

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


[GitHub] [pinot] xiangfu0 commented on a diff in pull request #11277: Remove commons-httpclient 3.1 library dependency.

Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 commented on code in PR #11277:
URL: https://github.com/apache/pinot/pull/11277#discussion_r1287870225


##########
pinot-common/src/main/java/org/apache/pinot/common/utils/TlsUtils.java:
##########
@@ -240,10 +230,6 @@ public static void installDefaultSSLSocketFactory(String keyStoreType, String ke
       // HttpsURLConnection
       HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
 
-      // Apache HTTP client 3.x
-      Protocol.registerProtocol("https",

Review Comment:
   Is it safe to remove this?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

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


[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #11277: Remove commons-httpclient 3.1 library dependency.

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #11277:
URL: https://github.com/apache/pinot/pull/11277#discussion_r1291904756


##########
pinot-common/src/main/java/org/apache/pinot/common/http/MultiHttpRequestResponse.java:
##########
@@ -18,38 +18,26 @@
  */
 package org.apache.pinot.common.http;
 
+import java.io.IOException;
 import java.net.URI;
 import org.apache.http.client.methods.CloseableHttpResponse;
-
-
 public class MultiHttpRequestResponse implements AutoCloseable {

Review Comment:
   (minor) Can we add some empty lines between methods? Auto-reformat should do the job



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

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


[GitHub] [pinot] abhioncbr commented on a diff in pull request #11277: Remove commons-httpclient 3.1 library dependency.

Posted by "abhioncbr (via GitHub)" <gi...@apache.org>.
abhioncbr commented on code in PR #11277:
URL: https://github.com/apache/pinot/pull/11277#discussion_r1287874461


##########
pinot-common/src/main/java/org/apache/pinot/common/utils/TlsUtils.java:
##########
@@ -240,10 +230,6 @@ public static void installDefaultSSLSocketFactory(String keyStoreType, String ke
       // HttpsURLConnection
       HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
 
-      // Apache HTTP client 3.x
-      Protocol.registerProtocol("https",

Review Comment:
   Yes, according to the conversation [here](https://github.com/apache/pinot/pull/11246). We are removing `commons-httpclient 3.1` and this set custom `sslcontext` in this way.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

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


[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #11277: Remove commons-httpclient 3.1 library dependency.

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #11277:
URL: https://github.com/apache/pinot/pull/11277#discussion_r1288019350


##########
pinot-core/src/main/java/org/apache/pinot/core/query/executor/sql/SqlQueryExecutor.java:
##########
@@ -103,7 +104,7 @@ public BrokerResponse executeDMLStatement(SqlNodeAndOptions sqlNodeAndOptions,
           List<Object[]> rows = new ArrayList<>();
           tableToTaskIdMap.forEach((key, value) -> rows.add(new Object[]{key, value}));
           result.setResultTable(new ResultTable(statement.getResultSchema(), rows));
-        } catch (IOException e) {
+        } catch (IOException | HttpException e) {

Review Comment:
   We should just catch `Exception` here (including RuntimeException)



##########
pinot-common/src/main/java/org/apache/pinot/common/http/MultiHttpRequestResponse.java:
##########
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.common.http;
+
+import java.net.URI;
+import org.apache.http.client.methods.CloseableHttpResponse;
+
+
+public class MultiHttpRequestResponse implements AutoCloseable {
+  private final URI _uri;
+  private final int _responseStatusCode;
+  private final String _responseContent;

Review Comment:
   These 2 fields are part of the response. Consider only passing in the response and get them on the fly



##########
pinot-common/src/main/java/org/apache/pinot/common/http/MultiHttpRequestResponse.java:
##########
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.common.http;
+
+import java.net.URI;
+import org.apache.http.client.methods.CloseableHttpResponse;
+
+
+public class MultiHttpRequestResponse implements AutoCloseable {
+  private final URI _uri;
+  private final int _responseStatusCode;
+  private final String _responseContent;
+  private final CloseableHttpResponse _response;
+
+  public MultiHttpRequestResponse(URI uri, int responseStatusCode,
+      String responseContent, CloseableHttpResponse response) {
+    _uri = uri;
+    _response = response;
+    _responseStatusCode = responseStatusCode;
+    _responseContent = responseContent;
+  }
+
+  public URI getURI() {
+    return _uri;
+  }
+
+  public int getResponseStatusCode() {
+    return _responseStatusCode;
+  }
+
+  public String getResponseContent() {
+    return _responseContent;
+  }
+
+  @Override
+  public void close() throws Exception {

Review Comment:
   (code format) This file doesn't follow Pinot Style



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

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


[GitHub] [pinot] codecov-commenter commented on pull request #11277: Remove commons-httpclient 3.1 library dependency.

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #11277:
URL: https://github.com/apache/pinot/pull/11277#issuecomment-1666693562

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/11277?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#11277](https://app.codecov.io/gh/apache/pinot/pull/11277?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (84931ea) into [master](https://app.codecov.io/gh/apache/pinot/commit/0984168988551b97c5a2884f3d2588e75975ff3b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (0984168) will **decrease** coverage by `0.12%`.
   > Report is 1 commits behind head on master.
   > The diff coverage is `0.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11277      +/-   ##
   ==========================================
   - Coverage    0.11%    0.00%   -0.12%     
   ==========================================
     Files        2229     1602     -627     
     Lines      119963    84646   -35317     
     Branches    18183    13437    -4746     
   ==========================================
   - Hits          137        0     -137     
   + Misses     119806    84646   -35160     
   + Partials       20        0      -20     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | integration1temurin11 | `?` | |
   | integration1temurin17 | `?` | |
   | integration1temurin20 | `?` | |
   | integration2temurin11 | `?` | |
   | integration2temurin17 | `?` | |
   | integration2temurin20 | `?` | |
   | unittests1temurin11 | `?` | |
   | unittests1temurin17 | `0.00% <0.00%> (ø)` | |
   | unittests1temurin20 | `?` | |
   | unittests2temurin11 | `?` | |
   | unittests2temurin17 | `?` | |
   | unittests2temurin20 | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Files Changed](https://app.codecov.io/gh/apache/pinot/pull/11277?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...org/apache/pinot/common/http/MultiHttpRequest.java](https://app.codecov.io/gh/apache/pinot/pull/11277?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vaHR0cC9NdWx0aUh0dHBSZXF1ZXN0LmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...he/pinot/common/http/MultiHttpRequestResponse.java](https://app.codecov.io/gh/apache/pinot/pull/11277?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vaHR0cC9NdWx0aUh0dHBSZXF1ZXN0UmVzcG9uc2UuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...a/org/apache/pinot/common/minion/MinionClient.java](https://app.codecov.io/gh/apache/pinot/pull/11277?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vbWluaW9uL01pbmlvbkNsaWVudC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...ava/org/apache/pinot/common/utils/SchemaUtils.java](https://app.codecov.io/gh/apache/pinot/pull/11277?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vdXRpbHMvU2NoZW1hVXRpbHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...n/java/org/apache/pinot/common/utils/TlsUtils.java](https://app.codecov.io/gh/apache/pinot/pull/11277?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vdXRpbHMvVGxzVXRpbHMuamF2YQ==) | `0.00% <ø> (ø)` | |
   | [...he/pinot/common/utils/webhdfs/WebHdfsV1Client.java](https://app.codecov.io/gh/apache/pinot/pull/11277?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vdXRpbHMvd2ViaGRmcy9XZWJIZGZzVjFDbGllbnQuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...inot/core/query/executor/sql/SqlQueryExecutor.java](https://app.codecov.io/gh/apache/pinot/pull/11277?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9xdWVyeS9leGVjdXRvci9zcWwvU3FsUXVlcnlFeGVjdXRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
   
   ... and [630 files with indirect coverage changes](https://app.codecov.io/gh/apache/pinot/pull/11277/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

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


[GitHub] [pinot] abhioncbr closed pull request #11277: Remove commons-httpclient 3.1 library dependency.

Posted by "abhioncbr (via GitHub)" <gi...@apache.org>.
abhioncbr closed pull request #11277: Remove commons-httpclient 3.1 library dependency. 
URL: https://github.com/apache/pinot/pull/11277


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

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


[GitHub] [pinot] Jackie-Jiang merged pull request #11277: Remove commons-httpclient 3.1 library dependency.

Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang merged PR #11277:
URL: https://github.com/apache/pinot/pull/11277


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

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