Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Add in HDFS storage-tiering #1030

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b633b81
Add in HDFS storage-tiering
cbaenziger Nov 16, 2017
3ed3b9f
use jmxtrans-agent to replace jmxtrans
leochen4891 Jul 19, 2017
35fd225
Remove trailing '/' from hdfs_url attr value
kiiranh Apr 13, 2015
debf985
Make hdfs cluster administrators configurable
kiiranh Aug 26, 2015
38f1a0d
Add hdfsdu cookbook
kiiranh Oct 30, 2014
4b36d36
Exclude Gemfile.lock for rsync to bootstrap
cbaenziger Jul 25, 2017
c9ca9ba
Make test/automated_install.sh idempotent again
cbaenziger Jul 29, 2017
ee51154
Fix typo in setup_chef_bootstrap_node.sh
cbaenziger Jul 30, 2017
a775198
Update HDFSDU for modern Chef-BACH
cbaenziger Jul 30, 2017
4ea38f6
Support directories under the local SSL certificate directory
cbaenziger Sep 22, 2017
f3f867c
Clean-up multi-cluster droppings
cbaenziger Sep 22, 2017
c2fa892
Correct maven_config to install Maven on non-bootstrap hosts
cbaenziger Sep 27, 2017
23395ed
Revert "Revert the mysql jar install target"
cbaenziger Sep 27, 2017
161a0fb
Revert "Use Maven for mysql-connector-java deployment"
cbaenziger Sep 27, 2017
161a5d8
Rubocop clean-up of bcpc-hadoop::maven_config
cbaenziger Sep 29, 2017
9f90df8
Update with code-review comments
cbaenziger Sep 30, 2017
8261495
Ensure we have enough VCPUs for a test environment
cbaenziger Oct 20, 2017
59740f9
Turns out libmysqlclient20 was not needed for the MySQL2 Gem it appears
cbaenziger Nov 12, 2017
f61b5b1
Working HDFS-DU fixes for proxies
cbaenziger Nov 21, 2017
bea6b4b
Add -DskipTests for HDFSDU build
cbaenziger Nov 21, 2017
1e45d15
Remove mysql_connector from the dead
cbaenziger Nov 22, 2017
c2d4af0
Work around Jolokia issues for Hadoop clusters
cbaenziger Oct 19, 2017
15606ba
Rubocop-ify hdfsdu
cbaenziger Nov 22, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ cookbooks/*/
!cookbooks/bcpc_jmxtrans
!cookbooks/hannibal
!cookbooks/bcpc_kafka
!cookbooks/hdfsdu
!cookbooks/bach_krb5
!cookbooks/smoke-tests
cookbooks/*/coverage
Expand Down
1 change: 1 addition & 0 deletions Berksfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ cookbook 'bcpc', path: './cookbooks/bcpc'
cookbook 'bcpc-hadoop', path: './cookbooks/bcpc-hadoop'
cookbook 'bcpc_jmxtrans', path: './cookbooks/bcpc_jmxtrans'
cookbook 'hannibal', path: './cookbooks/hannibal'
cookbook 'hdfsdu', path: './cookbooks/hdfsdu'
cookbook 'bcpc_kafka', path: './cookbooks/bcpc_kafka'
cookbook 'smoke-tests', path: './cookbooks/smoke-tests'

Expand Down
4 changes: 4 additions & 0 deletions cookbooks/bach_repository/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,7 @@

# Set the JAVA_HOME for Hadoop components
default['bcpc']['hadoop']['java'] = "/usr/lib/jvm/java-8-oracle-amd64"

# jmxtrans-agent (https://github.com/jmxtrans/jmxtrans-agent)
default['bach']['repository']['jmxtrans_agent']['download_url'] = 'https://github.com/jmxtrans/jmxtrans-agent/releases/download/jmxtrans-agent-1.2.5/jmxtrans-agent-1.2.5.jar'
default['bach']['repository']['jmxtrans_agent']['checksum'] = 'd351ac0b863ffb2742477001296f65cbca6f8e9bb5bec3dc2194c447d838ae17'
3 changes: 3 additions & 0 deletions cookbooks/bach_repository/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@
# build jvmkill lib
include_recipe 'bach_repository::jvmkill'

# download jmxtrans-agent
include_recipe 'bach_repository::jmxtrans_agent'

# Run after everything to fix perms.
include_recipe 'bach_repository::permissions'
16 changes: 16 additions & 0 deletions cookbooks/bach_repository/recipes/jmxtrans_agent.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Cookbook Name:: bach_repository
# Recipe:: jmxtrans_agent
#
include_recipe 'bach_repository::directory'
bins_dir = node['bach']['repository']['bins_directory']
target_file = bins_dir + '/jmxtrans-agent-1.2.5.jar'

remote_file target_file do
source node['bach']['repository']['jmxtrans_agent']['download_url']
user 'root'
group 'root'
mode 0444
checksum node['bach']['repository']['jmxtrans_agent']['checksum']
not_if { File.exist?(target_file) }
end
24 changes: 4 additions & 20 deletions cookbooks/bcpc-hadoop/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
require 'pathname'

user = node['bcpc']['bootstrap']['admin']['user']
default['bcpc']['cluster']['file_path'] = "/home/#{user}/chef-bcpc/cluster.txt"

default['bcpc']['hadoop'] = {}
default['bcpc']['hadoop']['distribution']['release'] = '2.6.1.17-1'
default['bcpc']['hadoop']['distribution']['active_release'] = node['bcpc']['hadoop']['distribution']['release']
default['bcpc']['hadoop']['decommission']['hosts'] = []
# disks to use for Hadoop activities (expected to be an environment or role set variable)
default['bcpc']['hadoop']['hadoop_home_warn_suppress'] = 1
default['bcpc']['hadoop']['hadoop_log_dir'] = '/var/log/hadoop-hdfs'
default['bcpc']['hadoop']['hadoop_mapred_ident_string'] = 'mapred'
Expand All @@ -26,19 +26,14 @@
# Flag to control whether automatic restarts due to config changes need to be skipped
# for e.g. if ZK quorum is down or if the recipes need to be run in a non ZK env
default['bcpc']['hadoop']['skip_restart_coordination'] = false
default['bcpc']['hadoop']['hdfs']['site_xml']['dfs.datanode.sync.behind.writes'] = true
default['bcpc']['hadoop']['hdfs']['site_xml']['dfs.datanode.synconclose'] = true
default['bcpc']['hadoop']['hdfs']['site_xml']['dfs.namenode.stale.datanode.interval'] = 30_000
default['bcpc']['hadoop']['hdfs']['HA'] = true
default['bcpc']['hadoop']['hdfs']['failed_volumes_tolerated'] = 1
default['bcpc']['hadoop']['hdfs']['dfs_replication_factor'] = 3
default['bcpc']['hadoop']['hdfs']['dfs_blocksize'] = '128m'
default['bcpc']['hadoop']['hdfs_url'] = "hdfs://#{node.chef_environment}"
default['bcpc']['hadoop']['jmx_enabled'] = true
default[:bcpc][:hadoop][:jute][:maxbuffer] = 6_291_456
default['bcpc']['hadoop']['datanode']['xmx']['max_size'] = 4_096
default['bcpc']['hadoop']['datanode']['xmx']['max_ratio'] = 0.25
default['bcpc']['hadoop']['datanode']['max']['xferthreads'] = 16_384
default['bcpc']['hadoop']['jmx_enabled'] = false
default['bcpc']['hadoop']['jmx_agent_enabled'] = true
default['bcpc']['hadoop']['java_https_keystore'] = '/usr/local/maven/conf/keystore'

# for jvmkill library
default['bcpc-hadoop']['jvmkill']['lib_file'] = '/var/lib/jvmkill/libjvmkill.so'
Expand Down Expand Up @@ -77,15 +72,6 @@
common_opts

