flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tzulitai <...@git.apache.org>
Subject [GitHub] flink pull request #5761: [FLINK-8989] [e2eTests] Elasticsearch1 end to end ...
Date Mon, 26 Mar 2018 07:10:53 GMT
Github user tzulitai commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5761#discussion_r176996077
  
    --- Diff: flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/elasticsearch/Elasticsearch1Example.java
---
    @@ -37,20 +39,36 @@
     import java.util.Map;
     
     /**
    - * This example shows how to use the Elasticsearch Sink. Before running it you must ensure
that
    - * you have a cluster named "elasticsearch" running or change the cluster name in the
config map.
    + * End to end test for elasticsearch1.
    + *
    + * <p>This example shows how to use the Elasticsearch Sink from an user endpoint.
Before running it you
    + * must ensure that you have a cluster named "elasticsearch" running or change the cluster
name in the config map.
    + *
    + * <p>Example usage:
    + * 	--index my-index-person --type my-type-spiderman
      */
    -@SuppressWarnings("serial")
    -public class ElasticsearchSinkExample {
    +public class Elasticsearch1Example {
     
     	public static void main(String[] args) throws Exception {
     
    +		final ParameterTool parameterTool = ParameterTool.fromArgs(args);
    +
    +		if (parameterTool.getNumberOfParameters() < 2) {
    +			System.out.println("Missing parameters!\n" +
    +					"Usage: --index <my-index-person> --type <my-type-spiderman>");
    --- End diff --
    
    For a general example, I think we should keep the usage wordings more general.
    Therefore, "<my-index-person>" "<my-type-spiderman>" could just be "type",
"index".


---

Mime
View raw message