1 #ifndef OBJTOOLS_WRITERS_WRITEDB__WRITEDB_LMDB_HPP
2 #define OBJTOOLS_WRITERS_WRITEDB__WRITEDB_LMDB_HPP
52 #define DEFAULT_LMDB_MAP_SIZE 500000
53 #define DEFAULT_TAXID_MAP_SIZE 500000
55 #define DEFAULT_LMDB_MAP_SIZE 700000000
56 #define DEFAULT_TAXID_MAP_SIZE 300000000
78 void InsertVolumesInfo(
const vector<string> & vol_names,
const vector<blastdb::TOid> & vol_num_oids);
99 void x_CommitTransaction();
101 void x_CreateOidToSeqidsLookupFile();
103 void x_IncreaseEnvMapSize();
104 void x_IncreaseEnvMapSize(
const vector<string> & vol_names,
const vector<blastdb::TOid> & vol_num_oids);
130 void x_Split(vector<SKeyValuePair>::iterator
b, vector<SKeyValuePair>::iterator e,
const unsigned int min_chunk_size);
159 void x_CommitTransaction();
160 void x_CreateOidToTaxIdsLookupFile();
161 void x_CreateTaxIdToOidsLookupFile();
163 void x_IncreaseEnvMapSize();
170 template <
class valueType>
This class supports creation of a string accession to integer OID lmdb database.
vector< SKeyValuePair > m_list
unsigned int m_MaxEntryPerTxn
This class supports creation of tax id list lookup files.
vector< SKeyValuePair< blastdb::TOid > > m_TaxId2OidList
vector< SKeyValuePair< Uint8 > > m_TaxId2OffsetsList
unsigned int m_MaxEntryPerTxn
Resource class for `MDB_env*` handles.
SStrictId_Tax::TId TTaxId
Taxon id type.
uint64_t Uint8
8-byte (64-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define NCBI_XOBJREAD_EXPORT
char * dbname(DBPROCESS *dbproc)
Get name of current database.
const GenericPointer< typename T::ValueType > T2 value
Defines BLAST database access classes.
Defines interface to interact with LMDB files.
const blastdb::TOid kSeqDBEntryNotFound
Int4 TOid
Ordinal ID in BLAST databases.
static bool cmp_key(const SKeyValuePair &v, const SKeyValuePair &k)
SKeyValuePair(TTaxId t, valueType v)
static bool cmp_key(const SKeyValuePair &v, const SKeyValuePair &k)
#define DEFAULT_LMDB_MAP_SIZE
#define DEFAULT_TAXID_MAP_SIZE