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_r393517888
 
 

 ##########
 File path: flink-end-to-end-tests/test-scripts/test_sql_client.sh
 ##########
 @@ -200,18 +224,20 @@ EOF
 )
 
 JOB_ID=$($FLINK_DIR/bin/sql-client.sh embedded \
-  --library $SQL_JARS_DIR \
+  --jar $KAFKA_SQL_JAR \
+  --jar $JSON_SQL_JAR \
+  --jar $ELASTICSEARCH_SQL_JAR \
   --jar $SQL_TOOLBOX_JAR \
   --environment $SQL_CONF \
-  --update "$SQL_STATEMENT_3" | grep "Job ID:" | sed 's/.* //g')
+  --update "$SQL_STATEMENT_1" | grep "Job ID:" | sed 's/.* //g')
 
 wait_job_terminal_state "$JOB_ID" "FINISHED"
 
-verify_result_hash "SQL Client Elasticsearch Upsert" "$ELASTICSEARCH_INDEX" 3 
"21a76360e2a40f442816d940e7071ccf"
+verify_result_line_number 3 "$ELASTICSEARCH_INDEX"
 
 
 Review comment:
   es6 and es7 have different json format about `total hits` in return data,  
   es6:
   `{
     "took" : 263,
     "timed_out" : false,
     "_shards" : {
       "total" : 5,
       "successful" : 5,
       "skipped" : 0,
       "failed" : 0
     },
     "hits" : {
       "total" : 3,
       "max_score" : 1.0,
       "hits" : [
         {
           "_index" : "my_users",
           "_type" : "user",
           "_id" : "42_Kim",
           "_score" : 1.0,
           "_source" : {
             "user_id" : 42,
             "user_name" : "Kim",
             "user_count" : 3
           }
         },
         {
           "_index" : "my_users",
           "_type" : "user",
           "_id" : "1_Bob",
           "_score" : 1.0,
           "_source" : {
             "user_id" : 1,
             "user_name" : "Bob",
             "user_count" : 2
           }
         },
         {
           "_index" : "my_users",
           "_type" : "user",
           "_id" : "22_Tom",
           "_score" : 1.0,
           "_source" : {
             "user_id" : 22,
             "user_name" : "Tom",
             "user_count" : 1
           }
         }
       ]
     }
   }`
   es7:
   `{
     "took" : 263,
     "timed_out" : false,
     "_shards" : {
       "total" : 5,
       "successful" : 5,
       "skipped" : 0,
       "failed" : 0
     },
     "hits" : {
       "total" : {
         "value" : 3,
         "relation" : "eq"
       },
       "max_score" : 1.0,
       "hits" : [
         {
           "_index" : "my_users",
           "_type" : "user",
           "_id" : "42_Kim",
           "_score" : 1.0,
           "_source" : {
             "user_id" : 42,
             "user_name" : "Kim",
             "user_count" : 3
           }
         },
         {
           "_index" : "my_users",
           "_type" : "user",
           "_id" : "1_Bob",
           "_score" : 1.0,
           "_source" : {
             "user_id" : 1,
             "user_name" : "Bob",
             "user_count" : 2
           }
         },
         {
           "_index" : "my_users",
           "_type" : "user",
           "_id" : "22_Tom",
           "_score" : 1.0,
           "_source" : {
             "user_id" : 22,
             "user_name" : "Tom",
             "user_count" : 1
           }
         }
       ]
     }
   }`
   check line numbers here for general purpose.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to