From 85f9b51c9d0a2034d0c3b5a3969d7aeb1c4762c9 Mon Sep 17 00:00:00 2001 From: whitestar Date: Mon, 4 Nov 2013 17:41:43 +0900 Subject: [PATCH] add quick setup role for CDH 4 (MRv1). --- cookbooks/cdh/recipes/yum_repo.rb | 4 ++-- nodes/localhost-cdh4.json | 2 +- roles/hadoop-pseudo-distributed-cdh4.rb | 4 +++- roles/hadoop-pseudo-distributed-cdh5.rb | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cookbooks/cdh/recipes/yum_repo.rb b/cookbooks/cdh/recipes/yum_repo.rb index 13c44de..63e0afb 100644 --- a/cookbooks/cdh/recipes/yum_repo.rb +++ b/cookbooks/cdh/recipes/yum_repo.rb @@ -28,7 +28,7 @@ def get_repo_urls(cdh_version, node_platform, node_platform_version, kernel_mach normalized_kernel_machine = nil case cdh_version.split(/[.u]/)[0] when '5' - normalized_kernel_machine = 'x86_64' + normalized_kernel_machine = 'x86_64' # CDH 5 provides only 64-bit packages. platform_ctx = "#{platform}/#{platform_major_version}/#{normalized_kernel_machine}" when '4' normalized_kernel_machine = (platform_major_version == '5') \ @@ -165,7 +165,7 @@ if node['cdh']['yum_repo']['only_for_mirroring'] \ package cdh_repo_pkg do source downloaded_repo_pkg options '--nogpgcheck' - flush_cache :after + #flush_cache [:after] not_if "rpm -qi #{cdh_repo_pkg}" unless node['cdh']['yum_repo']['update'] action :install end diff --git a/nodes/localhost-cdh4.json b/nodes/localhost-cdh4.json index a1e2a68..10b6d5b 100644 --- a/nodes/localhost-cdh4.json +++ b/nodes/localhost-cdh4.json @@ -1,5 +1,5 @@ { "run_list": [ - "role[test-cdh4-on-localhost]" + "role[hadoop-pseudo-distributed-cdh4]" ] } diff --git a/roles/hadoop-pseudo-distributed-cdh4.rb b/roles/hadoop-pseudo-distributed-cdh4.rb index 897d97b..4899044 100644 --- a/roles/hadoop-pseudo-distributed-cdh4.rb +++ b/roles/hadoop-pseudo-distributed-cdh4.rb @@ -24,12 +24,14 @@ default_attributes( 'cdh' => { 'version' => '4.4.0', 'yum_repo' => { - 'update' => true + 'update' => true, + 'with_gplextras' => true } }, 'hadoop' => { 'install_flavor' => 'cdh', 'cdh' => { + 'resource_negotiator_framework' => 'MRv1' }, 'with_hadoop_lzo' => true, 'HADOOP_CLASSPATH' => '', diff --git a/roles/hadoop-pseudo-distributed-cdh5.rb b/roles/hadoop-pseudo-distributed-cdh5.rb index bb6a867..b948499 100644 --- a/roles/hadoop-pseudo-distributed-cdh5.rb +++ b/roles/hadoop-pseudo-distributed-cdh5.rb @@ -31,6 +31,7 @@ default_attributes( 'hadoop' => { 'install_flavor' => 'cdh', 'cdh' => { + 'resource_negotiator_framework' => 'YARN' }, 'with_hadoop_lzo' => false, 'HADOOP_CLASSPATH' => '', -- 2.11.0