@Override public void mapSchemaWithSerDes(String schemaName, Long serDesId) { schemaRegistry.mapSchemaWithSerDes(schemaName, serDesId); }
@POST @Path("/schemas/{name}/mapping/{serDesId}") @ApiOperation(value = "Bind the given Serializer/Deserializer to the schema identified by the schema name", tags = OPERATION_GROUP_SERDE) @Timed @UnitOfWork public Response mapSchemaWithSerDes(@ApiParam(value = "Schema name", required = true) @PathParam("name") String schemaName, @ApiParam(value = "Serializer/deserializer identifier", required = true) @PathParam("serDesId") Long serDesId, @Context UriInfo uriInfo) { return handleLeaderAction(uriInfo, () -> { Response response; try { schemaRegistry.mapSchemaWithSerDes(schemaName, serDesId); response = WSUtils.respondEntity(true, Response.Status.OK); } catch (Exception ex) { response = WSUtils.respond(Response.Status.INTERNAL_SERVER_ERROR, CatalogResponse.ResponseMessage.EXCEPTION, ex.getMessage()); } return response; }); }
@POST @Path("/schemas/{name}/mapping/{serDesId}") @ApiOperation(value = "Bind the given Serializer/Deserializer to the schema identified by the schema name", tags = OPERATION_GROUP_SERDE) @Timed @UnitOfWork public Response mapSchemaWithSerDes(@ApiParam(value = "Schema name", required = true) @PathParam("name") String schemaName, @ApiParam(value = "Serializer/deserializer identifier", required = true) @PathParam("serDesId") Long serDesId, @Context UriInfo uriInfo) { return handleLeaderAction(uriInfo, () -> { Response response; try { schemaRegistry.mapSchemaWithSerDes(schemaName, serDesId); response = WSUtils.respondEntity(true, Response.Status.OK); } catch (Exception ex) { response = WSUtils.respond(Response.Status.INTERNAL_SERVER_ERROR, CatalogResponse.ResponseMessage.EXCEPTION, ex.getMessage()); } return response; }); }