diff --git a/management-api-agent-common/src/main/java/com/datastax/mgmtapi/NodeOpsProvider.java b/management-api-agent-common/src/main/java/com/datastax/mgmtapi/NodeOpsProvider.java index efe99c4c..a5bb80a1 100644 --- a/management-api-agent-common/src/main/java/com/datastax/mgmtapi/NodeOpsProvider.java +++ b/management-api-agent-common/src/main/java/com/datastax/mgmtapi/NodeOpsProvider.java @@ -81,7 +81,7 @@ public synchronized void unregister() { RpcRegistry.unregister(RPC_CLASS_NAME); } - @Rpc(name = "jobStatus") + @Rpc(name = "getJobStatus") public Map getJobStatus(@RpcParam(name = "job_id") String jobId) { Map resultMap = new HashMap<>(); Job jobWithId = service.getJobWithId(jobId); @@ -909,4 +909,4 @@ public Map, List> getRangeToEndpointMap( @RpcParam(name = "keyspaceName") String keyspaceName) { return ShimLoader.instance.get().getStorageService().getRangeToEndpointMap(keyspaceName); } -} +} \ No newline at end of file diff --git a/management-api-server/src/main/java/com/datastax/mgmtapi/resources/K8OperatorResources.java b/management-api-server/src/main/java/com/datastax/mgmtapi/resources/K8OperatorResources.java index 9164b1f8..e145bf14 100644 --- a/management-api-server/src/main/java/com/datastax/mgmtapi/resources/K8OperatorResources.java +++ b/management-api-server/src/main/java/com/datastax/mgmtapi/resources/K8OperatorResources.java @@ -191,11 +191,11 @@ public Response getJobStatus( Map jobResponse = (Map) ResponseTools.getSingleRowResponse( - app.dbUnixSocketFile, app.cqlService, "CALL NodeOps.jobStatus(?)", jobId); + app.dbUnixSocketFile, app.cqlService, "CALL NodeOps.getJobStatus(?)", jobId); if (jobResponse.isEmpty()) { return Response.status(Response.Status.NOT_FOUND).entity(jobResponse).build(); } return Response.ok(jobResponse, MediaType.APPLICATION_JSON).build(); }); } -} +} \ No newline at end of file diff --git a/management-api-server/src/test/java/com/datastax/mgmtapi/K8OperatorResourcesTest.java b/management-api-server/src/test/java/com/datastax/mgmtapi/K8OperatorResourcesTest.java index 0e78d752..90bdfbdc 100644 --- a/management-api-server/src/test/java/com/datastax/mgmtapi/K8OperatorResourcesTest.java +++ b/management-api-server/src/test/java/com/datastax/mgmtapi/K8OperatorResourcesTest.java @@ -617,7 +617,7 @@ public void testJobStatus() throws Exception { Assert.assertEquals(HttpStatus.SC_OK, response.getStatus()); verify(context.cqlService) - .executePreparedStatement(any(), eq("CALL NodeOps.jobStatus(?)"), anyString()); + .executePreparedStatement(any(), eq("CALL NodeOps.getJobStatus(?)"), anyString()); String json = response.getContentAsString(); @@ -648,7 +648,7 @@ public void testJobStatusNotExisting() throws Exception { Assert.assertEquals(HttpStatus.SC_NOT_FOUND, response.getStatus()); verify(context.cqlService) - .executePreparedStatement(any(), eq("CALL NodeOps.jobStatus(?)"), anyString()); + .executePreparedStatement(any(), eq("CALL NodeOps.getJobStatus(?)"), anyString()); String json = response.getContentAsString(); assertEquals("{}", json); @@ -2140,4 +2140,4 @@ public void testMoveAsync_MissingNewToken() throws Exception { verify(context.cqlService, never()) .executePreparedStatement(any(), eq("CALL NodeOps.move(?, ?)"), eq("1234"), eq(true)); } -} +} \ No newline at end of file