Class LogsCLI
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.yarn.client.cli.LogsCLI
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable,org.apache.hadoop.util.Tool
@Public
@Evolving
public class LogsCLI
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected YarnClientprotected List<org.codehaus.jettison.json.JSONObject>getAMContainerInfoForRMWebService(org.apache.hadoop.conf.Configuration conf, String appId) protected javax.ws.rs.core.ResponsegetClientResponseFromTimelineReader(org.apache.hadoop.conf.Configuration conf, String appId) org.apache.hadoop.yarn.api.records.ContainerReportgetContainerReport(String containerIdStr) getMatchedContainerLogFiles(org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request, boolean useRegex, boolean ignoreSizeLimit) getMatchedLogTypesForRunningApp(List<org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest> containerLogRequests, boolean useRegex, boolean ignoreSizeLimit) org.apache.hadoop.yarn.logaggregation.ContainerLogsRequestgetMatchedOptionForRunningApp(org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest container, boolean useRegex, boolean ignoreSizeLimit) getNodeHttpAddressFromRMWebString(org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request) javax.ws.rs.core.ResponsegetResponseFromNMWebService(org.apache.hadoop.conf.Configuration conf, javax.ws.rs.client.Client webServiceClient, org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request, String logFile) static voidintprintContainerLogsFromRunningApplication(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request, org.apache.hadoop.yarn.logaggregation.LogCLIHelpers logCliHelper, boolean useRegex, boolean ignoreSizeLimit) intMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
HELP_CMD
- See Also:
-
-
Constructor Details
-
LogsCLI
public LogsCLI()
-
-
Method Details
-
run
- Specified by:
runin interfaceorg.apache.hadoop.util.Tool- Throws:
Exception
-
createYarnClient
-
main
- Throws:
Exception
-
getAMContainerInfoForRMWebService
protected List<org.codehaus.jettison.json.JSONObject> getAMContainerInfoForRMWebService(org.apache.hadoop.conf.Configuration conf, String appId) throws Exception - Throws:
Exception
-
printContainerLogsFromRunningApplication
@Private @VisibleForTesting public int printContainerLogsFromRunningApplication(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request, org.apache.hadoop.yarn.logaggregation.LogCLIHelpers logCliHelper, boolean useRegex, boolean ignoreSizeLimit) throws IOException - Throws:
IOException
-
getContainerReport
@Private @VisibleForTesting public org.apache.hadoop.yarn.api.records.ContainerReport getContainerReport(String containerIdStr) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException - Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException
-
getClientResponseFromTimelineReader
protected javax.ws.rs.core.Response getClientResponseFromTimelineReader(org.apache.hadoop.conf.Configuration conf, String appId) throws IOException - Throws:
IOException
-
getMatchedContainerLogFiles
@VisibleForTesting public Set<String> getMatchedContainerLogFiles(org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request, boolean useRegex, boolean ignoreSizeLimit) throws IOException - Throws:
IOException
-
getResponseFromNMWebService
@VisibleForTesting public javax.ws.rs.core.Response getResponseFromNMWebService(org.apache.hadoop.conf.Configuration conf, javax.ws.rs.client.Client webServiceClient, org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request, String logFile) -
getNodeHttpAddressFromRMWebString
@VisibleForTesting public String getNodeHttpAddressFromRMWebString(org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request) throws javax.ws.rs.ProcessingException, IllegalStateException, org.codehaus.jettison.json.JSONException - Throws:
javax.ws.rs.ProcessingExceptionIllegalStateExceptionorg.codehaus.jettison.json.JSONException
-
getMatchedOptionForRunningApp
@Private @VisibleForTesting public org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest getMatchedOptionForRunningApp(org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest container, boolean useRegex, boolean ignoreSizeLimit) throws IOException - Throws:
IOException
-
getMatchedLogTypesForRunningApp
-