@InterfaceAudience.Private public class LogAggregationUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
TMP_FILE_SUFFIX |
Constructor and Description |
---|
LogAggregationUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getBucketSuffix()
Returns the bucket suffix component of the log dir.
|
static org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.FileStatus> |
getNodeFiles(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path remoteAppLogDir,
org.apache.hadoop.yarn.api.records.ApplicationId appId,
String appOwner)
Get all available log files under remote app log directory.
|
static String |
getNodeString(org.apache.hadoop.yarn.api.records.NodeId nodeId)
Converts a nodeId to a form used in the app log file name.
|
static String |
getNodeString(String nodeId) |
static org.apache.hadoop.fs.Path |
getOlderRemoteAppLogDir(org.apache.hadoop.yarn.api.records.ApplicationId appId,
String user,
org.apache.hadoop.fs.Path remoteRootLogDir,
String suffix)
Gets the older remote app log dir.
|
static org.apache.hadoop.fs.Path |
getOlderRemoteAppLogDir(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.yarn.api.records.ApplicationId appId,
String user,
org.apache.hadoop.fs.Path remoteRootLogDir,
String suffix) |
static org.apache.hadoop.fs.Path |
getOlderRemoteLogSuffixedDir(org.apache.hadoop.fs.Path remoteRootLogDir,
String user,
String suffix)
Gets the older remote suffixed log dir for the user.
|
static org.apache.hadoop.fs.Path |
getRemoteAppLogDir(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.yarn.api.records.ApplicationId appId,
String appOwner,
org.apache.hadoop.fs.Path remoteRootLogDir,
String suffix)
Return the remote application log directory.
|
static org.apache.hadoop.fs.Path |
getRemoteAppLogDir(org.apache.hadoop.fs.Path remoteRootLogDir,
org.apache.hadoop.yarn.api.records.ApplicationId appId,
String user,
String suffix)
Gets the remote app log dir.
|
static org.apache.hadoop.fs.Path |
getRemoteBucketDir(org.apache.hadoop.fs.Path remoteRootLogDir,
String user,
String suffix,
org.apache.hadoop.yarn.api.records.ApplicationId appId)
Gets the remote log user's bucket dir.
|
static org.apache.hadoop.fs.Path |
getRemoteLogSuffixedDir(org.apache.hadoop.fs.Path remoteRootLogDir,
String user,
String suffix)
Gets the remote suffixed log dir for the user.
|
static org.apache.hadoop.fs.Path |
getRemoteLogUserDir(org.apache.hadoop.fs.Path remoteRootLogDir,
String user)
Gets the remote log user dir.
|
static org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.FileStatus> |
getRemoteNodeFileDir(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.yarn.api.records.ApplicationId appId,
String appOwner,
org.apache.hadoop.fs.Path remoteRootLogDir,
String suffix)
Get all available log files under remote app log directory.
|
static List<org.apache.hadoop.fs.FileStatus> |
getRemoteNodeFileList(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.yarn.api.records.ApplicationId appId,
String appOwner,
org.apache.hadoop.fs.Path remoteRootLogDir,
String suffix)
Get all available log files under remote app log directory.
|
static org.apache.hadoop.fs.Path |
getRemoteNodeLogFileForApp(org.apache.hadoop.fs.Path remoteRootLogDir,
org.apache.hadoop.yarn.api.records.ApplicationId appId,
String user,
org.apache.hadoop.yarn.api.records.NodeId nodeId,
String suffix)
Constructs the full filename for an application's log file per node.
|
static boolean |
isOlderPathEnabled(org.apache.hadoop.conf.Configuration conf)
Check if older Application Log Directory has to be included.
|
public static final String TMP_FILE_SUFFIX
public static org.apache.hadoop.fs.Path getRemoteNodeLogFileForApp(org.apache.hadoop.fs.Path remoteRootLogDir, org.apache.hadoop.yarn.api.records.ApplicationId appId, String user, org.apache.hadoop.yarn.api.records.NodeId nodeId, String suffix)
remoteRootLogDir
- the aggregated remote root log dirappId
- the application Iduser
- the application ownernodeId
- the node idsuffix
- the log dir suffixpublic static org.apache.hadoop.fs.Path getRemoteAppLogDir(org.apache.hadoop.fs.Path remoteRootLogDir, org.apache.hadoop.yarn.api.records.ApplicationId appId, String user, String suffix)
remoteRootLogDir
- the aggregated log remote root log dirappId
- the application iduser
- the application ownersuffix
- the log directory suffixpublic static org.apache.hadoop.fs.Path getOlderRemoteAppLogDir(org.apache.hadoop.yarn.api.records.ApplicationId appId, String user, org.apache.hadoop.fs.Path remoteRootLogDir, String suffix)
appId
- the application iduser
- the application ownerremoteRootLogDir
- the aggregated log remote root log dirsuffix
- the log directory suffixpublic static org.apache.hadoop.fs.Path getOlderRemoteAppLogDir(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.api.records.ApplicationId appId, String user, org.apache.hadoop.fs.Path remoteRootLogDir, String suffix) throws IOException
IOException
public static org.apache.hadoop.fs.Path getRemoteLogSuffixedDir(org.apache.hadoop.fs.Path remoteRootLogDir, String user, String suffix)
remoteRootLogDir
- the aggregated log remote root log diruser
- the application ownersuffix
- the log dir suffixpublic static org.apache.hadoop.fs.Path getOlderRemoteLogSuffixedDir(org.apache.hadoop.fs.Path remoteRootLogDir, String user, String suffix)
remoteRootLogDir
- the aggregated log remote root log diruser
- the application ownersuffix
- the log dir suffixpublic static org.apache.hadoop.fs.Path getRemoteLogUserDir(org.apache.hadoop.fs.Path remoteRootLogDir, String user)
remoteRootLogDir
- the aggregated log remote root log diruser
- the application ownerpublic static org.apache.hadoop.fs.Path getRemoteBucketDir(org.apache.hadoop.fs.Path remoteRootLogDir, String user, String suffix, org.apache.hadoop.yarn.api.records.ApplicationId appId)
remoteRootLogDir
- the aggregated log remote root log diruser
- the application ownersuffix
- the log dir suffixappId
- the application idpublic static boolean isOlderPathEnabled(org.apache.hadoop.conf.Configuration conf)
conf
- the configurationpublic static String getBucketSuffix()
public static String getNodeString(org.apache.hadoop.yarn.api.records.NodeId nodeId)
nodeId
- the nodeIdpublic static org.apache.hadoop.fs.Path getRemoteAppLogDir(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.api.records.ApplicationId appId, String appOwner, org.apache.hadoop.fs.Path remoteRootLogDir, String suffix) throws IOException
conf
- the configurationappId
- the applicationappOwner
- the application ownerremoteRootLogDir
- the remote root log directorysuffix
- the log directory suffixIOException
- if we can not find remote application log directorypublic static org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.FileStatus> getNodeFiles(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path remoteAppLogDir, org.apache.hadoop.yarn.api.records.ApplicationId appId, String appOwner) throws IOException
conf
- the configurationremoteAppLogDir
- the application log directoryappId
- the applicationIdappOwner
- the application ownerIOException
- if there is no log file directorypublic static org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.FileStatus> getRemoteNodeFileDir(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.api.records.ApplicationId appId, String appOwner, org.apache.hadoop.fs.Path remoteRootLogDir, String suffix) throws IOException
conf
- the configurationappId
- the applicationIdappOwner
- the application ownerremoteRootLogDir
- the remote root log directorysuffix
- the log directory suffixIOException
- if there is no log file availablepublic static List<org.apache.hadoop.fs.FileStatus> getRemoteNodeFileList(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.api.records.ApplicationId appId, String appOwner, org.apache.hadoop.fs.Path remoteRootLogDir, String suffix) throws IOException
conf
- the configurationappId
- the applicationIdappOwner
- the application ownerremoteRootLogDir
- the remote root log directorysuffix
- the log directory suffixIOException
- if there is no log file availableCopyright © 2008–2022 Apache Software Foundation. All rights reserved.