td 0.10.91 → 0.10.92

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 54ab5db5f823601ee978f163a00352c436d0636a
4
+ data.tar.gz: b3c3d90f2a273a47d97b904b96a5ba28a2c8ec1d
5
+ SHA512:
6
+ metadata.gz: ac9469809cba499a0d9148694bba56a8c732510716885e1d0c63db39e0fe32afdd8c01a001c945ac33e7e4af1701a8c424b54c28b093af4906241634eef28713
7
+ data.tar.gz: 48d57829a410364a275be6863970293281aa28646be116eb98c425e6b2bc67329d06b5b2bf2a911ccc02a862dcccb7c679d51e05ec39d9b5088939daa598921c
data/.gitignore CHANGED
@@ -1,5 +1,5 @@
1
1
  .bundle
2
- build/td-bulk-import-java
2
+ build/td-import-java
3
3
  Gemfile.lock
4
4
  vendor/*
5
5
  *~
data/ChangeLog CHANGED
@@ -1,3 +1,12 @@
1
+ == 2013-11-05 version 0.10.92
2
+
3
+ * Improves import commands. It can parse string values of 'HH:mm:ss' time format automatically without specifying '%T' and transfer into long unix timestamp.
4
+ * Improves import commands. It can parse string values of 'yyyy/MM/dd HH:mm:ss' time format automatically without specifying 'time-format' and transfer into long unix timestamp.
5
+ * Improves import commands. It can parse string values of 'yyyy/MM/dd HH:mm:ss Z' time format automatically without specifying 'time-format' and transfer into long unix timestamp.
6
+ * Adds 'regex' to source file format option of import:prepare command.
7
+ * Fix import:upload command. NullPointerException often occurrs when data files are uploaded.
8
+
9
+
1
10
  == 2013-10-04 version 0.10.91
2
11
 
3
12
  * Fix import command doesn't work on Windows
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ def version
15
15
  end
16
16
 
17
17
  task "jar" do
18
- system('./build/update-td-bulk-import-java.sh')
18
+ system('./build/update-td-import-java.sh')
19
19
  end
20
20
 
21
21
  def project_root_path(path)
@@ -0,0 +1,44 @@
1
+ #!/bin/bash
2
+ cd "$(dirname $0)"
3
+ chrev="$1"
4
+
5
+ if [ -d td-import-java/.git ];then
6
+ rm -rf td-import-java/*
7
+ cd td-import-java
8
+ git checkout . || exit 1
9
+ git pull || exit 1
10
+ else
11
+ rm -rf td-import-java/
12
+ git clone git@github.com:treasure-data/td-import-java.git td-import-java || exit 1
13
+ cd td-import-java
14
+ fi
15
+ git checkout master
16
+
17
+ if [ -n "$chrev" ];then
18
+ git checkout $chrev
19
+ fi
20
+
21
+ revname="$(git show --pretty=format:'%H %ad' | head -n 1)"
22
+ vername="0.3.1-SNAPSHOT"
23
+
24
+ mvn package -Dmaven.test.skip=true || exit 1
25
+ echo "copy td-import-${vername}.jar"
26
+ cp target/td-import-${vername}.jar ../../java/td-import.jar
27
+ echo "copy logging.properties"
28
+ cp src/test/resources/java/logging.properties ../../java/logging.properties
29
+ echo "create VERSION file"
30
+ echo "${vername}" > VERSION
31
+ mv VERSION ../../java/VERSION
32
+
33
+ if [ -n "$chrev" ];then
34
+ git checkout master
35
+ fi
36
+
37
+ cd ../../
38
+
39
+ echo "$revname" > java/td-import-java.version
40
+
41
+ echo ""
42
+ echo "git commit ./java -m \"updated td-import-java $revname\""
43
+ git commit ./java/td-import.jar ./java/td-import-java.version -m "updated td-import-java $revname" || exit 1
44
+
data/java/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4-SNAPSHOT
1
+ 0.3.1-SNAPSHOT
@@ -0,0 +1 @@
1
+ d8f0fb80d14729cc8881a7e1aa074a51fdc34407 Tue Nov 5 14:08:52 2013 +0900
@@ -25,6 +25,10 @@ module Command
25
25
  raise ConfigError, "Account is not configured."
26
26
  end
27
27
  opts[:user_agent] = "TD: #{TreasureData::VERSION}"
28
+ if h = ENV['TD_API_HEADERS']
29
+ pairs = h.split("\n")
30
+ opts[:headers] = Hash[pairs.map {|pair| pair.split('=', 2) }]
31
+ end
28
32
  Client.new(apikey, opts)
29
33
  end
30
34
 
@@ -5,7 +5,7 @@ module Command
5
5
  BASE_PATH = File.expand_path('../../..', File.dirname(__FILE__))
6
6
 
7
7
  JAVA_COMMAND = "java"
8
- JAVA_MAIN_CLASS = "com.treasure_data.bulk_import.BulkImportMain"
8
+ JAVA_MAIN_CLASS = "com.treasure_data.td_import.BulkImportCommand"
9
9
  JVM_OPTS = ["-Xmx1024m"] # TODO
10
10
 
11
11
  def import_list(op)
@@ -25,7 +25,7 @@ module Command
25
25
 
26
26
  def import_java_version(op)
27
27
  vfile = find_version_file[0]
28
- puts "td-bulk-import-java #{File.open(vfile, 'r').read}"
28
+ puts "td-import-java #{File.open(vfile, 'r').read}"
29
29
  end
30
30
 
31
31
  def import_prepare(op)
@@ -81,7 +81,7 @@ module Command
81
81
  # configure java command-line arguments
82
82
  java_args = []
83
83
  java_args.concat build_sysprops
84
- java_args.concat ["-cp", find_td_bulk_import_jar]
84
+ java_args.concat ["-cp", find_td_import_jar]
85
85
  java_args << JAVA_MAIN_CLASS
86
86
  java_args << subcmd
87
87
  if show_help
@@ -112,11 +112,11 @@ module Command
112
112
  end
113
113
 
114
114
  private
115
- def find_td_bulk_import_jar
115
+ def find_td_import_jar
116
116
  libjars = Dir.glob("#{BASE_PATH}/java/**/*.jar")
