mirror of https://github.com/apache/druid.git
fix enabled endpoint
This commit is contained in:
parent
83cb7931ac
commit
beac0be45b
|
@ -99,14 +99,14 @@ public class WorkerResource
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Path("/disabled")
|
@Path("/enabled")
|
||||||
@Produces("application/json")
|
@Produces("application/json")
|
||||||
public Response isEnabled()
|
public Response isEnabled()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
final Worker theWorker = curatorCoordinator.getWorker();
|
final Worker theWorker = curatorCoordinator.getWorker();
|
||||||
final boolean disabled = theWorker.getVersion().equalsIgnoreCase(DISABLED_VERSION);
|
final boolean enabled = !theWorker.getVersion().equalsIgnoreCase(DISABLED_VERSION);
|
||||||
return Response.ok(ImmutableMap.of(theWorker.getHost(), disabled)).build();
|
return Response.ok(ImmutableMap.of(theWorker.getHost(), enabled)).build();
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
return Response.serverError().build();
|
return Response.serverError().build();
|
||||||
|
|
Loading…
Reference in New Issue