提交 8fbd3f49 编写于 作者: H Hongze Cheng

refact

上级 36d3adc2
......@@ -16,12 +16,16 @@
#ifndef _TD_META_CACHE_H_
#define _TD_META_CACHE_H_
#include "rocksdb/c.h"
#include "meta.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef rocksdb_cache_t meta_cache_t;
int metaOpenCache(SMeta *pMeta);
void metaCloseCache(SMeta *pMeta);
......
......@@ -16,12 +16,16 @@
#ifndef _TD_META_DB_H_
#define _TD_META_DB_H_
#include "rocksdb/c.h"
#include "meta.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef rocksdb_t meta_db_t;
int metaOpenDB(SMeta *pMeta);
void metaCloseDB(SMeta *pMeta);
......
......@@ -16,8 +16,9 @@
#ifndef _TD_META_DEF_H_
#define _TD_META_DEF_H_
#include "rocksdb/c.h"
#include "metaCache.h"
#include "metaDB.h"
#include "metaIdx.h"
#include "metaTbUid.h"
#ifdef __cplusplus
......@@ -25,12 +26,12 @@ extern "C" {
#endif
struct SMeta {
char * path; // path of current meta
SMetaOptions options; // meta option
rocksdb_t * pDB;
rocksdb_t * pIdx;
rocksdb_cache_t *pCache;
STbUidGenerator uidGnrt; // meta table UID generator
char* path; // path of current meta
SMetaOptions options; // meta option
meta_db_t* pDB; // raw data db
meta_index_t* pIdx; // tag index
meta_cache_t* pCache; // LRU cache
STbUidGenerator uidGnrt; // meta table UID generator
};
#ifdef __cplusplus
......
......@@ -16,12 +16,16 @@
#ifndef _TD_META_IDX_H_
#define _TD_META_IDX_H_
#include "rocksdb/c.h"
#include "meta.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef rocksdb_t meta_index_t;
int metaOpenIdx(SMeta *pMeta);
void metaCloseIdx(SMeta *pMeta);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册