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);
|
||||
RegisteredFileSet registeredFileSet=Serialization.convert(wrapper.getByPath(s).get(0),RegisteredFileSet.class);
|
||||
List<Object> toKeep = new ArrayList<>();
|
||||
for(Object matObj : registeredFileSet.getMaterializations()){
|
||||
Materialization mat = Serialization.convert(matObj,Materialization.class);
|
||||
if(mat.getType().equals(GCubeSDILayer.GCUBE_SDY_LAYER_TYPE)) {
|
||||
log.debug("Deleting Layer {} ",mat);
|
||||
sdi.deleteLayer(Serialization.convert(matObj, GCubeSDILayer.class));
|
||||
}else toKeep.add(matObj);
|
||||
}
|
||||
if(registeredFileSet.getMaterializations()!=null)
|
||||
for(Object matObj : registeredFileSet.getMaterializations()){
|
||||
Materialization mat = Serialization.convert(matObj,Materialization.class);
|
||||
if(mat.getType().equals(GCubeSDILayer.GCUBE_SDY_LAYER_TYPE)) {
|
||||
log.debug("Deleting Layer {} ",mat);
|
||||
sdi.deleteLayer(Serialization.convert(matObj, GCubeSDILayer.class));
|
||||
}else toKeep.add(matObj);
|
||||
}
|
||||
// Resetting remaining materializations
|
||||
registeredFileSet.put(RegisteredFileSet.MATERIALIZATIONS,toKeep);
|
||||
// Update FS in doc
|
||||
|
|
Loading…
Reference in New Issue