java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.service.Servicepublic abstract class VolumeManager
extends org.apache.hadoop.yarn.server.api.ConfigurableAuxiliaryService
| Modifier and Type | Field | Description |
|---|---|---|
protected org.apache.hadoop.fs.FileSystem |
fs |
|
static java.lang.String |
HS_VOLUME_NAME |
|
protected org.slf4j.Logger |
LOG |
|
protected java.lang.String |
mountPath |
|
protected boolean |
newVolumePathSupportEnabled |
|
static java.lang.String |
RM_VOLUME_NAME |
|
static java.lang.String |
VOLUME_MOUNTED |
|
static java.lang.String |
VOLUME_NAME |
|
static java.lang.String |
VOLUME_PATH |
|
protected java.lang.String |
volumeLogfilePath |
|
protected java.lang.String |
volumeMode |
|
protected org.apache.hadoop.fs.Path |
yarnDir |
| Constructor | Description |
|---|---|
VolumeManager(java.lang.String name) |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
copyOwnerAndPermission(org.apache.hadoop.fs.FileStatus srcStatus,
org.apache.hadoop.fs.Path dst) |
|
protected void |
copyPermissionsIfNeeded(org.apache.hadoop.fs.FileStatus srcStatus,
org.apache.hadoop.fs.Path dst) |
|
protected void |
createDir(java.lang.String pathName,
org.apache.hadoop.fs.permission.FsPermission perm) |
|
protected void |
createVolume(java.lang.String volumeNumber) |
|
abstract void |
createVolumes(org.apache.hadoop.conf.Configuration conf) |
|
protected java.util.Map<java.lang.String,java.lang.String> |
getVolumeInfo(java.lang.String volumeName) |
|
protected boolean |
isVolumeMounted(java.lang.String volumeName) |
|
protected void |
lockVolume(java.lang.String volumeName) |
|
protected void |
mountVolume(java.lang.String volumeName,
java.lang.String volumeMountPath) |
|
void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
|
protected void |
unlockVolume(java.lang.String volumeName) |
|
protected void |
unmountVolume(java.lang.String volumeName) |
|
protected void |
verifyYarnDirPermissions(org.apache.hadoop.fs.Path yarnDir) |
|
protected void |
waitForLockRelease(org.apache.hadoop.fs.Path lockFile) |
|
protected void |
waitForYarnPathCreated() |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceStart, serviceStop, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic static final java.lang.String VOLUME_NAME
public static final java.lang.String VOLUME_PATH
public static final java.lang.String VOLUME_MOUNTED
public static final java.lang.String HS_VOLUME_NAME
public static final java.lang.String RM_VOLUME_NAME
protected org.slf4j.Logger LOG
protected java.lang.String volumeLogfilePath
protected java.lang.String volumeMode
protected java.lang.String mountPath
protected org.apache.hadoop.fs.Path yarnDir
protected boolean newVolumePathSupportEnabled
protected org.apache.hadoop.fs.FileSystem fs
public void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws java.lang.Exception
serviceInit in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionpublic abstract void createVolumes(org.apache.hadoop.conf.Configuration conf)
throws java.lang.Exception
java.lang.Exceptionprotected void createVolume(java.lang.String volumeNumber)
throws java.lang.Exception
java.lang.Exceptionprotected void waitForYarnPathCreated()
throws java.lang.Exception
java.lang.Exceptionprotected void createDir(java.lang.String pathName,
org.apache.hadoop.fs.permission.FsPermission perm)
throws java.io.IOException
java.io.IOExceptionprotected void verifyYarnDirPermissions(org.apache.hadoop.fs.Path yarnDir)
throws java.lang.Exception
java.lang.Exceptionprotected void copyPermissionsIfNeeded(org.apache.hadoop.fs.FileStatus srcStatus,
org.apache.hadoop.fs.Path dst)
throws java.lang.Exception
java.lang.Exceptionprotected void copyOwnerAndPermission(org.apache.hadoop.fs.FileStatus srcStatus,
org.apache.hadoop.fs.Path dst)
throws java.lang.Exception
java.lang.Exceptionprotected java.util.Map<java.lang.String,java.lang.String> getVolumeInfo(java.lang.String volumeName)
throws java.io.IOException
java.io.IOExceptionprotected boolean isVolumeMounted(java.lang.String volumeName)
throws java.io.IOException
java.io.IOExceptionprotected void mountVolume(java.lang.String volumeName,
java.lang.String volumeMountPath)
throws java.io.IOException
java.io.IOExceptionprotected void unmountVolume(java.lang.String volumeName)
throws java.io.IOException
java.io.IOExceptionprotected void lockVolume(java.lang.String volumeName)
throws java.lang.Exception
java.lang.Exceptionprotected void unlockVolume(java.lang.String volumeName)
throws java.io.IOException
java.io.IOExceptionprotected void waitForLockRelease(org.apache.hadoop.fs.Path lockFile)
throws java.lang.Exception
java.lang.ExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.