Codota Logo
org.apache.metron.common.configuration
Code IndexAdd Codota to your IDE (free)

How to use org.apache.metron.common.configuration

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: apache/metron

public static void updateSensorIndexingConfigsFromZookeeper(IndexingConfigurations configurations, CuratorFramework client) throws Exception {
 updateConfigsFromZookeeper( configurations
              , INDEXING
              , sensorType -> configurations.updateSensorIndexingConfig(sensorType, readSensorIndexingConfigBytesFromZookeeper(sensorType, client))
              , client
              );
}
origin: apache/metron

public static void updateEnrichmentConfigsFromZookeeper(EnrichmentConfigurations configurations, CuratorFramework client) throws Exception {
 updateConfigsFromZookeeper( configurations
              , ENRICHMENT
              , sensorType -> configurations.updateSensorEnrichmentConfig(sensorType, readSensorEnrichmentConfigBytesFromZookeeper(sensorType, client))
              , client
              );
}
origin: apache/metron

public static void updateParserConfigsFromZookeeper(ParserConfigurations configurations, CuratorFramework client) throws Exception {
 updateConfigsFromZookeeper( configurations
              , PARSER
              , sensorType -> configurations.updateSensorParserConfig(sensorType, readSensorParserConfigBytesFromZookeeper(sensorType, client))
              , client
              );
}
origin: apache/metron

 @Override
 public ParserConfigurations getConfigurations() {
  ParserConfigurations configurations = new ParserConfigurations();
  SensorParserConfig sensorParserConfig = new SensorParserConfig();
  sensorParserConfig.setParserConfig(new HashMap<String, Object>() {{
    put(IndexingConfigurations.BATCH_SIZE_CONF, 10);
  }});
  configurations.updateSensorParserConfig("yaf", sensorParserConfig);
  return configurations;
 }
};
origin: apache/metron

@Override
public Map<String, Object> getSensorConfig(String sensorName) {
 return config.getSensorParserConfig(sensorName).getParserConfig();
}
origin: apache/metron

public static void writeSensorParserConfigToZookeeper(String sensorType, byte[] configData, CuratorFramework client) throws Exception {
 SensorParserConfig c = (SensorParserConfig) PARSER.deserialize(new String(configData));
 c.init();
 writeToZookeeper(PARSER.getZookeeperRoot() + "/" + sensorType, configData, client);
}
origin: apache/metron

public static Configurations getSampleConfigs() throws IOException {
 Configurations configurations = new Configurations();
 configurations.updateGlobalConfig(ConfigurationsUtils.readGlobalConfigFromFile(TestConstants.SAMPLE_CONFIG_PATH));
 return configurations;
}
origin: apache/metron

public static byte[] readGlobalConfigBytesFromZookeeper(CuratorFramework client) throws Exception {
 return readFromZookeeper(GLOBAL.getZookeeperRoot(), client);
}
origin: apache/metron

public void init() {
 for(FieldTransformer h : getFieldTransformations()) {
  h.initAndValidate();
 }
}
origin: apache/metron

public static void updateConfigsFromZookeeper(Configurations configurations, CuratorFramework client) throws Exception {
 configurations.updateGlobalConfig(readGlobalConfigBytesFromZookeeper(client));
}
origin: apache/metron

public void updateGlobalConfig(Map<String, Object> globalConfig) {
 if(globalConfig != null) {
  getConfigurations().put(ConfigurationType.GLOBAL.getTypeName(), globalConfig);
  validations = FieldValidator.readValidations(getGlobalConfig());
 }
}
origin: apache/metron

/**
 * Pulled from global config
 * Note: enrichment writes out to 1 kafka topic, so it is not pulling this config by sensor.
 *
 * @return batch timeout for writing to kafka
 * @see org.apache.metron.common.configuration.EnrichmentConfigurations#BATCH_TIMEOUT_CONF
 */
public int getBatchTimeout() {
 return getAs(BATCH_TIMEOUT_CONF, getGlobalConfig(true), 0, Integer.class);
}
origin: apache/metron

public static int getBatchSize(Map<String, Object> conf) {
 return getAs( BATCH_SIZE_CONF
        ,conf
       , 1
       , Integer.class
       );
}
origin: apache/metron

@Override
public void writeSensorConfigToZookeeper(String sensorType, byte[] configData,
  CuratorFramework client) throws Exception {
 ops.writeSensorConfigToZookeeper(sensorType, configData, client);
}
origin: apache/metron

/**
 * Dumps all config
 * @param client
 * @throws Exception
 */
public void dump(CuratorFramework client) throws Exception {
 ConfigurationsUtils.dumpConfigs(System.out, client);
}
origin: apache/metron

 @Override
 public String toString() {
  return "Configurations{" +
      "validations=" + validations +
      ", configurations=" + getConfigurations()+
      '}';
 }
}
origin: apache/metron

public static byte[] readSensorEnrichmentConfigBytesFromZookeeper(String sensorType, CuratorFramework client) throws Exception {
 return readFromZookeeper(ENRICHMENT.getZookeeperRoot() + "/" + sensorType, client);
}
origin: apache/metron

public static byte[] readProfilerConfigBytesFromZookeeper(CuratorFramework client) throws Exception {
 return readFromZookeeper(PROFILER.getZookeeperRoot(), client);
}
origin: apache/metron

public static byte[] readSensorParserConfigBytesFromZookeeper(String sensorType, CuratorFramework client) throws Exception {
 return readFromZookeeper(PARSER.getZookeeperRoot() + "/" + sensorType, client);
}
origin: apache/metron

public static byte[] readSensorIndexingConfigBytesFromZookeeper(String sensorType, CuratorFramework client) throws Exception {
 return readFromZookeeper(INDEXING.getZookeeperRoot() + "/" + sensorType, client);
}
org.apache.metron.common.configuration

Most used classes

  • ConfigurationsUtils
  • SensorParserConfig
    The configuration object that defines a parser for a given sensor. Each sensor has its own parser co
  • ParserConfigurations
  • IndexingConfigurations
  • ProfilerConfig
    The configuration object for the Profiler, which may contain many Profile definitions.
  • EnrichmentConfigurations,
  • FieldTransformer,
  • EnrichmentConfig,
  • SensorEnrichmentConfig,
  • RiskLevelRule,
  • ThreatIntelConfig,
  • ConfigurationType,
  • ConfigHandler,
  • ThreatTriageConfig,
  • ProfileConfig,
  • ConfigOption,
  • Configurations,
  • FieldValidator,
  • SensorEnrichmentUpdateConfig
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now