Skip to content

Commit

Permalink
Merge branch 'master' into feature/jobtracker-support
Browse files Browse the repository at this point in the history
Conflicts:
	recipes/hadoop_yarn_resourcemanager.rb
  • Loading branch information
wolf31o2 committed May 20, 2014
2 parents 6092cc0 + 5936075 commit f5d3aec
Show file tree
Hide file tree
Showing 28 changed files with 125 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ bin/*

.kitchen/
.kitchen.local.yml

.chef
2 changes: 1 addition & 1 deletion .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provisioner:

platforms:
- name: ubuntu-12.04
- name: centos-6.4
- name: centos-6.5

suites:
- name: default
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ end

gem 'chefspec', '~> 3.1'

gem 'rubocop'
gem 'rubocop', '~> 0.21.0'
gem 'rubocop-checkstyle_formatter', require: false
gem 'rainbow', '<= 1.99.1'

Expand Down
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# hadoop cookbook

[![Cookbook Version](http://img.shields.io/cookbook/v/hadoop.svg)][cookbook]
[![Build Status](http://img.shields.io/travis/continuuity/hadoop_cookbook.svg)][travis]
[![Code Climate](https://codeclimate.com/github/continuuity/hadoop_cookbook.png)][climate]

[cookbook]: https://community.opscode.com/cookbooks/hadoop
[travis]: http://travis-ci.org/continuuity/hadoop_cookbook
[climate]: https://codeclimate.com/github/continuuity/hadoop_cookbook
[![Cookbook Version](http://img.shields.io/cookbook/v/hadoop.svg)](https://community.opscode.com/cookbooks/hadoop)
[![Build Status](http://img.shields.io/travis/continuuity/hadoop_cookbook.svg)](http://travis-ci.org/continuuity/hadoop_cookbook)

# Requirements

Expand Down Expand Up @@ -119,9 +114,20 @@ Author:: Continuuity, Inc. (<[email protected]>)

# Testing

This cookbook has several ways to test it. It includes code tests, which are done using `foodcritic`, `rubocop`, and `chefspec`.
It, also, includes functionality testing, provided by `vagrant`.

```text
rake foodcritic
rake rubocop
rake chefspec
rake vagrant
```

This cookbook requires the `vagrant-omnibus` and `vagrant-berkshelf` Vagrant plugins to be installed.

# License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
Expand Down
18 changes: 18 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,23 @@ task :rubocop do
sh 'rubocop'
end

# creates metadata.json
desc 'Create metadata.json from metadata.rb'
task :metadata do
sh 'knife cookbook metadata from file metadata.rb'
end

# share cookbook to Chef community site
desc 'Share cookbook to community site'
task :share do
sh 'knife cookbook site share hadoop databases'
end

# run vagrant test
desc 'Run vagrant tests'
task :vagrant do
sh 'vagrant up'
end

# default tasks are quick, commit tests
task :default => %w(foodcritic rubocop chefspec)
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
'banned.users' => 'hdfs,yarn,mapred,bin'
},
:hdfs_site => {
'dfs.datanode.max.xcievers' => 4096
'dfs.datanode.max.transfer.threads' => 4096
}
},
:hbase => {
Expand Down
2 changes: 2 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
'5'
end

default['hadoop']['force_format'] = false

# Default: conf.chef
default['hadoop']['conf_dir'] = 'conf.chef'
default['hbase']['conf_dir'] = node['hadoop']['conf_dir']
Expand Down
46 changes: 46 additions & 0 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "hadoop",
"description": "Installs/Configures Hadoop (HDFS/YARN/MRv2), HBase, Hive, Oozie, Pig, and ZooKeeper",
"long_description": "# hadoop cookbook\n\n[![Cookbook Version](http://img.shields.io/cookbook/v/hadoop.svg)](https://community.opscode.com/cookbooks/hadoop)\n[![Build Status](http://img.shields.io/travis/continuuity/hadoop_cookbook.svg)](http://travis-ci.org/continuuity/hadoop_cookbook)\n\n# Requirements\n\nThis cookbook may work on earlier versions, but these are the minimal tested versions.\n\n* Chef 11.4.0+\n* CentOS 6.4+\n* Ubuntu 12.04+\n\nThis cookbook assumes that you have a working Java installation. It has been tested using version `1.21.2` of the `java` cookbook, using Oracle Java 6. If you plan on using Hive with a database other than the embedded Derby, you will need to provide it and set it up prior to starting Hive Metastore service.\n\n# Usage\n\nThis cookbook is designed to be used with a wrapper cookbook or a role with settings for configuring Hadoop. The services should work out of the box on a single host, but little validation is done that you have made a working Hadoop configuration. The cookbook is attribute-driven and is suitable for use via either `chef-client` or `chef-solo` since it does not use any server-based functionality. The cookbook defines service definitions for each Hadoop service, but it does not enable or start them, by default.\n\nFor more information, read the [Wrapping this cookbook](https://github.com/continuuity/hadoop_cookbook/wiki/Wrapping-this-cookbook) wiki entry.\n\n# Attributes\n\nAttributes for this cookbook define the configuration files for Hadoop and its various services. Hadoop configuration files are XML files, with name/value property pairs. The attribute name determines which file the property is placed and the property name. The attribute value is the property value. The attribute `hadoop['core_site']['fs.defaultFS']` will configure a property named `fs.defaultFS` in `core-site.xml` in `hadoop['conf_dir']`. All attribute values are taken as-is and only minimal configuration checking is done on values. It is up to the user to provide a valid configuration for your cluster.\n\nAttribute Tree | File | Location \n-------------- | ---- | --------\nhadoop['capacity_scheduler'] | capacity-scheduler.xml | `hadoop['conf_dir']`\nhadoop['container_executor'] | container-executor.cfg | `hadoop['conf_dir']`\nhadoop['core_site'] | core-site.xml | `hadoop['conf_dir']`\nhadoop['fair_scheduler'] | fair-scheduler.xml | `hadoop['conf_dir']`\nhadoop['hadoop_env'] | hadoop-env.sh | `hadoop['conf_dir']`\nhadoop['hadoop_metrics'] | hadoop-metrics.properties | `hadoop['conf_dir']`\nhadoop['hadoop_policy'] | hadoop-policy.xml | `hadoop['conf_dir']`\nhadoop['hdfs_site'] | hdfs-site.xml | `hadoop['conf_dir']`\nhadoop['log4j'] | log4j.properties | `hadoop['conf_dir']`\nhadoop['mapred_site'] | mapred-site.xml | `hadoop['conf_dir']`\nhadoop['yarn_env'] | yarn-env.sh | `hadoop['conf_dir']`\nhadoop['yarn_site'] | yarn-site.xml | `hadoop['conf_dir']`\nhbase['hadoop_metrics'] | hadoop-metrics.properties | `hbase['conf_dir']`\nhbase['hbase_env'] | hbase-env.sh | `hbase['conf_dir']`\nhbase['hbase_policy'] | hbase-policy.xml | `hbase['conf_dir']`\nhbase['hbase_site'] | hbase-site.xml | `hbase['conf_dir']`\nhbase['log4j'] | log4j.properties | `hbase['conf_dir']`\nhive['hive_env'] | hive-env.sh | `hive['conf_dir']`\nhive['hive_site'] | hive-site.xml | `hive['conf_dir']`\noozie['oozie_site'] | oozie-site.xml | `oozie['conf_dir']`\nzookeeper['log4j'] | log4j.properties | `zookeeper['conf_dir']`\nzookeeper['zoocfg'] | zoo.cfg | `zookeeper['conf_dir']`\n\n## Distribution Attributes\n\n* `hadoop['distribution']` - Specifies which Hadoop distribution to use, currently supported: cdh, hdp. Default `hdp`\n* `hadoop['distribution_version']` - Specifies which version of `hadoop['distribution']` to use. Default `2.0` if `hadoop['distribution']` is `hdp` and `5` if `hadoop['distribution']` is `cdh`\n\n### APT-specific settings\n\n* `hadoop['apt_repo_url']` - Provide an alternate apt installation source location. If you change this attribute, you are expected to provide a path to a working repo for the `hadoop['distribution']` used. Default: `nil`\n* `hadoop['apt_repo_key_url']` - Provide an alternative apt repository key source location. Default `nil`\n\n### RPM-specific settings\n\n* `hadoop['yum_repo_url']` - Provide an alternate yum installation source location. If you change this attribute, you are expected to provide a path to a working repo for the `hadoop['distribution']` used. Default: `nil`\n* `hadoop['yum_repo_key_url']` - Provide an alternative yum repository key source location. Default `nil`\n\n## Global Configuration Attributes\n\n* `hadoop['conf_dir']` - The directory used inside `/etc/hadoop` and used via the alternatives system. Default `conf.chef`\n* `hbase['conf_dir']` - The directory used inside `/etc/hbase` and used via the alternatives system. Default `conf.chef`\n* `hive['conf_dir']` - The directory used inside `/etc/hive` and used via the alternatives system. Default `conf.chef`\n* `oozie['conf_dir']` - The directory used inside `/etc/oozie` and used via the alternatives system. Default `conf.chef`\n* `zookeeper['conf_dir']` - The directory used inside `/etc/zookeeper` and used via the alternatives system. Default `conf.chef`\n\n## Default Attributes\n\n* `hadoop['core_site']['fs.defaultFS']` - Sets URI to HDFS NameNode. Default `hdfs://localhost`\n* `hadoop['yarn_site']['yarn.resourcemanager.hostname']` - Sets hostname of YARN ResourceManager. Default `localhost`\n* `hive['hive_site']['javax.jdo.option.ConnectionURL']` - Sets JDBC URL. Default `jdbc:derby:;databaseName=/var/lib/hive/metastore/metastore_db;create=true`\n* `hive['hive_site']['javax.jdo.option.ConnectionDriverName']` - Sets JDBC Driver. Default `org.apache.derby.jdbc.EmbeddedDriver`\n\n# Recipes\n\n* `default.rb` - Sets up configuration and `hadoop-client` packages.\n* `hadoop_hdfs_checkconfig` - Ensures the HDFS configuration meets required parameters.\n* `hadoop_hdfs_datanode` - Sets up an HDFS DataNode.\n* `hadoop_hdfs_ha_checkconfig` - Ensures the HDFS configuration meets requirements for High Availability.\n* `hadoop_hdfs_journalnode` - Sets up an HDFS JournalNode.\n* `hadoop_hdfs_namenode` - Sets up an HDFS NameNode.\n* `hadoop_hdfs_secondarynamenode` - Sets up an HDFS Secondary NameNode.\n* `hadoop_hdfs_zkfc` - Sets up HDFS Failover Controller, required for automated NameNode failover.\n* `hadoop_yarn_nodemanager` - Sets up a YARN NodeManager.\n* `hadoop_yarn_proxyserver` - Sets up a YARN Web Proxy.\n* `hadoop_yarn_resourcemanager` - Sets up a YARN ResourceManager.\n* `hbase` - Sets up configuration and `hbase` packages.\n* `hbase_checkconfig` - Ensures the HBase configuration meets required parameters.\n* `hbase_master` - Sets up an HBase Master.\n* `hbase_regionserver` - Sets up an HBase RegionServer.\n* `hbase_rest` - Sets up an HBase REST interface.\n* `hbase_thrift` - Sets up an HBase Thrift interface.\n* `hive` - Sets up configuration and `hive` packages.\n* `hive_metastore` - Sets up Hive Metastore metadata repository.\n* `hive_server` - Sets up a Hive Thrift service.\n* `hive_server2` - Sets up a Hive Thrift service with Kerberos and multi-client concurrency support.\n* `oozie` - Sets up an Oozie server.\n* `oozie_client` - Sets up an Oozie client.\n* `pig` - Installs pig interpreter.\n* `repo` - Sets up package manager repositories for specified `hadoop['distribution']`\n* `zookeeper` - Sets up `zookeeper` package.\n* `zookeeper_server` - Sets up a ZooKeeper server.\n\n# Author\n\nAuthor:: Continuuity, Inc. (<[email protected]>)\n\n# Testing\n\nThis cookbook has several ways to test it. It includes code tests, which are done using `foodcritic`, `rubocop`, and `chefspec`.\nIt, also, includes functionality testing, provided by `vagrant`.\n\n```text\nrake foodcritic\nrake rubocop\nrake chefspec\nrake vagrant\n```\n\nThis cookbook requires the `vagrant-omnibus` and `vagrant-berkshelf` Vagrant plugins to be installed.\n\n# License\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this software except in compliance with the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n",
"maintainer": "Continuuity, Inc.",
"maintainer_email": "[email protected]",
"license": "Apache 2.0",
"platforms": {
"centos": ">= 0.0.0",
"debian": ">= 0.0.0",
"redhat": ">= 0.0.0",
"scientific": ">= 0.0.0",
"ubuntu": ">= 0.0.0"
},
"dependencies": {
"yum": ">= 3.0",
"apt": ">= 0.0.0"
},
"recommendations": {
"java": ">= 1.21.2"
},
"suggestions": {
},
"conflicting": {
"hadoop_cluster": ">= 0.0.0",
"hadoop_cluster_rpm": ">= 0.0.0",
"hadoop_for_hbase": ">= 0.0.0",
"hbase": ">= 0.0.0",
"hbase_cluster": ">= 0.0.0",
"hive": ">= 0.0.0",
"pig": ">= 0.0.0",
"zookeeper": ">= 0.0.0",
"zookeeper_cluster": ">= 0.0.0"
},
"providing": {
},
"replacing": {
},
"attributes": {
},
"groupings": {
},
"recipes": {
},
"version": "1.0.9"
}
4 changes: 3 additions & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
license 'Apache 2.0'
description 'Installs/Configures Hadoop (HDFS/YARN/MRv2), HBase, Hive, Oozie, Pig, and ZooKeeper'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '1.0.8'
version '1.0.9'

depends 'yum', '>= 3.0'
depends 'apt'

recommends 'java', '>= 1.21.2'

%w(centos debian redhat scientific ubuntu).each do |os|
supports os
end
Expand Down
1 change: 1 addition & 0 deletions recipes/hadoop_hdfs_datanode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
end

service 'hadoop-hdfs-datanode' do
status_command 'service hadoop-hdfs-datanode status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
1 change: 1 addition & 0 deletions recipes/hadoop_hdfs_journalnode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
end

service 'hadoop-hdfs-journalnode' do
status_command 'service hadoop-hdfs-journalnode status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
3 changes: 2 additions & 1 deletion recipes/hadoop_hdfs_namenode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,14 @@
end

execute 'hdfs-namenode-format' do
command 'hdfs namenode -format'
command 'hdfs namenode -format -nonInteractive' + (node['hadoop']['force_format'] ? ' -force' : '')
action :nothing
group 'hdfs'
user 'hdfs'
end

service 'hadoop-hdfs-namenode' do
status_command 'service hadoop-hdfs-namenode status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
1 change: 1 addition & 0 deletions recipes/hadoop_hdfs_secondarynamenode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
end

service 'hadoop-hdfs-secondarynamenode' do
status_command 'service hadoop-hdfs-secondarynamenode status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
1 change: 1 addition & 0 deletions recipes/hadoop_hdfs_zkfc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
end

service 'hadoop-hdfs-zkfc' do
status_command 'service hadoop-hdfs-zkfc status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
1 change: 1 addition & 0 deletions recipes/hadoop_mapreduce_historyserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
end

service 'hadoop-mapreduce-historyserver' do
status_command 'service hadoop-mapreduce-historyserver status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
1 change: 1 addition & 0 deletions recipes/hadoop_yarn_nodemanager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
end

service 'hadoop-yarn-nodemanager' do
status_command 'service hadoop-yarn-nodemanager status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
1 change: 1 addition & 0 deletions recipes/hadoop_yarn_proxyserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
end

service 'hadoop-yarn-proxyserver' do
status_command 'service hadoop-yarn-proxyserver status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
12 changes: 9 additions & 3 deletions recipes/hadoop_yarn_resourcemanager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,24 @@
action :install
end

# YARN needs a /tmp in HDFS
# TODO: check for these and set them up
# mapreduce.cluster.local.dir = #{hadoop_tmp_dir}/mapred/local
# mapreduce.jobtracker.system.dir = #{hadoop_tmp_dir}/mapred/system
# mapreduce.jobtracker.staging.root.dir = #{hadoop_tmp_dir}/mapred/staging
# mapreduce.cluster.temp.dir = #{hadoop_tmp_dir}/mapred/temp

# We need a /tmp in HDFS
dfs = node['hadoop']['core_site']['fs.defaultFS']
execute 'yarn-hdfs-tmpdir' do
execute 'hdfs-tmpdir' do
command "hdfs dfs -mkdir -p #{dfs}/tmp && hdfs dfs -chmod 1777 #{dfs}/tmp"
timeout 300
user 'hdfs'
group 'hdfs'
not_if "hdfs dfs -test -d #{dfs}/tmp", :user => 'hdfs'
action :nothing
end

service 'hadoop-yarn-resourcemanager' do
status_command 'service hadoop-yarn-resourcemanager status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
14 changes: 8 additions & 6 deletions recipes/hbase_checkconfig.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@
Chef::Application.fatal!("You *must* set node['hadoop']['hdfs_site']['dfs.datanode.max.transfer.threads'] >= 4096 for HBase")
end

# HBase needs hbase.rootdir and hbase.zookeeper.quorum
if node['hbase'].key?('hbase_site') && node['hbase']['hbase_site'].key?('hbase.rootdir') && node['hbase']['hbase_site'].key?('hbase.zookeeper.quorum')
Chef::Log.info("HBase root: #{node['hbase']['hbase_site']['hbase.rootdir']}")
Chef::Log.info("HBase ZooKeeper Quorum: #{node['hbase']['hbase_site']['hbase.zookeeper.quorum']}")
else
Chef::Application.fatal!("You *must* set node['hbase']['hbase_site']['hbase.rootdir'] and node['hbase']['hbase_site']['hbase.zookeeper.quorum']")
# HBase needs hbase.rootdir and hbase.zookeeper.quorum in distributed mode
if node['hbase']['hbase_site'].key?('hbase.cluster.distributed') && node['hbase']['hbase_site']['hbase.cluster.distributed'].to_s == 'true'
if node['hbase'].key?('hbase_site') && node['hbase']['hbase_site'].key?('hbase.rootdir') && node['hbase']['hbase_site'].key?('hbase.zookeeper.quorum')
Chef::Log.info("HBase root: #{node['hbase']['hbase_site']['hbase.rootdir']}")
Chef::Log.info("HBase ZooKeeper Quorum: #{node['hbase']['hbase_site']['hbase.zookeeper.quorum']}")
else
Chef::Application.fatal!("You *must* set node['hbase']['hbase_site']['hbase.rootdir'] and node['hbase']['hbase_site']['hbase.zookeeper.quorum'] in distributed mode")
end
end
3 changes: 2 additions & 1 deletion recipes/hbase_master.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# HBase can use a local directory or an HDFS directory for its rootdir...
# if HDFS, create execute block with action :nothing
# else create the local directory when file://
if node['hbase']['hbase_site']['hbase.rootdir'] =~ %r{^/|^hdfs://} && node['hbase']['hbase_site']['hbase.cluster.distributed'].to_s == 'true'
if node['hbase']['hbase_site']['hbase.rootdir'] =~ %r{^hdfs://} || (node['hbase']['hbase_site']['hbase.rootdir'] =~ /^\// && node['hbase']['hbase_site']['hbase.cluster.distributed'].to_s == 'true')
execute 'hbase-hdfs-rootdir' do
command "hdfs dfs -mkdir -p #{node['hbase']['hbase_site']['hbase.rootdir']} && hdfs dfs -chown hbase #{node['hbase']['hbase_site']['hbase.rootdir']}"
timeout 300
Expand Down Expand Up @@ -68,6 +68,7 @@
end

service 'hbase-master' do
status_command 'service hbase-master status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
1 change: 1 addition & 0 deletions recipes/hbase_rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
end

service 'hbase-rest' do
status_command 'service hbase-rest status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
1 change: 1 addition & 0 deletions recipes/hbase_thrift.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
end

service 'hbase-thrift' do
status_command 'service hbase-thrift status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
3 changes: 2 additions & 1 deletion recipes/hive_metastore.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
end

execute 'hive-hdfs-warehousedir' do
command "hdfs dfs -mkdir -p #{dfs}/#{warehouse_dir} && hdfs dfs -chown hive:hdfs #{dfs}/#{warehouse_dir}"
command "hdfs dfs -mkdir -p #{dfs}/#{warehouse_dir} && hdfs dfs -chown hive:hdfs #{dfs}/#{warehouse_dir} && hdfs dfs -chmod 1777 #{dfs}/#{warehouse_dir}"
timeout 300
user 'hdfs'
group 'hdfs'
Expand All @@ -63,6 +63,7 @@
end

service 'hive-metastore' do
status_command 'service hive-metastore status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
1 change: 1 addition & 0 deletions recipes/hive_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
end

service 'hive-server' do
status_command 'service hive-server status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
1 change: 1 addition & 0 deletions recipes/hive_server2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
end

service 'hive-server2' do
status_command 'service hive-server2 status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
1 change: 1 addition & 0 deletions recipes/oozie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
end

service 'oozie' do
status_command 'service oozie status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
Expand Down
1 change: 1 addition & 0 deletions recipes/zookeeper_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
end # End log4j.properties

service 'zookeeper-server' do
status_command 'service zookeeper-server status'
supports [:restart => true, :reload => false, :status => true]
action :nothing
end
Expand Down
4 changes: 2 additions & 2 deletions spec/hadoop_yarn_resourcemanager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
expect(chef_run).to install_package('hadoop-yarn-resourcemanager')
end

it 'creates yarn-hdfs-tmpdir execute resource, but does not run it' do
expect(chef_run).to_not run_execute('yarn-hdfs-tmpdir').with(user: 'hdfs')
it 'creates hdfs-tmpdir execute resource, but does not run it' do
expect(chef_run).to_not run_execute('hdfs-tmpdir').with(user: 'hdfs')
end

it 'creates hadoop-yarn-resourcemanager service resource, but does not run it' do
Expand Down

0 comments on commit f5d3aec

Please sign in to comment.