Skip to content

Instantly share code, notes, and snippets.

@anmol2709
Created December 27, 2018 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anmol2709/6de439d1df1898d8aa9dbe7289040d64 to your computer and use it in GitHub Desktop.
Save anmol2709/6de439d1df1898d8aa9dbe7289040d64 to your computer and use it in GitHub Desktop.
val text =
// read the text file from given input path
if (params.has("input")) {
env.readTextFile(params.get("input"))
} else {
println("Executing WordCount example with default inputs data set.")
println("Use --input to specify file input.")
// get default test text data
env.fromElements(WordCountData.WORDS: _*)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment