itamae-plugin-recipe-spark 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/itamae/plugin/recipe/spark/install.rb +123 -1
- data/lib/itamae/plugin/recipe/spark/spark-3.5.5_hadoop_3_sha256.txt +1 -0
- data/lib/itamae/plugin/recipe/spark/spark-redshift_2.12-6.4.3-spark_3.5_sha256.txt +5 -0
- data/lib/itamae/plugin/recipe/spark/version.rb +10 -6
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d4c843d9f1451d6574eb7dc53e04514a17f83c440300d87c9ee83059f407e5d
|
4
|
+
data.tar.gz: 04b68e26473e7d794ac5ddf095e7f6cdf2cc63462c417d6de48a83394ee579c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 156ddc8e74c4eed60c6c8a9c9c631bac9ebadc4c734e8ee3b8b15e1f79aebc99e5adea177f0ab764ee09ac7e724564844899ffa585b2ed3af2c144316fb106c9
|
7
|
+
data.tar.gz: 3dfd725daaf86562d48847fd7ab9e51641a7319601b92e9d1d709e879b8768b7b82e041830581cbd82377c871dc6118857ccfd1c81a3f9a010f9a268bb19b7ee
|
@@ -1,6 +1,6 @@
|
|
1
1
|
version = ENV['SPARK_VERSION'] || Itamae::Plugin::Recipe::Spark::SPARK_VERSION
|
2
2
|
hadoop_version = ENV['HADOOP_VERSION'] || Itamae::Plugin::Recipe::Hadoop::HADOOP_VERSION
|
3
|
-
hadoop_type = if Gem::Version.create(hadoop_version)
|
3
|
+
hadoop_type = if Gem::Version.create(hadoop_version) >= Gem::Version.create('3.3.3')
|
4
4
|
'3'
|
5
5
|
elsif Gem::Version.create(hadoop_version) >= Gem::Version.create('3.2')
|
6
6
|
'3.2'
|
@@ -25,6 +25,7 @@ minimal_json_version = Itamae::Plugin::Recipe::Spark::MINIMAL_JSON_VERSION
|
|
25
25
|
redshift_jdbc_version = ENV['REDSHIFT_JDBC_VERSION'] || Itamae::Plugin::Recipe::Spark::REDSHIFT_JDBC_VERSION
|
26
26
|
fastdoubleparser_version = Itamae::Plugin::Recipe::Spark::FASTDOUBLEPARSER_VERSION
|
27
27
|
jets3t_version = Itamae::Plugin::Recipe::Spark::JETS3T_VERSION
|
28
|
+
aws_secretsmanager_caching_java_version = Itamae::Plugin::Recipe::Spark::AWS_SECRETSMANAGER_CACHING_JAVA_VERSION
|
28
29
|
aws_secretsmanager_jdbc_version = Itamae::Plugin::Recipe::Spark::AWS_SECRETSMANAGER_JDBC_VERSION
|
29
30
|
execute "download spark-redshift-#{spark_redshift_version} and dependencies" do
|
30
31
|
cwd '/tmp'
|
@@ -42,6 +43,11 @@ execute "download spark-redshift-#{spark_redshift_version} and dependencies" do
|
|
42
43
|
<<-EOS
|
43
44
|
wget -q https://repo1.maven.org/maven2/com/amazonaws/secretsmanager/aws-secretsmanager-jdbc/#{aws_secretsmanager_jdbc_version}/aws-secretsmanager-jdbc-#{aws_secretsmanager_jdbc_version}.jar -O aws-secretsmanager-jdbc-#{aws_secretsmanager_jdbc_version}.jar
|
44
45
|
EOS
|
46
|
+
elsif spark_redshift_version.split('-', 2).last == '6.4.3-spark_3.5'
|
47
|
+
<<-EOS
|
48
|
+
wget -q https://repo1.maven.org/maven2/com/amazonaws/secretsmanager/aws-secretsmanager-caching-java/#{aws_secretsmanager_caching_java_version}/aws-secretsmanager-caching-java-#{aws_secretsmanager_caching_java_version}.jar -O aws-secretsmanager-caching-java-#{aws_secretsmanager_caching_java_version}.jar
|
49
|
+
wget -q https://repo1.maven.org/maven2/com/amazonaws/secretsmanager/aws-secretsmanager-jdbc/#{aws_secretsmanager_jdbc_version}/aws-secretsmanager-jdbc-#{aws_secretsmanager_jdbc_version}.jar -O aws-secretsmanager-jdbc-#{aws_secretsmanager_jdbc_version}.jar
|
50
|
+
EOS
|
45
51
|
end}
|
46
52
|
EOF
|
47
53
|
|
@@ -56,6 +62,62 @@ execute 'download aws-java-sdk' do
|
|
56
62
|
not_if 'test -e /tmp/aws-java-sdk.zip'
|
57
63
|
end
|
58
64
|
|
65
|
+
|
66
|
+
aws_sdk_v2_version = ENV['AWS_SDK_V2_VERSION'] || Itamae::Plugin::Recipe::Spark::AWS_SDK_V2_VERSION
|
67
|
+
aws_sdk_v2_jars = %w[
|
68
|
+
apache-client
|
69
|
+
arns
|
70
|
+
auth
|
71
|
+
aws-core
|
72
|
+
aws-query-protocol
|
73
|
+
aws-xml-protocol
|
74
|
+
checksums
|
75
|
+
checksums-spi
|
76
|
+
endpoints-spi
|
77
|
+
http-auth
|
78
|
+
http-auth-aws
|
79
|
+
http-auth-spi
|
80
|
+
http-client-spi
|
81
|
+
identity-spi
|
82
|
+
json-utils
|
83
|
+
metrics-spi
|
84
|
+
profiles
|
85
|
+
protocol-core
|
86
|
+
regions
|
87
|
+
retries
|
88
|
+
retries-spi
|
89
|
+
s3
|
90
|
+
s3-transfer-manager
|
91
|
+
sdk-core
|
92
|
+
third-party-jackson-core
|
93
|
+
utils
|
94
|
+
]
|
95
|
+
reactive_streams_version = Itamae::Plugin::Recipe::Spark::REACTIVE_STREAMS_VERSION
|
96
|
+
if spark_redshift_version.split('-', 2).last == '6.4.3-spark_3.5'
|
97
|
+
directory '/tmp/aws_java_sdk_v2' do
|
98
|
+
action :create
|
99
|
+
end
|
100
|
+
|
101
|
+
aws_sdk_v2_jars.each do |jar|
|
102
|
+
execute "download aws java sdk v2 #{jar} jar" do
|
103
|
+
cwd '/tmp/aws_java_sdk_v2'
|
104
|
+
command <<-EOF
|
105
|
+
wget -q https://repo1.maven.org/maven2/software/amazon/awssdk/#{jar}/#{aws_sdk_v2_version}/#{jar}-#{aws_sdk_v2_version}.jar
|
106
|
+
EOF
|
107
|
+
not_if "test -e /tmp/aws_java_sdk_v2/#{jar}-#{aws_sdk_v2_version}.jar"
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
execute "download reactive_streams jar" do
|
112
|
+
cwd '/tmp/aws_java_sdk_v2'
|
113
|
+
command <<-EOF
|
114
|
+
wget -q https://repo1.maven.org/maven2/org/reactivestreams/reactive-streams/#{reactive_streams_version}/reactive-streams-#{reactive_streams_version}.jar
|
115
|
+
EOF
|
116
|
+
not_if "test -e /tmp/aws_java_sdk_v2/reactive-streams-#{reactive_streams_version}.jar"
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
|
59
121
|
execute 'unzip aws-java-sdk' do
|
60
122
|
cwd '/tmp'
|
61
123
|
command <<-EOF
|
@@ -94,6 +156,28 @@ execute 'install aws java sdk jar' do
|
|
94
156
|
not_if "test -e /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars/aws-java-sdk-*.jar"
|
95
157
|
end
|
96
158
|
|
159
|
+
if spark_redshift_version.split('-', 2).last == '6.4.3-spark_3.5'
|
160
|
+
aws_sdk_v2_jars.each do |jar|
|
161
|
+
execute "install aws java sdk v2 #{jar} jar" do
|
162
|
+
cwd '/tmp/aws_java_sdk_v2'
|
163
|
+
command <<-EOF
|
164
|
+
cp -f #{jar}-#{aws_sdk_v2_version}.jar \
|
165
|
+
/opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars/
|
166
|
+
EOF
|
167
|
+
not_if "test -e /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars/#{jar}-#{aws_sdk_v2_version}.jar"
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
execute "install reactive_streams jar" do
|
172
|
+
cwd '/tmp/aws_java_sdk_v2'
|
173
|
+
command <<-EOF
|
174
|
+
cp -f reactive-streams-#{reactive_streams_version}.jar \
|
175
|
+
/opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars/
|
176
|
+
EOF
|
177
|
+
not_if "test -e /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars/reactive-streams-#{reactive_streams_version}.jar"
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
97
181
|
execute 'install hadoop aws jar' do
|
98
182
|
cwd '/opt/hadoop/current'
|
99
183
|
command <<-EOF
|
@@ -103,6 +187,36 @@ execute 'install hadoop aws jar' do
|
|
103
187
|
not_if "test -e /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars/hadoop-aws-*.jar"
|
104
188
|
end
|
105
189
|
|
190
|
+
if spark_redshift_version.split('-', 2).last == '6.4.3-spark_3.5'
|
191
|
+
source = '/opt/hadoop/current/share/hadoop/client'
|
192
|
+
destination = "/opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars"
|
193
|
+
jar_name = "hadoop-client-api-#{hadoop_version}.jar"
|
194
|
+
|
195
|
+
execute "remove old hadoop client api jars" do
|
196
|
+
cwd "/opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars"
|
197
|
+
command <<-EOF
|
198
|
+
for file in hadoop-client-api-*.jar; do
|
199
|
+
if [[ -e $file ]]; then
|
200
|
+
file_version=${file#hadoop-client-api-}
|
201
|
+
file_version=${file_version%.jar}
|
202
|
+
if [[ "$(printf '%s\n%s' "#{hadoop_version}" "${file_version}" | sort -V | head -n1)" != "#{hadoop_version}" ]]; then
|
203
|
+
rm -f $file
|
204
|
+
fi
|
205
|
+
fi
|
206
|
+
done
|
207
|
+
EOF
|
208
|
+
only_if "ls /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars/hadoop-client-api-*.jar"
|
209
|
+
end
|
210
|
+
|
211
|
+
execute "install hadoop client api jar" do
|
212
|
+
cwd source
|
213
|
+
command <<-EOF
|
214
|
+
cp -f #{jar_name} #{destination}
|
215
|
+
EOF
|
216
|
+
not_if "test -e #{destination}/#{jar_name}"
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
106
220
|
execute 'install spark-redshift jars' do
|
107
221
|
cwd "/opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}"
|
108
222
|
command <<-EOF
|
@@ -128,6 +242,14 @@ execute 'install spark-redshift jars' do
|
|
128
242
|
EOS
|
129
243
|
elsif spark_redshift_version.split('-', 2).last == '6.2.0-spark_3.4'
|
130
244
|
<<-EOS
|
245
|
+
ls -d $(find jars) | grep 'aws-secretsmanager-jdbc-[0-9.]*.jar' | xargs rm -f
|
246
|
+
cp -f /tmp/aws-secretsmanager-jdbc-#{aws_secretsmanager_jdbc_version}.jar jars/
|
247
|
+
EOS
|
248
|
+
elsif spark_redshift_version.split('-', 2).last == '6.4.3-spark_3.5'
|
249
|
+
<<-EOS
|
250
|
+
ls -d $(find jars) | grep 'aws-secretsmanager-caching-java-[0-9.]*.jar' | xargs rm -f
|
251
|
+
cp -f /tmp/aws-secretsmanager-caching-java-#{aws_secretsmanager_caching_java_version}.jar jars/
|
252
|
+
|
131
253
|
ls -d $(find jars) | grep 'aws-secretsmanager-jdbc-[0-9.]*.jar' | xargs rm -f
|
132
254
|
cp -f /tmp/aws-secretsmanager-jdbc-#{aws_secretsmanager_jdbc_version}.jar jars/
|
133
255
|
EOS
|
@@ -0,0 +1 @@
|
|
1
|
+
8daa3f7fb0af2670fe11beb8a2ac79d908a534d7298353ec4746025b102d5e31 spark-3.5.5-bin-hadoop3.tgz
|
@@ -0,0 +1,5 @@
|
|
1
|
+
43d428ca25610fd3e7800c6d2270d1f27eacb6af1936c5e0641ad5d82abc65b9 spark-redshift_2.12-6.4.3-spark_3.5.jar
|
2
|
+
16815c7ae6e68eb8f097c3987737689a20fb9cd8718f1c6cce72b76008a94d06 spark-avro_2.12-3.5.5.jar
|
3
|
+
b30825a09c05293a79c8839bfef172901a9dcb7a46ec19559409d0e6eb7b5299 RedshiftJDBC42-2.1.0.29.jar
|
4
|
+
efa849f894b83fbef1f2c27c72b8e4a581051f106338f94bd027810fc646ae85 aws-secretsmanager-caching-java-1.0.2.jar
|
5
|
+
b90f9d51b6f34918cfdcbb100a486937fbc94eadd60862f2d2574716babe80bd aws-secretsmanager-jdbc-1.0.12.jar
|
@@ -2,21 +2,25 @@ module Itamae
|
|
2
2
|
module Plugin
|
3
3
|
module Recipe
|
4
4
|
module Spark
|
5
|
-
VERSION = "0.1.
|
5
|
+
VERSION = "0.1.12"
|
6
6
|
|
7
7
|
SPARK_VERSION = [
|
8
8
|
SPARK_VERSION_MAJOR = '3',
|
9
|
-
SPARK_VERSION_MINOR = '
|
10
|
-
SPARK_VERSION_REVISION = '
|
9
|
+
SPARK_VERSION_MINOR = '5',
|
10
|
+
SPARK_VERSION_REVISION = '5'
|
11
11
|
].join('.')
|
12
12
|
|
13
|
-
SPARK_REDSHIFT_VERSION = '2.12-6.
|
14
|
-
SPARK_AVRO_VERSION = '2.12-3.
|
13
|
+
SPARK_REDSHIFT_VERSION = '2.12-6.4.3-spark_3.5'
|
14
|
+
SPARK_AVRO_VERSION = '2.12-3.5.5'
|
15
15
|
MINIMAL_JSON_VERSION = '0.9.4'
|
16
|
-
REDSHIFT_JDBC_VERSION = '2.1.0.
|
16
|
+
REDSHIFT_JDBC_VERSION = '2.1.0.29'
|
17
17
|
FASTDOUBLEPARSER_VERSION = '0.8.0'
|
18
18
|
JETS3T_VERSION = '0.9.4'
|
19
|
+
AWS_SECRETSMANAGER_CACHING_JAVA_VERSION = '1.0.2'
|
19
20
|
AWS_SECRETSMANAGER_JDBC_VERSION = '1.0.12'
|
21
|
+
|
22
|
+
AWS_SDK_V2_VERSION = '2.31.78'
|
23
|
+
REACTIVE_STREAMS_VERSION = '1.0.4'
|
20
24
|
end
|
21
25
|
end
|
22
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae-plugin-recipe-spark
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ichylinux
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: itamae
|
@@ -107,8 +107,10 @@ files:
|
|
107
107
|
- lib/itamae/plugin/recipe/spark/spark-3.1.2_hadoop_3.2_sha256.txt
|
108
108
|
- lib/itamae/plugin/recipe/spark/spark-3.3.2_hadoop_3_sha256.txt
|
109
109
|
- lib/itamae/plugin/recipe/spark/spark-3.4.1_hadoop_3_sha256.txt
|
110
|
+
- lib/itamae/plugin/recipe/spark/spark-3.5.5_hadoop_3_sha256.txt
|
110
111
|
- lib/itamae/plugin/recipe/spark/spark-redshift_2.12-5.0.3_sha256.txt
|
111
112
|
- lib/itamae/plugin/recipe/spark/spark-redshift_2.12-6.2.0-spark_3.4_sha256.txt
|
113
|
+
- lib/itamae/plugin/recipe/spark/spark-redshift_2.12-6.4.3-spark_3.5_sha256.txt
|
112
114
|
- lib/itamae/plugin/recipe/spark/templates/hdfs-site.xml.erb
|
113
115
|
- lib/itamae/plugin/recipe/spark/templates/spark-defaults.conf.erb
|
114
116
|
- lib/itamae/plugin/recipe/spark/version.rb
|
@@ -131,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
133
|
- !ruby/object:Gem::Version
|
132
134
|
version: '0'
|
133
135
|
requirements: []
|
134
|
-
rubygems_version: 3.
|
136
|
+
rubygems_version: 3.3.26
|
135
137
|
signing_key:
|
136
138
|
specification_version: 4
|
137
139
|
summary: itamae recipe for apache spark installation
|