117
- found = libjars.find { |path| File.basename(path) =~ /^td-bulk-import/ }
117
+ found = libjars.find { |path| File.basename(path) =~ /^td-import/ }
118
118
  if found.nil?
119
- $stderr.puts "td-bulk-import.jar is not found."
119
+ $stderr.puts "td-import.jar is not found."
120
120
  exit 1
121
121
  end
122
122
  found
data/lib/td/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module TreasureData
2
2
 
3
- VERSION = '0.10.91'
3
+ VERSION = '0.10.92'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,34 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: td
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.91
5
- prerelease:
4
+ version: 0.10.92
6
5
  platform: ruby
7
6
  authors:
8
7
  - Treasure Data, Inc.
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-10-04 00:00:00.000000000 Z
11
+ date: 2013-11-05 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: msgpack
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.4.4
22
- - - ! '!='
20
+ - - '!='
23
21
  - !ruby/object:Gem::Version
24
22
  version: 0.5.0
25
- - - ! '!='
23
+ - - '!='
26
24
  - !ruby/object:Gem::Version
27
25
  version: 0.5.1
28
- - - ! '!='
26
+ - - '!='
29
27
  - !ruby/object:Gem::Version
30
28
  version: 0.5.2
31
- - - ! '!='
29
+ - - '!='
32
30
  - !ruby/object:Gem::Version
33
31
  version: 0.5.3
34
32
  - - <
@@ -37,21 +35,20 @@ dependencies:
37
35
  type: :runtime
38
36
  prerelease: false
39
37
  version_requirements: !ruby/object:Gem::Requirement
40
- none: false
41
38
  requirements:
42
- - - ! '>='
39
+ - - '>='
43
40
  - !ruby/object:Gem::Version
44
41
  version: 0.4.4
45
- - - ! '!='
42
+ - - '!='
46
43
  - !ruby/object:Gem::Version
47
44
  version: 0.5.0
48
- - - ! '!='
45
+ - - '!='
49
46
  - !ruby/object:Gem::Version
50
47
  version: 0.5.1
51
- - - ! '!='
48
+ - - '!='
52
49
  - !ruby/object:Gem::Version
53
50
  version: 0.5.2
54
- - - ! '!='
51
+ - - '!='
55
52
  - !ruby/object:Gem::Version
56
53
  version: 0.5.3
57
54
  - - <
@@ -60,7 +57,6 @@ dependencies:
60
57
  - !ruby/object:Gem::Dependency
61
58
  name: yajl-ruby
62
59
  requirement: !ruby/object:Gem::Requirement
63
- none: false
64
60
  requirements:
65
61
  - - ~>
66
62
  - !ruby/object:Gem::Version
@@ -68,7 +64,6 @@ dependencies:
68
64
  type: :runtime
69
65
  prerelease: false
70
66
  version_requirements: !ruby/object:Gem::Requirement
71
- none: false
72
67
  requirements:
73
68
  - - ~>
