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
|
||||
@Path("/disabled")
|
||||
@Path("/enabled")
|
||||
@Produces("application/json")
|
||||
public Response isEnabled()
|
||||
{
|
||||
try {
|
||||
final Worker theWorker = curatorCoordinator.getWorker();
|
||||
final boolean disabled = theWorker.getVersion().equalsIgnoreCase(DISABLED_VERSION);
|
||||
return Response.ok(ImmutableMap.of(theWorker.getHost(), disabled)).build();
|
||||
final boolean enabled = !theWorker.getVersion().equalsIgnoreCase(DISABLED_VERSION);
|
||||
return Response.ok(ImmutableMap.of(theWorker.getHost(), enabled)).build();
|
||||
}
|
||||
catch (Exception e) {
|
||||
return Response.serverError().build();
|
||||
|
|
Loading…
Reference in New Issue