Fixes #24235
This commit is contained in:
parent
ec0b826313
commit
de8ed2a811
|
@ -181,13 +181,14 @@ public class SDIMaterializerPlugin extends AbstractPlugin implements Materializa
|
||||||
log.debug("Found matching {} ",s);
|
log.debug("Found matching {} ",s);
|
||||||
RegisteredFileSet registeredFileSet=Serialization.convert(wrapper.getByPath(s).get(0),RegisteredFileSet.class);
|
RegisteredFileSet registeredFileSet=Serialization.convert(wrapper.getByPath(s).get(0),RegisteredFileSet.class);
|
||||||
List<Object> toKeep = new ArrayList<>();
|
List<Object> toKeep = new ArrayList<>();
|
||||||
for(Object matObj : registeredFileSet.getMaterializations()){
|
if(registeredFileSet.getMaterializations()!=null)
|
||||||
Materialization mat = Serialization.convert(matObj,Materialization.class);
|
for(Object matObj : registeredFileSet.getMaterializations()){
|
||||||
if(mat.getType().equals(GCubeSDILayer.GCUBE_SDY_LAYER_TYPE)) {
|
Materialization mat = Serialization.convert(matObj,Materialization.class);
|
||||||
log.debug("Deleting Layer {} ",mat);
|
if(mat.getType().equals(GCubeSDILayer.GCUBE_SDY_LAYER_TYPE)) {
|
||||||
sdi.deleteLayer(Serialization.convert(matObj, GCubeSDILayer.class));
|
log.debug("Deleting Layer {} ",mat);
|
||||||
}else toKeep.add(matObj);
|
sdi.deleteLayer(Serialization.convert(matObj, GCubeSDILayer.class));
|
||||||
}
|
}else toKeep.add(matObj);
|
||||||
|
}
|
||||||
// Resetting remaining materializations
|
// Resetting remaining materializations
|
||||||
registeredFileSet.put(RegisteredFileSet.MATERIALIZATIONS,toKeep);
|
registeredFileSet.put(RegisteredFileSet.MATERIALIZATIONS,toKeep);
|
||||||
// Update FS in doc
|
// Update FS in doc
|
||||||
|
|
Loading…
Reference in New Issue