public class LocalDirsHandlerService extends AbstractService
Service.STATE
Constructor and Description |
---|
LocalDirsHandlerService() |
Modifier and Type | Method and Description |
---|---|
boolean |
areDisksHealthy()
The minimum fraction of number of disks needed to be healthy for a node to
be considered healthy in terms of disks is configured using
YarnConfiguration.NM_MIN_HEALTHY_DISKS_FRACTION , with a default
value of YarnConfiguration.DEFAULT_NM_MIN_HEALTHY_DISKS_FRACTION . |
String |
getDisksHealthReport() |
long |
getLastDisksCheckTime() |
List<String> |
getLocalDirs() |
Path |
getLocalPathForWrite(String pathStr) |
Path |
getLocalPathForWrite(String pathStr,
long size,
boolean checkWrite) |
List<String> |
getLogDirs() |
Path |
getLogPathForWrite(String pathStr,
boolean checkWrite) |
Path |
getLogPathToRead(String pathStr) |
protected void |
serviceInit(Configuration config)
Method which initializes the timertask and its interval time.
|
protected void |
serviceStart()
Method used to start the disk health monitoring, if enabled.
|
protected void |
serviceStop()
Method used to terminate the disk health monitoring service.
|
static String[] |
validatePaths(String[] paths) |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
protected void serviceInit(Configuration config) throws Exception
serviceInit
in class AbstractService
config
- configurationException
- on a failure -these will be caught,
possibly wrapped, and wil; trigger a service stopprotected void serviceStart() throws Exception
serviceStart
in class AbstractService
Exception
- if needed -these will be caught,
wrapped, and trigger a service stopprotected void serviceStop() throws Exception
serviceStop
in class AbstractService
Exception
- if needed -these will be caught and logged.public List<String> getLocalDirs()
public List<String> getLogDirs()
public String getDisksHealthReport()
public boolean areDisksHealthy()
YarnConfiguration.NM_MIN_HEALTHY_DISKS_FRACTION
, with a default
value of YarnConfiguration.DEFAULT_NM_MIN_HEALTHY_DISKS_FRACTION
.public long getLastDisksCheckTime()
public Path getLocalPathForWrite(String pathStr) throws IOException
IOException
public Path getLocalPathForWrite(String pathStr, long size, boolean checkWrite) throws IOException
IOException
public Path getLogPathForWrite(String pathStr, boolean checkWrite) throws IOException
IOException
public Path getLogPathToRead(String pathStr) throws IOException
IOException
Copyright © 2013 Apache Software Foundation. All rights reserved.