You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by "ChengJie1053 (via GitHub)" <gi...@apache.org> on 2023/06/13 10:52:54 UTC
[GitHub] [linkis] ChengJie1053 opened a new pull request, #4625: Fix es ArrayIndexOutOfBoundsException bug
ChengJie1053 opened a new pull request, #4625:
URL: https://github.com/apache/linkis/pull/4625

--
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: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [linkis] jackxu2011 commented on a diff in pull request #4625: Fix es ArrayIndexOutOfBoundsException bug
Posted by "jackxu2011 (via GitHub)" <gi...@apache.org>.
jackxu2011 commented on code in PR #4625:
URL: https://github.com/apache/linkis/pull/4625#discussion_r1228869339
##########
linkis-engineconn-plugins/elasticsearch/src/main/java/org/apache/linkis/engineplugin/elasticsearch/executor/client/EsClientFactory.java:
##########
@@ -192,6 +192,9 @@ private static HttpHost[] getCluster(String clusterStr) {
.map(
value -> {
String[] arr = value.replace("http://", "").split(":");
+ if (arr.length < 2) {
+ return new HttpHost("127.0.0.1", 9200);
Review Comment:
this should use ```new HttpHost(arr[0].trim(), 80);```, and add length <1, throw error;
http without port, the default port is 80. https without port, the default port is 443
##########
linkis-engineconn-plugins/elasticsearch/src/main/java/org/apache/linkis/engineplugin/elasticsearch/executor/client/EsClientFactory.java:
##########
@@ -192,6 +192,9 @@ private static HttpHost[] getCluster(String clusterStr) {
.map(
value -> {
String[] arr = value.replace("http://", "").split(":");
+ if (arr.length < 2) {
+ return new HttpHost("127.0.0.1", 9200);
Review Comment:
9200, is es's default port, use 127.0.0.1 can't call the api, it's a config error?
--
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: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [linkis] ChengJie1053 commented on a diff in pull request #4625: Fix es ArrayIndexOutOfBoundsException bug
Posted by "ChengJie1053 (via GitHub)" <gi...@apache.org>.
ChengJie1053 commented on code in PR #4625:
URL: https://github.com/apache/linkis/pull/4625#discussion_r1229074926
##########
linkis-engineconn-plugins/elasticsearch/src/main/java/org/apache/linkis/engineplugin/elasticsearch/executor/client/EsClientFactory.java:
##########
@@ -192,6 +192,9 @@ private static HttpHost[] getCluster(String clusterStr) {
.map(
value -> {
String[] arr = value.replace("http://", "").split(":");
+ if (arr.length < 2) {
+ return new HttpHost("127.0.0.1", 9200);
Review Comment:


I did this because I wanted to be consistent with this configuration
--
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: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [linkis] ChengJie1053 commented on a diff in pull request #4625: Fix es ArrayIndexOutOfBoundsException bug
Posted by "ChengJie1053 (via GitHub)" <gi...@apache.org>.
ChengJie1053 commented on code in PR #4625:
URL: https://github.com/apache/linkis/pull/4625#discussion_r1229069813
##########
linkis-engineconn-plugins/elasticsearch/src/main/java/org/apache/linkis/engineplugin/elasticsearch/executor/client/EsClientFactory.java:
##########
@@ -192,6 +192,9 @@ private static HttpHost[] getCluster(String clusterStr) {
.map(
value -> {
String[] arr = value.replace("http://", "").split(":");
+ if (arr.length < 2) {
+ return new HttpHost("127.0.0.1", 9200);
Review Comment:
Ok, thanks for reviewing the code
--
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: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [linkis] aiceflower commented on pull request #4625: Fix es ArrayIndexOutOfBoundsException bug
Posted by "aiceflower (via GitHub)" <gi...@apache.org>.
aiceflower commented on PR #4625:
URL: https://github.com/apache/linkis/pull/4625#issuecomment-1590802283
LGTM.
--
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: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [linkis] jackxu2011 merged pull request #4625: [Fix Bug]Fix elasticsearch task execution failed
Posted by "jackxu2011 (via GitHub)" <gi...@apache.org>.
jackxu2011 merged PR #4625:
URL: https://github.com/apache/linkis/pull/4625
--
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: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org