itamae-plugin-recipe-spark 0.1.0 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68a1f138f9520f824e99226292606ce3155c30724103b7129f30420b78a564ae
4
- data.tar.gz: e244bf5b5273e19e872d03f00f397d54cb6bd3763caa3ddbb20d00b5abfb89db
3
+ metadata.gz: 201de04bbae7c37fcb100e26b798361d35f7064b2809e01e1a34b1efb2e0768b
4
+ data.tar.gz: 92cf7328ac3cd04c97f948e6fb8ccb10e114040d03ac50bc8556ecb8b60e5d9b
5
5
  SHA512:
6
- metadata.gz: 41ce3768627671b0fae643d7108e56396b2c6fd3cc2f8c358e0e6edf09fc1859903654b3b9aa1d6a014b6984532a2ed37e6700d1fae851a7a415f66314b36b4a
7
- data.tar.gz: a3f5dc7c49516e8c88557e6650222e67f0fb9819cb874f5756564da9da1d6d8e6f8c7f77a362d49b5c5cc7ff9ad66f3b1f572171f45c8a54fd4b071a178954d8
6
+ metadata.gz: 90e5650f5f509b8f29d2bde84b16df9f11278f8b9d2ff3f099e920f1728423c957dea0d29b698d229a8ec32dfe4196d4e3ae32aa8f5e53126929b1b6e6c0ad3f
7
+ data.tar.gz: 7f84c85db7a99f58fe1036483dc81157b2eba1f1f857b612ab26607110f9bf09cd75c94df74376c5c0f701ad830d2b38c987d5b4bfb6c97535780c8ffc0c0122
data/.gitignore CHANGED
@@ -45,7 +45,7 @@ build-iPhoneSimulator/
45
45
 
46
46
  # for a library or gem, you might want to ignore these files since the code is
47
47
  # intended to run in multiple environments; otherwise, check them in:
48
- # Gemfile.lock
48
+ Gemfile.lock
49
49
  # .ruby-version
50
50
  # .ruby-gemset
51
51
 
@@ -1,13 +1,20 @@
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) >= Gem::Version.create('3.2')
4
+ '3.2'
5
+ elsif Gem::Version.create(hadoop_version) >= Gem::Version.create('2.7')
6
+ '2.7'
7
+ else
8
+ raise "Hadoop version #{hadoop_version} is not supported."
9
+ end
3
10
 
4
11
  execute "download spark-#{version}" do
5
12
  cwd '/tmp'
6
13
  command <<-EOF
7
- rm -f spark-#{version}-bin-hadoop2.7.tgz
8
- wget https://archive.apache.org/dist/spark/spark-#{version}/spark-#{version}-bin-hadoop2.7.tgz
14
+ rm -f spark-#{version}-bin-hadoop#{hadoop_type}.tgz
15
+ wget https://archive.apache.org/dist/spark/spark-#{version}/spark-#{version}-bin-hadoop#{hadoop_type}.tgz
9
16
  EOF
10
- not_if "test -e /opt/spark/spark-#{version}-bin-hadoop2.7/INSTALLED || echo #{::File.read(::File.join(::File.dirname(__FILE__), "spark-#{version}_sha256.txt")).strip} | sha256sum -c"
17
+ not_if "test -e /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/INSTALLED || echo #{::File.read(::File.join(::File.dirname(__FILE__), "spark-#{version}_hadoop_#{hadoop_type}_sha256.txt")).strip} | sha256sum -c"
11
18
  end
12
19
 
13
20
  directory '/opt/spark' do
@@ -20,35 +27,37 @@ end
20
27
  execute "install spark-#{version}" do
21
28
  cwd '/tmp'
22
29
  command <<-EOF
23
- rm -Rf spark-#{version}-bin-hadoop2.7/
24
- tar zxf spark-#{version}-bin-hadoop2.7.tgz
25
- sudo rm -Rf /opt/spark/spark-#{version}-bin-hadoop2.7
26
- sudo mv spark-#{version}-bin-hadoop2.7 /opt/spark/
27
- sudo touch /opt/spark/spark-#{version}-bin-hadoop2.7/INSTALLED
30
+ rm -Rf spark-#{version}-bin-hadoop#{hadoop_type}/
31
+ tar zxf spark-#{version}-bin-hadoop#{hadoop_type}.tgz
32
+ sudo rm -Rf /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}
33
+ sudo mv spark-#{version}-bin-hadoop#{hadoop_type} /opt/spark/
34
+ sudo touch /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/INSTALLED
28
35
  EOF
