public abstract class SparkJobRestClient extends Object
| Modifier and Type | Field and Description |
|---|---|
SimpleDateFormat |
CUSTOM_DATE |
static String |
SPARK_UI_PORT |
static String |
VERSION |
| Constructor and Description |
|---|
SparkJobRestClient(String uri) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkContextExist(String contextName) |
void |
createApp(String appName,
String resourcePath) |
Integer |
createContext(String contextName,
HashSet<String> parameters,
int postCreationWaitTime) |
void |
deleteContext(String contextName) |
org.apache.hadoop.conf.Configuration |
getHadoopConf(String hdfsHost,
String hdfsUser) |
String |
getJobStatus(String jobId,
String contextName) |
String |
getServerURI() |
protected abstract String |
getXPatternsSjsBridgeClassPath() |
String |
launchJob(String input,
String contextName,
Boolean sync) |
void |
uploadFileToHDFS(String path,
byte[] bytes,
String hdfsHost,
String hdfsUser) |
abstract void |
writeError(String error) |
abstract void |
writeInfo(String info) |
public static final String VERSION
public static final String SPARK_UI_PORT
public final SimpleDateFormat CUSTOM_DATE
public SparkJobRestClient(String uri)
public String getServerURI()
public abstract void writeInfo(String info)
public abstract void writeError(String error)
protected abstract String getXPatternsSjsBridgeClassPath()
public String launchJob(String input, String contextName, Boolean sync) throws Exception
Exceptionpublic boolean checkContextExist(String contextName) throws Exception
Exceptionpublic void createApp(String appName, String resourcePath) throws Exception
Exceptionpublic String getJobStatus(String jobId, String contextName) throws Exception
Exceptionpublic Integer createContext(String contextName, HashSet<String> parameters, int postCreationWaitTime) throws Exception
Exceptionpublic void uploadFileToHDFS(String path, byte[] bytes, String hdfsHost, String hdfsUser) throws IOException
IOExceptionCopyright © 2015. All rights reserved.