Tabnine Logo
EnrichmentConfigurations.getSensorEnrichmentConfig
Code IndexAdd Tabnine to your IDE (free)

How to use
getSensorEnrichmentConfig
method
in
org.apache.metron.common.configuration.EnrichmentConfigurations

Best Java code snippets using org.apache.metron.common.configuration.EnrichmentConfigurations.getSensorEnrichmentConfig (Showing top 16 results out of 315)

origin: apache/metron

@Override
public SensorEnrichmentConfig findOne(String name) throws RestException {
 EnrichmentConfigurations configs = cache.get( EnrichmentConfigurations.class);
 return configs.getSensorEnrichmentConfig(name);
}
origin: apache/metron

@Override
public Map<String, Object> getSensorConfig(String sensorName) {
 return config.orElse(new EnrichmentConfigurations()).getSensorEnrichmentConfig(sensorName)
   .getConfiguration();
}
origin: apache/metron

protected Map<String, ConfigHandler> getFieldToHandlerMap(String sensorType) {
 if(sensorType != null) {
  SensorEnrichmentConfig config = getConfigurations().getSensorEnrichmentConfig(sensorType);
  if (config != null) {
   return config.getEnrichment().getEnrichmentConfigs();
  } else {
   LOG.debug("Unable to retrieve a sensor enrichment config of {}", sensorType);
  }
 } else {
  LOG.error("Trying to retrieve a field map with sensor type of null");
 }
 return new HashMap<>();
}
protected Map<String, Object > getFieldMap(String sensorType) {
origin: apache/metron

protected Map<String, Object > getFieldMap(String sensorType) {
 if(sensorType != null) {
  SensorEnrichmentConfig config = getConfigurations().getSensorEnrichmentConfig(sensorType);
  if (config != null) {
   return config.getEnrichment().getFieldMap();
  } else {
   LOG.debug("Unable to retrieve a sensor enrichment config of {}", sensorType);
  }
 } else {
  LOG.error("Trying to retrieve a field map with sensor type of null");
 }
 return new HashMap<>();
}
origin: apache/metron

protected Map<String, ConfigHandler> getFieldToHandlerMap(String sensorType) {
 if(sensorType != null) {
  SensorEnrichmentConfig config = getConfigurations().getSensorEnrichmentConfig(sensorType);
  if (config != null) {
   return config.getEnrichment().getEnrichmentConfigs();
  } else {
   LOG.debug("Unable to retrieve a sensor enrichment config of {}", sensorType);
  }
 } else {
  LOG.error("Trying to retrieve a field map with sensor type of null");
 }
 return new HashMap<>();
}
origin: apache/metron

@Override
protected Map<String, Object> getFieldMap(String sensorType) {
 if (sensorType != null) {
  SensorEnrichmentConfig config = getConfigurations().getSensorEnrichmentConfig(sensorType);
  if (config != null) {
   return config.getThreatIntel().getFieldMap();
  } else {
   LOG.debug("Unable to retrieve sensor config: {}", sensorType);
  }
 } else {
  LOG.error("Trying to retrieve a field map with sensor type of null");
 }
 return new HashMap<>();
}
origin: apache/metron

@Override
protected Map<String, ConfigHandler> getFieldToHandlerMap(String sensorType) {
 if(sensorType != null) {
  SensorEnrichmentConfig config = getConfigurations().getSensorEnrichmentConfig(sensorType);
  if (config != null) {
   return config.getThreatIntel().getEnrichmentConfigs();
  } else {
   LOG.debug("Unable to retrieve a sensor enrichment config of {}", sensorType);
  }
 } else {
  LOG.error("Trying to retrieve a field map with sensor type of null");
 }
 return new HashMap<>();
}
origin: apache/metron

@Override
protected Map<String, ConfigHandler> getFieldToHandlerMap(String sensorType) {
 if(sensorType != null) {
  SensorEnrichmentConfig config = getConfigurations().getSensorEnrichmentConfig(sensorType);
  if (config != null) {
   return config.getThreatIntel().getEnrichmentConfigs();
  } else {
   LOG.debug("Unable to retrieve a sensor config of {}", sensorType);
  }
 } else {
  LOG.error("Trying to retrieve a field map with sensor type of null");
 }
 return new HashMap<>();
}
origin: apache/metron

@Override
public Map<String, Object> getFieldMap(String sourceType) {
 SensorEnrichmentConfig config = getConfigurations().getSensorEnrichmentConfig(sourceType);
 if(config != null) {
  return config.getThreatIntel().getFieldMap();
 }
 else {
  LOG.debug("Unable to retrieve sensor config: {}", sourceType);
  return null;
 }
}
origin: apache/metron

 public Map<String, Object> getFieldMap(String sourceType) {
  if(sourceType != null) {
   SensorEnrichmentConfig config = getConfigurations().getSensorEnrichmentConfig(sourceType);
   if (config != null && config.getEnrichment() != null) {
    return config.getEnrichment().getFieldMap();
   }
   else {
    LOG.debug("Unable to retrieve a sensor enrichment config of {}", sourceType);
   }
  }
  else {
   LOG.error("Trying to retrieve a field map with source type of null");
  }
  return null;
 }
}
origin: apache/metron

