if (index == null) {
if (persistentIndex) {
String name = containerId.getDataContainerName() + "_" + containerId.getKey();
name=IOHelper.toFileSystemSafeName(name);
try {
HashIndex hashIndex = new HashIndex(directory, name, indexManager);
hashIndex.setNumberOfBins(getIndexBinSize());
hashIndex.setKeySize(getIndexKeySize());
hashIndex.setPageSize(getIndexPageSize());
hashIndex.setMaximumCapacity(getIndexMaxBinSize());
hashIndex.setLoadFactor(getIndexLoadFactor());
this.index = hashIndex;
} catch (IOException e) {
LOG.error("Failed to create HashIndex", e);
throw new RuntimeException(e);
}