Search in sources :

Example 1 with HBaseDao

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()));
}
Also used : HBaseDao(org.apache.metron.indexing.dao.HBaseDao) Test(org.junit.jupiter.api.Test)

Example 2 with HBaseDao

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);
}
Also used : HBaseDao(org.apache.metron.indexing.dao.HBaseDao) MockHBaseTableProvider(org.apache.metron.hbase.mock.MockHBaseTableProvider) AccessConfig(org.apache.metron.indexing.dao.AccessConfig) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

HBaseDao (org.apache.metron.indexing.dao.HBaseDao)2 MockHBaseTableProvider (org.apache.metron.hbase.mock.MockHBaseTableProvider)1 AccessConfig (org.apache.metron.indexing.dao.AccessConfig)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 Test (org.junit.jupiter.api.Test)1