use of org.apache.metron.indexing.dao.HBaseDao in project metron by apache.
the class ElasticsearchMetaAlertDaoTest method testInitInvalidDao.
@Test
public void testInitInvalidDao() {
HBaseDao dao = new HBaseDao();
ElasticsearchMetaAlertDao esDao = new ElasticsearchMetaAlertDao();
assertThrows(IllegalArgumentException.class, () -> esDao.init(dao, Optional.empty()));
}
use of org.apache.metron.indexing.dao.HBaseDao in project metron by apache.
the class HBaseDaoIntegrationTest method startHBase.
@BeforeEach
public void startHBase() {
AccessConfig accessConfig = new AccessConfig();
accessConfig.setMaxSearchResults(1000);
accessConfig.setMaxSearchGroups(1000);
accessConfig.setGlobalConfigSupplier(() -> new HashMap<String, Object>() {
{
put(HBASE_TABLE, TABLE_NAME);
put(HBASE_CF, COLUMN_FAMILY);
}
});
MockHBaseTableProvider.addToCache(TABLE_NAME, COLUMN_FAMILY);
accessConfig.setTableProvider(new MockHBaseTableProvider());
hbaseDao = new HBaseDao();
hbaseDao.init(accessConfig);
}
Aggregations