wobble 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.md +11 -0
  2. data/bin/wobble +52 -0
  3. data/lib/wobble.rb +2 -0
  4. data/lib/wobble/version.rb +3 -0
  5. metadata +168 -0
data/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # wobble
2
+
3
+ A command-line interface for Hadoop’s JobTracker.
4
+
5
+ ## Installation
6
+
7
+ gem install wobble
8
+
9
+ ## Usage
10
+
11
+ wobble --help
data/bin/wobble ADDED
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'gli'
4
+ require 'terminal-table'
5
+
6
+ require 'wobble'
7
+
8
+ include GLI::App
9
+
10
+ program_desc "a command-line interface for Hadoop's JobTracker"
11
+
12
+ version Wobble::VERSION
13
+
14
+ desc "host for Hadoop's JobTracker"
15
+ arg_name 'host'
16
+ flag :host
17
+
18
+ desc "retrieve job statuses from Hadoop's JobTracker"
19
+ arg_name 'status'
20
+
21
+ command :status do |c|
22
+ c.desc 'specify status type (i.e. running, completed, failed)'
23
+ c.flag :type
24
+ c.action do |global_options, options, args|
25
+ if options['type']
26
+ @tracker.type = options['type']
27
+ end
28
+
29
+ table = Terminal::Table.new do |t|
30
+ t.title = "#{options['type'].capitalize} Jobs"
31
+ t.headings = ['ID', 'Priority', 'User', 'Name']
32
+ t.rows = @tracker.jobs
33
+ end
34
+
35
+ puts table
36
+ end
37
+ end
38
+
39
+ pre do |global, command, options, args|
40
+ @tracker = Wobble::Tracker.new(global['host'])
41
+
42
+ true
43
+ end
44
+
45
+ post do |global, command, options, args|
46
+ end
47
+
48
+ on_error do |exception|
49
+ true
50
+ end
51
+
52
+ exit run(ARGV)
data/lib/wobble.rb ADDED
@@ -0,0 +1,2 @@
1
+ require 'wobble/tracker'
2
+ require 'wobble/version'
@@ -0,0 +1,3 @@
1
+ module Wobble
2
+ VERSION = '1.0.0'
3
+ end
metadata ADDED
@@ -0,0 +1,168 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wobble
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Allen Goodman
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-11-16 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: aruba
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 0.5.0
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.5.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 10.0.1
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 10.0.1
46
+ - !ruby/object:Gem::Dependency
47
+ name: rdoc
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '3.12'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '3.12'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 2.12.0
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 2.12.0
78
+ - !ruby/object:Gem::Dependency
79
+ name: nokogiri
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: 1.5.5
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 1.5.5
94
+ - !ruby/object:Gem::Dependency
95
+ name: terminal-table
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: 1.4.5
102
+ type: :runtime
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 1.4.5
110
+ - !ruby/object:Gem::Dependency
111
+ name: gli
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 2.4.1
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 2.4.1
126
+ description: A command-line interface for Hadoop’s JobTracker.
127
+ email: allen.goodman@me.com
128
+ executables:
129
+ - wobble
130
+ extensions: []
131
+ extra_rdoc_files:
132
+ - README.md
133
+ files:
134
+ - bin/wobble
135
+ - lib/wobble/version.rb
136
+ - lib/wobble.rb
137
+ - README.md
138
+ homepage: https://github.com/2a6U37Nn/wobble
139
+ licenses: []
140
+ post_install_message:
141
+ rdoc_options:
142
+ - --title
143
+ - wobble
144
+ - --main
145
+ - README.md
146
+ - -ri
147
+ require_paths:
148
+ - lib
149
+ required_ruby_version: !ruby/object:Gem::Requirement
150
+ none: false
151
+ requirements:
152
+ - - ! '>='
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
155
+ required_rubygems_version: !ruby/object:Gem::Requirement
156
+ none: false
157
+ requirements:
158
+ - - ! '>='
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ requirements: []
162
+ rubyforge_project:
163
+ rubygems_version: 1.8.23
164
+ signing_key:
165
+ specification_version: 3
166
+ summary: A command-line interface for Hadoop’s JobTracker.
167
+ test_files: []
168
+ has_rdoc: true