HBASE-6607 NullPointerException when accessing master web ui while master is initializing

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1375673 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jxiang 2012-08-21 17:25:27 +00:00
parent 94f8d617dd
commit 280c6124b5
2 changed files with 3 additions and 3 deletions

View File

@ -120,7 +120,7 @@ org.apache.hadoop.hbase.HBaseConfiguration;
for details.
</div>
</%if>
<%if !catalogJanitorEnabled %>
<%if master.isInitialized() && !catalogJanitorEnabled %>
<div class="alert alert-error">
Please note that your cluster is running with the CatalogJanitor disabled. It can be
re-enabled from the hbase shell by running the command 'catalogjanitor_switch true'

View File

@ -1207,8 +1207,8 @@ Server {
@Override
public IsCatalogJanitorEnabledResponse isCatalogJanitorEnabled(RpcController c,
IsCatalogJanitorEnabledRequest req) throws ServiceException {
return IsCatalogJanitorEnabledResponse.newBuilder().
setValue(catalogJanitorChore.getEnabled()).build();
boolean isEnabled = catalogJanitorChore != null ? catalogJanitorChore.getEnabled() : false;
return IsCatalogJanitorEnabledResponse.newBuilder().setValue(isEnabled).build();
}
/**