Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content/design/realtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Extending the code

Realtime integration is intended to be extended in two ways:

1. Connect to data streams from varied systems ([Firehose](https://github.com/druid-io/druid-api/blob/master/src/main/java/io/druid/data/input/FirehoseFactory.java))
1. Connect to data streams from varied systems ([Firehose](https://github.com/druid-io/druid/blob/master/java-util/src/main/java/io/druid/data/input/FirehoseFactory.java))
2. Adjust the publishing strategy to match your needs ([Plumber](https://github.com/druid-io/druid/blob/master/server/src/main/java/io/druid/segment/realtime/plumber/PlumberSchool.java))

The expectations are that the former will be very common and something that users of Druid will do on a fairly regular basis. Most users will probably never have to deal with the latter form of customization. Indeed, we hope that all potential use cases can be packaged up as part of Druid proper without requiring proprietary customization.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/development/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Binders.dataSegmentPusherBinder(binder)
.to(HdfsDataSegmentPusher.class).in(LazySingleton.class);
```

`Binders.dataSegment*Binder()` is a call provided by the druid-api jar which sets up a Guice multibind "MapBinder". If that doesn't make sense, don't worry about it, just think of it as a magical incantation.
`Binders.dataSegment*Binder()` is a call provided by the java-util jar which sets up a Guice multibind "MapBinder". If that doesn't make sense, don't worry about it, just think of it as a magical incantation.

`addBinding("hdfs")` for the Puller binder creates a new handler for loadSpec objects of type "hdfs". For the Pusher binder it creates a new type value that you can specify for the `druid.storage.type` parameter.

Expand Down
166 changes: 131 additions & 35 deletions java-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,107 @@
</properties>

<dependencies>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-guava</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
</dependency>
<dependency>
<groupId>org.jdbi</groupId>
<artifactId>jdbi</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>org.apache.logging.log4j</groupId>-->
<!--<artifactId>log4j-jul</artifactId>-->
<!--</dependency>-->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<!-- com.lmax.disruptor is optional in log4j-core, so we explicitly include it here -->
<dependency>
<groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId>
</dependency>

<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
</dependency>

<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-multibindings</artifactId>
</dependency>
<dependency>
<groupId>io.airlift</groupId>
<artifactId>airline</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>it.unimi.dsi</groupId>
<artifactId>fastutil</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand All @@ -69,6 +170,10 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-smile</artifactId>
</dependency>
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
Expand Down Expand Up @@ -105,18 +210,10 @@
</dependency>

<!-- Extra dependencies for emitter -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client</artifactId>
Expand Down Expand Up @@ -166,31 +263,6 @@
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jul</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
Expand All @@ -202,14 +274,18 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>it.unimi.dsi</groupId>
<artifactId>fastutil</artifactId>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down Expand Up @@ -277,6 +353,26 @@
</resources>
</build>

<profiles>
<profile>
<id>strict</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<!-- Antlr-generated classes miss @Override, that is not easy to fix -->
<arg>-Xep:MissingOverride:WARN</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<repositories>
<repository>
<id>sigar</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,9 @@ public abstract class DimensionSchema
public static final String DOUBLE_TYPE_NAME = "double";
private static final EmittingLogger log = new EmittingLogger(DimensionSchema.class);


// main druid and druid-api should really use the same ValueType enum.
// merge them when druid-api is merged back into the main repo

/**
* Should be the same as {@code io.druid.segment.column.ValueType}.
* TODO merge them when druid-api is merged back into the main repo
* TODO merge them when java-util is merged with druid-processing into a single druid-core module.
*/
public enum ValueType
{
Expand Down
3 changes: 3 additions & 0 deletions java-util/src/test/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@
<Root level="debug">
<AppenderRef ref="Console"/>
</Root>
<Logger level="debug" name="io.druid" additivity="false">
<AppenderRef ref="Console"/>
</Logger>
</Loggers>
</Configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

/**
* Should be the same as {@link io.druid.data.input.impl.DimensionSchema.ValueType}.
* TODO merge them when druid-api is merged back into the main repo
* TODO merge them when java-util is merged with druid-processing into a single druid-core module.
*/
public enum ValueType
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ public abstract class IncrementalIndex<AggregatorType> extends AbstractIndex imp
{
private volatile DateTime maxIngestedEventTime;

// Used to discover ValueType based on the class of values in a row
// Also used to convert between the duplicate ValueType enums in DimensionSchema (druid-api) and main druid.
/**
* Used to discover ValueType based on the class of values in a row
* TODO remove when {@link ValueType} is merged with {@link DimensionSchema.ValueType}
*/
public static final Map<Object, ValueType> TYPE_MAP = ImmutableMap.<Object, ValueType>builder()
.put(Long.class, ValueType.LONG)
.put(Double.class, ValueType.DOUBLE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,7 @@
import io.druid.metadata.PasswordProvider;

/**
* This is kept separate from {@link io.druid.java.util.emitter.core.HttpEmitterConfig} because {@link PasswordProvider}
* is currently located in druid-api. The java-util module which contains HttpEmitterConfig cannot import
* PasswordProvider because this would introduce a circular dependence between java-util and druid-api.
*
* PasswordProvider could be moved to java-util, but PasswordProvider is annotated with
* {@link io.druid.guice.annotations.ExtensionPoint}, which would also have to be moved.
*
* It would be easier to resolve these issues and merge the TLS-related config with HttpEmitterConfig once
* https://github.com/druid-io/druid/issues/4312 is resolved, so the TLS config is kept separate for now.
* TODO merge with {@link io.druid.java.util.emitter.core.HttpEmitterConfig}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we fix this TODO?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not going to do this in this PR

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, can we add more context to what the TODO means and link it to an issue?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense, in this PR, to change nothing about the content and just collapse the modules.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@b-slim previous comment was a lengthy explanation why those config classes couldn't be merged at that time. Now they could. I didn't want to add explanations why it should be done, because previously it wasn't as well (it is considered obvious, I suppose.)

Anyway, in general we don't usually add TODOs and favor issues on github; I've created #5491.

*/
public class HttpEmitterSSLClientConfig
{
Expand Down