class LayoutEntity #Red { // Tree of Cuboid long id String name List<Integer> colOrder long updateTime int storageType List<Integer> shardByColumns Map<Integer, ColumnDesc> orderedDimensions; Map<Integer, FunctionDesc> orderedMeasures; long rows long sourceRows long byteSize long fileCount int shardNum } abstract class SpanningTree { Collection<LayoutEntity> cuboids Collection<LayoutEntity> getRootIndexEntities() void decideTheNextLayer(Collection<LayoutEntity> currentLayer, SegmentInfo segment) Collection<LayoutEntity> getChildrenByIndexPlan(LayoutEntity parent) } class ForestSpanningTree { Map<Long, TreeNode> nodesMap List<TreeNode> roots } class TreeNode { LayoutEntity indexEntity; ArrayList<TreeNode> children int level TreeNode parent List<LayoutEntity> parentCandidates boolean hasBeenDecided = false } ForestSpanningTree -> SpanningTree SpanningTree *-- TreeNode TreeNode *-- LayoutEntity class ManagerHub { SegmentInfo getSegmentInfo(KylinConfig kylinConfig, String cubeName, String segmentId) } class MetadataConverter { SegmentInfo getSegmentInfo(cubeInstance: CubeInstance, segmentId: String, segmentName: String, identifier: String) } class SegmentInfo { // JoinDesc TableDesc etc.. } class ParentSourceChooser { } ManagerHub -- MetadataConverter : "call" > MetadataConverter -- SegmentInfo : "call" > |