• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Confused in applying lambda to Apache flink function

 
Ranch Hand
Posts: 166
1
jQuery Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am really confused in applying lambda map function where as the code which i am reading has got the result.



What i am doing wrong ? Please guide me .

Thanks & Regards,

Swapna.
 
Marshal
Posts: 4700
588
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You really didn't share a lot of detail about what problem you were having and what these data types are, but if MapFunction is org.apache.spark.api.java.function.MapFunction, it does not have a map method, but does have a call method.

Maybe changing public Tuple2<Integer, String> map(String value)
to public Tuple2<Integer, String> call(String value) will resolve your problem.
 
Ron McLeod
Marshal
Posts: 4700
588
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry - ignore that previous post.  I didn't notice that you mentioned Flink in the subject of your post.

I have never looked a Flink before, but I was able to compile your code without errors.  Since you don't have a data sink in your example, your function won't be executed when the application is run, so it not obvious what issue you might be finding.

 
Space pants. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic