[
https://issues.apache.org/jira/browse/HBASE-20064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16378166#comment-16378166
]
Chia-Ping Tsai commented on HBASE-20064:
----------------------------------------
Use getAllDescriptors instead. The getAll will be removed by HBASE-20097.
{code:java}
+ /**
+ * Check whether any table has mob column family.
+ * @return true if there is, false otherwise
+ * @throws IOException ioe possibly happens while getting all
TableDescriptors
+ */
+ private boolean checkColumnFamilyMobEnable() throws IOException {
+ TableDescriptors tds = getTableDescriptors();
+ // Can we expect no ioe? since this method only called at master start up.
+ for (TableDescriptor td : tds.getAll().values()) { // here
+ for (ColumnFamilyDescriptor cfd : td.getColumnFamilies()) {
+ if (cfd.isMobEnabled()) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
{code}
mobCacheConfig can be final. You can assign the null to it if the mob is
disabled.
{code:java}
- final MobCacheConfig mobCacheConfig;
+ MobCacheConfig mobCacheConfig;
{code}
Our metrics still assume the mob is enabled. Please check
RegionServerMetricsWrapperRunnable#run. It may cause NPE.
{code:java|title=RegionServerMetricsWrapperRunnable.java}
mobFileCacheAccessCount = mobFileCache.getAccessCount();
mobFileCacheMissCount = mobFileCache.getMissCount();
mobFileCacheHitRatio = Double.
isNaN(mobFileCache.getHitRatio())?0:mobFileCache.getHitRatio();
mobFileCacheEvictedCount = mobFileCache.getEvictedFileCount();
mobFileCacheCount = mobFileCache.getCacheSize();
blockedRequestsCount = tempBlockedRequestsCount;
{code}
Should we shutdown RS as with master?
{code:java}
- mobCacheConfig = new MobCacheConfig(conf);
+ if (MobUtils.isMobEnable(conf)) {
+ mobCacheConfig = new MobCacheConfig(conf);
+ }
{code}
> Disable MOB threads that are running whether you MOB or not
> -----------------------------------------------------------
>
> Key: HBASE-20064
> URL: https://issues.apache.org/jira/browse/HBASE-20064
> Project: HBase
> Issue Type: Bug
> Reporter: stack
> Assignee: Reid Chan
> Priority: Major
> Fix For: 2.0.0
>
> Attachments: HBASE-20064.master.001.patch,
> HBASE-20064.master.002.patch
>
>
> Master starts up some cleaner and compacting threads even though no MOB.
> Disable them and have users explicitly enable it.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)