more
This commit is contained in:
parent
0fb0d0bdd3
commit
3198baec27
|
@ -0,0 +1,14 @@
|
|||
#if !defined(_TD_CACHE_H_)
|
||||
#define _TD_CACHE_H_
|
||||
|
||||
typedef void cache_pool_t;
|
||||
|
||||
typedef struct SCacheBlock
|
||||
{
|
||||
|
||||
SCacheBlock *next;
|
||||
} SCacheBlock;
|
||||
|
||||
|
||||
|
||||
#endif // _TD_CACHE_H_
|
|
@ -1,3 +1,6 @@
|
|||
/**************************************
|
||||
* FOR OUTSIDE USAGE
|
||||
**************************************/
|
||||
#if !defined(_TD_TSDB_H_)
|
||||
#define _TD_TSDB_H_
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
/************************************
|
||||
* For internal usage
|
||||
************************************/
|
||||
|
||||
#include "tsdb.h"
|
||||
|
||||
typedef struct STable
|
||||
{
|
||||
STableId tid;
|
||||
char *tableName;
|
||||
} STable;
|
||||
|
||||
#define TSDB_GET_TABLE_ID(pTable) (((STable *)pTable)->tid).tableId
|
||||
#define TSDB_GET_TABLE_UID(pTable) (((STable *)pTable)->tid).uid
|
||||
|
||||
#define TSDB_IS_SUPER_TABLE(pTable)
|
|
@ -0,0 +1,42 @@
|
|||
#include <stdint.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "tsdb.h"
|
||||
#include "disk.h"
|
||||
#include "cache.h"
|
||||
|
||||
typedef struct STSDBRepo
|
||||
{
|
||||
// TSDB configuration
|
||||
STSDBcfg *pCfg;
|
||||
|
||||
/* Disk tier handle for multi-tier storage
|
||||
*
|
||||
* The handle is responsible for dealing with object-oriented
|
||||
* storage.
|
||||
*/
|
||||
SDiskTier *pDiskTier;
|
||||
|
||||
/* Cache block list
|
||||
*/
|
||||
SCacheBlock *pCacheBloclList;
|
||||
|
||||
/* Map from tableId-->STable
|
||||
*/
|
||||
STable *pTableList;
|
||||
|
||||
/* Map from tableName->tableId
|
||||
* TODO: may use dict
|
||||
*/
|
||||
void *pTableDict;
|
||||
|
||||
/* Map from super tableName->table
|
||||
*/
|
||||
void *pSTableDict;
|
||||
|
||||
pthread_mutext_t tsdbMutex;
|
||||
|
||||
} STSDBRepo;
|
||||
|
||||
#define TSDB_GET_TABLE_BY_ID(pRepo, sid) (((STSDBRepo *)pRepo)->pTableList)[sid]
|
||||
#define TSDB_GET_TABLE_BY_NAME(pRepo, name)
|
|
@ -0,0 +1,6 @@
|
|||
#include "tsdb.h"
|
||||
|
||||
typedef struct STable
|
||||
{
|
||||
/* data */
|
||||
};
|
Loading…
Reference in New Issue