Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Forever310
druid
提交
e7112dbb
D
druid
项目概览
Forever310
/
druid
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
druid
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
e7112dbb
编写于
12月 17, 2013
作者:
F
fjy
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of github.com:metamx/druid
上级
bbb2754a
58d1262e
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
47 addition
and
11 deletion
+47
-11
docs/content/Configuration.md
docs/content/Configuration.md
+3
-2
indexing-service/src/main/resources/indexer_static/console.html
...ng-service/src/main/resources/indexer_static/console.html
+1
-1
processing/src/main/java/io/druid/query/aggregation/JavaScriptAggregatorFactory.java
.../druid/query/aggregation/JavaScriptAggregatorFactory.java
+5
-3
processing/src/test/java/io/druid/query/aggregation/JavaScriptAggregatorTest.java
.../io/druid/query/aggregation/JavaScriptAggregatorTest.java
+34
-0
s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentArchiver.java
.../main/java/io/druid/storage/s3/S3DataSegmentArchiver.java
+1
-2
s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentArchiverConfig.java
...java/io/druid/storage/s3/S3DataSegmentArchiverConfig.java
+3
-3
未找到文件。
docs/content/Configuration.md
浏览文件 @
e7112dbb
...
...
@@ -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
...
...
indexing-service/src/main/resources/indexer_static/console.html
浏览文件 @
e7112dbb
...
...
@@ -51,7 +51,7 @@
<div
class=
"waiting_loading"
>
Loading Waiting Tasks... this may take a few minutes
</div>
<table
id=
"waitingTable"
></table>
<h2>
Complete Tasks
</h2>
<h2>
Complete Tasks
- Tasks recently completed
</h2>
<div
class=
"complete_loading"
>
Loading Complete Tasks... this may take a few minutes
</div>
<table
id=
"completeTable"
></table>
...
...
processing/src/main/java/io/druid/query/aggregation/JavaScriptAggregatorFactory.java
浏览文件 @
e7112dbb
...
...
@@ -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
);
...
...
processing/src/test/java/io/druid/query/aggregation/JavaScriptAggregatorTest.java
浏览文件 @
e7112dbb
...
...
@@ -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
<
String
,
String
>
script
=
scriptDoubleSum
;
JavaScriptAggregator
agg
=
new
JavaScriptAggregator
(
"billy"
,
Collections
.<
ObjectColumnSelector
>
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
,
9
f
});
...
...
s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentArchiver.java
浏览文件 @
e7112dbb
...
...
@@ -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
.
getArchiveBase
K
ey
();
String
targetS3BaseKey
=
config
.
getArchiveBase
k
ey
();
return
move
(
segment
,
...
...
s3-extensions/src/main/java/io/druid/storage/s3/S3DataSegmentArchiverConfig.java
浏览文件 @
e7112dbb
...
...
@@ -27,15 +27,15 @@ public class S3DataSegmentArchiverConfig
public
String
archiveBucket
=
""
;
@JsonProperty
public
String
archiveBase
K
ey
=
""
;
public
String
archiveBase
k
ey
=
""
;
public
String
getArchiveBucket
()
{
return
archiveBucket
;
}
public
String
getArchiveBase
K
ey
()
public
String
getArchiveBase
k
ey
()
{
return
archiveBase
K
ey
;
return
archiveBase
k
ey
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录