Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

README modifications

  • Loading branch information...
commit 2b7228e953046c60ebabd7dfb9f30ef995b88be0 1 parent 489c6d3
Gabor Szabo authored
Showing with 5 additions and 13 deletions.
  1. +5 −13 README.md
View
18 README.md
@@ -14,26 +14,18 @@ full data processing workflow from Python.
Examples
--------
-There can't be a big data tutorial without counting words. Here it is:
+There can't be a MapReduce tutorial without counting words. Here it is:
def main():
+ ...
- @udf(produces='word')
+ @udf_map(produces=['word'])
def split_words(tuple):
- for word in tuple.get(1).split():
+ for word in tuple.get('line').split():
yield [word]
input | split_words | group_by('word', native.count()) | output
-
- @map(produces=['word'])
- def split_words(tuple):
- for word in tuple.get(1).split():
- yield [word]
-
- def main():
- ...
- input | split_words | GroupBy('word') | Count() | output
- ...
+ ...
Above, the user-defined function that reshapes the stream is annotated with
a PyCascading decorator, and the workflow is created by chaining operations
Please sign in to comment.
Something went wrong with that request. Please try again.