feature(hudi-query): 增加查询 Hudi 表结构
This commit is contained in:
@@ -9,6 +9,7 @@ import com.lanyuanxiaoyao.service.configuration.entity.hudi.HudiInstant;
|
||||
import com.lanyuanxiaoyao.service.configuration.entity.hudi.HudiRollbackPlan;
|
||||
import com.lanyuanxiaoyao.service.forest.service.HudiService;
|
||||
import com.lanyuanxiaoyao.service.web.controller.base.AmisCrudResponse;
|
||||
import com.lanyuanxiaoyao.service.web.controller.base.AmisDetailResponse;
|
||||
import com.lanyuanxiaoyao.service.web.controller.base.AmisResponse;
|
||||
import com.lanyuanxiaoyao.service.web.controller.base.BaseController;
|
||||
import java.util.List;
|
||||
@@ -148,4 +149,18 @@ public class HudiController extends BaseController {
|
||||
}
|
||||
throw new Exception("Flink job id and alias or hdfs cannot be blank");
|
||||
}
|
||||
|
||||
@GetMapping("schema")
|
||||
public AmisDetailResponse readCleanerPlan(
|
||||
@RequestParam(value = "flink_job_id", required = false) Long flinkJobId,
|
||||
@RequestParam(value = "alias", required = false) String alias,
|
||||
@RequestParam(value = "hdfs", required = false) String hdfs
|
||||
) throws Exception {
|
||||
if (StrUtil.isNotBlank(hdfs)) {
|
||||
return AmisResponse.responseDetailData(hudiService.schema(hdfs));
|
||||
} else if (ObjectUtil.isNotNull(flinkJobId) && StrUtil.isNotBlank(alias)) {
|
||||
return AmisResponse.responseDetailData(hudiService.schema(flinkJobId, alias));
|
||||
}
|
||||
throw new Exception("Flink job id and alias or hdfs cannot be blank");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user