|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectServer
public class Server
The Templeton Web API server.
Field Summary | |
---|---|
static Pattern |
DDL_ID
|
protected static ExecService |
execService
|
static Map<String,String> |
STATUS_OK
The status message. |
static Map<String,Object> |
SUPPORTED_FORMATS
The list of supported return formats. |
static Map<String,Object> |
SUPPORTED_VERSIONS
The list of supported api versions. |
static String |
VERSION
|
Constructor Summary | |
---|---|
Server()
|
Method Summary | |
---|---|
Response |
addOneColumn(String db,
String table,
String column,
ColumnDesc desc)
Create a column in an hcat table. |
Response |
addOnePartition(String db,
String table,
String partition,
PartitionDesc desc)
Create a partition in an hcat table. |
Response |
addOneTableProperty(String db,
String table,
String property,
TablePropertyDesc desc)
Add a single property on an hcat table. |
CompleteBean |
completeJob(String jobid)
Notify on a completed job. |
Response |
createDatabase(String db,
DatabaseDesc desc)
Create a database |
Response |
createTable(String db,
String table,
TableDesc desc)
Create a new table. |
Response |
createTableLike(String db,
String existingTable,
String newTable,
TableLikeDesc desc)
Create a new table like another table. |
ExecBean |
ddl(String exec,
String group,
String permissions)
Execute an hcat ddl expression on the local box. |
QueueStatusBean |
deleteQueueId(String jobid)
Kill a job in the queue. |
Response |
descColumn(String db,
String table,
String column)
Describe a single column in an hcat table. |
Response |
descDatabase(String db,
String format)
Describe a database |
Response |
descOneTableProperty(String db,
String table,
String property)
Describe a single property on an hcat table. |
Response |
descPartition(String db,
String table,
String partition)
Describe a single partition in an hcat table. |
Response |
descTable(String db,
String table,
String format)
Describe an hcat table. |
Response |
dropDatabase(String db,
boolean ifExists,
String option,
String group,
String permissions)
Drop a database |
Response |
dropPartition(String db,
String table,
String partition,
boolean ifExists,
String group,
String permissions)
Drop a partition in an hcat table. |
Response |
dropTable(String db,
String table,
boolean ifExists,
String group,
String permissions)
Drop an hcat table. |
String |
getCompletedUrl()
The callback url on this server when a task is completed. |
String |
getUser()
Get the user name from the security context. |
EnqueueBean |
hive(String execute,
String srcFile,
List<String> defines,
String statusdir,
String callback)
Run a Hive job. |
Response |
listColumns(String db,
String table)
List the columns in an hcat table. |
Response |
listDatabases(String dbPattern)
List all databases, or those that match a pattern. |
Response |
listPartitions(String db,
String table)
List all the partitions in an hcat table. |
Response |
listTableProperties(String db,
String table)
List all the properties on an hcat table. |
Response |
listTables(String db,
String tablePattern)
List all the tables in an hcat database. |
EnqueueBean |
mapReduceJar(String jar,
String mainClass,
String libjars,
String files,
List<String> args,
List<String> defines,
String statusdir,
String callback)
Run a MapReduce Jar job. |
EnqueueBean |
mapReduceStreaming(List<String> inputs,
String output,
String mapper,
String reducer,
List<String> files,
List<String> defines,
List<String> cmdenvs,
List<String> args,
String statusdir,
String callback)
Run a MapReduce Streaming job. |
EnqueueBean |
pig(String execute,
String srcFile,
List<String> pigArgs,
String otherFiles,
String statusdir,
String callback)
Run a Pig job. |
Response |
renameTable(String db,
String oldTable,
String newTable,
String group,
String permissions)
Rename an hcat table. |
Map<String,Object> |
requestFormats()
Check the supported request formats of this server. |
QueueStatusBean |
showQueueId(String jobid)
Return the status of the jobid. |
List<String> |
showQueueList()
Return all the known job ids for this user. |
Map<String,String> |
status()
Check the status of this server. |
void |
verifyDdlParam(String param,
String name)
Verify that the parameter exists and is a simple DDL identifier name. |
void |
verifyParam(List<String> param,
String name)
Verify that the parameter exists. |
void |
verifyParam(String param,
String name)
Verify that the parameter exists. |
void |
verifyUser()
Verify that we have a valid user. |
Map<String,Object> |
version()
Check the version(s) supported by this server. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String VERSION
public static final Map<String,String> STATUS_OK
public static final Map<String,Object> SUPPORTED_VERSIONS
public static final Map<String,Object> SUPPORTED_FORMATS
protected static ExecService execService
public static final Pattern DDL_ID
Constructor Detail |
---|
public Server()
Method Detail |
---|
public Map<String,String> status()
public Map<String,Object> requestFormats()
public Map<String,Object> version()
public ExecBean ddl(String exec, String group, String permissions) throws NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response listTables(String db, String tablePattern) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response createTable(String db, String table, TableDesc desc) throws SimpleWebException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
SimpleWebException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response createTableLike(String db, String existingTable, String newTable, TableLikeDesc desc) throws SimpleWebException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
SimpleWebException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response descTable(String db, String table, String format) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response dropTable(String db, String table, boolean ifExists, String group, String permissions) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response renameTable(String db, String oldTable, String newTable, String group, String permissions) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response descOneTableProperty(String db, String table, String property) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response listTableProperties(String db, String table) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response addOneTableProperty(String db, String table, String property, TablePropertyDesc desc) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response listPartitions(String db, String table) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response descPartition(String db, String table, String partition) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response addOnePartition(String db, String table, String partition, PartitionDesc desc) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response dropPartition(String db, String table, String partition, boolean ifExists, String group, String permissions) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response listDatabases(String dbPattern) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response descDatabase(String db, String format) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response createDatabase(String db, DatabaseDesc desc) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response dropDatabase(String db, boolean ifExists, String option, String group, String permissions) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response listColumns(String db, String table) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response descColumn(String db, String table, String column) throws SimpleWebException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
SimpleWebException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public Response addOneColumn(String db, String table, String column, ColumnDesc desc) throws HcatException, NotAuthorizedException, BusyException, BadParam, ExecuteException, IOException
HcatException
NotAuthorizedException
BusyException
BadParam
ExecuteException
IOException
public EnqueueBean mapReduceStreaming(List<String> inputs, String output, String mapper, String reducer, List<String> files, List<String> defines, List<String> cmdenvs, List<String> args, String statusdir, String callback) throws NotAuthorizedException, BusyException, BadParam, QueueException, ExecuteException, IOException, InterruptedException
NotAuthorizedException
BusyException
BadParam
QueueException
ExecuteException
IOException
InterruptedException
public EnqueueBean mapReduceJar(String jar, String mainClass, String libjars, String files, List<String> args, List<String> defines, String statusdir, String callback) throws NotAuthorizedException, BusyException, BadParam, QueueException, ExecuteException, IOException, InterruptedException
NotAuthorizedException
BusyException
BadParam
QueueException
ExecuteException
IOException
InterruptedException
public EnqueueBean pig(String execute, String srcFile, List<String> pigArgs, String otherFiles, String statusdir, String callback) throws NotAuthorizedException, BusyException, BadParam, QueueException, ExecuteException, IOException, InterruptedException
NotAuthorizedException
BusyException
BadParam
QueueException
ExecuteException
IOException
InterruptedException
public EnqueueBean hive(String execute, String srcFile, List<String> defines, String statusdir, String callback) throws NotAuthorizedException, BusyException, BadParam, QueueException, ExecuteException, IOException, InterruptedException
NotAuthorizedException
BusyException
BadParam
QueueException
ExecuteException
IOException
InterruptedException
public QueueStatusBean showQueueId(String jobid) throws NotAuthorizedException, BadParam, IOException, InterruptedException
NotAuthorizedException
BadParam
IOException
InterruptedException
public QueueStatusBean deleteQueueId(String jobid) throws NotAuthorizedException, BadParam, IOException, InterruptedException
NotAuthorizedException
BadParam
IOException
InterruptedException
public List<String> showQueueList() throws NotAuthorizedException, BadParam, IOException, InterruptedException
NotAuthorizedException
BadParam
IOException
InterruptedException
public CompleteBean completeJob(String jobid) throws CallbackFailedException, IOException
CallbackFailedException
IOException
public void verifyUser() throws NotAuthorizedException
NotAuthorizedException
public void verifyParam(String param, String name) throws BadParam
BadParam
public void verifyParam(List<String> param, String name) throws BadParam
BadParam
public void verifyDdlParam(String param, String name) throws BadParam
BadParam
public String getUser()
public String getCompletedUrl()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |