Permalink
Browse files

Added numbers.rb

  • Loading branch information...
1 parent c81a44a commit 8328f216f454a7c40206a2859a3eb7b02a9e43df @nvijayap committed Jan 12, 2014
Showing with 16 additions and 0 deletions.
  1. +4 −0 .gitignore
  2. +12 −0 numbers.rb
View
@@ -0,0 +1,4 @@
+numbers.txt
+numbers.out
+numbers.err
+*.log
View
@@ -0,0 +1,12 @@
+
+puts "=> Creating datafile ..."
+File.open("numbers.txt", "w") do |f|
+ (0..10_000).each { |n| f.puts(n) }
+end
+
+# use local or mapreduce
+puts "=> Running pig ..."
+# `time pig numbers.pig >numbers.out 2>numbers.err` # default is mapreduce
+`(time pig -x local numbers.pig) >numbers.out 2>numbers.err`
+puts "=> STDOUT is in numbers.out and STDERR is in numbers.err"
+

0 comments on commit 8328f21

Please sign in to comment.