diff --git a/docs/content/Configuration.md b/docs/content/Configuration.md
index 13a1a67a741..e317ac0ecd4 100644
--- a/docs/content/Configuration.md
+++ b/docs/content/Configuration.md
@@ -285,9 +285,10 @@ This deep storage is used to interface with Amazon's S3.
|Property|Description|Default|
|--------|-----------|-------|
|`druid.storage.bucket`|S3 bucket name.|none|
-|`druid.storage.basekey`|S3 base key.|none|
+|`druid.storage.basekey`|S3 object key prefix for storage.|none|
|`druid.storage.disableAcl`|Boolean flag for ACL.|false|
-|`druid.storage.archiveBucket`|S3 bucket name where segments get archived to when running the indexing service *archive task*|none|
+|`druid.storage.archiveBucket`|S3 bucket name for archiving when running the indexing-service *archive task*.|none|
+|`druid.storage.archiveBasekey`|S3 object key prefix for archiving.|none|
#### HDFS Deep Storage
diff --git a/indexing-service/src/main/resources/indexer_static/console.html b/indexing-service/src/main/resources/indexer_static/console.html
index f51383c72c0..e8221aa287e 100644
--- a/indexing-service/src/main/resources/indexer_static/console.html
+++ b/indexing-service/src/main/resources/indexer_static/console.html
@@ -51,7 +51,7 @@
Loading Waiting Tasks... this may take a few minutes
- Complete Tasks
+ Complete Tasks - Tasks recently completed
Loading Complete Tasks... this may take a few minutes
diff --git a/processing/src/main/java/io/druid/query/aggregation/JavaScriptAggregatorFactory.java b/processing/src/main/java/io/druid/query/aggregation/JavaScriptAggregatorFactory.java
index ff55c9cee7f..927ab89676f 100644
--- a/processing/src/main/java/io/druid/query/aggregation/JavaScriptAggregatorFactory.java
+++ b/processing/src/main/java/io/druid/query/aggregation/JavaScriptAggregatorFactory.java
@@ -265,9 +265,11 @@ public class JavaScriptAggregatorFactory implements AggregatorFactory
final Object[] args = new Object[size + 1];
args[0] = current;
- int i = 0;
- while (i < size) {
- args[i + 1] = selectorList[i++].get();
+ for (int i = 0 ; i < size ; i++) {
+ final ObjectColumnSelector selector = selectorList[i];
+ if (selector != null) {
+ args[i + 1] = selector.get();
+ }
}
final Object res = fnAggregate.call(cx, scope, scope, args);
diff --git a/processing/src/test/java/io/druid/query/aggregation/JavaScriptAggregatorTest.java b/processing/src/test/java/io/druid/query/aggregation/JavaScriptAggregatorTest.java
index 2435211dfe9..7f087559339 100644
--- a/processing/src/test/java/io/druid/query/aggregation/JavaScriptAggregatorTest.java
+++ b/processing/src/test/java/io/druid/query/aggregation/JavaScriptAggregatorTest.java
@@ -27,6 +27,7 @@ import org.junit.Test;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Map;
public class JavaScriptAggregatorTest
@@ -141,6 +142,39 @@ public class JavaScriptAggregatorTest
Assert.assertEquals(val, agg.get(buf, position));
}
+ @Test
+ public void testAggregateMissingColumn()
+ {
+ Map script = scriptDoubleSum;
+
+ JavaScriptAggregator agg = new JavaScriptAggregator(
+ "billy",
+ Collections.singletonList(null),
+ JavaScriptAggregatorFactory.compileScript(script.get("fnAggregate"),
+ script.get("fnReset"),
+ script.get("fnCombine"))
+ );
+
+ final double val = 0;
+
+ Assert.assertEquals("billy", agg.getName());
+
+ agg.reset();
+ Assert.assertEquals(val, agg.get());
+ Assert.assertEquals(val, agg.get());
+ Assert.assertEquals(val, agg.get());
+
+ agg.aggregate();
+ Assert.assertEquals(val, agg.get());
+ Assert.assertEquals(val, agg.get());
+ Assert.assertEquals(val, agg.get());
+
+ agg.aggregate();
+ Assert.assertEquals(val, agg.get());
+ Assert.assertEquals(val, agg.get());
+ Assert.assertEquals(val, agg.get());
+ }
+
public static void main(String... args) throws Exception {
final LoopingFloatColumnSelector selector = new LoopingFloatColumnSelector(new float[]{42.12f, 9f});
diff --git a/s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentArchiver.java b/s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentArchiver.java
index b7c04ec0c00..1c642f110bd 100644
--- a/s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentArchiver.java
+++ b/s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentArchiver.java
@@ -21,7 +21,6 @@ package io.druid.storage.s3;
import com.google.common.collect.ImmutableMap;
import com.google.inject.Inject;
-import com.metamx.common.MapUtils;
import io.druid.segment.loading.DataSegmentArchiver;
import io.druid.segment.loading.SegmentLoadingException;
import io.druid.timeline.DataSegment;
@@ -46,7 +45,7 @@ public class S3DataSegmentArchiver extends S3DataSegmentMover implements DataSeg
public DataSegment archive(DataSegment segment) throws SegmentLoadingException
{
String targetS3Bucket = config.getArchiveBucket();
- String targetS3BaseKey = config.getArchiveBaseKey();
+ String targetS3BaseKey = config.getArchiveBasekey();
return move(
segment,
diff --git a/s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentArchiverConfig.java b/s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentArchiverConfig.java
index 5eb33eb1b5d..9aeccb74afe 100644
--- a/s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentArchiverConfig.java
+++ b/s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentArchiverConfig.java
@@ -27,15 +27,15 @@ public class S3DataSegmentArchiverConfig
public String archiveBucket = "";
@JsonProperty
- public String archiveBaseKey = "";
+ public String archiveBasekey = "";
public String getArchiveBucket()
{
return archiveBucket;
}
- public String getArchiveBaseKey()
+ public String getArchiveBasekey()
{
- return archiveBaseKey;
+ return archiveBasekey;
}
}