@Override
public JSONObject joinMessages(Map<String, Tuple> streamMessageMap, MessageGetStrategy messageGetStrategy) {
 JSONObject ret = super.joinMessages(streamMessageMap, messageGetStrategy);
 String sourceType = MessageUtils.getSensorType(ret);
 return ThreatIntelUtils.triage(ret, getConfigurations().getSensorEnrichmentConfig(sourceType), functionResolver, stellarContext);
}
origin: apache/metron

JSONObject enrichedField = new JSONObject();
if (value != null) {
 SensorEnrichmentConfig config = getConfigurations().getSensorEnrichmentConfig(sourceType);
 if(config == null) {
  LOG.debug("Unable to find SensorEnrichmentConfig for sourceType: {}", sourceType);
origin: apache/metron

try {
 String sourceType = MessageUtils.getSensorType(message);
 SensorEnrichmentConfig config = getConfigurations().getSensorEnrichmentConfig(sourceType);
 if(config == null) {
  LOG.debug("Unable to find SensorEnrichmentConfig for sourceType: {}", sourceType);
origin: apache/metron

Map<String, Object> expectedGlobalConfig = JSONUtils.INSTANCE.load(globalConfig, JSONUtils.MAP_SUPPLIER);
EnrichmentConfigurations config = cache.get( EnrichmentConfigurations.class);
assertEventually(() -> Assert.assertEquals(expectedConfig, config.getSensorEnrichmentConfig("test")));
assertEventually(() -> Assert.assertEquals(expectedGlobalConfig, config.getGlobalConfig()));
origin: apache/metron

SensorEnrichmentConfig expectedConfig = JSONUtils.INSTANCE.load(inFile, SensorEnrichmentConfig.class);
EnrichmentConfigurations config = cache.get( EnrichmentConfigurations.class);
assertEventually(() -> Assert.assertEquals(expectedConfig, config.getSensorEnrichmentConfig("test")));
assertEventually(() -> Assert.assertEquals(expectedGlobalConfig, config.getGlobalConfig()));
assertEventually(() -> Assert.assertNull(config.getSensorEnrichmentConfig("notthere")));
origin: apache/metron

assertEventually(() -> Assert.assertNull(config.getSensorEnrichmentConfig("test")));
assertEventually(()-> Assert.assertNull(config.getGlobalConfig(false)));
org.apache.metron.common.configurationEnrichmentConfigurationsgetSensorEnrichmentConfig

Popular methods of EnrichmentConfigurations

  • getGlobalConfig
  • <init>
  • updateSensorEnrichmentConfig
  • updateGlobalConfig
  • delete
  • getAs
  • getBatchSize
    Pulled from global config. Note: enrichment writes out to 1 kafka topic, so it is not pulling this c
  • getBatchTimeout
    Pulled from global config Note: enrichment writes out to 1 kafka topic, so it is not pulling this co
  • getConfigurations
  • getKey
  • getTypes
  • getTypes

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • JFrame (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now