Esempio n. 1
0
 def test_run_map(self):
     print
     p = tp.text_down_protocol(PIPES_SCRIPT)
     p.start()
     p.run_map("fake", 2)
     p.map_item("1", "a b a")
     p.close()
Esempio n. 2
0
 def test_run_map(self):
     print
     p = tp.text_down_protocol(PIPES_SCRIPT)
     p.start()
     p.run_map("fake", 2)
     p.map_item("1", "a b a")
     p.close()
Esempio n. 3
0
 def test_run_reduce(self):
     print
     p = tp.text_down_protocol(PIPES_SCRIPT)
     p.start()
     p.run_reduce()
     p.reduce_key("a")
     for _ in 1, 2:
         p.reduce_value("1")
     p.reduce_key("b")
     p.reduce_value("1")
     p.close()
Esempio n. 4
0
 def test_run_reduce(self):
     print
     p = tp.text_down_protocol(PIPES_SCRIPT)
     p.start()
     p.run_reduce()
     p.reduce_key("a")
     for _ in 1, 2:
         p.reduce_value("1")
     p.reduce_key("b")
     p.reduce_value("1")
     p.close()