td 0.10.87 → 0.10.88
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +7 -0
- data/build/update-td-bulk-import-java.sh +4 -1
- data/java/VERSION +1 -0
- data/java/td-bulk-import-java.version +1 -1
- data/java/td-bulk-import.jar +0 -0
- data/lib/td/command/import.rb +15 -12
- data/lib/td/command/list.rb +1 -0
- data/lib/td/version.rb +1 -1
- data/td.gemspec +1 -1
- metadata +7 -6
data/ChangeLog
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
== 2013-09-13 version 0.10.88
|
2
|
+
|
3
|
+
* Update td-client-ruby to 0.8.55
|
4
|
+
* Update td-bulk-import.jar to 0.2.4
|
5
|
+
* Add import:java_version subcommand to show bundled td-bulk-import-java version
|
6
|
+
|
7
|
+
|
1
8
|
== 2013-09-05 version 0.10.87
|
2
9
|
|
3
10
|
* Add auto-delete option to import:auto subcommand
|
@@ -19,13 +19,16 @@ if [ -n "$chrev" ];then
|
|
19
19
|
fi
|
20
20
|
|
21
21
|
revname="$(git show --pretty=format:'%H %ad' | head -n 1)"
|
22
|
-
vername="0.2.
|
22
|
+
vername="0.2.4-SNAPSHOT"
|
23
23
|
|
24
24
|
mvn package -Dmaven.test.skip=true || exit 1
|
25
25
|
echo "copy td-bulk-import-${vername}.jar"
|
26
26
|
cp target/td-bulk-import-${vername}.jar ../../java/td-bulk-import.jar
|
27
27
|
echo "copy logging.properties"
|
28
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
|
29
32
|
|
30
33
|
if [ -n "$chrev" ];then
|
31
34
|
git checkout master
|
data/java/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.2.4-SNAPSHOT
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
7946ca2a469530c5fcadad412f6de21e495d0fbb Fri Sep 13 18:36:18 2013 +0900
|
data/java/td-bulk-import.jar
CHANGED
Binary file
|
data/lib/td/command/import.rb
CHANGED
@@ -9,9 +9,6 @@ module Command
|
|
9
9
|
JAVA_MAIN_CLASS = "com.treasure_data.bulk_import.BulkImportMain"
|
10
10
|
JAVA_HEAP_MAX_SIZE = "-Xmx1024m" # TODO
|
11
11
|
|
12
|
-
APP_OPTION_PREPARE = "prepare"
|
13
|
-
APP_OPTION_UPLOAD = "upload"
|
14
|
-
|
15
12
|
def import_list(op)
|
16
13
|
require 'td/command/bulk_import'
|
17
14
|
bulk_import_list(op)
|
@@ -27,16 +24,21 @@ module Command
|
|
27
24
|
bulk_import_create(op)
|
28
25
|
end
|
29
26
|
|
27
|
+
def import_java_version(op)
|
28
|
+
vfile = find_version_file[0]
|
29
|
+
puts "td-bulk-import-java #{File.open(vfile, 'r').read}"
|
30
|
+
end
|
31
|
+
|
30
32
|
def import_prepare(op)
|
31
|
-
|
33
|
+
import_by_java('prepare')
|
32
34
|
end
|
33
35
|
|
34
36
|
def import_upload(op)
|
35
|
-
|
37
|
+
import_by_java('upload')
|
36
38
|
end
|
37
39
|
|
38
40
|
def import_auto(op)
|
39
|
-
|
41
|
+
import_by_java('auto')
|
40
42
|
end
|
41
43
|
|
42
44
|
def import_perform(op)
|
@@ -70,7 +72,7 @@ module Command
|
|
70
72
|
end
|
71
73
|
|
72
74
|
private
|
73
|
-
def
|
75
|
+
def import_by_java(subcmd)
|
74
76
|
# has java runtime
|
75
77
|
check_java
|
76
78
|
|
@@ -95,11 +97,6 @@ module Command
|
|
95
97
|
else
|
96
98
|
java_args << ARGV
|
97
99
|
end
|
98
|
-
if auto
|
99
|
-
java_args << "--auto-perform"
|
100
|
-
java_args << "--auto-commit"
|
101
|
-
java_args << "--auto-delete"
|
102
|
-
end
|
103
100
|
|
104
101
|
# TODO consider parameters including spaces; don't use join(' ')
|
105
102
|
cmd = "#{JAVA_COMMAND} #{jvm_opts.join(' ')} #{java_opts.join(' ')} #{sysprops.join(' ')} #{java_args.join(' ')}"
|
@@ -219,5 +216,11 @@ module Command
|
|
219
216
|
logging_conf_file
|
220
217
|
end
|
221
218
|
|
219
|
+
private
|
220
|
+
def find_version_file
|
221
|
+
vfile = Dir.glob("#{BASE_PATH}/java/**/VERSION")
|
222
|
+
vfile
|
223
|
+
end
|
224
|
+
|
222
225
|
end
|
223
226
|
end
|
data/lib/td/command/list.rb
CHANGED
@@ -248,6 +248,7 @@ module List
|
|
248
248
|
add_list 'import:list', %w[], 'List bulk import sessions', 'import:list'
|
249
249
|
add_list 'import:show', %w[name], 'Show list of uploaded parts', 'import:show'
|
250
250
|
add_list 'import:create', %w[name db table], 'Create a new bulk import session to the the table', 'import:create logs_201201 example_db event_logs'
|
251
|
+
add_list 'import:java_version', %w[], 'Show version', 'import:java_version'
|
251
252
|
add_list 'import:prepare', %w[files_], 'Convert files into part file format', 'import:prepare logs/*.csv --format csv --columns time,uid,price,count --time-column "time" -o parts/'
|
252
253
|
add_list 'import:upload', %w[name files_], 'Upload or re-upload files into a bulk import session', 'import:upload parts/* --parallel 4'
|
253
254
|
add_list 'import:auto', %w[name files_], 'Upload files and automatically perform and commit the data', 'import:auto parts/* --parallel 4'
|
data/lib/td/version.rb
CHANGED
data/td.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.add_dependency "yajl-ruby", "~> 1.1.0"
|
21
21
|
gem.add_dependency "hirb", ">= 0.4.5"
|
22
22
|
gem.add_dependency "parallel", "~> 0.6.1"
|
23
|
-
gem.add_dependency "td-client", "~> 0.8.
|
23
|
+
gem.add_dependency "td-client", "~> 0.8.55"
|
24
24
|
gem.add_dependency "td-logger", "~> 0.3.21"
|
25
25
|
gem.add_dependency "rubyzip", "~> 0.9.9"
|
26
26
|
gem.add_development_dependency "rake", "~> 0.9"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: td
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.88
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-09-
|
12
|
+
date: 2013-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack
|
@@ -112,7 +112,7 @@ dependencies:
|
|
112
112
|
requirements:
|
113
113
|
- - ~>
|
114
114
|
- !ruby/object:Gem::Version
|
115
|
-
version: 0.8.
|
115
|
+
version: 0.8.55
|
116
116
|
type: :runtime
|
117
117
|
prerelease: false
|
118
118
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -120,7 +120,7 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - ~>
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 0.8.
|
123
|
+
version: 0.8.55
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: td-logger
|
126
126
|
requirement: !ruby/object:Gem::Requirement
|
@@ -230,6 +230,7 @@ files:
|
|
230
230
|
- dist/resources/pkg/postinstall
|
231
231
|
- dist/resources/pkg/ruby-2.0.0-p0.pkg
|
232
232
|
- dist/resources/pkg/td
|
233
|
+
- java/VERSION
|
233
234
|
- java/logging.properties
|
234
235
|
- java/td-bulk-import-java.version
|
235
236
|
- java/td-bulk-import.jar
|
@@ -293,7 +294,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
293
294
|
version: '0'
|
294
295
|
segments:
|
295
296
|
- 0
|
296
|
-
hash:
|
297
|
+
hash: 3857310954122118624
|
297
298
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
298
299
|
none: false
|
299
300
|
requirements:
|
@@ -302,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
302
303
|
version: '0'
|
303
304
|
segments:
|
304
305
|
- 0
|
305
|
-
hash:
|
306
|
+
hash: 3857310954122118624
|
306
307
|
requirements: []
|
307
308
|
rubyforge_project:
|
308
309
|
rubygems_version: 1.8.23
|