private static Collector<SegmentInfo,?,Map<String,SegmentInfo>> partitionsToMapCollector(){
  return Collector.of(null,null,null);
}

private static Collector < SegmentInfo , ? , Map < String , SegmentInfo > > partitionsToMapCollector ( ) { return Collector . of ( null , null , null ) ; }
a collector to aggregate all partitions of a segment into a map .