29
- not_if "test -e /opt/spark/spark-#{version}-bin-hadoop2.7/INSTALLED"
36
+ not_if "test -e /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/INSTALLED"
30
37
  end
31
38
 
32
39
  execute 'install hadoop aws jars' do
33
40
  cwd '/opt/hadoop/current'
34
41
  command <<-EOF
35
42
  cp -f share/hadoop/tools/lib/aws-java-sdk-*.jar \
36
- /opt/spark/spark-#{version}-bin-hadoop2.7/jars/
43
+ /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars/
37
44
  cp -f share/hadoop/tools/lib/hadoop-aws-#{hadoop_version}.jar \
38
- /opt/spark/spark-#{version}-bin-hadoop2.7/jars/
45
+ /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars/
39
46
  EOF
40
- not_if "test `ls -1 /opt/spark/spark-#{version}-bin-hadoop2.7/jars/ | egrep '(hadoop-)?aws-.*' | wc -l` = 2"
47
+ not_if "test `ls -1 /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars/ | egrep '(hadoop-)?aws-.*' | wc -l` = 4"
41
48
  end
42
49
 
50
+ template "/opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/conf/spark-defaults.conf"
51
+
43
52
  if ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
44
- template "/opt/spark/spark-#{version}-bin-hadoop2.7/conf/hdfs-site.xml" do
53
+ template "/opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/conf/hdfs-site.xml" do
45
54
  variables aws_access_key_id: ENV['AWS_ACCESS_KEY_ID'],
46
55
  aws_secret_access_key: ENV['AWS_SECRET_ACCESS_KEY']
47
56
  end
48
57
  end
49
58
 
50
59
  link '/opt/spark/current' do
51
- to "/opt/spark/spark-#{version}-bin-hadoop2.7"
60
+ to "/opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}"
52
61
  user 'root'
53
62
  force true
54
63
  end
@@ -0,0 +1 @@
1
+ 020be52524e4df366eb974d41a6e18fcb6efcaba9a51632169e917c74267dd81 spark-2.4.5-bin-hadoop2.7.tgz
@@ -0,0 +1 @@
1
+ 7174fee30057fbf226698ebfcfa7c2944a26197e149053aa29b26b250d1e1eba spark-2.4.6-bin-hadoop2.7.tgz
@@ -0,0 +1 @@
1
+ 13098490936c9931beda3acc4c30cdc5ca707acd1415eebde1030b11903934fe spark-2.4.7-bin-hadoop2.7.tgz
@@ -0,0 +1 @@
1
+ 61543e748d225d859e3e0d488362f9dc4b6496a104ef5a4b297d341a47a49a12 spark-3.0.1-bin-hadoop2.7.tgz
@@ -0,0 +1 @@
1
+ e2d05efa1c657dd5180628a83ea36c97c00f972b4aee935b7affa2e1058b0279 spark-3.0.1-bin-hadoop3.2.tgz
@@ -0,0 +1,2 @@
1
+ spark.serializer org.apache.spark.serializer.KryoSerializer
2
+ spark.hadoop.mapreduce.fileoutputcommitter.algorithm.version 2
@@ -2,12 +2,12 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module Spark
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.5"
6
6
 
7
7
  SPARK_VERSION = [
8
- SPARK_VERSION_MAJOR = '2',
9
- SPARK_VERSION_MINOR = '4',
10
- SPARK_VERSION_REVISION = '4'
8
+ SPARK_VERSION_MAJOR = '3',
9
+ SPARK_VERSION_MINOR = '0',
10
+ SPARK_VERSION_REVISION = '1'
11
11
  ].join('.')
12
12
 
13
13
  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.0
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichylinux
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-14 00:00:00.000000000 Z
11
+ date: 2021-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: itamae
@@ -83,7 +83,6 @@ files:
83
83
  - ".project"
84
84
  - CODE_OF_CONDUCT.md
85
85
  - Gemfile
86
- - Gemfile.lock
87
86
  - LICENSE
88
87
  - LICENSE.txt
89
88
  - README.md
@@ -93,14 +92,19 @@ files:
93
92
  - itamae-plugin-recipe-spark.gemspec
94
93
  - lib/itamae/plugin/recipe/spark.rb
