Great! I'm happy to hear that it worked.

On Tue, Jun 9, 2015 at 5:28 PM, hagersaleh <loveallah1...@yahoo.com> wrote:

> I can solve problem when   final Map<String, Integer> map = new
> HashMap<String, Integer>();
>
>  very thanks
>  code run in command line not any error
>     public static  void main(String[] args) throws Exception {
>     final Map<String, Integer> map = new HashMap<String, Integer>();
>         map.put("C_MKTSEGMENT", 2);
>         ExecutionEnvironment env =
> ExecutionEnvironment.getExecutionEnvironment();
>           DataSet<Customer3>
> customers=env.readCsvFile("/home/hadoop/Desktop/Dataset/customer.csv")
>                                         .fieldDelimiter('|')
>
> .includeFields("11000010").ignoreFirstLine()
>                                         .tupleType(Customer3.class);
>            customers = customers.filter(new FilterFunction<Customer3>()
>                         {
>                             @Override
>                             public boolean filter(Customer3 c) {
>
>                             Integer index1=map.get("C_MKTSEGMENT");
>                             return c.getField(index1).equals("AUTOMOBILE");
>                         }
>                 });
>
>          customers.print();
>          customers.writeAsCsv("/home/hadoop/Desktop/Dataset/out1.csv",
> "\n",
> "|",WriteMode.OVERWRITE);
>         env.execute("TPCH Query 3 Example");
>
>     }
>
>
>
> --
> View this message in context:
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/when-return-value-from-linkedlist-or-map-and-use-in-filter-function-display-error-tp1528p1567.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive
> at Nabble.com.
>

Reply via email to