|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.metastore.DummyRawStoreForJdoConnection
public class DummyRawStoreForJdoConnection
DummyRawStoreForJdoConnection. An implementation of RawStore that verifies the DummyJdoConnectionUrlHook has already been applied when this class's setConf method is called, by checking that the value of the METASTORECONNECTURLKEY ConfVar has been updated. All non-void methods return default values.
Constructor Summary | |
---|---|
DummyRawStoreForJdoConnection()
|
Method Summary | |
---|---|
boolean |
addIndex(Index index)
|
boolean |
addPartition(Partition part)
|
boolean |
addRole(String rowName,
String ownerName)
|
boolean |
alterDatabase(String dbname,
Database db)
|
void |
alterIndex(String dbname,
String baseTblName,
String name,
Index newIndex)
|
void |
alterPartition(String db_name,
String tbl_name,
List<String> part_vals,
Partition new_part)
|
void |
alterTable(String dbname,
String name,
Table newTable)
|
long |
cleanupEvents()
|
boolean |
commitTransaction()
if this is the commit of the first open call then an actual commit is called. |
void |
createDatabase(Database db)
|
void |
createTable(Table tbl)
|
boolean |
createType(Type type)
|
boolean |
dropDatabase(String dbname)
|
boolean |
dropIndex(String dbName,
String origTableName,
String indexName)
|
boolean |
dropPartition(String dbName,
String tableName,
List<String> part_vals)
|
boolean |
dropTable(String dbName,
String tableName)
|
boolean |
dropType(String typeName)
|
List<String> |
getAllDatabases()
|
List<String> |
getAllTables(String dbName)
|
PrincipalPrivilegeSet |
getColumnPrivilegeSet(String dbName,
String tableName,
String partitionName,
String columnName,
String userName,
List<String> groupNames)
|
org.apache.hadoop.conf.Configuration |
getConf()
|
Database |
getDatabase(String name)
|
List<String> |
getDatabases(String pattern)
|
PrincipalPrivilegeSet |
getDBPrivilegeSet(String dbName,
String userName,
List<String> groupNames)
|
Index |
getIndex(String dbName,
String origTableName,
String indexName)
|
List<Index> |
getIndexes(String dbName,
String origTableName,
int max)
|
Partition |
getPartition(String dbName,
String tableName,
List<String> part_vals)
|
PrincipalPrivilegeSet |
getPartitionPrivilegeSet(String dbName,
String tableName,
String partition,
String userName,
List<String> groupNames)
|
List<Partition> |
getPartitions(String dbName,
String tableName,
int max)
|
List<Partition> |
getPartitionsByFilter(String dbName,
String tblName,
String filter,
short maxParts)
|
List<Partition> |
getPartitionsByNames(String dbName,
String tblName,
List<String> partNames)
|
List<Partition> |
getPartitionsWithAuth(String dbName,
String tblName,
short maxParts,
String userName,
List<String> groupNames)
|
Partition |
getPartitionWithAuth(String dbName,
String tblName,
List<String> partVals,
String user_name,
List<String> group_names)
|
Role |
getRole(String roleName)
|
Table |
getTable(String dbName,
String tableName)
|
List<Table> |
getTableObjectsByName(String dbname,
List<String> tableNames)
|
PrincipalPrivilegeSet |
getTablePrivilegeSet(String dbName,
String tableName,
String userName,
List<String> groupNames)
|
List<String> |
getTables(String dbName,
String pattern)
|
Type |
getType(String typeName)
|
PrincipalPrivilegeSet |
getUserPrivilegeSet(String userName,
List<String> groupNames)
|
boolean |
grantPrivileges(PrivilegeBag privileges)
|
boolean |
grantRole(Role role,
String userName,
PrincipalType principalType,
String grantor,
PrincipalType grantorType,
boolean grantOption)
|
boolean |
isPartitionMarkedForEvent(String dbName,
String tblName,
Map<String,String> partName,
PartitionEventType evtType)
|
List<MTablePrivilege> |
listAllTableGrants(String principalName,
PrincipalType principalType,
String dbName,
String tableName)
|
List<String> |
listIndexNames(String dbName,
String origTableName,
short max)
|
List<String> |
listPartitionNames(String db_name,
String tbl_name,
short max_parts)
|
List<String> |
listPartitionNamesByFilter(String db_name,
String tbl_name,
String filter,
short max_parts)
|
List<String> |
listPartitionNamesPs(String db_name,
String tbl_name,
List<String> part_vals,
short max_parts)
Lists partition names that match a given partial specification |
List<Partition> |
listPartitionsPsWithAuth(String db_name,
String tbl_name,
List<String> part_vals,
short max_parts,
String userName,
List<String> groupNames)
Lists partitions that match a given partial specification and sets their auth privileges. |
List<MDBPrivilege> |
listPrincipalDBGrants(String principalName,
PrincipalType principalType,
String dbName)
|
List<MGlobalPrivilege> |
listPrincipalGlobalGrants(String principalName,
PrincipalType principalType)
|
List<MPartitionColumnPrivilege> |
listPrincipalPartitionColumnGrants(String principalName,
PrincipalType principalType,
String dbName,
String tableName,
String partName,
String columnName)
|
List<MPartitionPrivilege> |
listPrincipalPartitionGrants(String principalName,
PrincipalType principalType,
String dbName,
String tableName,
String partName)
|
List<MTableColumnPrivilege> |
listPrincipalTableColumnGrants(String principalName,
PrincipalType principalType,
String dbName,
String tableName,
String columnName)
|
List<String> |
listRoleNames()
|
List<MRoleMap> |
listRoles(String principalName,
PrincipalType principalType)
|
List<String> |
listTableNamesByFilter(String dbName,
String filter,
short max_tables)
Gets a list of tables based on a filter string and filter type. |
Table |
markPartitionForEvent(String dbName,
String tblName,
Map<String,String> partVals,
PartitionEventType evtType)
|
boolean |
openTransaction()
Opens a new one or the one already created Every call of this function must have corresponding commit or rollback function call |
boolean |
removeRole(String roleName)
|
boolean |
revokePrivileges(PrivilegeBag privileges)
|
boolean |
revokeRole(Role role,
String userName,
PrincipalType principalType)
|
void |
rollbackTransaction()
Rolls back the current transaction if it is active |
void |
setConf(org.apache.hadoop.conf.Configuration arg0)
|
void |
shutdown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DummyRawStoreForJdoConnection()
Method Detail |
---|
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void setConf(org.apache.hadoop.conf.Configuration arg0)
setConf
in interface org.apache.hadoop.conf.Configurable
public void shutdown()
shutdown
in interface RawStore
public boolean openTransaction()
RawStore
openTransaction
in interface RawStore
public boolean commitTransaction()
RawStore
commitTransaction
in interface RawStore
public void rollbackTransaction()
RawStore
rollbackTransaction
in interface RawStore
public void createDatabase(Database db) throws InvalidObjectException, MetaException
createDatabase
in interface RawStore
InvalidObjectException
MetaException
public Database getDatabase(String name) throws NoSuchObjectException
getDatabase
in interface RawStore
NoSuchObjectException
public boolean dropDatabase(String dbname) throws NoSuchObjectException, MetaException
dropDatabase
in interface RawStore
NoSuchObjectException
MetaException
public boolean alterDatabase(String dbname, Database db) throws NoSuchObjectException, MetaException
alterDatabase
in interface RawStore
NoSuchObjectException
MetaException
public List<String> getDatabases(String pattern) throws MetaException
getDatabases
in interface RawStore
MetaException
public List<String> getAllDatabases() throws MetaException
getAllDatabases
in interface RawStore
MetaException
public boolean createType(Type type)
createType
in interface RawStore
public Type getType(String typeName)
getType
in interface RawStore
public boolean dropType(String typeName)
dropType
in interface RawStore
public void createTable(Table tbl) throws InvalidObjectException, MetaException
createTable
in interface RawStore
InvalidObjectException
MetaException
public boolean dropTable(String dbName, String tableName) throws MetaException
dropTable
in interface RawStore
MetaException
public Table getTable(String dbName, String tableName) throws MetaException
getTable
in interface RawStore
MetaException
public boolean addPartition(Partition part) throws InvalidObjectException, MetaException
addPartition
in interface RawStore
InvalidObjectException
MetaException
public Partition getPartition(String dbName, String tableName, List<String> part_vals) throws MetaException, NoSuchObjectException
getPartition
in interface RawStore
MetaException
NoSuchObjectException
public boolean dropPartition(String dbName, String tableName, List<String> part_vals) throws MetaException
dropPartition
in interface RawStore
MetaException
public List<Partition> getPartitions(String dbName, String tableName, int max) throws MetaException
getPartitions
in interface RawStore
MetaException
public void alterTable(String dbname, String name, Table newTable) throws InvalidObjectException, MetaException
alterTable
in interface RawStore
InvalidObjectException
MetaException
public List<String> getTables(String dbName, String pattern) throws MetaException
getTables
in interface RawStore
MetaException
public List<Table> getTableObjectsByName(String dbname, List<String> tableNames) throws MetaException, UnknownDBException
getTableObjectsByName
in interface RawStore
dbname
- The name of the database from which to retrieve the tablestableNames
- The names of the tables to retrieve.
MetaException
UnknownDBException
public List<String> getAllTables(String dbName) throws MetaException
getAllTables
in interface RawStore
MetaException
public List<String> listTableNamesByFilter(String dbName, String filter, short max_tables) throws MetaException, UnknownDBException
RawStore
listTableNamesByFilter
in interface RawStore
dbName
- The name of the database from which you will retrieve the table namesfilter
- The filter stringmax_tables
- The maximum number of tables returned
MetaException
UnknownDBException
public List<String> listPartitionNames(String db_name, String tbl_name, short max_parts) throws MetaException
listPartitionNames
in interface RawStore
MetaException
public List<String> listPartitionNamesByFilter(String db_name, String tbl_name, String filter, short max_parts) throws MetaException
listPartitionNamesByFilter
in interface RawStore
MetaException
public void alterPartition(String db_name, String tbl_name, List<String> part_vals, Partition new_part) throws InvalidObjectException, MetaException
alterPartition
in interface RawStore
InvalidObjectException
MetaException
public boolean addIndex(Index index) throws InvalidObjectException, MetaException
addIndex
in interface RawStore
InvalidObjectException
MetaException
public Index getIndex(String dbName, String origTableName, String indexName) throws MetaException
getIndex
in interface RawStore
MetaException
public boolean dropIndex(String dbName, String origTableName, String indexName) throws MetaException
dropIndex
in interface RawStore
MetaException
public List<Index> getIndexes(String dbName, String origTableName, int max) throws MetaException
getIndexes
in interface RawStore
MetaException
public List<String> listIndexNames(String dbName, String origTableName, short max) throws MetaException
listIndexNames
in interface RawStore
MetaException
public void alterIndex(String dbname, String baseTblName, String name, Index newIndex) throws InvalidObjectException, MetaException
alterIndex
in interface RawStore
InvalidObjectException
MetaException
public List<Partition> getPartitionsByFilter(String dbName, String tblName, String filter, short maxParts) throws MetaException, NoSuchObjectException
getPartitionsByFilter
in interface RawStore
MetaException
NoSuchObjectException
public List<Partition> getPartitionsByNames(String dbName, String tblName, List<String> partNames) throws MetaException, NoSuchObjectException
getPartitionsByNames
in interface RawStore
MetaException
NoSuchObjectException
public Table markPartitionForEvent(String dbName, String tblName, Map<String,String> partVals, PartitionEventType evtType) throws MetaException, UnknownTableException, InvalidPartitionException, UnknownPartitionException
markPartitionForEvent
in interface RawStore
MetaException
UnknownTableException
InvalidPartitionException
UnknownPartitionException
public boolean isPartitionMarkedForEvent(String dbName, String tblName, Map<String,String> partName, PartitionEventType evtType) throws MetaException, UnknownTableException, InvalidPartitionException, UnknownPartitionException
isPartitionMarkedForEvent
in interface RawStore
MetaException
UnknownTableException
InvalidPartitionException
UnknownPartitionException
public boolean addRole(String rowName, String ownerName) throws InvalidObjectException, MetaException, NoSuchObjectException
addRole
in interface RawStore
InvalidObjectException
MetaException
NoSuchObjectException
public boolean removeRole(String roleName) throws MetaException, NoSuchObjectException
removeRole
in interface RawStore
MetaException
NoSuchObjectException
public boolean grantRole(Role role, String userName, PrincipalType principalType, String grantor, PrincipalType grantorType, boolean grantOption) throws MetaException, NoSuchObjectException, InvalidObjectException
grantRole
in interface RawStore
MetaException
NoSuchObjectException
InvalidObjectException
public boolean revokeRole(Role role, String userName, PrincipalType principalType) throws MetaException, NoSuchObjectException
revokeRole
in interface RawStore
MetaException
NoSuchObjectException
public PrincipalPrivilegeSet getUserPrivilegeSet(String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getUserPrivilegeSet
in interface RawStore
InvalidObjectException
MetaException
public PrincipalPrivilegeSet getDBPrivilegeSet(String dbName, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getDBPrivilegeSet
in interface RawStore
InvalidObjectException
MetaException
public PrincipalPrivilegeSet getTablePrivilegeSet(String dbName, String tableName, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getTablePrivilegeSet
in interface RawStore
InvalidObjectException
MetaException
public PrincipalPrivilegeSet getPartitionPrivilegeSet(String dbName, String tableName, String partition, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getPartitionPrivilegeSet
in interface RawStore
InvalidObjectException
MetaException
public PrincipalPrivilegeSet getColumnPrivilegeSet(String dbName, String tableName, String partitionName, String columnName, String userName, List<String> groupNames) throws InvalidObjectException, MetaException
getColumnPrivilegeSet
in interface RawStore
InvalidObjectException
MetaException
public List<MGlobalPrivilege> listPrincipalGlobalGrants(String principalName, PrincipalType principalType)
listPrincipalGlobalGrants
in interface RawStore
public List<MDBPrivilege> listPrincipalDBGrants(String principalName, PrincipalType principalType, String dbName)
listPrincipalDBGrants
in interface RawStore
public List<MTablePrivilege> listAllTableGrants(String principalName, PrincipalType principalType, String dbName, String tableName)
listAllTableGrants
in interface RawStore
public List<MPartitionPrivilege> listPrincipalPartitionGrants(String principalName, PrincipalType principalType, String dbName, String tableName, String partName)
listPrincipalPartitionGrants
in interface RawStore
public List<MTableColumnPrivilege> listPrincipalTableColumnGrants(String principalName, PrincipalType principalType, String dbName, String tableName, String columnName)
listPrincipalTableColumnGrants
in interface RawStore
public List<MPartitionColumnPrivilege> listPrincipalPartitionColumnGrants(String principalName, PrincipalType principalType, String dbName, String tableName, String partName, String columnName)
listPrincipalPartitionColumnGrants
in interface RawStore
public boolean grantPrivileges(PrivilegeBag privileges) throws InvalidObjectException, MetaException, NoSuchObjectException
grantPrivileges
in interface RawStore
InvalidObjectException
MetaException
NoSuchObjectException
public boolean revokePrivileges(PrivilegeBag privileges) throws InvalidObjectException, MetaException, NoSuchObjectException
revokePrivileges
in interface RawStore
InvalidObjectException
MetaException
NoSuchObjectException
public Role getRole(String roleName) throws NoSuchObjectException
getRole
in interface RawStore
NoSuchObjectException
public List<String> listRoleNames()
listRoleNames
in interface RawStore
public List<MRoleMap> listRoles(String principalName, PrincipalType principalType)
listRoles
in interface RawStore
public Partition getPartitionWithAuth(String dbName, String tblName, List<String> partVals, String user_name, List<String> group_names) throws MetaException, NoSuchObjectException, InvalidObjectException
getPartitionWithAuth
in interface RawStore
MetaException
NoSuchObjectException
InvalidObjectException
public List<Partition> getPartitionsWithAuth(String dbName, String tblName, short maxParts, String userName, List<String> groupNames) throws MetaException, NoSuchObjectException, InvalidObjectException
getPartitionsWithAuth
in interface RawStore
MetaException
NoSuchObjectException
InvalidObjectException
public List<String> listPartitionNamesPs(String db_name, String tbl_name, List<String> part_vals, short max_parts) throws MetaException, NoSuchObjectException
RawStore
listPartitionNamesPs
in interface RawStore
db_name
- The name of the database which has the partitionstbl_name
- The name of the table which has the partitionspart_vals
- A partial list of values for partitions in order of the table's partition keys.
Entries can be empty if you only want to specify latter partitions.max_parts
- The maximum number of partitions to return
MetaException
NoSuchObjectException
public List<Partition> listPartitionsPsWithAuth(String db_name, String tbl_name, List<String> part_vals, short max_parts, String userName, List<String> groupNames) throws MetaException, InvalidObjectException, NoSuchObjectException
RawStore
listPartitionsPsWithAuth
in interface RawStore
db_name
- The name of the database which has the partitionstbl_name
- The name of the table which has the partitionspart_vals
- A partial list of values for partitions in order of the table's partition keys
Entries can be empty if you need to specify latter partitions.max_parts
- The maximum number of partitions to returnuserName
- The user name for the partition for authentication privilegesgroupNames
- The groupNames for the partition for authentication privileges
MetaException
InvalidObjectException
NoSuchObjectException
public long cleanupEvents()
cleanupEvents
in interface RawStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |