This is an automated email from the ASF dual-hosted git repository.

gian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git


The following commit(s) were added to refs/heads/master by this push:
     new fc1d579  remove wikipedia irc firehose and dependencies from core 
server module to examples (#6391)
fc1d579 is described below

commit fc1d5795c12a33e6228bfe3cdcefb8388a9a6d3e
Author: Clint Wylie <[email protected]>
AuthorDate: Wed Sep 26 21:46:37 2018 -0700

    remove wikipedia irc firehose and dependencies from core server module to 
examples (#6391)
---
 examples/pom.xml                                   |  8 ++++
 .../apache/druid/examples/ExamplesDruidModule.java |  6 ++-
 .../druid/examples/wikipedia}/IrcDecoder.java      |  2 +-
 .../examples/wikipedia}/IrcFirehoseFactory.java    | 11 ++---
 .../examples/wikipedia}/IrcInputRowParser.java     |  2 +-
 .../examples/wikipedia}/WikipediaIrcDecoder.java   |  2 +-
 server/pom.xml                                     |  8 ----
 .../org/apache/druid/guice/FirehoseModule.java     |  2 -
 .../java/org/apache/druid/guice/ParsersModule.java | 51 ----------------------
 .../druid/initialization/Initialization.java       |  2 -
 .../druid/cli/validate/DruidJsonValidator.java     |  4 +-
 11 files changed, 20 insertions(+), 78 deletions(-)

diff --git a/examples/pom.xml b/examples/pom.xml
index 0f4e915..d85db49 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -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>
diff --git 
a/examples/src/main/java/org/apache/druid/examples/ExamplesDruidModule.java 
b/examples/src/main/java/org/apache/druid/examples/ExamplesDruidModule.java
index c9321b8..8bf13d0 100644
--- a/examples/src/main/java/org/apache/druid/examples/ExamplesDruidModule.java
+++ b/examples/src/main/java/org/apache/druid/examples/ExamplesDruidModule.java
@@ -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")
             )
     );
   }
diff --git 
a/server/src/main/java/org/apache/druid/segment/realtime/firehose/IrcDecoder.java
 b/examples/src/main/java/org/apache/druid/examples/wikipedia/IrcDecoder.java
similarity index 96%
rename from 
server/src/main/java/org/apache/druid/segment/realtime/firehose/IrcDecoder.java
rename to 
examples/src/main/java/org/apache/druid/examples/wikipedia/IrcDecoder.java
index 59a8dde..e4adb1c 100644
--- 
a/server/src/main/java/org/apache/druid/segment/realtime/firehose/IrcDecoder.java
+++ b/examples/src/main/java/org/apache/druid/examples/wikipedia/IrcDecoder.java
@@ -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;
diff --git 
a/server/src/main/java/org/apache/druid/segment/realtime/firehose/IrcFirehoseFactory.java
 
b/examples/src/main/java/org/apache/druid/examples/wikipedia/IrcFirehoseFactory.java
similarity index 97%
rename from 
server/src/main/java/org/apache/druid/segment/realtime/firehose/IrcFirehoseFactory.java
rename to 
examples/src/main/java/org/apache/druid/examples/wikipedia/IrcFirehoseFactory.java
index 87211b6..ab3f806 100644
--- 
a/server/src/main/java/org/apache/druid/segment/realtime/firehose/IrcFirehoseFactory.java
+++ 
b/examples/src/main/java/org/apache/druid/examples/wikipedia/IrcFirehoseFactory.java
@@ -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
         };
       }
 
diff --git 
a/server/src/main/java/org/apache/druid/segment/realtime/firehose/IrcInputRowParser.java
 
b/examples/src/main/java/org/apache/druid/examples/wikipedia/IrcInputRowParser.java
similarity index 98%
rename from 
server/src/main/java/org/apache/druid/segment/realtime/firehose/IrcInputRowParser.java
rename to 
examples/src/main/java/org/apache/druid/examples/wikipedia/IrcInputRowParser.java
index c849019..b4a9fbb 100644
--- 
a/server/src/main/java/org/apache/druid/segment/realtime/firehose/IrcInputRowParser.java
+++ 
b/examples/src/main/java/org/apache/druid/examples/wikipedia/IrcInputRowParser.java
@@ -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;
diff --git 
a/server/src/main/java/org/apache/druid/segment/realtime/firehose/WikipediaIrcDecoder.java
 
b/examples/src/main/java/org/apache/druid/examples/wikipedia/WikipediaIrcDecoder.java
similarity index 99%
rename from 
server/src/main/java/org/apache/druid/segment/realtime/firehose/WikipediaIrcDecoder.java
rename to 
examples/src/main/java/org/apache/druid/examples/wikipedia/WikipediaIrcDecoder.java
index 983a17e..af792c7 100644
--- 
a/server/src/main/java/org/apache/druid/segment/realtime/firehose/WikipediaIrcDecoder.java
+++ 
b/examples/src/main/java/org/apache/druid/examples/wikipedia/WikipediaIrcDecoder.java
@@ -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;
diff --git a/server/pom.xml b/server/pom.xml
index 7935ed8..54be740 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -160,14 +160,6 @@
             <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>
             <version>10.11.1.1</version>
diff --git a/server/src/main/java/org/apache/druid/guice/FirehoseModule.java 
b/server/src/main/java/org/apache/druid/guice/FirehoseModule.java
index 91698d3..1715949 100644
--- a/server/src/main/java/org/apache/druid/guice/FirehoseModule.java
+++ b/server/src/main/java/org/apache/druid/guice/FirehoseModule.java
@@ -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"),
diff --git a/server/src/main/java/org/apache/druid/guice/ParsersModule.java 
b/server/src/main/java/org/apache/druid/guice/ParsersModule.java
deleted file mode 100644
index 421a9a1..0000000
--- a/server/src/main/java/org/apache/druid/guice/ParsersModule.java
+++ /dev/null
@@ -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")
-            )
-    );
-  }
-}
diff --git 
a/server/src/main/java/org/apache/druid/initialization/Initialization.java 
b/server/src/main/java/org/apache/druid/initialization/Initialization.java
index e8f025c..5ab04ea 100644
--- a/server/src/main/java/org/apache/druid/initialization/Initialization.java
+++ b/server/src/main/java/org/apache/druid/initialization/Initialization.java
@@ -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(),
diff --git 
a/services/src/main/java/org/apache/druid/cli/validate/DruidJsonValidator.java 
b/services/src/main/java/org/apache/druid/cli/validate/DruidJsonValidator.java
index dac7a71..8101b33 100644
--- 
a/services/src/main/java/org/apache/druid/cli/validate/DruidJsonValidator.java
+++ 
b/services/src/main/java/org/apache/druid/cli/validate/DruidJsonValidator.java
@@ -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()
             )
         )
     );


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to