Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Forever310
druid
提交
97a2f5af
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 搜索 >>
提交
97a2f5af
编写于
10月 31, 2014
作者:
X
Xavier Léauté
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename db->metadata
上级
9c06db02
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
45 addition
and
45 deletion
+45
-45
indexing-service/src/main/resources/indexer_static/console.html
...ng-service/src/main/resources/indexer_static/console.html
+8
-8
server/src/main/java/io/druid/server/http/InfoResource.java
server/src/main/java/io/druid/server/http/InfoResource.java
+26
-26
server/src/main/java/io/druid/server/http/MetadataResource.java
.../src/main/java/io/druid/server/http/MetadataResource.java
+1
-1
server/src/main/resources/static/druid.js
server/src/main/resources/static/druid.js
+3
-3
server/src/main/resources/static/old-console/js/enable-0.0.1.js
.../src/main/resources/static/old-console/js/enable-0.0.1.js
+3
-3
server/src/main/resources/static/old-console/js/kill-0.0.1.js
...er/src/main/resources/static/old-console/js/kill-0.0.1.js
+2
-2
server/src/main/resources/static/old-console/js/rules-0.0.2.js
...r/src/main/resources/static/old-console/js/rules-0.0.2.js
+2
-2
未找到文件。
indexing-service/src/main/resources/indexer_static/console.html
浏览文件 @
97a2f5af
...
...
@@ -25,14 +25,14 @@
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<meta
name=
"Description"
content=
"Druid Indexer Coordinator Console"
/>
<style
type=
"text/css"
>
@import
"css/style.css"
;
</style>
<style
type=
"text/css"
>
@import
"css/demo_table.css"
;
</style>
<style
type=
"text/css"
>
@import
"
old-console/
css/style.css"
;
</style>
<style
type=
"text/css"
>
@import
"
old-console/
css/demo_table.css"
;
</style>
<script
type=
"text/javascript"
src=
"js/underscore-1.2.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-1.11.0.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery.dataTables-1.8.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/druidTable-0.0.1.js"
></script>
<script
type=
"text/javascript"
src=
"js/tablehelper-0.0.2.js"
></script>
<script
type=
"text/javascript"
src=
"
old-console/
js/underscore-1.2.2.js"
></script>
<script
type=
"text/javascript"
src=
"
old-console/
js/jquery-1.11.0.min.js"
></script>
<script
type=
"text/javascript"
src=
"
old-console/
js/jquery.dataTables-1.8.2.js"
></script>
<script
type=
"text/javascript"
src=
"
old-console/
js/druidTable-0.0.1.js"
></script>
<script
type=
"text/javascript"
src=
"
old-console/
js/tablehelper-0.0.2.js"
></script>
<script
type=
"text/javascript"
src=
"js/console-0.0.1.js"
></script>
</head>
...
...
@@ -64,4 +64,4 @@
<table
id=
"eventTable"
></table>
</div>
</body>
</html>
\ No newline at end of file
</html>
server/src/main/java/io/druid/server/http/InfoResource.java
浏览文件 @
97a2f5af
...
...
@@ -102,8 +102,8 @@ public class InfoResource
private
final
DruidCoordinator
coordinator
;
private
final
InventoryView
serverInventoryView
;
private
final
MetadataSegmentManager
database
SegmentManager
;
private
final
MetadataRuleManager
database
RuleManager
;
private
final
MetadataSegmentManager
metadata
SegmentManager
;
private
final
MetadataRuleManager
metadata
RuleManager
;
private
final
IndexingServiceClient
indexingServiceClient
;
private
final
ObjectMapper
jsonMapper
;
...
...
@@ -112,8 +112,8 @@ public class InfoResource
public
InfoResource
(
DruidCoordinator
coordinator
,
InventoryView
serverInventoryView
,
MetadataSegmentManager
database
SegmentManager
,
MetadataRuleManager
database
RuleManager
,
MetadataSegmentManager
metadata
SegmentManager
,
MetadataRuleManager
metadata
RuleManager
,
@Nullable
IndexingServiceClient
indexingServiceClient
,
ObjectMapper
jsonMapper
...
...
@@ -121,8 +121,8 @@ public class InfoResource
{
this
.
coordinator
=
coordinator
;
this
.
serverInventoryView
=
serverInventoryView
;
this
.
databaseSegmentManager
=
database
SegmentManager
;
this
.
databaseRuleManager
=
database
RuleManager
;
this
.
metadataSegmentManager
=
metadata
SegmentManager
;
this
.
metadataRuleManager
=
metadata
RuleManager
;
this
.
indexingServiceClient
=
indexingServiceClient
;
this
.
jsonMapper
=
jsonMapper
;
}
...
...
@@ -358,7 +358,7 @@ public class InfoResource
// This will def. be removed as part of the next release
return
Response
.
ok
().
entity
(
Maps
.
transformValues
(
database
RuleManager
.
getAllRules
(),
metadata
RuleManager
.
getAllRules
(),
new
Function
<
List
<
Rule
>,
Object
>()
{
@Override
...
...
@@ -374,8 +374,8 @@ public class InfoResource
if
(
rule
instanceof
LoadRule
)
{
Map
<
String
,
Object
>
newRule
=
jsonMapper
.
convertValue
(
rule
,
new
TypeReference
<
Map
<
String
,
Object
>>()
{
}
{
}
);
Set
<
String
>
tiers
=
Sets
.
newHashSet
(((
LoadRule
)
rule
).
getTieredReplicants
().
keySet
());
tiers
.
remove
(
DruidServer
.
DEFAULT_TIER
);
...
...
@@ -409,10 +409,10 @@ public class InfoResource
)
{
if
(
full
!=
null
)
{
return
Response
.
ok
(
database
RuleManager
.
getRulesWithDefault
(
dataSourceName
))
return
Response
.
ok
(
metadata
RuleManager
.
getRulesWithDefault
(
dataSourceName
))
.
build
();
}
return
Response
.
ok
(
database
RuleManager
.
getRules
(
dataSourceName
))
return
Response
.
ok
(
metadata
RuleManager
.
getRules
(
dataSourceName
))
.
build
();
}
...
...
@@ -424,7 +424,7 @@ public class InfoResource
final
List
<
Rule
>
rules
)
{
if
(
database
RuleManager
.
overrideRule
(
dataSourceName
,
rules
))
{
if
(
metadata
RuleManager
.
overrideRule
(
dataSourceName
,
rules
))
{
return
Response
.
status
(
Response
.
Status
.
OK
).
build
();
}
return
Response
.
status
(
Response
.
Status
.
INTERNAL_SERVER_ERROR
).
build
();
...
...
@@ -491,7 +491,7 @@ public class InfoResource
if
(
kill
!=
null
&&
Boolean
.
valueOf
(
kill
))
{
indexingServiceClient
.
killSegments
(
dataSourceName
,
new
Interval
(
interval
));
}
else
{
if
(!
database
SegmentManager
.
removeDatasource
(
dataSourceName
))
{
if
(!
metadata
SegmentManager
.
removeDatasource
(
dataSourceName
))
{
return
Response
.
status
(
Response
.
Status
.
NOT_FOUND
).
build
();
}
}
...
...
@@ -506,7 +506,7 @@ public class InfoResource
@PathParam
(
"dataSourceName"
)
final
String
dataSourceName
)
{
if
(!
database
SegmentManager
.
enableDatasource
(
dataSourceName
))
{
if
(!
metadata
SegmentManager
.
enableDatasource
(
dataSourceName
))
{
return
Response
.
status
(
Response
.
Status
.
NOT_FOUND
).
build
();
}
...
...
@@ -574,7 +574,7 @@ public class InfoResource
@PathParam
(
"segmentId"
)
String
segmentId
)
{
if
(!
database
SegmentManager
.
removeSegment
(
dataSourceName
,
segmentId
))
{
if
(!
metadata
SegmentManager
.
removeSegment
(
dataSourceName
,
segmentId
))
{
return
Response
.
status
(
Response
.
Status
.
NOT_FOUND
).
build
();
}
...
...
@@ -589,7 +589,7 @@ public class InfoResource
@PathParam
(
"segmentId"
)
String
segmentId
)
{
if
(!
database
SegmentManager
.
enableSegment
(
segmentId
))
{
if
(!
metadata
SegmentManager
.
enableSegment
(
segmentId
))
{
return
Response
.
status
(
Response
.
Status
.
NOT_FOUND
).
build
();
}
...
...
@@ -672,7 +672,7 @@ public class InfoResource
}
@GET
@Path
(
"/
db
/datasources"
)
@Path
(
"/
metadata
/datasources"
)
@Produces
(
"application/json"
)
public
Response
getDatabaseDataSources
(
@QueryParam
(
"full"
)
String
full
,
...
...
@@ -681,15 +681,15 @@ public class InfoResource
{
Response
.
ResponseBuilder
builder
=
Response
.
status
(
Response
.
Status
.
OK
);
if
(
includeDisabled
!=
null
)
{
return
builder
.
entity
(
database
SegmentManager
.
getAllDatasourceNames
()).
build
();
return
builder
.
entity
(
metadata
SegmentManager
.
getAllDatasourceNames
()).
build
();
}
if
(
full
!=
null
)
{
return
builder
.
entity
(
database
SegmentManager
.
getInventory
()).
build
();
return
builder
.
entity
(
metadata
SegmentManager
.
getInventory
()).
build
();
}
List
<
String
>
dataSourceNames
=
Lists
.
newArrayList
(
Iterables
.
transform
(
database
SegmentManager
.
getInventory
(),
metadata
SegmentManager
.
getInventory
(),
new
Function
<
DruidDataSource
,
String
>()
{
@Override
...
...
@@ -707,13 +707,13 @@ public class InfoResource
}
@GET
@Path
(
"/
db
/datasources/{dataSourceName}"
)
@Path
(
"/
metadata
/datasources/{dataSourceName}"
)
@Produces
(
"application/json"
)
public
Response
getDatabaseSegmentDataSource
(
@PathParam
(
"dataSourceName"
)
final
String
dataSourceName
)
{
DruidDataSource
dataSource
=
database
SegmentManager
.
getInventoryValue
(
dataSourceName
);
DruidDataSource
dataSource
=
metadata
SegmentManager
.
getInventoryValue
(
dataSourceName
);
if
(
dataSource
==
null
)
{
return
Response
.
status
(
Response
.
Status
.
NOT_FOUND
).
build
();
}
...
...
@@ -722,14 +722,14 @@ public class InfoResource
}
@GET
@Path
(
"/
db
/datasources/{dataSourceName}/segments"
)
@Path
(
"/
metadata
/datasources/{dataSourceName}/segments"
)
@Produces
(
"application/json"
)
public
Response
getDatabaseSegmentDataSourceSegments
(
@PathParam
(
"dataSourceName"
)
String
dataSourceName
,
@QueryParam
(
"full"
)
String
full
)
{
DruidDataSource
dataSource
=
database
SegmentManager
.
getInventoryValue
(
dataSourceName
);
DruidDataSource
dataSource
=
metadata
SegmentManager
.
getInventoryValue
(
dataSourceName
);
if
(
dataSource
==
null
)
{
return
Response
.
status
(
Response
.
Status
.
NOT_FOUND
).
build
();
}
...
...
@@ -755,14 +755,14 @@ public class InfoResource
}
@GET
@Path
(
"/
db
/datasources/{dataSourceName}/segments/{segmentId}"
)
@Path
(
"/
metadata
/datasources/{dataSourceName}/segments/{segmentId}"
)
@Produces
(
"application/json"
)
public
Response
getDatabaseSegmentDataSourceSegment
(
@PathParam
(
"dataSourceName"
)
String
dataSourceName
,
@PathParam
(
"segmentId"
)
String
segmentId
)
{
DruidDataSource
dataSource
=
database
SegmentManager
.
getInventoryValue
(
dataSourceName
);
DruidDataSource
dataSource
=
metadata
SegmentManager
.
getInventoryValue
(
dataSourceName
);
if
(
dataSource
==
null
)
{
return
Response
.
status
(
Response
.
Status
.
NOT_FOUND
).
build
();
}
...
...
server/src/main/java/io/druid/server/http/MetadataResource.java
浏览文件 @
97a2f5af
...
...
@@ -38,7 +38,7 @@ import java.util.List;
/**
*/
@Path
(
"/druid/coordinator/v1/
db
"
)
@Path
(
"/druid/coordinator/v1/
metadata
"
)
public
class
MetadataResource
{
private
final
MetadataSegmentManager
metadataSegmentManager
;
...
...
server/src/main/resources/static/druid.js
浏览文件 @
97a2f5af
...
...
@@ -11375,10 +11375,10 @@ app.factory('$druid', function($q, $http, $utils, $window) {
return this.getAndProcess("/servers?simple", $utils.processServerTiers);
},
getDataSources: function() {
return this.getAndProcess("/
db
/datasources", $utils.processDataSources);
return this.getAndProcess("/
metadata
/datasources", $utils.processDataSources);
},
getAllDataSources: function() {
return this.getAndProcess("/
db
/datasources?includeDisabled", function(dataSources) {
return this.getAndProcess("/
metadata
/datasources?includeDisabled", function(dataSources) {
return dataSources;
});
},
...
...
@@ -12758,4 +12758,4 @@ ClusterConfigInstanceCtrl = function($scope, $modalInstance, $druid) {
};
},{"../../bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js":1,"../../bower_components/angular-sanitize/angular-sanitize.min.js":2,"../../bower_components/angular-ui-router/release/angular-ui-router.min.js":3,"../../bower_components/angular/angular.min.js":4,"../../bower_components/d3/d3.js":5,"../../bower_components/moment/min/moment.min.js":7,"../../bower_components/ng-clip/dest/ng-clip.min.js":8,"../../bower_components/ng-csv/build/ng-csv.min.js":9,"../../bower_components/underscore/underscore.js":10,"../../bower_components/zeroclipboard/ZeroClipboard.min.js":11,"../../lib/moment-interval.js":12,"jquery":6}]},{},[13])
\ No newline at end of file
},{"../../bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js":1,"../../bower_components/angular-sanitize/angular-sanitize.min.js":2,"../../bower_components/angular-ui-router/release/angular-ui-router.min.js":3,"../../bower_components/angular/angular.min.js":4,"../../bower_components/d3/d3.js":5,"../../bower_components/moment/min/moment.min.js":7,"../../bower_components/ng-clip/dest/ng-clip.min.js":8,"../../bower_components/ng-csv/build/ng-csv.min.js":9,"../../bower_components/underscore/underscore.js":10,"../../bower_components/zeroclipboard/ZeroClipboard.min.js":11,"../../lib/moment-interval.js":12,"jquery":6}]},{},[13])
server/src/main/resources/static/old-console/js/enable-0.0.1.js
浏览文件 @
97a2f5af
...
...
@@ -70,12 +70,12 @@ $(document).ready(function() {
}
});
$
.
getJSON
(
"
/druid/coordinator/v1/
db
/datasources
"
,
function
(
enabled_datasources
)
{
$
.
getJSON
(
"
/druid/coordinator/v1/
metadata
/datasources
"
,
function
(
enabled_datasources
)
{
$
.
each
(
enabled_datasources
,
function
(
index
,
datasource
)
{
$
(
'
#enabled_datasources
'
).
append
(
$
(
'
<li>
'
+
datasource
+
'
</li>
'
));
});
$
.
getJSON
(
"
/druid/coordinator/v1/
db
/datasources?includeDisabled
"
,
function
(
db_datasources
)
{
$
.
getJSON
(
"
/druid/coordinator/v1/
metadata
/datasources?includeDisabled
"
,
function
(
db_datasources
)
{
var
disabled_datasources
=
_
.
difference
(
db_datasources
,
enabled_datasources
);
$
.
each
(
disabled_datasources
,
function
(
index
,
datasource
)
{
$
(
'
#disabled_datasources
'
).
append
(
$
(
'
<li>
'
+
datasource
+
'
</li>
'
));
...
...
@@ -93,4 +93,4 @@ $(document).ready(function() {
$
(
'
#disable
'
).
click
(
function
(){
$
(
"
#disable_dialog
"
).
dialog
(
"
open
"
)
});
});
\ No newline at end of file
});
server/src/main/resources/static/old-console/js/kill-0.0.1.js
浏览文件 @
97a2f5af
...
...
@@ -41,7 +41,7 @@ $(document).ready(function() {
}
});
$
.
getJSON
(
"
/druid/coordinator/v1/
db
/datasources?includeDisabled
"
,
function
(
data
)
{
$
.
getJSON
(
"
/druid/coordinator/v1/
metadata
/datasources?includeDisabled
"
,
function
(
data
)
{
$
.
each
(
data
,
function
(
index
,
datasource
)
{
$
(
'
#datasources
'
).
append
(
$
(
'
<option></option>
'
).
val
(
datasource
).
text
(
datasource
));
});
...
...
@@ -50,4 +50,4 @@ $(document).ready(function() {
$
(
"
#confirm
"
).
click
(
function
()
{
$
(
"
#confirm_dialog
"
).
dialog
(
"
open
"
);
});
});
\ No newline at end of file
});
server/src/main/resources/static/old-console/js/rules-0.0.2.js
浏览文件 @
97a2f5af
...
...
@@ -268,7 +268,7 @@ $(document).ready(function() {
tiers
=
theTiers
;
});
$
.
getJSON
(
"
/druid/coordinator/v1/
db
/datasources
"
,
function
(
data
)
{
$
.
getJSON
(
"
/druid/coordinator/v1/
metadata
/datasources
"
,
function
(
data
)
{
$
.
each
(
data
,
function
(
index
,
datasource
)
{
$
(
'
#datasources
'
).
append
(
$
(
'
<option></option>
'
).
val
(
datasource
).
text
(
datasource
));
});
...
...
@@ -307,4 +307,4 @@ $(document).ready(function() {
$
(
'
#update
'
).
click
(
function
(){
$
(
"
#update_dialog
"
).
dialog
(
"
open
"
)
});
});
\ No newline at end of file
});
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录