Search in sources :

Example 1 with StellarAdapter

use of org.apache.metron.enrichment.adapters.stellar.StellarAdapter in project metron by apache.

the class ParallelEnricherTest method setup.

@BeforeClass
public static void setup() {
    ConcurrencyContext infrastructure = new ConcurrencyContext();
    infrastructure.initialize(5, 100, 10, null, null, false);
    stellarContext = new Context.Builder().build();
    StellarFunctions.initialize(stellarContext);
    StellarAdapter adapter = new StellarAdapter() {

        @Override
        public void logAccess(CacheKey value) {
            numAccesses.incrementAndGet();
        }
    }.ofType("ENRICHMENT");
    adapter.initializeAdapter(new HashMap<>());
    enrichmentsByType = ImmutableMap.of("stellar", adapter);
    enricher = new ParallelEnricher(enrichmentsByType, infrastructure, false);
}
Also used : StellarAdapter(org.apache.metron.enrichment.adapters.stellar.StellarAdapter) CacheKey(org.apache.metron.enrichment.bolt.CacheKey) BeforeClass(org.junit.BeforeClass)

Aggregations

StellarAdapter (org.apache.metron.enrichment.adapters.stellar.StellarAdapter)1 CacheKey (org.apache.metron.enrichment.bolt.CacheKey)1 BeforeClass (org.junit.BeforeClass)1