@Override
            public Entry<String, Optional<MetaProperties>> next() {
                if (emptyLogDirsIterator.hasNext()) {
                    return new SimpleImmutableEntry<>(emptyLogDirsIterator.next(), Optional.empty());
                }
                Entry<String, MetaProperties> entry = logDirsIterator.next();
                return new SimpleImmutableEntry<>(entry.getKey(), Optional.of(entry.getValue()));
            }
@return An iterator that returns (logDir, metaProps) for all non-failed directories.
metadata/src/main/java/org/apache/kafka/metadata/properties/MetaPropertiesEnsemble.java