public class SavedQueryServiceImpl extends BaseLensService implements SavedQueryService
BaseLensService.SessionContext
Constructor and Description |
---|
SavedQueryServiceImpl(org.apache.hive.service.cli.CLIService cliService)
Instantiates a new lens service.
|
Modifier and Type | Method and Description |
---|---|
void |
delete(LensSessionHandle handle,
long id)
Deletes the saved query specified.
|
SavedQuery |
get(LensSessionHandle handle,
long id)
Returns the saved query pointed out by the id.
|
HealthStatus |
getHealthStatus()
Returns the health status of the service.
|
void |
grant(LensSessionHandle handle,
long id,
String sharingUser,
String targetUserPath,
String[] privileges)
Grant permissions for users to do actions on the saved query.
|
void |
init(org.apache.hadoop.hive.conf.HiveConf hiveConf) |
ListResponse |
list(LensSessionHandle handle,
javax.ws.rs.core.MultivaluedMap<String,String> criteria,
long start,
long count)
List the saved query from {start} to {count} matching filter denoted by criteria.
|
void |
revoke(LensSessionHandle handle,
long id,
String sharingUser,
String targetUserPath,
String[] privileges)
Revoke permissions from users to do actions on the saved query.
|
long |
save(LensSessionHandle handle,
SavedQuery savedQuery)
Saves a query
|
void |
update(LensSessionHandle handle,
long id,
SavedQuery savedQuery)
Updates the specified saved query with the new object.
|
acquire, acquire, closeSession, getCliService, getHiveSessionHandle, getLensConf, getLensConf, getNumberOfSessions, getServerDomain, getSession, getSessionManager, getValidPath, openSession, openSession, prepareStopping, readExternal, release, release, removePrefixBeforeURI, restoreSession, validateSession, writeExternal
public static final String NAME
public SavedQueryServiceImpl(org.apache.hive.service.cli.CLIService cliService) throws LensException
cliService
- the cli serviceLensException
public void init(org.apache.hadoop.hive.conf.HiveConf hiveConf)
init
in interface org.apache.hive.service.Service
init
in class org.apache.hive.service.CompositeService
public HealthStatus getHealthStatus()
getHealthStatus
in interface HealthCheckable
public long save(LensSessionHandle handle, SavedQuery savedQuery) throws LensException
save
in interface SavedQueryService
savedQuery
- Saved query object.LensException
public void update(LensSessionHandle handle, long id, SavedQuery savedQuery) throws LensException
update
in interface SavedQueryService
handle
- session handle of the queryid
- id of the saved query.savedQuery
- Saved query object.LensException
public void delete(LensSessionHandle handle, long id) throws LensException
delete
in interface SavedQueryService
handle
- session handle of the queryid
- id of the saved query.LensException
public SavedQuery get(LensSessionHandle handle, long id) throws LensException
get
in interface SavedQueryService
handle
- session handle of the queryid
- id of the saved query.LensException
public ListResponse list(LensSessionHandle handle, javax.ws.rs.core.MultivaluedMap<String,String> criteria, long start, long count) throws LensException
list
in interface SavedQueryService
handle
- session handle of the querycriteria
- Multivalued map representing the criteria.start
- Displacement from the first matching record.count
- Number of records to fetch.LensException
public void grant(LensSessionHandle handle, long id, String sharingUser, String targetUserPath, String[] privileges) throws LensException
grant
in interface SavedQueryService
handle
- session handle of the queryid
- id of the query.sharingUser
- User invoking this action.targetUserPath
- Target users who have to get affected.privileges
- Privileges to be granted.LensException
public void revoke(LensSessionHandle handle, long id, String sharingUser, String targetUserPath, String[] privileges) throws LensException
revoke
in interface SavedQueryService
handle
- session handle of the queryid
- id of the query.sharingUser
- User invoking this action.targetUserPath
- Target users who have to get affected.privileges
- Privileges to be granted.LensException
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.