74
69
  - !ruby/object:Gem::Version
@@ -76,23 +71,20 @@ dependencies:
76
71
  - !ruby/object:Gem::Dependency
77
72
  name: hirb
78
73
  requirement: !ruby/object:Gem::Requirement
79
- none: false
80
74
  requirements:
81
- - - ! '>='
75
+ - - '>='
82
76
  - !ruby/object:Gem::Version
83
77
  version: 0.4.5
84
78
  type: :runtime
85
79
  prerelease: false
86
80
  version_requirements: !ruby/object:Gem::Requirement
87
- none: false
88
81
  requirements:
89
- - - ! '>='
82
+ - - '>='
90
83
  - !ruby/object:Gem::Version
91
84
  version: 0.4.5
92
85
  - !ruby/object:Gem::Dependency
93
86
  name: parallel
94
87
  requirement: !ruby/object:Gem::Requirement
95
- none: false
96
88
  requirements:
97
89
  - - ~>
98
90
  - !ruby/object:Gem::Version
@@ -100,7 +92,6 @@ dependencies:
100
92
  type: :runtime
101
93
  prerelease: false
102
94
  version_requirements: !ruby/object:Gem::Requirement
103
- none: false
104
95
  requirements:
105
96
  - - ~>
106
97
  - !ruby/object:Gem::Version
@@ -108,7 +99,6 @@ dependencies:
108
99
  - !ruby/object:Gem::Dependency
109
100
  name: td-client
110
101
  requirement: !ruby/object:Gem::Requirement
111
- none: false
112
102
  requirements:
113
103
  - - ~>
114
104
  - !ruby/object:Gem::Version
@@ -116,7 +106,6 @@ dependencies:
116
106
  type: :runtime
117
107
  prerelease: false
118
108
  version_requirements: !ruby/object:Gem::Requirement
119
- none: false
120
109
  requirements:
121
110
  - - ~>
122
111
  - !ruby/object:Gem::Version
@@ -124,7 +113,6 @@ dependencies:
124
113
  - !ruby/object:Gem::Dependency
125
114
  name: td-logger
126
115
  requirement: !ruby/object:Gem::Requirement
127
- none: false
128
116
  requirements:
129
117
  - - ~>
130
118
  - !ruby/object:Gem::Version
@@ -132,7 +120,6 @@ dependencies:
132
120
  type: :runtime
133
121
  prerelease: false
134
122
  version_requirements: !ruby/object:Gem::Requirement
135
- none: false
136
123
  requirements:
137
124
  - - ~>
138
125
  - !ruby/object:Gem::Version
@@ -140,7 +127,6 @@ dependencies:
140
127
  - !ruby/object:Gem::Dependency
141
128
  name: rubyzip
142
129
  requirement: !ruby/object:Gem::Requirement
143
- none: false
144
130
  requirements:
145
131
  - - ~>
146
132
  - !ruby/object:Gem::Version
@@ -148,7 +134,6 @@ dependencies:
148
134
  type: :runtime
149
135
  prerelease: false
150
136
  version_requirements: !ruby/object:Gem::Requirement
151
- none: false
152
137
  requirements:
153
138
  - - ~>
154
139
  - !ruby/object:Gem::Version
@@ -156,7 +141,6 @@ dependencies:
156
141
  - !ruby/object:Gem::Dependency
157
142
  name: rake
158
143
  requirement: !ruby/object:Gem::Requirement
159
- none: false
160
144
  requirements:
161
145
  - - ~>
162
146
  - !ruby/object:Gem::Version
@@ -164,7 +148,6 @@ dependencies:
164
148
  type: :development
165
149
  prerelease: false
166
150
  version_requirements: !ruby/object:Gem::Requirement
167
- none: false
168
151
  requirements:
169
152
  - - ~>
170
153
  - !ruby/object:Gem::Version
@@ -172,7 +155,6 @@ dependencies:
172
155
  - !ruby/object:Gem::Dependency
173
156
  name: rspec
174
157
  requirement: !ruby/object:Gem::Requirement
175
- none: false
176
158
  requirements:
177
159
  - - ~>
178
160
  - !ruby/object:Gem::Version
@@ -180,7 +162,6 @@ dependencies:
180
162
  type: :development
181
163
  prerelease: false
182
164
  version_requirements: !ruby/object:Gem::Requirement
183
- none: false
184
165
  requirements:
185
166
  - - ~>
186
167
  - !ruby/object:Gem::Version
@@ -188,7 +169,6 @@ dependencies:
188
169
  - !ruby/object:Gem::Dependency
189
170
  name: simplecov
190
171
  requirement: !ruby/object:Gem::Requirement
