Table of Contents |
---|
IMetaStoreClient
...
Tests
One option for java Java clients to access the MetaStore is to connect through the IMetaStoreClient interface implementations.
...
Currently the following implementations are tested:
- EmbeddedMetaStore - when EmbeddedMetaStore – when the MetaStore is running in the same thread, and in process communication is used - used. Represented by the EmbeddedMetaStoreForTests.
- RemoteMetaStore - – when the MetaStore is running in the a separate thread but in the same JVM, and in Thrift communication is used - used. Represented by the RemoteMetaStoreForTests.
- ClusterMetaStore - ClusterMetaStore – when the MetaStore is started separately from the tests. Currently it is not used in the code, but could be used to test against previous versions of the MetaStore to ensure backward compatibility.
MetaStoreFactoryForTests provides the list of these implementations which can be used in parametrized tests in @Parameterized.Parameters. Currently the returning list contains the following implementations:
- Embedded - Uses Embedded – Uses the same configuration as TestEmbeddedHiveMetaStore.
- Remote – Uses Remote - Uses the same configuration as TestRemoteHiveMetaStore. Later multiple configurations could be added, like the ones in TestSetUGIOnBothClientServer, TestSetUGIOnOnlyClient, TestSetUGIOnOnlyServer.
- If the -Dtest.hms.client.configs is provided then a ClusterMetaStore is returned in the list too.
The following test files will check the API functionalities:
- TestDatabases - TestDatabases – creating, querying, dropping databases
- TestFunctions - creatingTestFunctions – creating, querying, dropping functions
- ...
...