@InterfaceAudience.Public
@InterfaceStability.Evolving
public class LogsCLI
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
Constructor and Description |
---|
LogsCLI() |
Modifier and Type | Method and Description |
---|---|
protected YarnClient |
createYarnClient() |
protected List<org.codehaus.jettison.json.JSONObject> |
getAMContainerInfoForRMWebService(org.apache.hadoop.conf.Configuration conf,
String appId) |
org.apache.hadoop.yarn.api.records.ContainerReport |
getContainerReport(String containerIdStr) |
Set<String> |
getMatchedContainerLogFiles(org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request,
boolean useRegex,
boolean ignoreSizeLimit) |
Map<String,org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest> |
getMatchedLogTypesForRunningApp(List<org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest> containerLogRequests,
boolean useRegex,
boolean ignoreSizeLimit) |
org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest |
getMatchedOptionForRunningApp(org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest container,
boolean useRegex,
boolean ignoreSizeLimit) |
String |
getNodeHttpAddressFromRMWebString(org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request) |
com.sun.jersey.api.client.ClientResponse |
getResponeFromNMWebService(org.apache.hadoop.conf.Configuration conf,
com.sun.jersey.api.client.Client webServiceClient,
org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request,
String logFile) |
static void |
main(String[] args) |
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) |
int |
run(String[] args) |
public static final String HELP_CMD
public int run(String[] args) throws Exception
run
in interface org.apache.hadoop.util.Tool
Exception
protected YarnClient createYarnClient()
protected List<org.codehaus.jettison.json.JSONObject> getAMContainerInfoForRMWebService(org.apache.hadoop.conf.Configuration conf, String appId) throws com.sun.jersey.api.client.ClientHandlerException, com.sun.jersey.api.client.UniformInterfaceException, org.codehaus.jettison.json.JSONException
com.sun.jersey.api.client.ClientHandlerException
com.sun.jersey.api.client.UniformInterfaceException
org.codehaus.jettison.json.JSONException
@InterfaceAudience.Private 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
IOException
@InterfaceAudience.Private public org.apache.hadoop.yarn.api.records.ContainerReport getContainerReport(String containerIdStr) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
org.apache.hadoop.yarn.exceptions.YarnException
IOException
public Set<String> getMatchedContainerLogFiles(org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request, boolean useRegex, boolean ignoreSizeLimit) throws IOException
IOException
public com.sun.jersey.api.client.ClientResponse getResponeFromNMWebService(org.apache.hadoop.conf.Configuration conf, com.sun.jersey.api.client.Client webServiceClient, org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request, String logFile)
public String getNodeHttpAddressFromRMWebString(org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest request) throws com.sun.jersey.api.client.ClientHandlerException, com.sun.jersey.api.client.UniformInterfaceException, org.codehaus.jettison.json.JSONException
com.sun.jersey.api.client.ClientHandlerException
com.sun.jersey.api.client.UniformInterfaceException
org.codehaus.jettison.json.JSONException
@InterfaceAudience.Private public org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest getMatchedOptionForRunningApp(org.apache.hadoop.yarn.logaggregation.ContainerLogsRequest container, boolean useRegex, boolean ignoreSizeLimit) throws IOException
IOException
Copyright © 2008–2018 Apache Software Foundation. All rights reserved.