mortar 0.15.0 → 0.15.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mortar/local/pig.rb +16 -0
- data/lib/mortar/templates/script/runpig.sh +4 -1
- data/lib/mortar/templates/script/runpython.sh +2 -0
- data/lib/mortar/version.rb +1 -1
- metadata +41 -17
- checksums.yaml +0 -7
data/lib/mortar/local/pig.rb
CHANGED
@@ -181,6 +181,17 @@ class Mortar::Local::Pig
|
|
181
181
|
end
|
182
182
|
|
183
183
|
def launch_repl(pig_version, pig_parameters)
|
184
|
+
# The REPL is very likely to be run outside a mortar project and almost equally as likely
|
185
|
+
# to be run in the users home directory. The default log4j config file references pig log
|
186
|
+
# file as being ../logs/local-pig.log, which is a path relative to the 'pigscripts' directory.
|
187
|
+
# Since we very likely aren't going be run from a mortar project we won't have a pigscripts
|
188
|
+
# directory to cd into, so log4j spits out an ugly error message when it doesn't have permissions
|
189
|
+
# to create /home/logs/local-pig.log. So to work around this we copy the log4j configuration and
|
190
|
+
# overwrite the log file to no longer be relative.
|
191
|
+
File.open(log4j_conf_no_project, 'w') do |out|
|
192
|
+
out << File.open(log4j_conf).read.gsub(/log4j.appender.LogFileAppender.File=.*\n/,
|
193
|
+
"log4j.appender.LogFileAppender.File=local-pig.log\n")
|
194
|
+
end
|
184
195
|
run_pig_command(" ", pig_version, pig_parameters)
|
185
196
|
end
|
186
197
|
|
@@ -320,6 +331,10 @@ class Mortar::Local::Pig
|
|
320
331
|
"#{lib_directory}/conf/log4j-cli-local-dev.properties"
|
321
332
|
end
|
322
333
|
|
334
|
+
def log4j_conf_no_project
|
335
|
+
"#{lib_directory}/conf/log4j-cli-local-no-project.properties"
|
336
|
+
end
|
337
|
+
|
323
338
|
# Parameters necessary for rendering the bash script template
|
324
339
|
def pig_command_script_template_parameters(cmd, pig_version, pig_parameters)
|
325
340
|
template_params = {}
|
@@ -329,6 +344,7 @@ class Mortar::Local::Pig
|
|
329
344
|
template_params['pig_classpath'] = "#{pig_directory(pig_version)}/lib-local/*:#{lib_directory}/lib-local/*:#{pig_directory(pig_version)}/lib-pig/*:#{pig_directory(pig_version)}/lib-cluster/*:#{lib_directory}/lib-pig/*:#{lib_directory}/lib-cluster/*:#{jython_directory}/jython.jar"
|
330
345
|
template_params['classpath'] = template_params_classpath
|
331
346
|
template_params['log4j_conf'] = log4j_conf
|
347
|
+
template_params['no_project_log4j_conf'] = log4j_conf_no_project
|
332
348
|
template_params['pig_sub_command'] = cmd
|
333
349
|
template_params['pig_opts'] = pig_options
|
334
350
|
template_params
|
@@ -10,7 +10,10 @@ export PIG_OPTS="<% @pig_opts.each do |k,v| %>-D<%= k %>=<%= v %> <% end %>"
|
|
10
10
|
|
11
11
|
# UDF paths are relative to this direectory
|
12
12
|
if [ -d "<%= @project_home %>/pigscripts" ]; then
|
13
|
+
export LOG4J_CONF_FILE=<%= @log4j_conf %>
|
13
14
|
cd <%= @project_home %>/pigscripts
|
15
|
+
else
|
16
|
+
export LOG4J_CONF_FILE=<%= @no_project_log4j_conf %>
|
14
17
|
fi
|
15
18
|
|
16
19
|
# Setup python environment
|
@@ -18,7 +21,7 @@ source <%= @local_install_dir %>/pythonenv/bin/activate
|
|
18
21
|
|
19
22
|
# Run Pig
|
20
23
|
<%= @local_install_dir %>/<%= @pig_dir %>/bin/pig -exectype local \
|
21
|
-
-log4jconf
|
24
|
+
-log4jconf "$LOG4J_CONF_FILE" \
|
22
25
|
-propertyFile <%= @local_install_dir %>/lib-common/conf/pig-hawk-global.properties \
|
23
26
|
-propertyFile <%= @local_install_dir %>/lib-common/conf/pig-cli-local-dev.properties \
|
24
27
|
-param_file <%= @pig_params_file %> \
|
@@ -5,6 +5,8 @@ set -e
|
|
5
5
|
# Setup python environment
|
6
6
|
source <%= @local_install_dir %>/pythonenv/bin/activate
|
7
7
|
|
8
|
+
export LUIGI_CONFIG_PATH=`pwd`/`dirname <%= @python_script %>`/client.cfg
|
9
|
+
|
8
10
|
# Run Python
|
9
11
|
<%= @local_install_dir %>/pythonenv/bin/python \
|
10
12
|
<%= @python_arugments %> \
|
data/lib/mortar/version.rb
CHANGED
metadata
CHANGED
@@ -1,32 +1,36 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mortar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.1
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Mortar Data
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-
|
12
|
+
date: 2014-03-04 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: rdoc
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- - '>='
|
19
|
+
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: 4.0.0
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- - '>='
|
27
|
+
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 4.0.0
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: mortar-api-ruby
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ~>
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ~>
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -41,6 +46,7 @@ dependencies:
|
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: netrc
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
51
|
- - ~>
|
46
52
|
- !ruby/object:Gem::Version
|
@@ -48,6 +54,7 @@ dependencies:
|
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
59
|
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
@@ -55,6 +62,7 @@ dependencies:
|
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: launchy
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ~>
|
60
68
|
- !ruby/object:Gem::Version
|
@@ -62,6 +70,7 @@ dependencies:
|
|
62
70
|
type: :runtime
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
75
|
- - ~>
|
67
76
|
- !ruby/object:Gem::Version
|
@@ -69,6 +78,7 @@ dependencies:
|
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: parseconfig
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
83
|
- - ~>
|
74
84
|
- !ruby/object:Gem::Version
|
@@ -76,6 +86,7 @@ dependencies:
|
|
76
86
|
type: :runtime
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
91
|
- - ~>
|
81
92
|
- !ruby/object:Gem::Version
|
@@ -83,6 +94,7 @@ dependencies:
|
|
83
94
|
- !ruby/object:Gem::Dependency
|
84
95
|
name: excon
|
85
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
99
|
- - ~>
|
88
100
|
- !ruby/object:Gem::Version
|
@@ -90,6 +102,7 @@ dependencies:
|
|
90
102
|
type: :development
|
91
103
|
prerelease: false
|
92
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
93
106
|
requirements:
|
94
107
|
- - ~>
|
95
108
|
- !ruby/object:Gem::Version
|
@@ -97,6 +110,7 @@ dependencies:
|
|
97
110
|
- !ruby/object:Gem::Dependency
|
98
111
|
name: fakefs
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
100
114
|
requirements:
|
101
115
|
- - ~>
|
102
116
|
- !ruby/object:Gem::Version
|
@@ -104,6 +118,7 @@ dependencies:
|
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
107
122
|
requirements:
|
108
123
|
- - ~>
|
109
124
|
- !ruby/object:Gem::Version
|
@@ -111,57 +126,65 @@ dependencies:
|
|
111
126
|
- !ruby/object:Gem::Dependency
|
112
127
|
name: gem-release
|
113
128
|
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
114
130
|
requirements:
|
115
|
-
- - '>='
|
131
|
+
- - ! '>='
|
116
132
|
- !ruby/object:Gem::Version
|
117
133
|
version: '0'
|
118
134
|
type: :development
|
119
135
|
prerelease: false
|
120
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
121
138
|
requirements:
|
122
|
-
- - '>='
|
139
|
+
- - ! '>='
|
123
140
|
- !ruby/object:Gem::Version
|
124
141
|
version: '0'
|
125
142
|
- !ruby/object:Gem::Dependency
|
126
143
|
name: rake
|
127
144
|
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
128
146
|
requirements:
|
129
|
-
- - '>='
|
147
|
+
- - ! '>='
|
130
148
|
- !ruby/object:Gem::Version
|
131
149
|
version: '0'
|
132
150
|
type: :development
|
133
151
|
prerelease: false
|
134
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
135
154
|
requirements:
|
136
|
-
- - '>='
|
155
|
+
- - ! '>='
|
137
156
|
- !ruby/object:Gem::Version
|
138
157
|
version: '0'
|
139
158
|
- !ruby/object:Gem::Dependency
|
140
159
|
name: rr
|
141
160
|
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
142
162
|
requirements:
|
143
|
-
- - '>='
|
163
|
+
- - ! '>='
|
144
164
|
- !ruby/object:Gem::Version
|
145
165
|
version: '0'
|
146
166
|
type: :development
|
147
167
|
prerelease: false
|
148
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
149
170
|
requirements:
|
150
|
-
- - '>='
|
171
|
+
- - ! '>='
|
151
172
|
- !ruby/object:Gem::Version
|
152
173
|
version: '0'
|
153
174
|
- !ruby/object:Gem::Dependency
|
154
175
|
name: rspec
|
155
176
|
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
156
178
|
requirements:
|
157
|
-
- - '>='
|
179
|
+
- - ! '>='
|
158
180
|
- !ruby/object:Gem::Version
|
159
181
|
version: '0'
|
160
182
|
type: :development
|
161
183
|
prerelease: false
|
162
184
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
163
186
|
requirements:
|
164
|
-
- - '>='
|
187
|
+
- - ! '>='
|
165
188
|
- !ruby/object:Gem::Version
|
166
189
|
version: '0'
|
167
190
|
description: Client library and command-line tool to interact with the Mortar service.
|
@@ -299,25 +322,26 @@ files:
|
|
299
322
|
- spec/support/display_message_matcher.rb
|
300
323
|
homepage: http://mortardata.com/
|
301
324
|
licenses: []
|
302
|
-
metadata: {}
|
303
325
|
post_install_message:
|
304
326
|
rdoc_options: []
|
305
327
|
require_paths:
|
306
328
|
- lib
|
307
329
|
required_ruby_version: !ruby/object:Gem::Requirement
|
330
|
+
none: false
|
308
331
|
requirements:
|
309
|
-
- - '>='
|
332
|
+
- - ! '>='
|
310
333
|
- !ruby/object:Gem::Version
|
311
334
|
version: 1.8.7
|
312
335
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
336
|
+
none: false
|
313
337
|
requirements:
|
314
|
-
- - '>='
|
338
|
+
- - ! '>='
|
315
339
|
- !ruby/object:Gem::Version
|
316
340
|
version: '0'
|
317
341
|
requirements: []
|
318
342
|
rubyforge_project:
|
319
|
-
rubygems_version:
|
343
|
+
rubygems_version: 1.8.23
|
320
344
|
signing_key:
|
321
|
-
specification_version:
|
345
|
+
specification_version: 3
|
322
346
|
summary: Client library and CLI to interact with the Mortar service.
|
323
347
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: a48ef7a19f19d16af145ed38847a5c316c509361
|
4
|
-
data.tar.gz: 4d554dd57193f50f23b0f98b273695d6e7d1af2c
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: d8a722fdcc23c6312b8faac36dba45d9f2399d6bbb64c2187576abd600fead99d0c20dfd7073002d1f4903c9026409b57b219ba49ace184d5334f0b575ab7ba1
|
7
|
-
data.tar.gz: 868f456e447061aaeb90a941a00f2cdf0b0706fa7355fe5753a7554ec99af13d43501bcb553aa3246ff0aa9605382f6cc5f620733ae57327cbe521b1970a5b1c
|