Search in sources :

Example 26 with Configuration

use of org.apache.commons.configuration2.Configuration in project graylog2-server by Graylog2.

the class KafkaJournalTest method setUp.

@Before
public void setUp() throws IOException {
    scheduler = new ScheduledThreadPoolExecutor(1);
    scheduler.prestartCoreThread();
    journalDirectory = temporaryFolder.newFolder();
    final File nodeId = temporaryFolder.newFile("node-id");
    Files.write(UUID.randomUUID().toString(), nodeId, StandardCharsets.UTF_8);
    final Configuration configuration = new Configuration() {

        @Override
        public String getNodeIdFile() {
            return nodeId.getAbsolutePath();
        }
    };
    serverStatus = new ServerStatus(configuration, EnumSet.of(ServerStatus.Capability.MASTER), new EventBus("KafkaJournalTest"), NullAuditEventSender::new);
}
Also used : Configuration(org.graylog2.Configuration) ScheduledThreadPoolExecutor(java.util.concurrent.ScheduledThreadPoolExecutor) ServerStatus(org.graylog2.plugin.ServerStatus) EventBus(com.google.common.eventbus.EventBus) File(java.io.File) Before(org.junit.Before)

Aggregations

SubsetConfiguration (org.apache.commons.configuration2.SubsetConfiguration)10 Configuration (org.graylog2.Configuration)10 Test (org.junit.Test)9 Configuration (org.apache.hadoop.conf.Configuration)8 URI (java.net.URI)7 Configuration (org.apache.commons.configuration2.Configuration)5 Before (org.junit.Before)5 PropertiesConfiguration (org.apache.commons.configuration2.PropertiesConfiguration)4 MetricRegistry (com.codahale.metrics.MetricRegistry)2 File (java.io.File)2 URISyntaxException (java.net.URISyntaxException)2 Parameters (org.apache.commons.configuration2.builder.fluent.Parameters)2 ConfigurationException (org.apache.commons.configuration2.ex.ConfigurationException)2 FileSystem (org.apache.hadoop.fs.FileSystem)2 Path (org.apache.hadoop.fs.Path)2 Role (org.graylog2.shared.users.Role)2 UserService (org.graylog2.shared.users.UserService)2 EventBus (com.google.common.eventbus.EventBus)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 PrintWriter (java.io.PrintWriter)1