Polished and removed double space in logging.

This commit is contained in:
Claus Ibsen 2013-10-03 11:11:13 +02:00
parent 987769a62b
commit ea1d02d067
1 changed files with 9 additions and 9 deletions

View File

@ -1904,7 +1904,7 @@ public class BrokerService implements Service {
dir = new File(dirPath); dir = new File(dirPath);
} }
while (dir != null && dir.isDirectory() == false) { while (dir != null && !dir.isDirectory()) {
dir = dir.getParentFile(); dir = dir.getParentFile();
} }
long storeLimit = usage.getStoreUsage().getLimit(); long storeLimit = usage.getStoreUsage().getLimit();
@ -1913,7 +1913,7 @@ public class BrokerService implements Service {
LOG.warn("Store limit is " + storeLimit / (1024 * 1024) + LOG.warn("Store limit is " + storeLimit / (1024 * 1024) +
" mb, whilst the data directory: " + dir.getAbsolutePath() + " mb, whilst the data directory: " + dir.getAbsolutePath() +
" only has " + dirFreeSpace / (1024 * 1024) + " only has " + dirFreeSpace / (1024 * 1024) +
" mb of usable space - resetting to maximum available disk space: " + " mb of usable space - resetting to maximum available disk space: " +
dirFreeSpace / (1024 * 1024) + " mb"); dirFreeSpace / (1024 * 1024) + " mb");
usage.getStoreUsage().setLimit(dirFreeSpace); usage.getStoreUsage().setLimit(dirFreeSpace);
} }
@ -1944,7 +1944,7 @@ public class BrokerService implements Service {
} }
long storeLimit = usage.getTempUsage().getLimit(); long storeLimit = usage.getTempUsage().getLimit();
while (tmpDir != null && tmpDir.isDirectory() == false) { while (tmpDir != null && !tmpDir.isDirectory()) {
tmpDir = tmpDir.getParentFile(); tmpDir = tmpDir.getParentFile();
} }
long dirFreeSpace = tmpDir.getUsableSpace(); long dirFreeSpace = tmpDir.getUsableSpace();
@ -1985,7 +1985,7 @@ public class BrokerService implements Service {
schedulerDir = new File(schedulerDirPath); schedulerDir = new File(schedulerDirPath);
} }
while (schedulerDir != null && schedulerDir.isDirectory() == false) { while (schedulerDir != null && !schedulerDir.isDirectory()) {
schedulerDir = schedulerDir.getParentFile(); schedulerDir = schedulerDir.getParentFile();
} }
long schedularLimit = usage.getJobSchedulerUsage().getLimit(); long schedularLimit = usage.getJobSchedulerUsage().getLimit();
@ -2077,7 +2077,7 @@ public class BrokerService implements Service {
} }
public ObjectName createDuplexNetworkConnectorObjectName(String transport) throws MalformedObjectNameException { public ObjectName createDuplexNetworkConnectorObjectName(String transport) throws MalformedObjectNameException {
return BrokerMBeanSupport.createNetworkConnectorName(getBrokerObjectName(), "duplexNetworkConnectors", transport.toString()); return BrokerMBeanSupport.createNetworkConnectorName(getBrokerObjectName(), "duplexNetworkConnectors", transport);
} }
protected void unregisterNetworkConnectorMBean(NetworkConnector connector) { protected void unregisterNetworkConnectorMBean(NetworkConnector connector) {
@ -2086,7 +2086,7 @@ public class BrokerService implements Service {
ObjectName objectName = createNetworkConnectorObjectName(connector); ObjectName objectName = createNetworkConnectorObjectName(connector);
getManagementContext().unregisterMBean(objectName); getManagementContext().unregisterMBean(objectName);
} catch (Exception e) { } catch (Exception e) {
LOG.error("Network Connector could not be unregistered from JMX", e); LOG.warn("Network Connector could not be unregistered from JMX due " + e.getMessage() + ". This exception is ignored.", e);
} }
} }
} }
@ -2172,7 +2172,7 @@ public class BrokerService implements Service {
regionBroker = new ManagedRegionBroker(this, getManagementContext(), getBrokerObjectName(), regionBroker = new ManagedRegionBroker(this, getManagementContext(), getBrokerObjectName(),
getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory, destinationInterceptor,getScheduler(),getExecutor()); getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory, destinationInterceptor,getScheduler(),getExecutor());
} catch(MalformedObjectNameException me){ } catch(MalformedObjectNameException me){
LOG.error("Couldn't create ManagedRegionBroker", me); LOG.warn("Cannot create ManagedRegionBroker due " + me.getMessage(), me);
throw new IOException(me); throw new IOException(me);
} }
} else { } else {
@ -2324,7 +2324,7 @@ public class BrokerService implements Service {
try { try {
Runtime.getRuntime().removeShutdownHook(shutdownHook); Runtime.getRuntime().removeShutdownHook(shutdownHook);
} catch (Exception e) { } catch (Exception e) {
LOG.debug("Caught exception, must be shutting down", e); LOG.debug("Caught exception, must be shutting down. This exception is ignored.", e);
} }
} }
} }
@ -2606,7 +2606,7 @@ public class BrokerService implements Service {
try { try {
this.scheduler.start(); this.scheduler.start();
} catch (Exception e) { } catch (Exception e) {
LOG.error("Failed to start Scheduler ",e); LOG.error("Failed to start Scheduler", e);
} }
} }
return this.scheduler; return this.scheduler;