static class LogLevel.CLI extends org.apache.hadoop.conf.Configured implements org.apache.hadoop.util.Tool
| Modifier and Type | Field and Description | 
|---|---|
| private String | className | 
| private String | hostName | 
| private String | level | 
| private LogLevel.Operations | operation | 
| private String | protocol | 
| Constructor and Description | 
|---|
| CLI(org.apache.hadoop.conf.Configuration conf) | 
| Modifier and Type | Method and Description | 
|---|---|
| private HttpURLConnection | connect(URL url)Connect to the URL. | 
| private void | doGetLevel()Send HTTP request to get log level. | 
| private void | doSetLevel()Send HTTP request to set log level. | 
| void | parseArguments(String[] args) | 
| private int | parseGetLevelArgs(String[] args,
                 int index) | 
| private int | parseProtocolArgs(String[] args,
                 int index) | 
| private int | parseSetLevelArgs(String[] args,
                 int index) | 
| private void | process(String urlString)Configures the client to send HTTP request to the URL. | 
| int | run(String[] args) | 
| private void | sendLogLevelRequest()Send HTTP request to the daemon. | 
private LogLevel.Operations operation
CLI(org.apache.hadoop.conf.Configuration conf)
public int run(String[] args) throws Exception
run in interface org.apache.hadoop.util.ToolExceptionprivate void sendLogLevelRequest() throws org.apache.hadoop.HadoopIllegalArgumentException, Exception
org.apache.hadoop.HadoopIllegalArgumentException - if arguments are invalid.Exception - if unable to connectpublic void parseArguments(String[] args) throws org.apache.hadoop.HadoopIllegalArgumentException
org.apache.hadoop.HadoopIllegalArgumentExceptionprivate int parseGetLevelArgs(String[] args, int index) throws org.apache.hadoop.HadoopIllegalArgumentException
org.apache.hadoop.HadoopIllegalArgumentExceptionprivate int parseSetLevelArgs(String[] args, int index) throws org.apache.hadoop.HadoopIllegalArgumentException
org.apache.hadoop.HadoopIllegalArgumentExceptionprivate int parseProtocolArgs(String[] args, int index) throws org.apache.hadoop.HadoopIllegalArgumentException
org.apache.hadoop.HadoopIllegalArgumentExceptionprivate void doGetLevel() throws Exception
org.apache.hadoop.HadoopIllegalArgumentException - if arguments are invalid.Exception - if unable to connectprivate void doSetLevel() throws Exception
org.apache.hadoop.HadoopIllegalArgumentException - if arguments are invalid.Exception - if unable to connectprivate HttpURLConnection connect(URL url) throws Exception
url - the URL address of the daemon servletException - if it can not establish a connection.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.