leonardBang commented on a change in pull request #11396: 
[FLINK-16170][connectors/elasticsearch]SearchTemplateRequest 
ClassNotFoundException when use flink-sql-connector-elasticsearch7
URL: https://github.com/apache/flink/pull/11396#discussion_r396870402
 
 

 ##########
 File path: flink-end-to-end-tests/test-scripts/test_sql_client.sh
 ##########
 @@ -85,6 +90,31 @@ function sql_cleanup() {
 }
 on_exit sql_cleanup
 
+function prepare_elasticsearch {
+  echo "Preparing Elasticsearch(version=$ELASTICSEARCH_VERSION)..."
+  # elastcisearch offers different release binary file for corresponding 
system since version 7.
+  case "$(uname -s)" in
+      Linux*)     OS_TYPE=linux;;
+      Darwin*)    OS_TYPE=mac;;
+      *)          OS_TYPE="UNKNOWN:${unameOut}"
+  esac
+
+  if [[ "$ELASTICSEARCH_VERSION" == 6 ]]; then
+    DOWNLOAD_URL=$ELASTICSEARCH6_DOWNLOAD_URL
+  elif [[ "$ELASTICSEARCH_VERSION" == 7 ]] && [[ "$OS_TYPE" == "mac" ]]; then
+    DOWNLOAD_URL=$ELASTICSEARCH7_MAC_DOWNLOAD_URL
+  elif [[ "$ELASTICSEARCH_VERSION" == 7 ]] && [[ "$OS_TYPE" == "linux" ]]; then
+    DOWNLOAD_URL=$ELASTICSEARCH7_LINUX_DOWNLOAD_URL
+  else
+    echo "Unsupported elasticsearch version($ELASTICSEARCH_VERSION) for OS: 
$OS_TYPE, fallback to elasticsearh($ELASTICSEARCH_VERSION)."
 
 Review comment:
   okay,giving an exception is better than fallback to elasticsearch 6.

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


With regards,
Apache Git Services

Reply via email to