class ShardInfoDownloader {

    public Map<Long, Double> getShardRelativeWeights() {
        Map<Long, Double> res = new HashMap<>();
        if (sortedByIdShards.isEmpty()) {
            return res;
        }
        for (Long shardId : sortedByIdShards.keySet()) {
            //1.0 for last shard and then less
            Double k = 1.0 * shardId / sortedByIdShards.keySet().size();
            Double weight = getShardWeight(shardId) * k;
            res.put(shardId, weight);
        }
        //we can use environment variable to fore download of some shard
        Long predefined = readManuallyDefinedShardId();
        if (predefined != null) {
            boolean exists = res.get(predefined) != null;
            if (exists) {
                res.replace(predefined, 20.0D);
                log.info("Downloading of shard {} is forced by enviromnent variable", predefined);
            } else {
                log.info("Shard ID {} predefined in environment variable is not usable or does not exist", predefined);
            }
        }
        return res;
    }

    @Inject public  ShardInfoDownloader(PeersService peers);

}