@Deprecated
@PUT
@Path("/tables/{tableName}/metadataConfigs")
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value = "Update table metadata", notes = "Updates table configuration")
@ApiResponses(value = {@ApiResponse(code = 200, message = "Success"), @ApiResponse(code = 500, message = "Internal server error"), @ApiResponse(code = 404, message = "Table not found")})
public SuccessResponse updateTableMetadata(@PathParam("tableName") String tableName, String requestBody) {
try {
TableConfig tableConfig = TableConfig.fromJsonString(requestBody);
pinotHelixResourceManager.updateMetadataConfigFor(tableConfig.getTableName(), tableConfig.getTableType(),
tableConfig.getCustomConfig());
return new SuccessResponse("Successfully updated " + tableName + " configuration");
} catch (Exception e) {
String errStr = "Error while updating table configuration, table: " + tableName;
throw new ControllerApplicationException(LOGGER, errStr, Response.Status.INTERNAL_SERVER_ERROR, e);
}
}
}