public static Map < String , ByteAmount > getComponentDiskMapConfig ( TopologyAPI . Topology topology ) throws RuntimeException { Map < String , String > configMap = getComponentConfigMap ( topology , Config . TOPOLOGY_COMPONENT_DISKMAP ) ; Map < String , ByteAmount > diskMap = new HashMap <> ( ) ; for ( Map . Entry < String , String > entry : configMap . entrySet ( ) ) { long requiredDisk = Long . parseLong ( entry . getValue ( ) ) ; diskMap . put ( entry . getKey ( ) , ByteAmount . fromBytes ( requiredDisk ) ) ; } return diskMap ; }
Parses the value in Config . TOPOLOGY_COMPONENT_DISKMAP and returns a map containing only component specified . Returns a empty map if the Config is not set