Skip to content

Commit 1d70b5d

Browse files
committed
Merge branch 'master' of github.com:lrsjohnson/scheme-mapreduce
2 parents 1745500 + 0fe51c1 commit 1d70b5d

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

examples/demo.scm code/examples/demo.scm

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
;;; Flow computation demo
22
(define (demo)
3-
(define 2d-vectors (create-data-set))
4-
(define 3d-vectors (create-data-set))
5-
(define magnitudes (create-data-set))
6-
(define in-out-flow (create-data-set))
3+
(define 2d-vectors (mrs:create-data-set))
4+
(define 3d-vectors (mrs:create-data-set))
5+
(define magnitudes (mrs:create-data-set))
6+
(define in-out-flow (mrs:create-output-data-set))
77
(mrs:map
88
(lambda (key 2d-vec)
99
(let ((x (car 2d-vec)) (y (cadr 2d-vec)))
@@ -25,6 +25,5 @@
2525
(in (3 3))
2626
(out (5 0))))
2727
(mrs:feed-key-value-list 3d-vectors '((in (1 1 1))
28-
(out (5 0 0))))
29-
(mrs:print-streaming in-out-flow 'flows))
28+
(out (5 0 0)))))
3029
(mrs:run-computation demo)
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(define (word-count)
2-
(define documents (create-data-set))
3-
(define words (create-data-set))
4-
(define word-counts (create-data-set))
2+
(define documents (mrs:create-data-set))
3+
(define words (mrs:create-data-set))
4+
(define word-counts (mrs:create-output-data-set))
55
(mrs:map
66
(lambda (key document)
77
(for-each (lambda (word) (mrs:emit word 1)) document))
@@ -12,6 +12,5 @@
1212
words word-counts)
1313
(mrs:feed-value-list documents '((hello world this is a document)))
1414
(mrs:feed-value-list documents '((another document) (and another)))
15-
(mrs:feed-value-list documents '((this document is somewhat long) (a short document)))
16-
(mrs:print-streaming word-counts 'count))
15+
(mrs:feed-value-list documents '((this document is somewhat long) (a short document))))
1716
(mrs:run-computation word-count)

writeup.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ \subsubsection{Pipes}
198198

199199
For the inter-process communication, we pass data between our
200200
distributors and workers via simple queued pipes. However, our data
201-
abstraction of ``send message to worker'' and ``Get message from
201+
abstraction of ``send message to worker'' and ``get message from
202202
worker'' could easily be reimplemented to use network / TCP
203203
communications to communicate with an actual distributed system of computers.
204204

0 commit comments

Comments
 (0)