@VisibleForTesting
  boolean createEmptyIndexes(HashSet<IndexCreationData> indexDefinitions,
      boolean remotelyOriginated, Set<Index> indexes, HashMap<String, Exception> exceptionsMap) {
    boolean throwException = false;
    for (IndexCreationData icd : indexDefinitions) {
      try {
        Index ind = createIndex(remotelyOriginated, icd.getIndexType(), icd.getIndexName(),
            icd.getIndexExpression(), icd.getIndexFromClause(), icd.getIndexImportString(), false,
            false);
        // There could be nulls in the set if a node is accessor.
        // The index might have been created by the local node.
        if (ind != null) {
          indexes.add(ind);
        }
      } catch (CancelException cancelException) {
        // Do not add cancel exception to exceptionsMap, re-throw instead.
        throw cancelException;
      } catch (Exception ex) {
        // If an index creation fails, add the exception to the map and
        // continue creating rest of the indexes.The failed indexes will
        // be removed from the IndexManager#indexes map by the createIndex
        // method so that those indexes will not be populated in the next
        // step.
        if (logger.isDebugEnabled()) {
          logger.debug("Creation failed for index: {}, {}", icd.getIndexName(), ex.getMessage(),
              ex);
        }
        exceptionsMap.put(icd.getIndexName(), ex);
        throwException = true;
      }
    }
    return throwException;
  }
Creates the actual index on this partitioned regions.

@param remotelyOriginated true if the index is created because of a remote index creation call
@param indexType the type of index created.
@param indexName the name for the index to be created
@param indexedExpression expression for index creation.
@param fromClause the from clause for index creation
@param imports class to be imported for fromClause.

@return Index an index created on this region.
@throws ForceReattemptException indicating the operation failed to create a remote index
@throws IndexCreationException if the index is not created properly
@throws IndexNameConflictException if an index exists with this name on this region
@throws IndexExistsException if and index already exists with the same properties as the one
        created
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java