org.apache.hadoop.mapreduce.v2.hs
Class HistoryFileManager
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.mapreduce.v2.hs.HistoryFileManager
- All Implemented Interfaces:
- Closeable, org.apache.hadoop.service.Service
@InterfaceAudience.Public
@InterfaceStability.Unstable
public class HistoryFileManager
- extends org.apache.hadoop.service.AbstractService
This class provides a way to interact with history files in a thread safe
manor.
| Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service |
org.apache.hadoop.service.Service.STATE |
| Methods inherited from class org.apache.hadoop.service.AbstractService |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceStart, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop |
jobListCache
protected org.apache.hadoop.mapreduce.v2.hs.HistoryFileManager.JobListCache jobListCache
moveToDoneExecutor
protected ThreadPoolExecutor moveToDoneExecutor
HistoryFileManager
public HistoryFileManager()
serviceInit
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
- Overrides:
serviceInit in class org.apache.hadoop.service.AbstractService
- Throws:
Exception
serviceStop
public void serviceStop()
throws Exception
- Overrides:
serviceStop in class org.apache.hadoop.service.AbstractService
- Throws:
Exception
createJobListCache
protected org.apache.hadoop.mapreduce.v2.hs.HistoryFileManager.JobListCache createJobListCache()
scanDirectoryForHistoryFiles
protected List<org.apache.hadoop.fs.FileStatus> scanDirectoryForHistoryFiles(org.apache.hadoop.fs.Path path,
org.apache.hadoop.fs.FileContext fc)
throws IOException
- Throws:
IOException
findTimestampedDirectories
protected List<org.apache.hadoop.fs.FileStatus> findTimestampedDirectories()
throws IOException
- Finds all history directories with a timestamp component by scanning the
filesystem. Used when the JobHistory server is started.
- Returns:
- list of history directories
- Throws:
IOException
getAllFileInfo
public Collection<HistoryFileManager.HistoryFileInfo> getAllFileInfo()
throws IOException
- Throws:
IOException
getFileInfo
public HistoryFileManager.HistoryFileInfo getFileInfo(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId)
throws IOException
- Throws:
IOException
deleteDir
protected boolean deleteDir(org.apache.hadoop.fs.FileStatus serialDir)
throws org.apache.hadoop.security.AccessControlException,
FileNotFoundException,
org.apache.hadoop.fs.UnsupportedFileSystemException,
IOException
- Throws:
org.apache.hadoop.security.AccessControlException
FileNotFoundException
org.apache.hadoop.fs.UnsupportedFileSystemException
IOException
setMaxHistoryAge
protected void setMaxHistoryAge(long newValue)
Copyright © 2014 Apache Software Foundation. All Rights Reserved.