mirror of https://github.com/apache/druid.git
Merge branch 'guice' of github.com:metamx/druid into guice
This commit is contained in:
commit
8d7af40313
|
@ -28,7 +28,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.metamx</groupId>
|
<groupId>com.metamx</groupId>
|
||||||
<artifactId>druid</artifactId>
|
<artifactId>druid</artifactId>
|
||||||
<version>0.5.50-SNAPSHOT</version>
|
<version>0.6.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type":"longSum",
|
"type":"longSum",
|
||||||
"fieldName":"edits",
|
"fieldName":"edit_count",
|
||||||
"name":"edits"
|
"name":"count"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"filter":{
|
"filter":{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"schema": {
|
"schema": {
|
||||||
"dataSource": "wikipedia",
|
"dataSource": "wikipedia",
|
||||||
"aggregators": [
|
"aggregators": [
|
||||||
{"type": "count", "name": "edits"},
|
{"type": "count", "name": "count"},
|
||||||
{"type": "longSum", "fieldName": "added", "name": "added"},
|
{"type": "longSum", "fieldName": "added", "name": "added"},
|
||||||
{"type": "longSum", "fieldName": "deleted", "name": "deleted"},
|
{"type": "longSum", "fieldName": "deleted", "name": "deleted"},
|
||||||
{"type": "longSum", "fieldName": "delta", "name": "delta"}
|
{"type": "longSum", "fieldName": "delta", "name": "delta"}
|
||||||
|
|
|
@ -45,7 +45,7 @@ for delay in 5 30 30 30 30 30 30 30 30 30 30
|
||||||
echo "sleep for $delay seconds..."
|
echo "sleep for $delay seconds..."
|
||||||
echo " "
|
echo " "
|
||||||
sleep $delay
|
sleep $delay
|
||||||
curl -X POST 'http://localhost:8080/druid/v2/?w' -H 'content-type: application/json' -d "`cat ${QUERY_FILE}`"
|
curl -X POST 'http://localhost:8083/druid/v2/?w' -H 'content-type: application/json' -d "`cat ${QUERY_FILE}`"
|
||||||
echo " "
|
echo " "
|
||||||
echo " "
|
echo " "
|
||||||
done
|
done
|
||||||
|
|
|
@ -58,7 +58,7 @@ DRUID_CP=${EXAMPLE_LOC}
|
||||||
DRUID_CP=${DRUID_CP}:`ls ${SCRIPT_DIR}/../target/druid-examples-*-selfcontained.jar`
|
DRUID_CP=${DRUID_CP}:`ls ${SCRIPT_DIR}/../target/druid-examples-*-selfcontained.jar`
|
||||||
DRUID_CP=${DRUID_CP}:${SCRIPT_DIR}/../config/realtime
|
DRUID_CP=${DRUID_CP}:${SCRIPT_DIR}/../config/realtime
|
||||||
#For the kit
|
#For the kit
|
||||||
DRUID_CP=${DRUID_CP}:`ls ${SCRIPT_DIR}/lib/druid-examples-*-selfcontained.jar`
|
DRUID_CP=${DRUID_CP}:${SCRIPT_DIR}/lib/*
|
||||||
DRUID_CP=${DRUID_CP}:${SCRIPT_DIR}/config/realtime
|
DRUID_CP=${DRUID_CP}:${SCRIPT_DIR}/config/realtime
|
||||||
|
|
||||||
echo "Running command:"
|
echo "Running command:"
|
||||||
|
|
|
@ -6,11 +6,16 @@ druid.service=realtime
|
||||||
com.metamx.emitter.logging=true
|
com.metamx.emitter.logging=true
|
||||||
com.metamx.emitter.logging.level=info
|
com.metamx.emitter.logging.level=info
|
||||||
|
|
||||||
|
# zk
|
||||||
|
druid.zk.service.host=localhost
|
||||||
|
druid.zk.paths.base=/druid
|
||||||
|
druid.zk.paths.discoveryPath=/druid/discoveryPath
|
||||||
|
|
||||||
# processing
|
# processing
|
||||||
druid.processing.buffer.sizeBytes=10000000
|
druid.processing.buffer.sizeBytes=10000000
|
||||||
|
|
||||||
# schema
|
# schema
|
||||||
druid.realtime.specFile=realtime.spec
|
druid.realtime.specFile=config/realtime/realtime.spec
|
||||||
|
|
||||||
# aws (dummy user)
|
# aws (dummy user)
|
||||||
com.metamx.aws.accessKey=AKIAIMKECRUYKDQGR6YQ
|
com.metamx.aws.accessKey=AKIAIMKECRUYKDQGR6YQ
|
||||||
|
|
|
@ -1,4 +1,23 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
~ 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.
|
||||||
|
-->
|
||||||
|
|
||||||
<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">
|
<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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.metamx.druid</groupId>
|
<groupId>com.metamx.druid</groupId>
|
||||||
|
@ -9,7 +28,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.metamx</groupId>
|
<groupId>com.metamx</groupId>
|
||||||
<artifactId>druid</artifactId>
|
<artifactId>druid</artifactId>
|
||||||
<version>0.5.50-SNAPSHOT</version>
|
<version>0.6.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.metamx</groupId>
|
<groupId>com.metamx</groupId>
|
||||||
<artifactId>druid</artifactId>
|
<artifactId>druid</artifactId>
|
||||||
<version>0.5.50-SNAPSHOT</version>
|
<version>0.6.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.metamx</groupId>
|
<groupId>com.metamx</groupId>
|
||||||
<artifactId>druid</artifactId>
|
<artifactId>druid</artifactId>
|
||||||
<version>0.5.50-SNAPSHOT</version>
|
<version>0.6.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
8
pom.xml
8
pom.xml
|
@ -23,7 +23,7 @@
|
||||||
<groupId>com.metamx</groupId>
|
<groupId>com.metamx</groupId>
|
||||||
<artifactId>druid</artifactId>
|
<artifactId>druid</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>0.5.50-SNAPSHOT</version>
|
<version>0.6.0-SNAPSHOT</version>
|
||||||
<name>druid</name>
|
<name>druid</name>
|
||||||
<description>druid</description>
|
<description>druid</description>
|
||||||
<scm>
|
<scm>
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<metamx.java-util.version>0.25.0-SNAPSHOT</metamx.java-util.version>
|
<metamx.java-util.version>0.25.0</metamx.java-util.version>
|
||||||
<apache.curator.version>2.1.0-incubating</apache.curator.version>
|
<apache.curator.version>2.1.0-incubating</apache.curator.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.metamx</groupId>
|
<groupId>com.metamx</groupId>
|
||||||
<artifactId>emitter</artifactId>
|
<artifactId>emitter</artifactId>
|
||||||
<version>0.2.5-SNAPSHOT</version>
|
<version>0.2.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.metamx</groupId>
|
<groupId>com.metamx</groupId>
|
||||||
|
@ -492,7 +492,7 @@
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>1.7.1</version>
|
<version>2.1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
<artifactId>maven-site-plugin</artifactId>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.metamx</groupId>
|
<groupId>com.metamx</groupId>
|
||||||
<artifactId>druid</artifactId>
|
<artifactId>druid</artifactId>
|
||||||
<version>0.5.50-SNAPSHOT</version>
|
<version>0.6.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
@ -47,6 +47,7 @@ import io.druid.query.dimension.DimensionSpec;
|
||||||
import io.druid.segment.Cursor;
|
import io.druid.segment.Cursor;
|
||||||
import io.druid.segment.DimensionSelector;
|
import io.druid.segment.DimensionSelector;
|
||||||
import io.druid.segment.StorageAdapter;
|
import io.druid.segment.StorageAdapter;
|
||||||
|
import io.druid.segment.data.IndexedInts;
|
||||||
import io.druid.segment.filter.Filters;
|
import io.druid.segment.filter.Filters;
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
import org.joda.time.Interval;
|
import org.joda.time.Interval;
|
||||||
|
@ -177,17 +178,28 @@ public class GroupByQueryEngine
|
||||||
{
|
{
|
||||||
if (dims.size() > 0) {
|
if (dims.size() > 0) {
|
||||||
List<ByteBuffer> retVal = null;
|
List<ByteBuffer> retVal = null;
|
||||||
for (Integer dimValue : dims.get(0).getRow()) {
|
List<ByteBuffer> unaggregatedBuffers = null;
|
||||||
|
|
||||||
|
final DimensionSelector dimSelector = dims.get(0);
|
||||||
|
final IndexedInts row = dimSelector.getRow();
|
||||||
|
if (row.size() == 0) {
|
||||||
|
ByteBuffer newKey = key.duplicate();
|
||||||
|
newKey.putInt(dimSelector.getValueCardinality());
|
||||||
|
unaggregatedBuffers = updateValues(newKey, dims.subList(1, dims.size()));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (Integer dimValue : row) {
|
||||||
ByteBuffer newKey = key.duplicate();
|
ByteBuffer newKey = key.duplicate();
|
||||||
newKey.putInt(dimValue);
|
newKey.putInt(dimValue);
|
||||||
final List<ByteBuffer> unaggregatedBuffers = updateValues(newKey, dims.subList(1, dims.size()));
|
unaggregatedBuffers = updateValues(newKey, dims.subList(1, dims.size()));
|
||||||
|
}
|
||||||
|
}
|
||||||
if (unaggregatedBuffers != null) {
|
if (unaggregatedBuffers != null) {
|
||||||
if (retVal == null) {
|
if (retVal == null) {
|
||||||
retVal = Lists.newArrayList();
|
retVal = Lists.newArrayList();
|
||||||
}
|
}
|
||||||
retVal.addAll(unaggregatedBuffers);
|
retVal.addAll(unaggregatedBuffers);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -385,7 +397,11 @@ public class GroupByQueryEngine
|
||||||
|
|
||||||
ByteBuffer keyBuffer = input.getKey().duplicate();
|
ByteBuffer keyBuffer = input.getKey().duplicate();
|
||||||
for (int i = 0; i < dimensions.size(); ++i) {
|
for (int i = 0; i < dimensions.size(); ++i) {
|
||||||
theEvent.put(dimNames.get(i), dimensions.get(i).lookupName(keyBuffer.getInt()));
|
final DimensionSelector dimSelector = dimensions.get(i);
|
||||||
|
final int dimVal = keyBuffer.getInt();
|
||||||
|
if (dimSelector.getValueCardinality() != dimVal) {
|
||||||
|
theEvent.put(dimNames.get(i), dimSelector.lookupName(dimVal));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int position = input.getValue();
|
int position = input.getValue();
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
/*
|
|
||||||
* 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.query.groupby;
|
|
||||||
|
|
||||||
import org.skife.config.Config;
|
|
||||||
import org.skife.config.Default;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
public abstract class GroupByQueryEngineConfig
|
|
||||||
{
|
|
||||||
@Config("druid.query.groupBy.maxIntermediateRows")
|
|
||||||
@Default("50000")
|
|
||||||
public abstract int getMaxIntermediateRows();
|
|
||||||
}
|
|
|
@ -38,6 +38,8 @@ public class LegacySegmentSpec extends MultipleIntervalSegmentSpec
|
||||||
final List<?> intervalStringList;
|
final List<?> intervalStringList;
|
||||||
if (intervals instanceof String) {
|
if (intervals instanceof String) {
|
||||||
intervalStringList = Arrays.asList((((String) intervals).split(",")));
|
intervalStringList = Arrays.asList((((String) intervals).split(",")));
|
||||||
|
} else if (intervals instanceof Interval) {
|
||||||
|
intervalStringList = Arrays.asList(intervals.toString());
|
||||||
} else if (intervals instanceof Map) {
|
} else if (intervals instanceof Map) {
|
||||||
intervalStringList = (List) ((Map) intervals).get("intervals");
|
intervalStringList = (List) ((Map) intervals).get("intervals");
|
||||||
} else if (intervals instanceof List) {
|
} else if (intervals instanceof List) {
|
||||||
|
|
|
@ -292,7 +292,7 @@ public class IncrementalIndexStorageAdapter implements StorageAdapter
|
||||||
@Override
|
@Override
|
||||||
public int getValueCardinality()
|
public int getValueCardinality()
|
||||||
{
|
{
|
||||||
return dimValLookup.size();
|
return maxId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -0,0 +1,118 @@
|
||||||
|
/*
|
||||||
|
* 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.segment.incremental;
|
||||||
|
|
||||||
|
import com.google.common.base.Supplier;
|
||||||
|
import com.google.common.base.Suppliers;
|
||||||
|
import com.google.common.collect.ImmutableMap;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import com.metamx.common.guava.Sequence;
|
||||||
|
import com.metamx.common.guava.Sequences;
|
||||||
|
import io.druid.collections.StupidPool;
|
||||||
|
import io.druid.data.input.MapBasedInputRow;
|
||||||
|
import io.druid.data.input.MapBasedRow;
|
||||||
|
import io.druid.data.input.Row;
|
||||||
|
import io.druid.granularity.QueryGranularity;
|
||||||
|
import io.druid.query.aggregation.AggregatorFactory;
|
||||||
|
import io.druid.query.aggregation.CountAggregatorFactory;
|
||||||
|
import io.druid.query.aggregation.LongSumAggregatorFactory;
|
||||||
|
import io.druid.query.groupby.GroupByQuery;
|
||||||
|
import io.druid.query.groupby.GroupByQueryConfig;
|
||||||
|
import io.druid.query.groupby.GroupByQueryEngine;
|
||||||
|
import junit.framework.Assert;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
|
import org.joda.time.Interval;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public class IncrementalIndexStorageAdapterTest
|
||||||
|
{
|
||||||
|
@Test
|
||||||
|
public void testSanity() throws Exception
|
||||||
|
{
|
||||||
|
IncrementalIndex index = new IncrementalIndex(
|
||||||
|
0, QueryGranularity.MINUTE, new AggregatorFactory[]{new CountAggregatorFactory("cnt")}
|
||||||
|
);
|
||||||
|
|
||||||
|
index.add(
|
||||||
|
new MapBasedInputRow(
|
||||||
|
new DateTime().minus(1).getMillis(),
|
||||||
|
Lists.newArrayList("billy"),
|
||||||
|
ImmutableMap.<String, Object>of("billy", "hi")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
index.add(
|
||||||
|
new MapBasedInputRow(
|
||||||
|
new DateTime().minus(1).getMillis(),
|
||||||
|
Lists.newArrayList("sally"),
|
||||||
|
ImmutableMap.<String, Object>of("sally", "bo")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
GroupByQueryEngine engine = new GroupByQueryEngine(
|
||||||
|
Suppliers.<GroupByQueryConfig>ofInstance(new GroupByQueryConfig()
|
||||||
|
{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMaxIntermediateRows()
|
||||||
|
{
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
new StupidPool(
|
||||||
|
new Supplier<ByteBuffer>()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public ByteBuffer get()
|
||||||
|
{
|
||||||
|
return ByteBuffer.allocate(50000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
final Sequence<Row> rows = engine.process(
|
||||||
|
GroupByQuery.builder()
|
||||||
|
.setDataSource("test")
|
||||||
|
.setGranularity(QueryGranularity.ALL)
|
||||||
|
.setInterval(new Interval(0, new DateTime().getMillis()))
|
||||||
|
.addDimension("billy")
|
||||||
|
.addDimension("sally")
|
||||||
|
.addAggregator(new LongSumAggregatorFactory("cnt", "cnt"))
|
||||||
|
.build(),
|
||||||
|
new IncrementalIndexStorageAdapter(index)
|
||||||
|
);
|
||||||
|
|
||||||
|
final ArrayList<Row> results = Sequences.toList(rows, Lists.<Row>newArrayList());
|
||||||
|
|
||||||
|
Assert.assertEquals(2, results.size());
|
||||||
|
|
||||||
|
MapBasedRow row = (MapBasedRow) results.get(0);
|
||||||
|
Assert.assertEquals(ImmutableMap.of("billy", "hi", "cnt", 1l), row.getEvent());
|
||||||
|
|
||||||
|
row = (MapBasedRow) results.get(1);
|
||||||
|
Assert.assertEquals(ImmutableMap.of("sally", "bo", "cnt", 1l), row.getEvent());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -28,7 +28,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.metamx</groupId>
|
<groupId>com.metamx</groupId>
|
||||||
<artifactId>druid</artifactId>
|
<artifactId>druid</artifactId>
|
||||||
<version>0.5.50-SNAPSHOT</version>
|
<version>0.6.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
@ -39,6 +39,7 @@ import org.joda.time.DateTime;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -147,9 +148,7 @@ public class IrcFirehoseFactory implements FirehoseFactory
|
||||||
@Override
|
@Override
|
||||||
public List<String> getAlternativeNicknames()
|
public List<String> getAlternativeNicknames()
|
||||||
{
|
{
|
||||||
return Lists.newArrayList(nick + "_",
|
return Lists.newArrayList(nick + UUID.randomUUID(), nick + UUID.randomUUID(), nick + UUID.randomUUID());
|
||||||
nick + "__",
|
|
||||||
nick + "___");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -50,8 +50,10 @@ class WikipediaIrcDecoder implements IrcDecoder
|
||||||
final DatabaseReader geoLookup;
|
final DatabaseReader geoLookup;
|
||||||
|
|
||||||
static final Pattern pattern = Pattern.compile(
|
static final Pattern pattern = Pattern.compile(
|
||||||
"\\x0314\\[\\[\\x0307(.+?)\\x0314\\]\\]\\x034 (.*?)\\x0310.*\\x0302(http.+?)\\x03.+\\x0303(.+?)\\x03.+\\x03 (\\(([+-]\\d+)\\).*|.+) \\x0310(.+)\\x03"
|
".*\\x0314\\[\\[\\x0307(.+?)\\x0314\\]\\]\\x034 (.*?)\\x0310.*\\x0302(http.+?)" +
|
||||||
|
"\\x03.+\\x0303(.+?)\\x03.+\\x03 (\\(([+-]\\d+)\\).*|.+) \\x0310(.+)\\x03.*"
|
||||||
);
|
);
|
||||||
|
|
||||||
static final Pattern ipPattern = Pattern.compile("\\d+.\\d+.\\d+.\\d+");
|
static final Pattern ipPattern = Pattern.compile("\\d+.\\d+.\\d+.\\d+");
|
||||||
static final Pattern shortnamePattern = Pattern.compile("#(\\w\\w)\\..*");
|
static final Pattern shortnamePattern = Pattern.compile("#(\\w\\w)\\..*");
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ import com.google.common.collect.Iterables;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.primitives.Ints;
|
import com.google.common.primitives.Ints;
|
||||||
import com.google.common.util.concurrent.ListeningExecutorService;
|
|
||||||
import com.google.common.util.concurrent.MoreExecutors;
|
import com.google.common.util.concurrent.MoreExecutors;
|
||||||
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||||
import com.metamx.common.Pair;
|
import com.metamx.common.Pair;
|
||||||
|
@ -193,7 +192,7 @@ public class RealtimePlumberSchool implements PlumberSchool
|
||||||
|
|
||||||
public void setQueryExecutorService(ExecutorService executorService)
|
public void setQueryExecutorService(ExecutorService executorService)
|
||||||
{
|
{
|
||||||
this.queryExecutorService = queryExecutorService;
|
this.queryExecutorService = executorService;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.metamx</groupId>
|
<groupId>com.metamx</groupId>
|
||||||
<artifactId>druid</artifactId>
|
<artifactId>druid</artifactId>
|
||||||
<version>0.5.50-SNAPSHOT</version>
|
<version>0.6.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
~ 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
|
||||||
|
@ -24,14 +24,29 @@
|
||||||
<artifactId>druid-services</artifactId>
|
<artifactId>druid-services</artifactId>
|
||||||
<name>druid-services</name>
|
<name>druid-services</name>
|
||||||
<description>druid-services</description>
|
<description>druid-services</description>
|
||||||
<version>0.5.50-SNAPSHOT</version>
|
<version>0.6.0-SNAPSHOT</version>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.metamx</groupId>
|
<groupId>com.metamx</groupId>
|
||||||
<artifactId>druid</artifactId>
|
<artifactId>druid</artifactId>
|
||||||
<version>0.5.50-SNAPSHOT</version>
|
<version>0.6.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.metamx.druid</groupId>
|
||||||
|
<artifactId>druid-examples</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.metamx.druid</groupId>
|
||||||
|
<artifactId>druid-indexing-hadoop</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.metamx.druid</groupId>
|
||||||
|
<artifactId>druid-indexing-service</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.metamx.druid</groupId>
|
<groupId>com.metamx.druid</groupId>
|
||||||
<artifactId>druid-realtime</artifactId>
|
<artifactId>druid-realtime</artifactId>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||||
<id>bin</id>
|
<id>bin</id>
|
||||||
<formats>
|
<formats>
|
||||||
<format>tar.gz</format>
|
<format>tar.gz</format>
|
||||||
|
@ -48,20 +50,6 @@
|
||||||
<fileMode>744</fileMode>
|
<fileMode>744</fileMode>
|
||||||
<outputDirectory>/</outputDirectory>
|
<outputDirectory>/</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
|
||||||
<directory>../examples/target</directory>
|
|
||||||
<includes>
|
|
||||||
<include>druid-examples-*-selfcontained.jar</include>
|
|
||||||
</includes>
|
|
||||||
<outputDirectory>lib</outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
|
||||||
<directory>../services/target</directory>
|
|
||||||
<includes>
|
|
||||||
<include>druid-services-*-selfcontained.jar</include>
|
|
||||||
</includes>
|
|
||||||
<outputDirectory>lib</outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>../examples/bin/examples</directory>
|
<directory>../examples/bin/examples</directory>
|
||||||
<includes>
|
<includes>
|
||||||
|
|
Loading…
Reference in New Issue