default['bcpc']['hadoop']['mapreduce']['framework']['name'] = 'yarn'
default['bcpc']['hadoop']['namenode']['handler']['count'] = 100
# set to nil to calculate dynamically based on available memory
default['bcpc']['hadoop']['namenode']['xmx']['max_size'] = 1024
# set to nil to calculate dynamically based on available memory
default['bcpc']['hadoop']['namenode']['xmn']['max_size'] = 128
default['bcpc']['hadoop']['namenode']['xmx']['max_ratio'] = 0.25
default['bcpc']['hadoop']['namenode']['rpc']['port'] = 8020
default['bcpc']['hadoop']['namenode']['http']['port'] = 50070
default['bcpc']['hadoop']['namenode']['https']['port'] = 50470
default['bcpc']['hadoop']['kafka']['jmx']['port'] = 9995
default['bcpc']['hadoop']['topology']['script'] = 'topology'
default['bcpc']['hadoop']['topology']['cookbook'] = 'bcpc-hadoop'
Expand Down Expand Up @@ -209,5 +195,3 @@

# Set the JAVA_HOME for Hadoop components
default['bcpc']['hadoop']['java'] = '/usr/lib/jvm/java-8-oracle-amd64'

default['bcpc']['cluster']['file_path'] = "/home/#{user}/chef-bcpc/cluster.txt"
27 changes: 22 additions & 5 deletions cookbooks/bcpc-hadoop/attributes/hdfs.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
# vim: tabstop=2:shiftwidth=2:softtabstop=2
# vim: tabstop=2:shiftwidth=2:softtabstop=2
# Setting balancer andwidth to default value as per hdfs-default.xml
default["hadoop"]["hdfs"]["balancer"]["bandwidth"] = 1048576
# balancer thread multiplier constant
default["hadoop"]["hdfs"]["balancer"]["max_concurrent_moves_multiplier"] = 10

default['bcpc']['hadoop']['datanode']['xmx']['max_size'] = 4_096
default['bcpc']['hadoop']['datanode']['xmx']['max_ratio'] = 0.25
default['bcpc']['hadoop']['datanode']['max']['xferthreads'] = 16_384
default['bcpc']['hadoop']['namenode']['handler']['count'] = 100
# set to nil to calculate dynamically based on available memory
default['bcpc']['hadoop']['namenode']['xmx']['max_size'] = 1024
# # set to nil to calculate dynamically based on available memory
default['bcpc']['hadoop']['namenode']['xmn']['max_size'] = 128
default['bcpc']['hadoop']['namenode']['xmx']['max_ratio'] = 0.25
default['bcpc']['hadoop']['namenode']['jmx']['port'] = 10111
default['bcpc']['hadoop']['namenode']['rpc']['port'] = 8020
default['bcpc']['hadoop']['namenode']['http']['port'] = 50070
default['bcpc']['hadoop']['namenode']['https']['port'] = 50470

# JMX port mappings
default['bcpc']['hadoop'].tap do |jmx|
jmx['journalnode']['jmx']['port'] = 10110
Expand Down Expand Up @@ -41,13 +55,16 @@

default[:bcpc][:hadoop][:hdfs][:site_xml].tap do |site_xml|
dfs = node[:bcpc][:hadoop][:hdfs][:dfs]

site_xml['dfs.replication'] =
node[:bcpc][:hadoop][:hdfs][:dfs_replication_factor]

site_xml['dfs.namenode.audit.log.async'] =
dfs[:namenode][:audit][:log][:async]

site_xml['dfs.datanode.sync.behind.writes'] = true
site_xml['dfs.datanode.synconclose'] = true
site_xml['dfs.namenode.stale.datanode.interval'] = 30_000

site_xml['dfs.nameservices'] = node.chef_environment

Expand All @@ -70,7 +87,7 @@

site_xml['dfs.client.read.shortcircuit'] =
dfs[:client][:read][:shortcircuit]

site_xml['dfs.domain.socket.path'] =
dfs[:domain][:socket][:path]

Expand Down Expand Up @@ -100,7 +117,7 @@

site_xml['dfs.datanode.max.transfer.threads'] =
node[:bcpc][:hadoop][:datanode][:max][:xferthreads]

site_xml['dfs.namenode.handler.count'] =
node[:bcpc][:hadoop][:namenode][:handler][:count]

Expand Down
Loading