|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lens.server.ui.QueryServiceUIResource
@Path(value="/queryuiapi") public class QueryServiceUIResource
The Class QueryServiceUIResource.
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
LOG
The Constant LOG. |
Constructor Summary | |
---|---|
QueryServiceUIResource()
Instantiates a new query service ui resource. |
Method Summary | |
---|---|
APIResult |
cancelQuery(UUID publicId,
String queryHandle)
Cancel the query specified by the handle. |
List<QueryHandle> |
getAllQueries(UUID publicId,
String state,
String user,
String queryName,
long fromDate,
long toDate)
Get all the queries in the query server; can be filtered with state and user. |
javax.ws.rs.core.Response |
getHttpResultSet(UUID publicId,
String queryHandle)
Get the http endpoint for result set. |
ResultRow |
getResultSet(UUID publicId,
String queryHandle,
int pageNumber,
int fetchSize)
Fetch the result set. |
LensQuery |
getStatus(UUID publicId,
String queryHandle)
Get lens query and its current status. |
QuerySubmitResult |
query(UUID publicId,
String query,
String queryName)
Submit the query for explain or execute or execute with a timeout. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log LOG
Constructor Detail |
---|
public QueryServiceUIResource()
Method Detail |
---|
@GET @Path(value="queries") @Produces(value={"application/json","application/xml","text/plain"}) public List<QueryHandle> getAllQueries(@QueryParam(value="publicId") UUID publicId, @DefaultValue(value="")@QueryParam(value="state") String state, @DefaultValue(value="")@QueryParam(value="user") String user, @DefaultValue(value="")@QueryParam(value="queryName") String queryName, @DefaultValue(value="-1")@QueryParam(value="fromDate") long fromDate, @DefaultValue(value="-1")@QueryParam(value="toDate") long toDate)
publicId
- The public id of the session in which user is workingstate
- If any state is passed, all the queries in that state will be returned, otherwise all queries will be
returned. Possible states are user
- return queries matching the user. If set to "all", return queries of all users. By default, returns
queries of the current user.queryName
- human readable query name set by user (optional)fromDate
- the from datetoDate
- the to date
QueryHandle
objects@POST @Path(value="queries") @Consumes(value="multipart/form-data") @Produces(value={"application/json","application/xml","text/plain"}) public QuerySubmitResult query(UUID publicId, String query, @DefaultValue(value="") String queryName)
publicId
- The public id of the session in which user is submitting the query. Any configuration set in the session
will be picked up.query
- The query to runqueryName
- human readable query name set by user (optional)
QueryHandle
@GET @Path(value="queries/{queryHandle}") @Produces(value={"application/json","application/xml","text/plain"}) public LensQuery getStatus(@QueryParam(value="publicId") UUID publicId, @PathParam(value="queryHandle") String queryHandle)
publicId
- The public id of session handlequeryHandle
- The query handle
LensQuery
@GET @Path(value="queries/{queryHandle}/resultset") @Produces(value={"application/json","application/xml","text/plain"}) public ResultRow getResultSet(@QueryParam(value="publicId") UUID publicId, @PathParam(value="queryHandle") String queryHandle, @QueryParam(value="pageNumber") int pageNumber, @QueryParam(value="fetchsize") int fetchSize)
publicId
- The public id of user's session handlequeryHandle
- The query handlepageNumber
- page number of the query result set to be readfetchSize
- fetch size
ResultRow
@DELETE @Path(value="queries/{queryHandle}") @Produces(value={"application/json","application/xml","text/plain"}) public APIResult cancelQuery(@QueryParam(value="sessionid") UUID publicId, @PathParam(value="queryHandle") String queryHandle)
publicId
- The user session handlequeryHandle
- The query handle
@GET @Path(value="queries/{queryHandle}/httpresultset") @Produces(value="application/octet-stream") public javax.ws.rs.core.Response getHttpResultSet(@QueryParam(value="sessionid") UUID publicId, @PathParam(value="queryHandle") String queryHandle)
publicId
- the public idqueryHandle
- The query handle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |