public class QueryServiceUIResource extends Object
Constructor and Description |
---|
QueryServiceUIResource()
Instantiates a new query service ui resource.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public QueryServiceUIResource()
public List<QueryHandle> getAllQueries(UUID publicId, String state, String user, String queryName, long fromDate, 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 QueryStatus.Status.values()
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 dateQueryHandle
objectspublic QuerySubmitResult query(UUID publicId, String query, 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
public LensQuery getStatus(UUID publicId, String queryHandle)
publicId
- The public id of session handlequeryHandle
- The query handleLensQuery
public ResultRow getResultSet(UUID publicId, String queryHandle, int pageNumber, 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 sizeResultRow
public APIResult cancelQuery(UUID publicId, String queryHandle)
publicId
- The user session handlequeryHandle
- The query handleAPIResult.Status.SUCCEEDED
in case of successful
cancellation. APIResult with state APIResult.Status.FAILED
in case of cancellation
failure.Copyright © 2014–2015 Apache Software Foundation. All rights reserved.