public void addFileSizes(ImmutableOpenMap<String, Long> fileSizes) { ImmutableOpenMap.Builder<String, Long> map = ImmutableOpenMap.builder(this.fileSizes); for (Iterator<ObjectObjectCursor<String, Long>> it = fileSizes.iterator(); it.hasNext();) { ObjectObjectCursor<String, Long> entry = it.next(); if (map.containsKey(entry.key)) { Long oldValue = map.get(entry.key); map.put(entry.key, oldValue + entry.value); } else { map.put(entry.key, entry.value); } } this.fileSizes = map.build(); }
if (mappings.containsKey(MapperService.DEFAULT_MAPPING)) { MappingMetaData defaultMapping = mappings.get(MapperService.DEFAULT_MAPPING); for (ObjectCursor<MappingMetaData> cursor : mappings.values()) {
public void addFileSizes(ImmutableOpenMap<String, Long> fileSizes) { ImmutableOpenMap.Builder<String, Long> map = ImmutableOpenMap.builder(this.fileSizes); for (Iterator<ObjectObjectCursor<String, Long>> it = fileSizes.iterator(); it.hasNext();) { ObjectObjectCursor<String, Long> entry = it.next(); if (map.containsKey(entry.key)) { Long oldValue = map.get(entry.key); map.put(entry.key, oldValue + entry.value); } else { map.put(entry.key, entry.value); } } this.fileSizes = map.build(); }
if (inSyncAllocationIds.containsKey(i)) { filledInSyncAllocationIds.put(i, Collections.unmodifiableSet(new HashSet<>(inSyncAllocationIds.get(i)))); } else {
if (mappings.containsKey(MapperService.DEFAULT_MAPPING)) { MappingMetaData defaultMapping = mappings.get(MapperService.DEFAULT_MAPPING); for (ObjectCursor<MappingMetaData> cursor : mappings.values()) {
if (mappings.containsKey(MapperService.DEFAULT_MAPPING)) { MappingMetaData defaultMapping = mappings.get(MapperService.DEFAULT_MAPPING); for (ObjectCursor<MappingMetaData> cursor : mappings.values()) {
public void addFileSizes(ImmutableOpenMap<String, Long> fileSizes) { ImmutableOpenMap.Builder<String, Long> map = ImmutableOpenMap.builder(this.fileSizes); for (Iterator<ObjectObjectCursor<String, Long>> it = fileSizes.iterator(); it.hasNext();) { ObjectObjectCursor<String, Long> entry = it.next(); if (map.containsKey(entry.key)) { Long oldValue = map.get(entry.key); map.put(entry.key, oldValue + entry.value); } else { map.put(entry.key, entry.value); } } this.fileSizes = map.build(); }
public void addFileSizes(ImmutableOpenMap<String, Long> fileSizes) { ImmutableOpenMap.Builder<String, Long> map = ImmutableOpenMap.builder(this.fileSizes); for (Iterator<ObjectObjectCursor<String, Long>> it = fileSizes.iterator(); it.hasNext();) { ObjectObjectCursor<String, Long> entry = it.next(); if (map.containsKey(entry.key)) { Long oldValue = map.get(entry.key); map.put(entry.key, oldValue + entry.value); } else { map.put(entry.key, entry.value); } } this.fileSizes = map.build(); }
public IndexMetaData build() { ImmutableOpenMap.Builder<String, AliasMetaData> tmpAliases = aliases; Settings tmpSettings = settings; // update default mapping on the MappingMetaData if (mappings.containsKey(MapperService.DEFAULT_MAPPING)) { MappingMetaData defaultMapping = mappings.get(MapperService.DEFAULT_MAPPING); for (ObjectCursor<MappingMetaData> cursor : mappings.values()) { cursor.value.updateDefaultMapping(defaultMapping); } } return new IndexMetaData(index, version, state, tmpSettings, mappings.build(), tmpAliases.build(), customs.build()); }