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

Disable bucket cache on HBase masters #1277

Merged
merged 2 commits into from
Sep 26, 2018

Conversation

vt0r
Copy link
Member

@vt0r vt0r commented Sep 25, 2018

This removes the config parameters from HBase masters that are added when the bucket cache is enabled. These were only intended for region servers anyway.

EDIT: This was tested on a dev hardware cluster.
EDIT2: The second iteration was tested in the same place.

Copy link
Contributor

@macmaster macmaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, looks good to me.

@vt0r
Copy link
Member Author

vt0r commented Sep 25, 2018

Notes for those deploying: This might restart regionservers, since they share an env file with masters. It's recommended to stop chef and update them in a loop. BETTER SAFE THAN SORRY. ™️

Copy link
Member

@cbaenziger cbaenziger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please double check my read through if you would.

@@ -134,7 +134,8 @@
# If HBASE bucket cache is enabled the properties from this section will be included in hbase-site.xml
#
bucketcache_size = (node['bcpc']['hadoop']['hbase_rs']['mx_dir_mem']['size'] - node['bcpc']['hadoop']['hbase_rs']['hdfs_dir_mem']['size']).floor
if node['bcpc']['hadoop']['hbase']['bucketcache']['enabled'] == true
if node['bcpc']['hadoop']['hbase']['bucketcache']['enabled'] == true &&
node['bcpc']['hadoop']['rs_hosts'].map { |rs| rs.values[0] }.include?(node['fqdn'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using include may cause foo-r1n1 to match foo-r1n10. Why not a select over map and look for equality?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that will happen because the result of a map is an Array.
It will call the include? which falls back to the method in Enumerable.
That returns true if any element in the map results == node['fqdn']

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What Ron said. In the map, I strip the small hashes down to just the value. The result is a String array of just FQDNs. I then do an include? using the fqdn of the node itself to check for a match, which should avoid collisions.

@bijugs
Copy link
Contributor

bijugs commented Sep 26, 2018

LGTM.

- Makes it more readable and simpler.
@vt0r vt0r dismissed cbaenziger’s stale review September 26, 2018 14:10

Addressed concerns in this review.

@cbaenziger cbaenziger merged commit b357859 into bloomberg:master Sep 26, 2018
@vt0r vt0r deleted the disable_bucketcache_masters branch October 24, 2018 22:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants