Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

nuked crufty get_hadoop_logs script

  • Loading branch information...
commit 08e95080eb078240f48a01f849b11c6baf34702c 1 parent 818d86e
@thedatachef thedatachef authored
Showing with 0 additions and 36 deletions.
  1. +0 −36 bin/get_hadoop_logs
View
36 bin/get_hadoop_logs
@@ -1,36 +0,0 @@
-#!/usr/bin/env jruby
-
-require 'swineherd'; include Swineherd
-
-class LogGatherer
-
- attr_accessor :fs
- def initialize
- @fs = FileSystem.get(:hdfs)
- end
-
- #
- # Given a path to a hadoop job's output return the string jobconf contents
- #
- def jobconf path
- log_path = File.join(path, "_logs", "history")
- jobconf_xml = fs.entries(log_path).select{|path| path =~ /.*.xml/}.first
- fs.open(jobconf_xml).read
- end
-
-
- #
- # Given a path to a hadoop job's output return the string jobstats contents
- #
- def jobstats path
- log_path = File.join(path, "_logs", "history")
- jobstats_page = fs.entries(log_path).reject{|path| path =~ /.*.xml/}.first
- fs.open(jobstats_page).read
- end
-
-
-end
-
-gatherer = LogGatherer.new
-puts gatherer.jobconf "/tmp/trstrank/trstrank_table"
-puts gatherer.jobstats "/tmp/trstrank/trstrank_table"
Please sign in to comment.
Something went wrong with that request. Please try again.