Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

dumping to elephant-bird 3.0.6 from git

  • Loading branch information...
commit 3b6723522d1d572f8366ee1a4523b026aab1551b 1 parent bb5633b
@joshbronson joshbronson authored
View
7 cookbooks/hadoop_cluster/attributes/default.rb
@@ -114,9 +114,10 @@
default[:hadoop][:lzo][:archive] = "twitter-hadoop-lzo-9ab0565"
default[:hadoop][:lzo][:version] = "0.4.16"
-default[:hadoop][:elephant_bird][:github] = "https://github.com/kevinweil/elephant-bird/tarball/v2.2.2"
-default[:hadoop][:elephant_bird][:version] = "2.2.2"
-default[:hadoop][:elephant_bird][:archive] = "kevinweil-elephant-bird-ca8154e"
+default[:hadoop][:elephant_bird][:build_dir] = "/usr/local/share/elephant-bird"
+default[:hadoop][:elephant_bird][:git_repo] = "https://github.com/kevinweil/elephant-bird.git"
+default[:hadoop][:elephant_bird][:version] = "3.0.6"
+
default[:hadoop][:elephant_bird][:protobuf_url] = "http://protobuf.googlecode.com/files/protobuf-2.3.0.tar.gz"
default[:hadoop][:elephant_bird][:protobuf_ver] = "2.3.0"
View
44 cookbooks/hadoop_cluster/recipes/elephant_bird.rb
@@ -30,38 +30,34 @@
release_url node[:hadoop][:elephant_bird][:protobuf_url]
version node[:hadoop][:elephant_bird][:protobuf_ver]
action [ :configure_with_autoconf, :install_with_make, :install ]
- not_if { File.exists?("/usr/local/lib/libprotobuf.so") }
+ not_if { File.exists?("/usr/local/lib/libprotobuf.so") }
notifies :run, resources(:execute => "run ldconfig"), :immediately
end
end
-github = node[:hadoop][:elephant_bird][:github]
-archive = node[:hadoop][:elephant_bird][:archive]
+git_repo = node[:hadoop][:elephant_bird][:git_repo]
+build_dir = node[:hadoop][:elephant_bird][:build_dir]
version = node[:hadoop][:elephant_bird][:version]
-# git_private_repo 'elephant_bird' do
-# repository github
-# branch version
-# path "/usr/local/src/#{archive}"
-# end
-
-remote_file "/usr/local/src/#{archive}.tar.gz" do
- source github
- mode "0644"
-end
-
-execute "tar zxvf #{archive}.tar.gz" do
- cwd "/usr/local/src"
- creates "/usr/local/src/#{archive}"
+git build_dir do
+ repository git_repo
+ action :sync
+ group 'admin'
+ revision "elephant-bird-#{version}"
end
-execute "ant jar" do
- cwd "/usr/local/src/#{archive}"
- environment( 'JAVA_HOME' => node[:java][:java_home] )
- creates "/usr/local/src/#{archive}/build/elephant-bird-#{version}.jar"
+bash 'compile elephant-bird' do
+ user 'root'
+ cwd build_dir
+ code "mvn package -DskipTests=true"
+ not_if { File.exists? File.join(build_dir, "elephant-bird-core-#{version}.jar") }
end
-execute "cp elephant-bird-#{node[:hadoop][:elephant_bird][:version]}.jar /usr/lib/hadoop-0.20/lib" do
- cwd "/usr/local/src/#{node[:hadoop][:elephant_bird][:archive]}/build"
- creates "/usr/lib/hadoop-0.20/lib/elephant-bird-#{node[:hadoop][:elephant_bird][:version]}.jar"
+bash 'install elephant-bird' do
+ user 'root'
+ cwd build_dir
+ code([
+ "cp ./core/target/elephant-bird-core-#{version}.jar",
+ File.join(node[:hadoop][:home_dir], 'lib'),
+ ].join(" "))
end

0 comments on commit 3b67235

Please sign in to comment.
Something went wrong with that request. Please try again.