use of io.cdap.cdap.proto.metadata.lineage.CollapseType in project cdap by caskdata.
the class LineageHTTPHandler method getCollapseTypes.
private static Set<CollapseType> getCollapseTypes(@Nullable List<String> collapse) throws BadRequestException {
if (collapse == null) {
return Collections.emptySet();
}
Set<CollapseType> collapseTypes = new HashSet<>();
for (String c : collapse) {
try {
CollapseType type = CollapseType.valueOf(c.toUpperCase());
collapseTypes.add(type);
} catch (IllegalArgumentException e) {
throw new BadRequestException(String.format("Invalid collapse type %s", c));
}
}
return collapseTypes;
}
Aggregations