Class LogsCLI
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.yarn.client.cli.LogsCLI
- All Implemented Interfaces:
Configurable,Tool
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected YarnClientprotected List<org.codehaus.jettison.json.JSONObject>getAMContainerInfoForRMWebService(Configuration conf, String appId) protected javax.ws.rs.core.ResponsegetClientResponseFromTimelineReader(Configuration conf, String appId) getContainerReport(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(Configuration conf, javax.ws.rs.client.Client webServiceClient, org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request, String logFile) static voidintprintContainerLogsFromRunningApplication(Configuration conf, org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request, org.apache.hadoop.yarn.logaggregation.LogCLIHelpers logCliHelper, boolean useRegex, boolean ignoreSizeLimit) intExecute the command with the given arguments.Methods 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
Description copied from interface:ToolExecute the command with the given arguments. -
createYarnClient
-
main
- Throws:
Exception
-
getAMContainerInfoForRMWebService
protected List<org.codehaus.jettison.json.JSONObject> getAMContainerInfoForRMWebService(Configuration conf, String appId) throws Exception - Throws:
Exception
-
printContainerLogsFromRunningApplication
@Private @VisibleForTesting public int printContainerLogsFromRunningApplication(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 ContainerReport getContainerReport(String containerIdStr) throws YarnException, IOException - Throws:
YarnExceptionIOException
-
getClientResponseFromTimelineReader
protected javax.ws.rs.core.Response getClientResponseFromTimelineReader(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(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
-