Skip to content

Instantly share code, notes, and snippets.

View ogibayashi's full-sized avatar

Hironori Ogibayashi ogibayashi

View GitHub Profile
#!/usr/bin/env ruby
require 'rubygems'
require 'parallel'
require 'socket'
require 'optparse'
opts = {}
ARGV.options {|opt|
opt.on('-h Host', 'host to connect'){|v| opts[:host] = v }
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
## Hadoopのジョブ実行ログをパースし、task attemptごとに<attempt ID>,<start>,<end>の
## 形で出力する.
## Usage
## parse_joblog.rb history/done/....
task_attempts = { }
##
## Hadoopのジョブ実行時間を可視化する
##
## 入力ファイルは、以下のように<attempt ID>,<start>,<end>のフォーマットである必要がある
##
## attempt_201405161748_0029_m_000074_0,1400232465,1400232468
## attempt_201405161748_0029_m_000072_0,1400232468,1400232474
## attempt_201405161748_0029_m_000047_0,1400232468,1400232477
## attempt_201405161748_0029_m_000048_0,1400232468,1400232482
## attempt_201405161748_0029_m_000061_0,1400232468,1400232483