remove wikipedia irc firehose and dependencies from core server module to examples (#6391)

This commit is contained in:
Clint Wylie 2018-09-26 21:46:37 -07:00 committed by Gian Merlino
parent 993bc5e9d3
commit fc1d5795c1
11 changed files with 20 additions and 78 deletions

View File

@ -66,6 +66,14 @@
<artifactId>commons-validator</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>com.ircclouds.irc</groupId>
<artifactId>irc-api</artifactId>
</dependency>
<dependency>
<groupId>com.maxmind.geoip2</groupId>
<artifactId>geoip2</artifactId>
</dependency>
<!-- For tests! -->
<dependency>

View File

@ -24,6 +24,8 @@ import com.fasterxml.jackson.databind.jsontype.NamedType;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.google.inject.Binder;
import org.apache.druid.examples.twitter.TwitterSpritzerFirehoseFactory;
import org.apache.druid.examples.wikipedia.IrcFirehoseFactory;
import org.apache.druid.examples.wikipedia.IrcInputRowParser;
import org.apache.druid.initialization.DruidModule;
import java.util.Collections;
@ -39,7 +41,9 @@ public class ExamplesDruidModule implements DruidModule
return Collections.<Module>singletonList(
new SimpleModule("ExamplesModule")
.registerSubtypes(
new NamedType(TwitterSpritzerFirehoseFactory.class, "twitzer")
new NamedType(TwitterSpritzerFirehoseFactory.class, "twitzer"),
new NamedType(IrcFirehoseFactory.class, "irc"),
new NamedType(IrcInputRowParser.class, "irc")
)
);
}

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.apache.druid.segment.realtime.firehose;
package org.apache.druid.examples.wikipedia;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.apache.druid.segment.realtime.firehose;
package org.apache.druid.examples.wikipedia;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
@ -234,13 +234,8 @@ public class IrcFirehoseFactory implements FirehoseFactory<InputRowParser<Pair<D
@Override
public Runnable commit()
{
return new Runnable()
{
@Override
public void run()
{
// nothing to see here
}
return () -> {
// nothing to see here
};
}

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.apache.druid.segment.realtime.firehose;
package org.apache.druid.examples.wikipedia;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

View File

@ -17,7 +17,7 @@
* under the License.
*/
package org.apache.druid.segment.realtime.firehose;
package org.apache.druid.examples.wikipedia;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

View File

@ -159,14 +159,6 @@
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
</dependency>
<dependency>
<groupId>com.ircclouds.irc</groupId>
<artifactId>irc-api</artifactId>
</dependency>
<dependency>
<groupId>com.maxmind.geoip2</groupId>
<artifactId>geoip2</artifactId>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>

View File

@ -29,7 +29,6 @@ import org.apache.druid.segment.realtime.firehose.CombiningFirehoseFactory;
import org.apache.druid.segment.realtime.firehose.EventReceiverFirehoseFactory;
import org.apache.druid.segment.realtime.firehose.FixedCountFirehoseFactory;
import org.apache.druid.segment.realtime.firehose.HttpFirehoseFactory;
import org.apache.druid.segment.realtime.firehose.IrcFirehoseFactory;
import org.apache.druid.segment.realtime.firehose.LocalFirehoseFactory;
import org.apache.druid.segment.realtime.firehose.SqlFirehoseFactory;
import org.apache.druid.segment.realtime.firehose.TimedShutoffFirehoseFactory;
@ -54,7 +53,6 @@ public class FirehoseModule implements DruidModule
.registerSubtypes(
new NamedType(ClippedFirehoseFactory.class, "clipped"),
new NamedType(TimedShutoffFirehoseFactory.class, "timed"),
new NamedType(IrcFirehoseFactory.class, "irc"),
new NamedType(LocalFirehoseFactory.class, "local"),
new NamedType(HttpFirehoseFactory.class, "http"),
new NamedType(EventReceiverFirehoseFactory.class, "receiver"),

View File

@ -1,51 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.druid.guice;
import com.fasterxml.jackson.databind.Module;
import com.fasterxml.jackson.databind.jsontype.NamedType;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.google.inject.Binder;
import org.apache.druid.initialization.DruidModule;
import org.apache.druid.segment.realtime.firehose.IrcInputRowParser;
import java.util.Collections;
import java.util.List;
/**
*/
public class ParsersModule implements DruidModule
{
@Override
public void configure(Binder binder)
{
}
@Override
public List<? extends Module> getJacksonModules()
{
return Collections.<Module>singletonList(
new SimpleModule("ParsersModule")
.registerSubtypes(
new NamedType(IrcInputRowParser.class, "irc")
)
);
}
}

View File

@ -47,7 +47,6 @@ import org.apache.druid.guice.LifecycleModule;
import org.apache.druid.guice.LocalDataStorageDruidModule;
import org.apache.druid.guice.MetadataConfigModule;
import org.apache.druid.guice.ModulesConfig;
import org.apache.druid.guice.ParsersModule;
import org.apache.druid.guice.ServerModule;
import org.apache.druid.guice.ServerViewModule;
import org.apache.druid.guice.StartupLoggingModule;
@ -394,7 +393,6 @@ public class Initialization
new CoordinatorDiscoveryModule(),
new LocalDataStorageDruidModule(),
new FirehoseModule(),
new ParsersModule(),
new JavaScriptModule(),
new AuthenticatorModule(),
new AuthenticatorMapperModule(),

View File

@ -41,7 +41,6 @@ import org.apache.druid.guice.ExtensionsConfig;
import org.apache.druid.guice.FirehoseModule;
import org.apache.druid.guice.IndexingServiceFirehoseModule;
import org.apache.druid.guice.LocalDataStorageDruidModule;
import org.apache.druid.guice.ParsersModule;
import org.apache.druid.guice.QueryRunnerFactoryModule;
import org.apache.druid.guice.QueryableModule;
import org.apache.druid.indexer.HadoopDruidIndexerConfig;
@ -130,8 +129,7 @@ public class DruidJsonValidator extends GuiceRunnable
new FirehoseModule(),
new IndexingHadoopModule(),
new IndexingServiceFirehoseModule(),
new LocalDataStorageDruidModule(),
new ParsersModule()
new LocalDataStorageDruidModule()
)
)
);