コード例 #1
0
  @Override
  public void writeIndexesToFiles(
      ByteSink invertedIndexFile, OutputSupplier<FileOutputStream> spatialIndexFile)
      throws IOException {
    final SerializerUtils serializerUtils = new SerializerUtils();

    bitmapWriter.close();
    serializerUtils.writeString(invertedIndexFile, dimensionName);
    ByteStreams.copy(bitmapWriter.combineStreams(), invertedIndexFile);

    if (capabilities.hasSpatialIndexes()) {
      spatialWriter.close();
      serializerUtils.writeString(spatialIndexFile, dimensionName);
      ByteStreams.copy(spatialWriter.combineStreams(), spatialIndexFile);
      spatialIoPeon.cleanup();
    }
  }
コード例 #2
0
  @Override
  public void writeValueMetadataToFile(FileOutputSupplier valueEncodingFile) throws IOException {
    final SerializerUtils serializerUtils = new SerializerUtils();

    dictionaryWriter.close();
    serializerUtils.writeString(valueEncodingFile, dimensionName);
    ByteStreams.copy(dictionaryWriter.combineStreams(), valueEncodingFile);

    // save this File reference, we will read from it later when building bitmap/spatial indexes
    dictionaryFile = valueEncodingFile.getFile();
  }