summaryrefslogtreecommitdiff
path: root/dtrain/hstreaming
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-04-23 21:30:26 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-04-23 21:30:26 +0200
commitd3aa71d1095a5c45c1d3ca3155259e5fe0b58df2 (patch)
tree7752cecb6fad0102e4fabd1c9e935bee955d9566 /dtrain/hstreaming
parente91553ae70907e243a554e4a549c53df57b78478 (diff)
NEXT
Diffstat (limited to 'dtrain/hstreaming')
-rwxr-xr-xdtrain/hstreaming/avg.rb5
-rwxr-xr-xdtrain/hstreaming/lplp.rb4
2 files changed, 5 insertions, 4 deletions
diff --git a/dtrain/hstreaming/avg.rb b/dtrain/hstreaming/avg.rb
index 91d4e29a..5deb62e4 100755
--- a/dtrain/hstreaming/avg.rb
+++ b/dtrain/hstreaming/avg.rb
@@ -22,10 +22,11 @@ else
end
w.each_key { |k|
if k == shard_count_key
- puts "# shard count: #{shard_count.to_i}"
+ #puts "# shard count: #{shard_count.to_i}"
+ next
else
puts "#{k}\t#{w[k]/shard_count}"
- puts "# #{c[k]}"
+ #puts "# #{c[k]}"
end
}
diff --git a/dtrain/hstreaming/lplp.rb b/dtrain/hstreaming/lplp.rb
index 40409bbd..57353adb 100755
--- a/dtrain/hstreaming/lplp.rb
+++ b/dtrain/hstreaming/lplp.rb
@@ -82,7 +82,7 @@ def _test()
cut(w, method(:mean), 1, 2.05)
exit
end
-_test()
+#_test()
# actually do something
def usage()
@@ -107,7 +107,7 @@ STDOUT.set_encoding 'utf-8'
w = {}
shard_count = 0
while line = STDIN.gets
- key, val = line.split /\t/
+ key, val = line.split /\s+/
if key == shard_count_key
shard_count += 1
next