This repository was archived by the owner on Jan 8, 2019. It is now read-only.
File tree 2 files changed +6
-5
lines changed
cookbooks/bcpc-hadoop/recipes
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 134
134
# If HBASE bucket cache is enabled the properties from this section will be included in hbase-site.xml
135
135
#
136
136
bucketcache_size = ( node [ 'bcpc' ] [ 'hadoop' ] [ 'hbase_rs' ] [ 'mx_dir_mem' ] [ 'size' ] - node [ 'bcpc' ] [ 'hadoop' ] [ 'hbase_rs' ] [ 'hdfs_dir_mem' ] [ 'size' ] ) . floor
137
- if node [ 'bcpc' ] [ 'hadoop' ] [ 'hbase' ] [ 'bucketcache' ] [ 'enabled' ] == true
137
+ bucketcache_enabled = node [ 'bcpc' ] [ 'hadoop' ] [ 'hbase' ] [ 'bucketcache' ] [ 'enabled' ]
138
+ is_region_server = node [ 'bcpc' ] [ 'hadoop' ] [ 'rs_hosts' ] . any? do |rs |
139
+ rs . values [ 0 ] == node [ 'fqdn' ]
140
+ end
141
+
142
+ if bucketcache_enabled && is_region_server
138
143
generated_values [ 'hbase.regionserver.global.memstore.upperLimit' ] = node [ 'bcpc' ] [ 'hadoop' ] [ 'hbase_rs' ] [ 'memstore' ] [ 'upperlimit' ] . to_s
139
144
generated_values [ 'hfile.block.cache.size' ] = node [ 'bcpc' ] [ 'hadoop' ] [ 'hbase' ] [ 'blockcache' ] [ 'size' ] . to_s
140
145
generated_values [ 'hbase.bucketcache.size' ] = bucketcache_size
Original file line number Diff line number Diff line change 63
63
node . default [ 'bcpc' ] [ 'hadoop' ] [ 'hbase' ] [ 'env' ] [ 'HBASE_REGIONSERVER_OPTS' ] =
64
64
node [ 'bcpc' ] [ 'hadoop' ] [ 'hbase' ] [ 'env' ] [ 'HBASE_REGIONSERVER_OPTS' ] +
65
65
' -XX:MaxDirectMemorySize=' + node [ 'bcpc' ] [ 'hadoop' ] [ 'hbase_rs' ] [ 'mx_dir_mem' ] [ 'size' ] . to_s + 'm'
66
-
67
- node . default [ 'bcpc' ] [ 'hadoop' ] [ 'hbase' ] [ 'env' ] [ 'HBASE_MASTER_OPTS' ] =
68
- node [ 'bcpc' ] [ 'hadoop' ] [ 'hbase' ] [ 'env' ] [ 'HBASE_MASTER_OPTS' ] +
69
- ' -XX:MaxDirectMemorySize=' + node [ 'bcpc' ] [ 'hadoop' ] [ 'hbase_master' ] [ 'mx_dir_mem' ] [ 'size' ] . to_s + 'm'
70
66
end
71
67
72
68
if node [ :bcpc ] [ :hadoop ] [ :kerberos ] [ :enable ] == true
You can’t perform that action at this time.
0 commit comments