byte[] getChunk(final File file, final int id) {
    final ChunkKey key = new ChunkKey(file.id, id);

    // The file's metadata indicates that this chunk shouldn't
    // exist. Purge all of the chunks that are larger than the file metadata
    if (id >= file.chunks) {
      while (fileAndChunkRegion.containsKey(key)) {
        fileAndChunkRegion.remove(key);
        key.chunkId++;
      }
      return null;
    }

    final byte[] chunk = (byte[]) fileAndChunkRegion.get(key);
    if (chunk != null) {
      stats.incReadBytes(chunk.length);
    } else {
      logger.debug("Chunk was null for file:" + file.getName() + " file id: " + key.getFileId()
          + " chunkKey:" + key.chunkId);
    }
    return chunk;
  }
Create filesystem that will store data in the two provided regions. The fileAndChunkRegion
contains metadata about the files, and the chunkRegion contains the actual data. If data from
either region is missing or inconsistent, no guarantees are made about what this class will do,
so it's best if these regions are colocated and in the same disk store to ensure the data
remains together.

@param fileAndChunkRegion the region to store metadata about the files
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/filesystem/FileSystem.java