public class GuaguaYarnClient
extends org.apache.hadoop.conf.Configured
GuaguaYarnClient is used to submit master-workers computation app on yarn cluster.
TODO clean app resources in HDFS no matter successful or not
| Constructor and Description |
|---|
GuaguaYarnClient()
Default constructor.
|
GuaguaYarnClient(org.apache.hadoop.conf.Configuration conf)
Constructor with
Configuration setting. |
| Modifier and Type | Method and Description |
|---|---|
static void |
addInputPath(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path) |
String |
getAmQueue() |
org.apache.hadoop.yarn.api.records.ApplicationId |
getAppId() |
String |
getAppName() |
long |
getStartTime() |
boolean |
init(String[] args) |
static void |
main(String[] args) |
int |
run(String[] args)
To submit an app to yarn cluster and monitor the status.
|
void |
setAmQueue(String amQueue) |
void |
setAppId(org.apache.hadoop.yarn.api.records.ApplicationId appId) |
void |
setAppName(String appName) |
void |
setStartTime(long startTime) |
public GuaguaYarnClient()
YarnConfiguration as default conf setting.public GuaguaYarnClient(org.apache.hadoop.conf.Configuration conf)
Configuration setting.public static void addInputPath(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path path)
throws IOException
IOExceptionpublic int run(String[] args) throws Exception
Exceptionpublic boolean init(String[] args)
public org.apache.hadoop.yarn.api.records.ApplicationId getAppId()
public void setAppId(org.apache.hadoop.yarn.api.records.ApplicationId appId)
public String getAppName()
public void setAppName(String appName)
public String getAmQueue()
public void setAmQueue(String amQueue)
public long getStartTime()
public void setStartTime(long startTime)
public static void main(String[] args)
Copyright © 2015. All Rights Reserved.