@Deprecated @Override public Map<String, String> readStringStringMap() throws IOException { return delegate.readStringStringMap(); }
/** * Reads legacy checksum files found in the directory. * <p> * Files are expected to start with _checksums- prefix * followed by long file version. Only file with the highest version is read, all other files are ignored. * * @param directory the directory to read checksums from * @return a map of file checksums and the checksum file version */ static Tuple<Map<String, String>, Long> readLegacyChecksums(Directory directory) throws IOException { synchronized (directory) { long lastFound = -1; for (String name : directory.listAll()) { if (!isChecksum(name)) { continue; } long current = Long.parseLong(name.substring(CHECKSUMS_PREFIX.length())); if (current > lastFound) { lastFound = current; } } if (lastFound > -1) { try (IndexInput indexInput = directory.openInput(CHECKSUMS_PREFIX + lastFound, IOContext.READONCE)) { indexInput.readInt(); // version return new Tuple(indexInput.readStringStringMap(), lastFound); } } return new Tuple(new HashMap<>(), -1l); } }
final Map<String,String> diagnostics = Collections.unmodifiableMap(input.readStringStringMap()); final Map<String,String> attributes = Collections.unmodifiableMap(input.readStringStringMap()); final Set<String> files = Collections.unmodifiableSet(input.readStringSet());
final LegacyDocValuesType oldValuesType = getDocValuesType((byte) (val & 0x0F)); final LegacyDocValuesType oldNormsType = getDocValuesType((byte) ((val >>> 4) & 0x0F)); final Map<String,String> attributes = input.readStringStringMap(); if (oldValuesType.mapping != DocValuesType.NONE) { attributes.put(LEGACY_DV_TYPE_KEY, oldValuesType.name());
final DocValuesType docValuesType = getDocValuesType(input, (byte) (val & 0x0F)); final DocValuesType normsType = getDocValuesType(input, (byte) ((val >>> 4) & 0x0F)); final Map<String,String> attributes = input.readStringStringMap();
input.readStringStringMap(); fail("cannot use IndexInput once closed"); } catch (AlreadyClosedException e) {