191
- none: false
192
172
  requirements:
193
173
  - - ~>
194
174
  - !ruby/object:Gem::Version
@@ -196,7 +176,6 @@ dependencies:
196
176
  type: :development
197
177
  prerelease: false
198
178
  version_requirements: !ruby/object:Gem::Requirement
199
- none: false
200
179
  requirements:
201
180
  - - ~>
202
181
  - !ruby/object:Gem::Version
@@ -214,7 +193,7 @@ files:
214
193
  - README.rdoc
215
194
  - Rakefile
216
195
  - bin/td
217
- - build/update-td-bulk-import-java.sh
196
+ - build/update-td-import-java.sh
218
197
  - contrib/completion/_td
219
198
  - contrib/completion/td-comletion.bash
220
199
  - data/sample_apache.json
@@ -232,8 +211,8 @@ files:
232
211
  - dist/resources/pkg/td
233
212
  - java/VERSION
234
213
  - java/logging.properties
235
- - java/td-bulk-import-java.version
236
- - java/td-bulk-import.jar
214
+ - java/td-import-java.version
215
+ - java/td-import.jar
237
216
  - lib/td.rb
238
217
  - lib/td/command/account.rb
239
218
  - lib/td/command/acl.rb
@@ -282,33 +261,26 @@ files:
282
261
  - td.gemspec
283
262
  homepage: http://treasure-data.com/
284
263
  licenses: []
264
+ metadata: {}
285
265
  post_install_message:
286
266
  rdoc_options: []
287
267
  require_paths:
288
268
  - lib
289
269
  required_ruby_version: !ruby/object:Gem::Requirement
290
- none: false
291
270
  requirements:
292
- - - ! '>='
271
+ - - '>='
293
272
  - !ruby/object:Gem::Version
294
273
  version: '0'
295
- segments:
296
- - 0
297
- hash: 3403017301161628743
298
274
  required_rubygems_version: !ruby/object:Gem::Requirement
299
- none: false
300
275
  requirements:
301
- - - ! '>='
276
+ - - '>='
302
277
  - !ruby/object:Gem::Version
303
278
  version: '0'
304
- segments:
305
- - 0
306
- hash: 3403017301161628743
307
279
  requirements: []
308
280
  rubyforge_project:
309
- rubygems_version: 1.8.23
281
+ rubygems_version: 2.0.3
310
282
  signing_key:
311
- specification_version: 3
283
+ specification_version: 4
312
284
  summary: CLI to manage data on Treasure Data, the Hadoop-based cloud data warehousing
313
285
  test_files:
314
286
  - spec/file_reader/filter_spec.rb
@@ -1,44 +0,0 @@
1
- #!/bin/bash
2
- cd "$(dirname $0)"
3
- chrev="$1"
4
-
5
- if [ -d td-bulk-import-java/.git ];then
6
- rm -rf td-bulk-import-java/*
7
- cd td-bulk-import-java
8
- git checkout . || exit 1
9
- git pull || exit 1
10
- else
11
- rm -rf td-bulk-import-java/
12
- git clone git@github.com:treasure-data/td-bulk-import-java.git td-bulk-import-java || exit 1
13
- cd td-bulk-import-java
14
- fi
15
- git checkout master
16
-
17
- if [ -n "$chrev" ];then
18
- git checkout $chrev
19
- fi
20
-
21
- revname="$(git show --pretty=format:'%H %ad' | head -n 1)"
22
- vername="0.2.4-SNAPSHOT"
23
-
24
- mvn package -Dmaven.test.skip=true || exit 1
25
- echo "copy td-bulk-import-${vername}.jar"
26
- cp target/td-bulk-import-${vername}.jar ../../java/td-bulk-import.jar
27
- echo "copy logging.properties"
28
- cp src/test/resources/java/logging.properties ../../java/logging.properties
29
- echo "create VERSION file"
30
- echo "${vername}" > VERSION
31
- mv VERSION ../../java/VERSION
32
-
33
- if [ -n "$chrev" ];then
34
- git checkout master
35
- fi
36
-
37
- cd ../../
38
-
39
- echo "$revname" > java/td-bulk-import-java.version
40
-
41
- echo ""
42
- echo "git commit ./java -m \"updated td-bulk-import-java $revname\""
43
- git commit ./java/td-bulk-import.jar ./java/td-bulk-import-java.version -m "updated td-bulk-import-java $revname" || exit 1
44
-
@@ -1 +0,0 @@
1
- 2252f77e1a64c6a2b34e7be2ed3302665604c433 Thu Sep 26 12:15:16 2013 +0900