mirror of https://github.com/apache/druid.git
fix inconsistent druid http paths + fix master console bugs
This commit is contained in:
parent
e785b87be0
commit
5bdcc3613c
|
@ -207,12 +207,11 @@ public class BrokerNode extends QueryableNode<BrokerNode>
|
|||
theModules.addAll(extraModules);
|
||||
|
||||
final Injector injector = Guice.createInjector(theModules);
|
||||
final Context root = new Context(getServer(), "/druid/v2", Context.SESSIONS);
|
||||
|
||||
final Context root = new Context(getServer(), "/", Context.SESSIONS);
|
||||
root.addServlet(new ServletHolder(new StatusServlet()), "/status");
|
||||
root.addServlet(
|
||||
new ServletHolder(new QueryServlet(getJsonMapper(), getSmileMapper(), texasRanger, getEmitter(), getRequestLogger())),
|
||||
"/*"
|
||||
"/druid/v2/*"
|
||||
);
|
||||
|
||||
root.addEventListener(new GuiceServletConfig(injector));
|
||||
|
|
|
@ -190,13 +190,13 @@ public class RealtimeNode extends BaseServerNode<RealtimeNode>
|
|||
|
||||
startMonitoring(monitors);
|
||||
|
||||
final Context v2Druid = new Context(getServer(), "/druid/v2", Context.SESSIONS);
|
||||
v2Druid.addServlet(new ServletHolder(new StatusServlet()), "/status");
|
||||
v2Druid.addServlet(
|
||||
final Context root = new Context(getServer(), "/", Context.SESSIONS);
|
||||
root.addServlet(new ServletHolder(new StatusServlet()), "/status");
|
||||
root.addServlet(
|
||||
new ServletHolder(
|
||||
new QueryServlet(getJsonMapper(), getSmileMapper(), realtimeManager, emitter, getRequestLogger())
|
||||
),
|
||||
"/*"
|
||||
"/druid/v2/*"
|
||||
);
|
||||
|
||||
initialized = true;
|
||||
|
|
|
@ -54,6 +54,7 @@ import org.jets3t.service.S3ServiceException;
|
|||
import org.jets3t.service.impl.rest.httpclient.RestS3Service;
|
||||
import org.jets3t.service.security.AWSCredentials;
|
||||
import org.mortbay.jetty.servlet.Context;
|
||||
import org.mortbay.jetty.servlet.DefaultServlet;
|
||||
import org.mortbay.jetty.servlet.ServletHolder;
|
||||
import org.skife.config.ConfigurationObjectFactory;
|
||||
|
||||
|
@ -149,13 +150,12 @@ public class ComputeNode extends BaseServerNode<ComputeNode>
|
|||
startMonitoring(monitors);
|
||||
|
||||
final Context root = new Context(getServer(), "/", Context.SESSIONS);
|
||||
|
||||
root.addServlet(new ServletHolder(new StatusServlet()), "/status");
|
||||
root.addServlet(
|
||||
new ServletHolder(
|
||||
new QueryServlet(getJsonMapper(), getSmileMapper(), serverManager, emitter, getRequestLogger())
|
||||
),
|
||||
"/*"
|
||||
"/druid/v2/*"
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -221,9 +221,12 @@ public class ComputeNode extends BaseServerNode<ComputeNode>
|
|||
jsonMapper = new DefaultObjectMapper();
|
||||
smileMapper = new DefaultObjectMapper(new SmileFactory());
|
||||
smileMapper.getJsonFactory().setCodec(smileMapper);
|
||||
}
|
||||
else if (jsonMapper == null || smileMapper == null) {
|
||||
throw new ISE("Only jsonMapper[%s] or smileMapper[%s] was set, must set neither or both.", jsonMapper, smileMapper);
|
||||
} else if (jsonMapper == null || smileMapper == null) {
|
||||
throw new ISE(
|
||||
"Only jsonMapper[%s] or smileMapper[%s] was set, must set neither or both.",
|
||||
jsonMapper,
|
||||
smileMapper
|
||||
);
|
||||
}
|
||||
|
||||
if (lifecycle == null) {
|
||||
|
|
|
@ -6,10 +6,10 @@ $(document).ready(function() {
|
|||
var type = $('#select_type').attr('value') + '';
|
||||
var view = $('#select_view').attr('value') + '';
|
||||
|
||||
function handleTable()
|
||||
function handleTable(dontDisplay)
|
||||
{
|
||||
$.get(basePath + type + '?full', function(data) {
|
||||
buildTable(data, $('#result_table'));
|
||||
buildTable(data, $('#result_table'), dontDisplay);
|
||||
|
||||
$('.loading').hide();
|
||||
$('#table_wrapper').show();
|
||||
|
@ -75,14 +75,25 @@ $(document).ready(function() {
|
|||
}
|
||||
|
||||
$('#view_button').click(function() {
|
||||
type = $('#select_type').attr('value') + "";
|
||||
view = $('#select_view').attr('value') + "";
|
||||
type = $('#select_type').attr('value') + '';
|
||||
view = $('#select_view').attr('value') + '';
|
||||
|
||||
resetViews();
|
||||
|
||||
switch (view) {
|
||||
case "table":
|
||||
handleTable();
|
||||
var dontDisplay;
|
||||
switch (type) {
|
||||
case "servers":
|
||||
case "datasources":
|
||||
dontDisplay = ["segments"];
|
||||
break;
|
||||
case "segments":
|
||||
dontDisplay = ["shardSpec"];
|
||||
break;
|
||||
}
|
||||
|
||||
handleTable(dontDisplay);
|
||||
break;
|
||||
case "list":
|
||||
handleList(type.indexOf("segments") == -1);
|
||||
|
|
Loading…
Reference in New Issue