Alluxio/Community

Improve memory efficiency in IndexSet.Java with Java Collections utils

Closed this issue · 0 comments

In the constructor of alluxio.collections.IndexedSet, replace

Iterable<IndexDefinition<T>> indexDefinitions =
        Iterables.concat(Arrays.asList(primaryIndexDefinition),
            Arrays.asList(otherIndexDefinitions));

with

Iterable<IndexDefinition<T>> indexDefinitions =
        Iterables.concat(Collections.singletonList(primaryIndexDefinition),
            Arrays.asList(otherIndexDefinitions));

to save memory.