Search in sources :

Example 6 with AccessConfig

use of org.apache.metron.indexing.dao.AccessConfig in project metron by apache.

the class HBaseDaoIntegrationTest method startHBase.

@BeforeClass
public static void startHBase() throws Exception {
    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) BeforeClass(org.junit.BeforeClass)

Aggregations

AccessConfig (org.apache.metron.indexing.dao.AccessConfig)6 IndexDao (org.apache.metron.indexing.dao.IndexDao)3 HashMap (java.util.HashMap)2 ElasticsearchDao (org.apache.metron.elasticsearch.dao.ElasticsearchDao)2 JSONObject (org.json.simple.JSONObject)2 BeforeClass (org.junit.BeforeClass)2 File (java.io.File)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Map (java.util.Map)1 Optional (java.util.Optional)1 ElasticsearchMetaAlertDao (org.apache.metron.elasticsearch.dao.ElasticsearchMetaAlertDao)1 HTableProvider (org.apache.metron.hbase.HTableProvider)1 MockHBaseTableProvider (org.apache.metron.hbase.mock.MockHBaseTableProvider)1 HBaseDao (org.apache.metron.indexing.dao.HBaseDao)1 MetaAlertDao (org.apache.metron.indexing.dao.MetaAlertDao)1 FieldType (org.apache.metron.indexing.dao.search.FieldType)1 GroupRequest (org.apache.metron.indexing.dao.search.GroupRequest)1 SearchRequest (org.apache.metron.indexing.dao.search.SearchRequest)1 Document (org.apache.metron.indexing.dao.update.Document)1