protected void initLegalTypes ( ) { Map < Integer , Map < ResourceType , Integer > > cpuToResourcePartitioning = conf . getCpuToResourcePartitioning ( ) ; for ( Map . Entry < Integer , Map < ResourceType , Integer > > entry : cpuToResourcePartitioning . entrySet ( ) ) { for ( ResourceType type : entry . getValue ( ) . keySet ( ) ) { legalTypeSet . add ( type ) ; } } legalTypeSet = Collections . unmodifiableSet ( legalTypeSet ) ; }
Prepare the legal types allowed based on the resources available