use of org.apache.metron.common.configuration.IndexingConfigurations in project metron by apache.
the class IndexingWriterConfigurationTest method testGetAllConfiguredTimeouts.
@Test
public void testGetAllConfiguredTimeouts() throws FileNotFoundException, IOException {
// default
IndexingWriterConfiguration config = new IndexingWriterConfiguration("hdfs", new IndexingConfigurations());
Assert.assertEquals(0, config.getAllConfiguredTimeouts().size());
// non-default
IndexingConfigurations iconfigs = new IndexingConfigurations();
iconfigs.updateSensorIndexingConfig(sensorType, new FileInputStream(sampleSensorIndexingConfigPath));
config = new IndexingWriterConfiguration("elasticsearch", iconfigs);
Assert.assertEquals(1, config.getAllConfiguredTimeouts().size());
Assert.assertEquals(7, (long) config.getAllConfiguredTimeouts().get(0));
}
use of org.apache.metron.common.configuration.IndexingConfigurations in project metron by apache.
the class IndexingWriterConfigurationTest method testDefaultIndex.
@Test
public void testDefaultIndex() {
IndexingWriterConfiguration config = new IndexingWriterConfiguration("hdfs", new IndexingConfigurations());
Assert.assertEquals("foo", config.getIndex("foo"));
}
use of org.apache.metron.common.configuration.IndexingConfigurations in project metron by apache.
the class IndexingWriterConfigurationTest method testDefaultBatchTimeout.
@Test
public void testDefaultBatchTimeout() {
IndexingWriterConfiguration config = new IndexingWriterConfiguration("hdfs", new IndexingConfigurations());
Assert.assertEquals(0, config.getBatchTimeout("foo"));
}
use of org.apache.metron.common.configuration.IndexingConfigurations in project metron by apache.
the class IndexingWriterConfigurationTest method testDefaultIndex.
@Test
public void testDefaultIndex() {
IndexingWriterConfiguration config = new IndexingWriterConfiguration("hdfs", new IndexingConfigurations());
assertEquals("foo", config.getIndex("foo"));
}
use of org.apache.metron.common.configuration.IndexingConfigurations in project metron by apache.
the class IndexingWriterConfigurationTest method testDefaultBatchTimeout.
@Test
public void testDefaultBatchTimeout() {
IndexingWriterConfiguration config = new IndexingWriterConfiguration("hdfs", new IndexingConfigurations());
assertEquals(0, config.getBatchTimeout("foo"));
}
Aggregations