org.rocksdb.RocksDB.ingestExternalFile()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(306)

本文整理了Java中org.rocksdb.RocksDB.ingestExternalFile方法的一些代码示例,展示了RocksDB.ingestExternalFile的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RocksDB.ingestExternalFile方法的具体详情如下:
包路径:org.rocksdb.RocksDB
类名称:RocksDB
方法名:ingestExternalFile

RocksDB.ingestExternalFile介绍

[英]ingestExternalFile will load a list of external SST files (1) into the DB We will try to find the lowest possible level that the file can fit in, and ingest the file into this level (2). A file that have a key range that overlap with the memtable key range will require us to Flush the memtable first before ingesting the file. (1) External SST files can be created using SstFileWriter(2) We will try to ingest the files to the lowest possible level even if the file compression doesn't match the level compression
[中]ingestExternalFile将外部SST文件列表(1)加载到数据库中。我们将尝试找到该文件可以容纳的最低级别,并将该文件摄入该级别(2)。如果文件的密钥范围与memtable密钥范围重叠,则需要我们在接收该文件之前先刷新memtable。(1) 外部SST文件可以使用SstFileWriter创建(2)我们将尝试将文件接收到尽可能低的级别,即使文件压缩与压缩级别不匹配

代码示例

代码示例来源:origin: hugegraph/hugegraph

  1. public void ingest(ColumnFamilyHandle cf, List<String> ssts)
  2. throws RocksDBException {
  3. if (!ssts.isEmpty()) {
  4. this.rocksdb.ingestExternalFile(cf, ssts, this.options);
  5. }
  6. }

代码示例来源:origin: com.baidu.hugegraph/hugegraph-rocksdb

  1. public void ingest(ColumnFamilyHandle cf, List<String> ssts)
  2. throws RocksDBException {
  3. if (!ssts.isEmpty()) {
  4. this.rocksdb.ingestExternalFile(cf, ssts, this.options);
  5. }
  6. }

代码示例来源:origin: org.rocksdb/rocksdbjni

  1. /**
  2. * ingestExternalFile will load a list of external SST files (1) into the DB
  3. * We will try to find the lowest possible level that the file can fit in, and
  4. * ingest the file into this level (2). A file that have a key range that
  5. * overlap with the memtable key range will require us to Flush the memtable
  6. * first before ingesting the file.
  7. *
  8. * (1) External SST files can be created using {@link SstFileWriter}
  9. * (2) We will try to ingest the files to the lowest possible level
  10. * even if the file compression doesn't match the level compression
  11. *
  12. * @param columnFamilyHandle The column family for the ingested files
  13. * @param filePathList The list of files to ingest
  14. * @param ingestExternalFileOptions the options for the ingestion
  15. *
  16. * @throws RocksDBException thrown if error happens in underlying
  17. * native library.
  18. */
  19. public void ingestExternalFile(final ColumnFamilyHandle columnFamilyHandle,
  20. final List<String> filePathList,
  21. final IngestExternalFileOptions ingestExternalFileOptions)
  22. throws RocksDBException {
  23. ingestExternalFile(nativeHandle_, columnFamilyHandle.nativeHandle_,
  24. filePathList.toArray(new String[filePathList.size()]),
  25. filePathList.size(), ingestExternalFileOptions.nativeHandle_);
  26. }

代码示例来源:origin: org.rocksdb/rocksdbjni

  1. /**
  2. * ingestExternalFile will load a list of external SST files (1) into the DB
  3. * We will try to find the lowest possible level that the file can fit in, and
  4. * ingest the file into this level (2). A file that have a key range that
  5. * overlap with the memtable key range will require us to Flush the memtable
  6. * first before ingesting the file.
  7. *
  8. * (1) External SST files can be created using {@link SstFileWriter}
  9. * (2) We will try to ingest the files to the lowest possible level
  10. * even if the file compression doesn't match the level compression
  11. *
  12. * @param filePathList The list of files to ingest
  13. * @param ingestExternalFileOptions the options for the ingestion
  14. *
  15. * @throws RocksDBException thrown if error happens in underlying
  16. * native library.
  17. */
  18. public void ingestExternalFile(final List<String> filePathList,
  19. final IngestExternalFileOptions ingestExternalFileOptions)
  20. throws RocksDBException {
  21. ingestExternalFile(nativeHandle_, getDefaultColumnFamily().nativeHandle_,
  22. filePathList.toArray(new String[filePathList.size()]),
  23. filePathList.size(), ingestExternalFileOptions.nativeHandle_);
  24. }

相关文章