use of com.hortonworks.streamline.streams.cluster.service.metadata.json.Tables in project streamline by hortonworks.
the class HiveMetadataService method getHiveTables.
/**
* @return The table names for the database specified in the parameter
*/
public Tables getHiveTables(String dbName) throws MetaException, PrivilegedActionException, IOException, InterruptedException {
final Tables tables = Tables.newInstance(executeSecure(() -> metaStoreClient.getAllTables(dbName)), securityContext, false, getPrincipals(), getKeytabs());
LOG.debug("Hive database [{}] has tables {}", dbName, tables.getTables());
return tables;
}
use of com.hortonworks.streamline.streams.cluster.service.metadata.json.Tables in project streamline by hortonworks.
the class HBaseBundleHintProviderTest method testGetHintsOnCluster.
// FIXME: below hint needs to access HBase and currently it doesn't work with secure cluster
// FIXME: hence can't add HBase sink to the topology
// FIXME: so we should mark this test to ignore until it is fixed
@Ignore
@Test
public void testGetHintsOnCluster() throws Exception {
List<String> tables = Lists.newArrayList("test1", "test2", "test3");
new Expectations() {
{
hbaseMetadataService.getHBaseTables();
result = new Tables(tables);
}
};
Cluster cluster = new Cluster();
cluster.setId(1L);
cluster.setName("cluster1");
Map<String, Object> hints = provider.getHintsOnCluster(cluster, null, null);
Assert.assertNotNull(hints);
Assert.assertEquals(1, hints.size());
Assert.assertEquals(tables, hints.get(HBaseBundleHintProvider.FIELD_NAME_TABLE));
new Verifications() {
{
hbaseMetadataService.getHBaseTables();
}
};
}
Aggregations