[ 
https://issues.apache.org/jira/browse/KYLIN-3430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17533639#comment-17533639
 ] 

Zhong Yanghong commented on KYLIN-3430:
---------------------------------------

The following code:
{code}
        Set<String> activeResources = Sets.newHashSet();
        for (CubeInstance cube : cubeManager.reloadAndListAllCubes()) {
            activeResources.addAll(cube.getSnapshots().values());
            for (CubeSegment segment : cube.getSegments()) {
                activeResources.addAll(segment.getSnapshotPaths());
                activeResources.addAll(segment.getDictionaryPaths());
                activeResources.add(segment.getStatisticsResourcePath());
                for (String dictPath : segment.getDictionaryPaths()) {
                    DictionaryInfo dictInfo = store.getResource(dictPath, 
DictionaryInfoSerializer.FULL_SERIALIZER);
                    if ("org.apache.kylin.dict.AppendTrieDictionary"
                            .equals(dictInfo != null ? 
dictInfo.getDictionaryClass() : null)) {
{code}
will make it very slow to do the clean up, since we have to load every 
dictionaries.

> Global Dictionary Cleanup
> -------------------------
>
>                 Key: KYLIN-3430
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3430
>             Project: Kylin
>          Issue Type: Improvement
>          Components: Tools, Build and Test
>    Affects Versions: v2.1.0, v2.2.0, v2.3.0, v2.3.1, v2.4.0
>            Reporter: Temple Zhou
>            Assignee: Temple Zhou
>            Priority: Major
>             Fix For: v2.6.0
>
>         Attachments: KYLIN-3430.master.001.patch
>
>
> I had run "{{./bin/metastore.sh clean --delete true" to cleanup my Kylin 
> metadata, but, after that, the Global Dictionary still exists in my HDFS and 
> the size of directory "/kylin_metadata/resources/GlobalDict/dict" hasn't 
> shrunk.}}
>  
> {{BTW: I'm very sure that there are redundant Global Dictionaries.}}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to