From 28806638345e60bd442bf5fa8e7471f9115b0296 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Thu, 26 Apr 2012 11:36:49 +0200 Subject: remove obsolete stuff --- dtrain/hstreaming/rule_count/map.sh | 4 ---- dtrain/hstreaming/rule_count/red.rb | 24 ------------------------ dtrain/hstreaming/rule_count/rulecount.rb | 13 ------------- dtrain/hstreaming/rule_count/test | 8 -------- 4 files changed, 49 deletions(-) delete mode 100755 dtrain/hstreaming/rule_count/map.sh delete mode 100644 dtrain/hstreaming/rule_count/red.rb delete mode 100644 dtrain/hstreaming/rule_count/rulecount.rb delete mode 100644 dtrain/hstreaming/rule_count/test (limited to 'dtrain/hstreaming/rule_count') diff --git a/dtrain/hstreaming/rule_count/map.sh b/dtrain/hstreaming/rule_count/map.sh deleted file mode 100755 index ae75fece..00000000 --- a/dtrain/hstreaming/rule_count/map.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -ruby rulecount.rb | sort | ruby red.rb - diff --git a/dtrain/hstreaming/rule_count/red.rb b/dtrain/hstreaming/rule_count/red.rb deleted file mode 100644 index 874ae7ac..00000000 --- a/dtrain/hstreaming/rule_count/red.rb +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env ruby - -STDIN.set_encoding 'utf-8' -STDOUT.set_encoding 'utf-8' - -def output(key, val) - puts "#{key}\t#{val}" -end - -prev_key = nil -sum = 0 -while line = STDIN.gets - key, val = line.strip.split /\t/ - if key != prev_key && sum > 0 - output prev_key, sum - prev_key = key - sum = 0 - elsif !prev_key - prev_key = key - end - sum += val.to_i -end -output prev_key, sum - diff --git a/dtrain/hstreaming/rule_count/rulecount.rb b/dtrain/hstreaming/rule_count/rulecount.rb deleted file mode 100644 index 67361fa4..00000000 --- a/dtrain/hstreaming/rule_count/rulecount.rb +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env ruby - -STDIN.set_encoding 'utf-8' -STDOUT.set_encoding 'utf-8' - -while line = STDIN.gets - a = line.strip.chomp.split "\t" - a[3..a.size].each { |r| - id = r.split("|||")[0..2].join("|||").to_s.strip.gsub("\s", "_") - puts "#{id}\t1" - } -end - diff --git a/dtrain/hstreaming/rule_count/test b/dtrain/hstreaming/rule_count/test deleted file mode 100644 index acd00a5e..00000000 --- a/dtrain/hstreaming/rule_count/test +++ /dev/null @@ -1,8 +0,0 @@ -a 1 -a 1 -a 1 -b 1 -b 1 -c 1 -d 1 -a 1 -- cgit v1.2.3