95
94
  - lib/itamae/plugin/recipe/spark/install.rb
96
- - lib/itamae/plugin/recipe/spark/spark-2.1.1_sha256.txt
97
- - lib/itamae/plugin/recipe/spark/spark-2.2.0_sha256.txt
98
- - lib/itamae/plugin/recipe/spark/spark-2.3.1_sha256.txt
99
- - lib/itamae/plugin/recipe/spark/spark-2.3.2_sha256.txt
100
- - lib/itamae/plugin/recipe/spark/spark-2.4.0_sha256.txt
101
- - lib/itamae/plugin/recipe/spark/spark-2.4.3_sha256.txt
102
- - lib/itamae/plugin/recipe/spark/spark-2.4.4_sha256.txt
95
+ - lib/itamae/plugin/recipe/spark/spark-2.2.0_hadoop_2.7_sha256.txt
96
+ - lib/itamae/plugin/recipe/spark/spark-2.3.1_hadoop_2.7_sha256.txt
97
+ - lib/itamae/plugin/recipe/spark/spark-2.3.2_hadoop_2.7_sha256.txt
98
+ - lib/itamae/plugin/recipe/spark/spark-2.4.0_hadoop_2.7_sha256.txt
99
+ - lib/itamae/plugin/recipe/spark/spark-2.4.3_hadoop_2.7_sha256.txt
100
+ - lib/itamae/plugin/recipe/spark/spark-2.4.4_hadoop_2.7_sha256.txt
101
+ - lib/itamae/plugin/recipe/spark/spark-2.4.5_hadoop_2.7_sha256.txt
102
+ - lib/itamae/plugin/recipe/spark/spark-2.4.6_hadoop_2.7_sha256.txt
103
+ - lib/itamae/plugin/recipe/spark/spark-2.4.7_hadoop_2.7_sha256.txt
104
+ - lib/itamae/plugin/recipe/spark/spark-3.0.1_hadoop_2.7_sha256.txt
105
+ - lib/itamae/plugin/recipe/spark/spark-3.0.1_hadoop_3.2_sha256.txt
103
106
  - lib/itamae/plugin/recipe/spark/templates/hdfs-site.xml.erb
107
+ - lib/itamae/plugin/recipe/spark/templates/spark-defaults.conf.erb
104
108
  - lib/itamae/plugin/recipe/spark/version.rb
105
109
  homepage: https://github.com/maedadev/itamae-plugin-recipe-spark
106
110
  licenses:
@@ -121,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
125
  - !ruby/object:Gem::Version
122
126
  version: '0'
123
127
  requirements: []
124
- rubygems_version: 3.0.4
128
+ rubygems_version: 3.1.4
125
129
  signing_key:
126
130
  specification_version: 4
127
131
  summary: itamae recipe for apache spark installation
data/Gemfile.lock DELETED
@@ -1,44 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- itamae-plugin-recipe-spark (0.1.0)
5
- itamae (~> 1.10, >= 1.10.4)
6
- itamae-plugin-recipe-hadoop (~> 0.1)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- ansi (1.5.0)
12
- hashie (4.1.0)
13
- itamae (1.10.6)
14
- ansi
15
- hashie
16
- schash (~> 0.1.0)
17
- specinfra (>= 2.64.0, < 3.0.0)
18
- thor
19
- itamae-plugin-recipe-hadoop (0.1.0)
20
- itamae (~> 1.10, >= 1.10.4)
21
- net-scp (2.0.0)
22
- net-ssh (>= 2.6.5, < 6.0.0)
23
- net-ssh (5.2.0)
24
- net-telnet (0.1.1)
25
- rake (13.0.1)
26
- schash (0.1.2)
27
- sfl (2.3)
28
- specinfra (2.82.12)
29
- net-scp
30
- net-ssh (>= 2.7)
31
- net-telnet (= 0.1.1)
32
- sfl
33
- thor (1.0.1)
34
-
35
- PLATFORMS
36
- ruby
37
-
38
- DEPENDENCIES
39
- bundler (~> 2.0)
40
- itamae-plugin-recipe-spark!
41
- rake (>= 12.3.3)
42
-
43
- BUNDLED WITH
44
- 2.0.2
@@ -1 +0,0 @@
1
- 372ac4f73221c07696793101007a4f19e31566d1f0d9bd0e5205b6fb5b45bfc2 spark-2.1.1-bin-hadoop2.7.tgz