mirror of https://github.com/apache/druid.git
OMG!!! A lot of stuff has been moved. Modules have been created and destroyed, but everything is compiling and unit tests are passing, OMFG this is awesome.!
This commit is contained in:
parent
2e26a4d8b9
commit
56e2b956d0
251
client/pom.xml
251
client/pom.xml
|
@ -1,251 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!--
|
|
||||||
~ Druid - a distributed column store.
|
|
||||||
~ Copyright (C) 2012 Metamarkets Group Inc.
|
|
||||||
~
|
|
||||||
~ This program is free software; you can redistribute it and/or
|
|
||||||
~ modify it under the terms of the GNU General Public License
|
|
||||||
~ as published by the Free Software Foundation; either version 2
|
|
||||||
~ of the License, or (at your option) any later version.
|
|
||||||
~
|
|
||||||
~ This program is distributed in the hope that it will be useful,
|
|
||||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
~ GNU General Public License for more details.
|
|
||||||
~
|
|
||||||
~ You should have received a copy of the GNU General Public License
|
|
||||||
~ along with this program; if not, write to the Free Software
|
|
||||||
~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>com.metamx.druid</groupId>
|
|
||||||
<artifactId>druid-client</artifactId>
|
|
||||||
<name>druid-client</name>
|
|
||||||
<description>druid-client</description>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>com.metamx</groupId>
|
|
||||||
<artifactId>druid</artifactId>
|
|
||||||
<version>0.5.50-SNAPSHOT</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.metamx.druid</groupId>
|
|
||||||
<artifactId>druid-common</artifactId>
|
|
||||||
<version>${project.parent.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.metamx.druid</groupId>
|
|
||||||
<artifactId>druid-indexing-common</artifactId>
|
|
||||||
<version>${project.parent.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.metamx</groupId>
|
|
||||||
<artifactId>emitter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.metamx</groupId>
|
|
||||||
<artifactId>http-client</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.metamx</groupId>
|
|
||||||
<artifactId>java-util</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.metamx</groupId>
|
|
||||||
<artifactId>server-metrics</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.davekoelle</groupId>
|
|
||||||
<artifactId>alphanum</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-codec</groupId>
|
|
||||||
<artifactId>commons-codec</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-httpclient</groupId>
|
|
||||||
<artifactId>commons-httpclient</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.skife.config</groupId>
|
|
||||||
<artifactId>config-magic</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.curator</groupId>
|
|
||||||
<artifactId>curator-client</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.curator</groupId>
|
|
||||||
<artifactId>curator-framework</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.curator</groupId>
|
|
||||||
<artifactId>curator-x-discovery</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-server</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-servlet</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
|
||||||
<artifactId>jetty-servlets</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.guava</groupId>
|
|
||||||
<artifactId>guava</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.inject</groupId>
|
|
||||||
<artifactId>guice</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.inject.extensions</groupId>
|
|
||||||
<artifactId>guice-servlet</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.ibm.icu</groupId>
|
|
||||||
<artifactId>icu4j</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.jaxrs</groupId>
|
|
||||||
<artifactId>jackson-jaxrs-json-provider</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<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>javax.inject</groupId>
|
|
||||||
<artifactId>javax.inject</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.sun.jersey</groupId>
|
|
||||||
<artifactId>jersey-server</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.sun.jersey</groupId>
|
|
||||||
<artifactId>jersey-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.sun.jersey.contribs</groupId>
|
|
||||||
<artifactId>jersey-guice</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>joda-time</groupId>
|
|
||||||
<artifactId>joda-time</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
|
||||||
<artifactId>jsr305</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.inject.extensions</groupId>
|
|
||||||
<artifactId>guice-servlet</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>log4j</groupId>
|
|
||||||
<artifactId>log4j</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jboss.netty</groupId>
|
|
||||||
<artifactId>netty</artifactId>
|
|
||||||
<version>3.2.4.Final</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>javax.servlet</groupId>
|
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-log4j12</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.code.simple-spring-memcached</groupId>
|
|
||||||
<artifactId>spymemcached</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.antlr</groupId>
|
|
||||||
<artifactId>antlr4-runtime</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>commons-cli</groupId>
|
|
||||||
<artifactId>commons-cli</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.metamx</groupId>
|
|
||||||
<artifactId>bytebuffer-collections</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>net.jpountz.lz4</groupId>
|
|
||||||
<artifactId>lz4</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Tests -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.easymock</groupId>
|
|
||||||
<artifactId>easymock</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.caliper</groupId>
|
|
||||||
<artifactId>caliper</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.curator</groupId>
|
|
||||||
<artifactId>curator-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>test-jar</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.antlr</groupId>
|
|
||||||
<artifactId>antlr4-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>antlr4</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
|
@ -1,31 +0,0 @@
|
||||||
package com.metamx.druid.client;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JacksonInject;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import com.metamx.druid.initialization.ZkPathsConfig;
|
|
||||||
import org.apache.curator.framework.CuratorFramework;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class BatchServerInventoryViewProvider implements ServerInventoryViewProvider
|
|
||||||
{
|
|
||||||
@JacksonInject
|
|
||||||
@NotNull
|
|
||||||
private ZkPathsConfig zkPaths = null;
|
|
||||||
|
|
||||||
@JacksonInject
|
|
||||||
@NotNull
|
|
||||||
private CuratorFramework curator = null;
|
|
||||||
|
|
||||||
@JacksonInject
|
|
||||||
@NotNull
|
|
||||||
private ObjectMapper jsonMapper = null;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ServerInventoryView get()
|
|
||||||
{
|
|
||||||
return new BatchServerInventoryView(zkPaths, curator, jsonMapper);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
package com.metamx.druid.client;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public interface InventoryView
|
|
||||||
{
|
|
||||||
public DruidServer getInventoryValue(String string);
|
|
||||||
public Iterable<DruidServer> getInventory();
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.metamx.druid.client;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
|
||||||
import com.google.inject.Provider;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = SingleServerInventoryProvider.class)
|
|
||||||
@JsonSubTypes(value = {
|
|
||||||
@JsonSubTypes.Type(name = "legacy", value = SingleServerInventoryProvider.class),
|
|
||||||
@JsonSubTypes.Type(name = "batch", value = BatchServerInventoryViewProvider.class)
|
|
||||||
})
|
|
||||||
public interface ServerInventoryViewProvider extends Provider<ServerInventoryView>
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,31 +0,0 @@
|
||||||
package com.metamx.druid.client;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JacksonInject;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import com.metamx.druid.initialization.ZkPathsConfig;
|
|
||||||
import org.apache.curator.framework.CuratorFramework;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class SingleServerInventoryProvider implements ServerInventoryViewProvider
|
|
||||||
{
|
|
||||||
@JacksonInject
|
|
||||||
@NotNull
|
|
||||||
private ZkPathsConfig zkPaths = null;
|
|
||||||
|
|
||||||
@JacksonInject
|
|
||||||
@NotNull
|
|
||||||
private CuratorFramework curator = null;
|
|
||||||
|
|
||||||
@JacksonInject
|
|
||||||
@NotNull
|
|
||||||
private ObjectMapper jsonMapper = null;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ServerInventoryView get()
|
|
||||||
{
|
|
||||||
return new SingleServerInventoryView(zkPaths, curator, jsonMapper);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
package com.metamx.druid.client.cache;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
|
||||||
import com.google.inject.Provider;
|
|
||||||
|
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = LocalCacheProvider.class)
|
|
||||||
@JsonSubTypes(value = {
|
|
||||||
@JsonSubTypes.Type(name = "local", value = LocalCacheProvider.class),
|
|
||||||
@JsonSubTypes.Type(name = "memcached", value = MemcachedCacheProvider.class)
|
|
||||||
})
|
|
||||||
public interface CacheProvider extends Provider<Cache>
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,49 +0,0 @@
|
||||||
package com.metamx.druid.client.cache;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
public class MemcachedCacheConfig
|
|
||||||
{
|
|
||||||
@JsonProperty
|
|
||||||
private int expiration = 2592000; // What is this number?
|
|
||||||
|
|
||||||
@JsonProperty
|
|
||||||
private int timeout = 500;
|
|
||||||
|
|
||||||
@JsonProperty
|
|
||||||
@NotNull
|
|
||||||
private String hosts;
|
|
||||||
|
|
||||||
@JsonProperty
|
|
||||||
private int maxObjectSize = 50 * 1024 * 1024;
|
|
||||||
|
|
||||||
@JsonProperty
|
|
||||||
private String memcachedPrefix = "druid";
|
|
||||||
|
|
||||||
public int getExpiration()
|
|
||||||
{
|
|
||||||
return expiration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getTimeout()
|
|
||||||
{
|
|
||||||
return timeout;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getHosts()
|
|
||||||
{
|
|
||||||
return hosts;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getMaxObjectSize()
|
|
||||||
{
|
|
||||||
return maxObjectSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMemcachedPrefix()
|
|
||||||
{
|
|
||||||
return memcachedPrefix;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
package com.metamx.druid.client.cache;
|
|
||||||
|
|
||||||
public class MemcachedCacheProvider extends MemcachedCacheConfig implements CacheProvider
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public Cache get()
|
|
||||||
{
|
|
||||||
return MemcachedCache.create(this);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.metamx.druid.client.indexing;
|
|
||||||
|
|
||||||
import com.google.inject.BindingAnnotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
@BindingAnnotation
|
|
||||||
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
public @interface IndexingService
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
package com.metamx.druid.client.selector;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public interface DiscoverySelector<T>
|
|
||||||
{
|
|
||||||
public T pick();
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
package com.metamx.druid.client.selector;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public interface Server
|
|
||||||
{
|
|
||||||
public String getScheme();
|
|
||||||
public String getHost();
|
|
||||||
public int getPort();
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
package com.metamx.druid.coordination;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JacksonInject;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class BatchDataSegmentAnnouncerProvider implements DataSegmentAnnouncerProvider
|
|
||||||
{
|
|
||||||
@JacksonInject
|
|
||||||
@NotNull
|
|
||||||
private BatchDataSegmentAnnouncer batchAnnouncer = null;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DataSegmentAnnouncer get()
|
|
||||||
{
|
|
||||||
return batchAnnouncer;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.metamx.druid.coordination;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
|
||||||
import com.google.inject.Provider;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = LegacyDataSegmentAnnouncerProvider.class)
|
|
||||||
@JsonSubTypes(value = {
|
|
||||||
@JsonSubTypes.Type(name = "legacy", value = LegacyDataSegmentAnnouncerProvider.class),
|
|
||||||
@JsonSubTypes.Type(name = "batch", value = BatchDataSegmentAnnouncerProvider.class)
|
|
||||||
})
|
|
||||||
public interface DataSegmentAnnouncerProvider extends Provider<DataSegmentAnnouncer>
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
package com.metamx.druid.coordination;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JacksonInject;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import com.metamx.common.lifecycle.Lifecycle;
|
|
||||||
import com.metamx.druid.guice.annotations.Json;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class LegacyDataSegmentAnnouncerProvider implements DataSegmentAnnouncerProvider
|
|
||||||
{
|
|
||||||
@JacksonInject
|
|
||||||
@NotNull
|
|
||||||
private SingleDataSegmentAnnouncer singleAnnouncer = null;
|
|
||||||
|
|
||||||
@JacksonInject
|
|
||||||
@NotNull
|
|
||||||
private BatchDataSegmentAnnouncer batchAnnouncer = null;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DataSegmentAnnouncer get()
|
|
||||||
{
|
|
||||||
return new MultipleDataSegmentAnnouncerDataSegmentAnnouncer(
|
|
||||||
Arrays.<DataSegmentAnnouncer>asList(singleAnnouncer, batchAnnouncer)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
package com.metamx.druid.curator.discovery;
|
|
||||||
|
|
||||||
import com.metamx.druid.initialization.DruidNode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Does nothing.
|
|
||||||
*/
|
|
||||||
public class NoopServiceAnnouncer implements ServiceAnnouncer
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void announce(DruidNode node)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void unannounce(DruidNode node)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
package com.metamx.druid.curator.discovery;
|
|
||||||
|
|
||||||
import com.metamx.druid.initialization.DruidNode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Announces our ability to serve a particular function. Multiple users may announce the same service, in which
|
|
||||||
* case they are treated as interchangeable instances of that service.
|
|
||||||
*/
|
|
||||||
public interface ServiceAnnouncer
|
|
||||||
{
|
|
||||||
public void announce(DruidNode node);
|
|
||||||
|
|
||||||
public void unannounce(DruidNode node);
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
package com.metamx.druid.guice;
|
|
||||||
|
|
||||||
import com.google.inject.Binder;
|
|
||||||
import com.google.inject.Module;
|
|
||||||
import com.google.inject.Provides;
|
|
||||||
import com.metamx.druid.concurrent.Execs;
|
|
||||||
import com.metamx.druid.coordination.BatchDataSegmentAnnouncer;
|
|
||||||
import com.metamx.druid.coordination.DataSegmentAnnouncer;
|
|
||||||
import com.metamx.druid.coordination.DataSegmentAnnouncerProvider;
|
|
||||||
import com.metamx.druid.coordination.SingleDataSegmentAnnouncer;
|
|
||||||
import com.metamx.druid.curator.announcement.Announcer;
|
|
||||||
import com.metamx.druid.initialization.BatchDataSegmentAnnouncerConfig;
|
|
||||||
import org.apache.curator.framework.CuratorFramework;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class AnnouncerModule implements Module
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void configure(Binder binder)
|
|
||||||
{
|
|
||||||
JsonConfigProvider.bind(binder, "druid.announcer", BatchDataSegmentAnnouncerConfig.class);
|
|
||||||
JsonConfigProvider.bind(binder, "druid.announcer", DataSegmentAnnouncerProvider.class);
|
|
||||||
binder.bind(DataSegmentAnnouncer.class).toProvider(DataSegmentAnnouncerProvider.class);
|
|
||||||
binder.bind(BatchDataSegmentAnnouncer.class).in(ManageLifecycleLast.class);
|
|
||||||
binder.bind(SingleDataSegmentAnnouncer.class).in(ManageLifecycleLast.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Provides
|
|
||||||
@ManageLifecycle
|
|
||||||
public Announcer getAnnouncer(CuratorFramework curator)
|
|
||||||
{
|
|
||||||
return new Announcer(curator, Execs.singleThreaded("Announcer-%s"));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
package com.metamx.druid.guice;
|
|
||||||
|
|
||||||
import com.google.inject.Binder;
|
|
||||||
import com.google.inject.Module;
|
|
||||||
import com.metamx.druid.client.BrokerServerView;
|
|
||||||
import com.metamx.druid.client.CachingClusteredClient;
|
|
||||||
import com.metamx.druid.client.TimelineServerView;
|
|
||||||
import com.metamx.druid.client.cache.Cache;
|
|
||||||
import com.metamx.druid.client.cache.CacheProvider;
|
|
||||||
import com.metamx.druid.query.MapQueryToolChestWarehouse;
|
|
||||||
import com.metamx.druid.query.QueryToolChestWarehouse;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class BrokerModule implements Module
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void configure(Binder binder)
|
|
||||||
{
|
|
||||||
binder.bind(QueryToolChestWarehouse.class).to(MapQueryToolChestWarehouse.class);
|
|
||||||
|
|
||||||
binder.bind(CachingClusteredClient.class).in(LazySingleton.class);
|
|
||||||
binder.bind(TimelineServerView.class).to(BrokerServerView.class).in(LazySingleton.class);
|
|
||||||
|
|
||||||
binder.bind(Cache.class).toProvider(CacheProvider.class).in(ManageLifecycle.class);
|
|
||||||
JsonConfigProvider.bind(binder, "druid.broker.cache", CacheProvider.class);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
package com.metamx.druid.guice;
|
|
||||||
|
|
||||||
import com.google.inject.Binder;
|
|
||||||
import com.google.inject.Module;
|
|
||||||
import com.metamx.druid.client.InventoryView;
|
|
||||||
import com.metamx.druid.client.ServerInventoryView;
|
|
||||||
import com.metamx.druid.client.ServerInventoryViewProvider;
|
|
||||||
import com.metamx.druid.client.ServerView;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class ServerViewModule implements Module
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void configure(Binder binder)
|
|
||||||
{
|
|
||||||
JsonConfigProvider.bind(binder, "druid.announcer", ServerInventoryViewProvider.class);
|
|
||||||
binder.bind(InventoryView.class).to(ServerInventoryView.class);
|
|
||||||
binder.bind(ServerView.class).to(ServerInventoryView.class);
|
|
||||||
binder.bind(ServerInventoryView.class).toProvider(ServerInventoryViewProvider.class).in(ManageLifecycle.class);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.metamx.druid.guice.annotations;
|
|
||||||
|
|
||||||
import com.google.inject.BindingAnnotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
@BindingAnnotation
|
|
||||||
public @interface Client
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
package com.metamx.druid.http;
|
|
||||||
|
|
||||||
import com.google.inject.Binder;
|
|
||||||
import com.google.inject.Module;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class ZkPathsModule implements Module
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void configure(Binder binder)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
package com.metamx.druid.http.log;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JacksonInject;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import com.google.inject.Injector;
|
|
||||||
import com.metamx.emitter.service.ServiceEmitter;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
@JsonTypeName("emitter")
|
|
||||||
public class EmittingRequestLoggerProvider implements RequestLoggerProvider
|
|
||||||
{
|
|
||||||
@JsonProperty
|
|
||||||
@NotNull
|
|
||||||
private String feed = null;
|
|
||||||
|
|
||||||
@JacksonInject
|
|
||||||
@NotNull
|
|
||||||
private ServiceEmitter emitter = null;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
public void injectMe(Injector injector)
|
|
||||||
{
|
|
||||||
System.out.println("YAYAYAYAYAYA!!!");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public RequestLogger get()
|
|
||||||
{
|
|
||||||
return new EmittingRequestLogger(emitter, feed);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
package com.metamx.druid.http.log;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JacksonInject;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import com.metamx.common.concurrent.ScheduledExecutorFactory;
|
|
||||||
import com.metamx.druid.guice.annotations.Json;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
@JsonTypeName("file")
|
|
||||||
public class FileRequestLoggerProvider implements RequestLoggerProvider
|
|
||||||
{
|
|
||||||
@JsonProperty
|
|
||||||
@NotNull
|
|
||||||
private File dir = null;
|
|
||||||
|
|
||||||
@JacksonInject
|
|
||||||
@NotNull
|
|
||||||
private ScheduledExecutorFactory factory = null;
|
|
||||||
|
|
||||||
|
|
||||||
@JacksonInject
|
|
||||||
@NotNull
|
|
||||||
@Json
|
|
||||||
private ObjectMapper jsonMapper = null;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public RequestLogger get()
|
|
||||||
{
|
|
||||||
return new FileRequestLogger(jsonMapper, factory.create(1, "RequestLogger-%s"), dir);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
package com.metamx.druid.http.log;
|
|
||||||
|
|
||||||
import com.metamx.druid.http.RequestLogLine;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class NoopRequestLogger implements RequestLogger
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void log(RequestLogLine requestLogLine) throws Exception
|
|
||||||
{
|
|
||||||
// This is a no op!
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
package com.metamx.druid.http.log;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class NoopRequestLoggerProvider implements RequestLoggerProvider
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public RequestLogger get()
|
|
||||||
{
|
|
||||||
return new NoopRequestLogger();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
package com.metamx.druid.http.log;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
|
||||||
import com.google.inject.Provider;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A Marker interface for things that can provide a RequestLogger. This can be combined with jackson polymorphic serde
|
|
||||||
* to provide new RequestLogger implementations as plugins.
|
|
||||||
*/
|
|
||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = NoopRequestLoggerProvider.class)
|
|
||||||
public interface RequestLoggerProvider extends Provider<RequestLogger>
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
package com.metamx.druid.initialization;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
|
|
||||||
import javax.validation.constraints.Max;
|
|
||||||
import javax.validation.constraints.Min;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class BatchDataSegmentAnnouncerConfig
|
|
||||||
{
|
|
||||||
@JsonProperty
|
|
||||||
@Min(1)
|
|
||||||
private int segmentsPerNode = 50;
|
|
||||||
|
|
||||||
@JsonProperty
|
|
||||||
@Max(1024 * 1024)
|
|
||||||
@Min(1024)
|
|
||||||
private long maxBytesPerNode = 512 * 1024;
|
|
||||||
|
|
||||||
public int getSegmentsPerNode()
|
|
||||||
{
|
|
||||||
return segmentsPerNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getMaxBytesPerNode()
|
|
||||||
{
|
|
||||||
return maxBytesPerNode;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
package com.metamx.druid.initialization;
|
|
||||||
|
|
||||||
import com.google.inject.Injector;
|
|
||||||
import org.eclipse.jetty.server.Server;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public interface JettyServerInitializer
|
|
||||||
{
|
|
||||||
public void initialize(Server server, Injector injector);
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
package com.metamx.druid.query;
|
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import io.druid.query.Query;
|
|
||||||
import io.druid.query.QueryToolChest;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class MapQueryToolChestWarehouse implements QueryToolChestWarehouse
|
|
||||||
{
|
|
||||||
private final Map<Class<? extends Query>, QueryToolChest> toolchests;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
public MapQueryToolChestWarehouse(
|
|
||||||
Map<Class<? extends Query>, QueryToolChest> toolchests
|
|
||||||
)
|
|
||||||
{
|
|
||||||
this.toolchests = toolchests;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public <T, QueryType extends Query<T>> QueryToolChest<T, QueryType> getToolChest(QueryType query)
|
|
||||||
{
|
|
||||||
return toolchests.get(query.getClass());
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
package com.metamx.druid.query.group;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class GroupByQueryConfig
|
|
||||||
{
|
|
||||||
@JsonProperty
|
|
||||||
private boolean singleThreaded = false;
|
|
||||||
|
|
||||||
@JsonProperty
|
|
||||||
private int maxIntermediateRows = 50000;
|
|
||||||
|
|
||||||
@JsonProperty
|
|
||||||
private int maxResults = 500000;
|
|
||||||
|
|
||||||
public boolean isSingleThreaded()
|
|
||||||
{
|
|
||||||
return singleThreaded;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getMaxIntermediateRows()
|
|
||||||
{
|
|
||||||
return maxIntermediateRows;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMaxIntermediateRows(int maxIntermediateRows)
|
|
||||||
{
|
|
||||||
this.maxIntermediateRows = maxIntermediateRows;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getMaxResults()
|
|
||||||
{
|
|
||||||
return maxResults;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
package com.metamx.druid.query.group.having;
|
|
||||||
|
|
||||||
import com.metamx.druid.input.Row;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class AlwaysHavingSpec implements HavingSpec
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public boolean eval(Row row)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
package com.metamx.druid.query.group.orderby;
|
|
||||||
|
|
||||||
import com.google.common.collect.MinMaxPriorityQueue;
|
|
||||||
|
|
||||||
import java.util.Iterator;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Utility class that supports iterating a priority queue in sorted order.
|
|
||||||
*/
|
|
||||||
class OrderedPriorityQueueItems<T> implements Iterable<T>
|
|
||||||
{
|
|
||||||
private MinMaxPriorityQueue<T> rows;
|
|
||||||
|
|
||||||
public OrderedPriorityQueueItems(MinMaxPriorityQueue<T> rows)
|
|
||||||
{
|
|
||||||
this.rows = rows;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Iterator<T> iterator()
|
|
||||||
{
|
|
||||||
return new Iterator<T>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean hasNext()
|
|
||||||
{
|
|
||||||
return !rows.isEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public T next()
|
|
||||||
{
|
|
||||||
return rows.poll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void remove()
|
|
||||||
{
|
|
||||||
throw new UnsupportedOperationException("Can't remove any item from an intermediary heap for orderBy/limit");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.druid.segment;
|
package com.metamx.druid;
|
||||||
|
|
||||||
import org.joda.time.Interval;
|
import org.joda.time.Interval;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -20,7 +20,6 @@
|
||||||
package com.metamx.druid;
|
package com.metamx.druid;
|
||||||
|
|
||||||
import com.metamx.druid.partition.PartitionHolder;
|
import com.metamx.druid.partition.PartitionHolder;
|
||||||
import io.druid.segment.LogicalSegment;
|
|
||||||
import org.joda.time.Interval;
|
import org.joda.time.Interval;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
package com.metamx.druid.guice;
|
|
||||||
|
|
||||||
import com.google.inject.Binder;
|
|
||||||
import com.google.inject.Module;
|
|
||||||
import com.google.inject.Provides;
|
|
||||||
import com.metamx.druid.db.DbConnector;
|
|
||||||
import com.metamx.druid.db.DbConnectorConfig;
|
|
||||||
import com.metamx.druid.db.DbTablesConfig;
|
|
||||||
import org.skife.jdbi.v2.IDBI;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class DbConnectorModule implements Module
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void configure(Binder binder)
|
|
||||||
{
|
|
||||||
JsonConfigProvider.bind(binder, "druid.db.tables", DbTablesConfig.class);
|
|
||||||
JsonConfigProvider.bind(binder, "druid.db.connector", DbConnectorConfig.class);
|
|
||||||
|
|
||||||
binder.bind(DbConnector.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Provides @LazySingleton
|
|
||||||
public IDBI getDbi(final DbConnector dbConnector)
|
|
||||||
{
|
|
||||||
return dbConnector.getDBI();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.metamx.druid.guice;
|
|
||||||
|
|
||||||
import com.google.inject.Binder;
|
|
||||||
import com.google.inject.Module;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class DruidGuiceExtensions implements Module
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void configure(Binder binder)
|
|
||||||
{
|
|
||||||
binder.requireExplicitBindings();
|
|
||||||
binder.bindScope(LazySingleton.class, DruidScopes.SINGLETON);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
package com.metamx.druid.guice;
|
|
||||||
|
|
||||||
import com.google.inject.ScopeAnnotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
@Target({ ElementType.TYPE, ElementType.METHOD })
|
|
||||||
@Retention(RUNTIME)
|
|
||||||
@ScopeAnnotation
|
|
||||||
public @interface LazySingleton
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
package com.metamx.druid.guice;
|
|
||||||
|
|
||||||
import com.google.inject.ScopeAnnotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Marks the object to be managed by {@link com.metamx.common.lifecycle.Lifecycle}
|
|
||||||
*
|
|
||||||
* This Scope gets defined by {@link com.metamx.druid.guice.LifecycleModule}
|
|
||||||
*/
|
|
||||||
@Target({ ElementType.TYPE, ElementType.METHOD })
|
|
||||||
@Retention(RUNTIME)
|
|
||||||
@ScopeAnnotation
|
|
||||||
public @interface ManageLifecycle
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
package com.metamx.druid.guice;
|
|
||||||
|
|
||||||
import com.google.inject.ScopeAnnotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Marks the object to be managed by {@link com.metamx.common.lifecycle.Lifecycle} and set to be on Stage.LAST
|
|
||||||
*
|
|
||||||
* This Scope gets defined by {@link com.metamx.druid.guice.LifecycleModule}
|
|
||||||
*/
|
|
||||||
@Target({ ElementType.TYPE, ElementType.METHOD })
|
|
||||||
@Retention(RUNTIME)
|
|
||||||
@ScopeAnnotation
|
|
||||||
public @interface ManageLifecycleLast
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
package com.metamx.druid.guice;
|
|
||||||
|
|
||||||
import com.google.common.base.Supplier;
|
|
||||||
import com.google.inject.Inject;
|
|
||||||
import com.google.inject.Injector;
|
|
||||||
import com.google.inject.Key;
|
|
||||||
import com.google.inject.Provider;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public class SupplierProvider<T> implements Provider<T>
|
|
||||||
{
|
|
||||||
private final Key<Supplier<T>> supplierKey;
|
|
||||||
|
|
||||||
private Provider<Supplier<T>> supplierProvider;
|
|
||||||
|
|
||||||
public SupplierProvider(
|
|
||||||
Key<Supplier<T>> supplierKey
|
|
||||||
)
|
|
||||||
{
|
|
||||||
this.supplierKey = supplierKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
public void configure(Injector injector)
|
|
||||||
{
|
|
||||||
this.supplierProvider = injector.getProvider(supplierKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public T get()
|
|
||||||
{
|
|
||||||
return supplierProvider.get().get();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.metamx.druid.guice.annotations;
|
|
||||||
|
|
||||||
import com.google.inject.BindingAnnotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
@BindingAnnotation
|
|
||||||
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
public @interface Global
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.metamx.druid.guice.annotations;
|
|
||||||
|
|
||||||
import com.google.inject.BindingAnnotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
@BindingAnnotation
|
|
||||||
public @interface Json
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.metamx.druid.guice.annotations;
|
|
||||||
|
|
||||||
import com.google.inject.BindingAnnotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
@BindingAnnotation
|
|
||||||
public @interface Self
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
package com.metamx.druid.guice.annotations;
|
|
||||||
|
|
||||||
import com.google.inject.BindingAnnotation;
|
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
@BindingAnnotation
|
|
||||||
public @interface Smile
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -22,18 +22,18 @@ package com.metamx.druid.jackson;
|
||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||||
import com.metamx.druid.aggregation.CountAggregatorFactory;
|
|
||||||
import com.metamx.druid.aggregation.DoubleSumAggregatorFactory;
|
|
||||||
import com.metamx.druid.aggregation.HistogramAggregatorFactory;
|
|
||||||
import com.metamx.druid.aggregation.JavaScriptAggregatorFactory;
|
|
||||||
import com.metamx.druid.aggregation.LongSumAggregatorFactory;
|
|
||||||
import com.metamx.druid.aggregation.MaxAggregatorFactory;
|
|
||||||
import com.metamx.druid.aggregation.MinAggregatorFactory;
|
|
||||||
import com.metamx.druid.aggregation.post.ArithmeticPostAggregator;
|
|
||||||
import com.metamx.druid.aggregation.post.ConstantPostAggregator;
|
|
||||||
import com.metamx.druid.aggregation.post.FieldAccessPostAggregator;
|
|
||||||
import io.druid.query.aggregation.AggregatorFactory;
|
import io.druid.query.aggregation.AggregatorFactory;
|
||||||
import io.druid.query.aggregation.PostAggregator;
|
import io.druid.query.aggregation.PostAggregator;
|
||||||
|
import io.druid.query.aggregation.aggregation.CountAggregatorFactory;
|
||||||
|
import io.druid.query.aggregation.aggregation.DoubleSumAggregatorFactory;
|
||||||
|
import io.druid.query.aggregation.aggregation.HistogramAggregatorFactory;
|
||||||
|
import io.druid.query.aggregation.aggregation.JavaScriptAggregatorFactory;
|
||||||
|
import io.druid.query.aggregation.aggregation.LongSumAggregatorFactory;
|
||||||
|
import io.druid.query.aggregation.aggregation.MaxAggregatorFactory;
|
||||||
|
import io.druid.query.aggregation.aggregation.MinAggregatorFactory;
|
||||||
|
import io.druid.query.aggregation.aggregation.post.ArithmeticPostAggregator;
|
||||||
|
import io.druid.query.aggregation.aggregation.post.ConstantPostAggregator;
|
||||||
|
import io.druid.query.aggregation.aggregation.post.FieldAccessPostAggregator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -25,9 +25,9 @@ import com.google.inject.Binder;
|
||||||
import com.google.inject.Key;
|
import com.google.inject.Key;
|
||||||
import com.google.inject.Module;
|
import com.google.inject.Module;
|
||||||
import com.google.inject.Provides;
|
import com.google.inject.Provides;
|
||||||
import com.metamx.druid.guice.LazySingleton;
|
import io.druid.guice.guice.LazySingleton;
|
||||||
import com.metamx.druid.guice.annotations.Json;
|
import io.druid.guice.guice.annotations.Json;
|
||||||
import com.metamx.druid.guice.annotations.Smile;
|
import io.druid.guice.guice.annotations.Smile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,4 +1,23 @@
|
||||||
package com.metamx.druid.guice;
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.inject.Binder;
|
import com.google.inject.Binder;
|
|
@ -0,0 +1,48 @@
|
||||||
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
|
import com.google.inject.Binder;
|
||||||
|
import com.google.inject.Module;
|
||||||
|
import com.google.inject.Provides;
|
||||||
|
import com.metamx.druid.db.DbConnector;
|
||||||
|
import com.metamx.druid.db.DbConnectorConfig;
|
||||||
|
import com.metamx.druid.db.DbTablesConfig;
|
||||||
|
import org.skife.jdbi.v2.IDBI;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public class DbConnectorModule implements Module
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void configure(Binder binder)
|
||||||
|
{
|
||||||
|
JsonConfigProvider.bind(binder, "druid.db.tables", DbTablesConfig.class);
|
||||||
|
JsonConfigProvider.bind(binder, "druid.db.connector", DbConnectorConfig.class);
|
||||||
|
|
||||||
|
binder.bind(DbConnector.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Provides @LazySingleton
|
||||||
|
public IDBI getDbi(final DbConnector dbConnector)
|
||||||
|
{
|
||||||
|
return dbConnector.getDBI();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
|
import com.google.inject.Binder;
|
||||||
|
import com.google.inject.Module;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public class DruidGuiceExtensions implements Module
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void configure(Binder binder)
|
||||||
|
{
|
||||||
|
binder.requireExplicitBindings();
|
||||||
|
binder.bindScope(LazySingleton.class, DruidScopes.SINGLETON);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,23 @@
|
||||||
package com.metamx.druid.guice;
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.google.inject.Key;
|
import com.google.inject.Key;
|
|
@ -1,4 +1,23 @@
|
||||||
package com.metamx.druid.guice;
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair;
|
import com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair;
|
||||||
|
@ -10,8 +29,8 @@ import com.google.inject.Injector;
|
||||||
import com.google.inject.Key;
|
import com.google.inject.Key;
|
||||||
import com.google.inject.Module;
|
import com.google.inject.Module;
|
||||||
import com.google.inject.Provides;
|
import com.google.inject.Provides;
|
||||||
import com.metamx.druid.guice.annotations.Json;
|
import io.druid.guice.guice.annotations.Json;
|
||||||
import com.metamx.druid.guice.annotations.Smile;
|
import io.druid.guice.guice.annotations.Smile;
|
||||||
import org.skife.config.ConfigurationObjectFactory;
|
import org.skife.config.ConfigurationObjectFactory;
|
||||||
|
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
|
@ -1,4 +1,23 @@
|
||||||
package com.metamx.druid.guice;
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
import com.google.common.base.Supplier;
|
import com.google.common.base.Supplier;
|
||||||
import com.google.inject.Binder;
|
import com.google.inject.Binder;
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.guice;
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.google.common.base.Supplier;
|
import com.google.common.base.Supplier;
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.guice;
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
import com.google.common.base.Supplier;
|
import com.google.common.base.Supplier;
|
||||||
import com.google.common.base.Suppliers;
|
import com.google.common.base.Suppliers;
|
|
@ -1,4 +1,23 @@
|
||||||
package com.metamx.druid.guice;
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JacksonInject;
|
import com.fasterxml.jackson.annotation.JacksonInject;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
|
import com.google.inject.ScopeAnnotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
@Target({ ElementType.TYPE, ElementType.METHOD })
|
||||||
|
@Retention(RUNTIME)
|
||||||
|
@ScopeAnnotation
|
||||||
|
public @interface LazySingleton
|
||||||
|
{
|
||||||
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.guice;
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.inject.Binder;
|
import com.google.inject.Binder;
|
|
@ -1,4 +1,23 @@
|
||||||
package com.metamx.druid.guice;
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.inject.Key;
|
import com.google.inject.Key;
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.guice;
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
|
@ -0,0 +1,40 @@
|
||||||
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
|
import com.google.inject.ScopeAnnotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Marks the object to be managed by {@link com.metamx.common.lifecycle.Lifecycle}
|
||||||
|
*
|
||||||
|
* This Scope gets defined by {@link io.druid.guice.guice.LifecycleModule}
|
||||||
|
*/
|
||||||
|
@Target({ ElementType.TYPE, ElementType.METHOD })
|
||||||
|
@Retention(RUNTIME)
|
||||||
|
@ScopeAnnotation
|
||||||
|
public @interface ManageLifecycle
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
|
import com.google.inject.ScopeAnnotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Marks the object to be managed by {@link com.metamx.common.lifecycle.Lifecycle} and set to be on Stage.LAST
|
||||||
|
*
|
||||||
|
* This Scope gets defined by {@link io.druid.guice.guice.LifecycleModule}
|
||||||
|
*/
|
||||||
|
@Target({ ElementType.TYPE, ElementType.METHOD })
|
||||||
|
@Retention(RUNTIME)
|
||||||
|
@ScopeAnnotation
|
||||||
|
public @interface ManageLifecycleLast
|
||||||
|
{
|
||||||
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.guice;
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
import com.google.inject.Binder;
|
import com.google.inject.Binder;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
|
@ -0,0 +1,54 @@
|
||||||
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
|
import com.google.common.base.Supplier;
|
||||||
|
import com.google.inject.Inject;
|
||||||
|
import com.google.inject.Injector;
|
||||||
|
import com.google.inject.Key;
|
||||||
|
import com.google.inject.Provider;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public class SupplierProvider<T> implements Provider<T>
|
||||||
|
{
|
||||||
|
private final Key<Supplier<T>> supplierKey;
|
||||||
|
|
||||||
|
private Provider<Supplier<T>> supplierProvider;
|
||||||
|
|
||||||
|
public SupplierProvider(
|
||||||
|
Key<Supplier<T>> supplierKey
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this.supplierKey = supplierKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public void configure(Injector injector)
|
||||||
|
{
|
||||||
|
this.supplierProvider = injector.getProvider(supplierKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T get()
|
||||||
|
{
|
||||||
|
return supplierProvider.get().get();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice.annotations;
|
||||||
|
|
||||||
|
import com.google.inject.BindingAnnotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
@BindingAnnotation
|
||||||
|
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
public @interface Global
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice.annotations;
|
||||||
|
|
||||||
|
import com.google.inject.BindingAnnotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@BindingAnnotation
|
||||||
|
public @interface Json
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice.annotations;
|
||||||
|
|
||||||
|
import com.google.inject.BindingAnnotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@BindingAnnotation
|
||||||
|
public @interface Self
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice.annotations;
|
||||||
|
|
||||||
|
import com.google.inject.BindingAnnotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
@Target({ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD})
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@BindingAnnotation
|
||||||
|
public @interface Smile
|
||||||
|
{
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import io.druid.query.aggregation.Aggregator;
|
import io.druid.query.aggregation.Aggregator;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import io.druid.query.aggregation.BufferAggregator;
|
import io.druid.query.aggregation.BufferAggregator;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.google.common.collect.Ordering;
|
import com.google.common.collect.Ordering;
|
||||||
import com.google.common.primitives.Doubles;
|
import com.google.common.primitives.Doubles;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import io.druid.query.aggregation.BufferAggregator;
|
import io.druid.query.aggregation.BufferAggregator;
|
||||||
import io.druid.segment.FloatMetricSelector;
|
import io.druid.segment.FloatMetricSelector;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.google.common.primitives.Longs;
|
import com.google.common.primitives.Longs;
|
||||||
import io.druid.query.aggregation.Aggregator;
|
import io.druid.query.aggregation.Aggregator;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.google.common.primitives.Floats;
|
import com.google.common.primitives.Floats;
|
||||||
import com.google.common.primitives.Longs;
|
import com.google.common.primitives.Longs;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import io.druid.query.aggregation.Aggregator;
|
import io.druid.query.aggregation.Aggregator;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import io.druid.query.aggregation.BufferAggregator;
|
import io.druid.query.aggregation.BufferAggregator;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.google.common.primitives.Longs;
|
import com.google.common.primitives.Longs;
|
||||||
import io.druid.query.aggregation.Aggregator;
|
import io.druid.query.aggregation.Aggregator;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import io.druid.query.aggregation.BufferAggregator;
|
import io.druid.query.aggregation.BufferAggregator;
|
||||||
import io.druid.segment.FloatMetricSelector;
|
import io.druid.segment.FloatMetricSelector;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import io.druid.query.aggregation.Aggregator;
|
import io.druid.query.aggregation.Aggregator;
|
||||||
import io.druid.segment.FloatMetricSelector;
|
import io.druid.segment.FloatMetricSelector;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import io.druid.query.aggregation.BufferAggregator;
|
import io.druid.query.aggregation.BufferAggregator;
|
||||||
import io.druid.segment.FloatMetricSelector;
|
import io.druid.segment.FloatMetricSelector;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import io.druid.query.aggregation.Aggregator;
|
import io.druid.query.aggregation.Aggregator;
|
||||||
import io.druid.segment.FloatMetricSelector;
|
import io.druid.segment.FloatMetricSelector;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import io.druid.query.aggregation.BufferAggregator;
|
import io.druid.query.aggregation.BufferAggregator;
|
||||||
import io.druid.segment.FloatMetricSelector;
|
import io.druid.segment.FloatMetricSelector;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import io.druid.query.aggregation.Aggregator;
|
import io.druid.query.aggregation.Aggregator;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import io.druid.query.aggregation.BufferAggregator;
|
import io.druid.query.aggregation.BufferAggregator;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import io.druid.query.aggregation.Aggregator;
|
import io.druid.query.aggregation.Aggregator;
|
||||||
import io.druid.query.aggregation.AggregatorFactory;
|
import io.druid.query.aggregation.AggregatorFactory;
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation.post;
|
package io.druid.query.aggregation.aggregation.post;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation.post;
|
package io.druid.query.aggregation.aggregation.post;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation.post;
|
package io.druid.query.aggregation.aggregation.post;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
@ -21,8 +21,8 @@ package com.metamx.druid.histogram;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.metamx.druid.aggregation.Histogram;
|
|
||||||
import com.metamx.druid.jackson.DefaultObjectMapper;
|
import com.metamx.druid.jackson.DefaultObjectMapper;
|
||||||
|
import io.druid.query.aggregation.aggregation.Histogram;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,23 @@
|
||||||
package com.metamx.druid.guice;
|
/*
|
||||||
|
* Druid - a distributed column store.
|
||||||
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
import com.google.inject.Binder;
|
import com.google.inject.Binder;
|
||||||
import com.google.inject.Guice;
|
import com.google.inject.Guice;
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.guice;
|
package io.druid.guice.guice;
|
||||||
|
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
import com.google.inject.Binder;
|
import com.google.inject.Binder;
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Druid - a distributed column store.
|
* Druid - a distributed column store.
|
||||||
* Copyright (C) 2012 Metamarkets Group Inc.
|
* Copyright (C) 2012, 2013 Metamarkets Group Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.metamx.druid.aggregation;
|
package io.druid.query.aggregation.aggregation;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue