Merge pull request #25430 from taosdata/enh/supportTmqInterface
Enh/supportTmqInterface
This commit is contained in:
commit
7eb5724b05
|
@ -236,35 +236,25 @@ typedef struct {
|
||||||
__data_compress_init initFn;
|
__data_compress_init initFn;
|
||||||
__data_compress_l1_fn_t comprFn;
|
__data_compress_l1_fn_t comprFn;
|
||||||
__data_decompress_l1_fn_t decomprFn;
|
__data_decompress_l1_fn_t decomprFn;
|
||||||
} TCompressL1FnSet;
|
} TCmprL1FnSet;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *name;
|
char *name;
|
||||||
__data_compress_init initFn;
|
__data_compress_init initFn;
|
||||||
__data_compress_l2_fn_t comprFn;
|
__data_compress_l2_fn_t comprFn;
|
||||||
__data_decompress_l2_fn_t decomprFn;
|
__data_decompress_l2_fn_t decomprFn;
|
||||||
} TCompressL2FnSet;
|
} TCmprL2FnSet;
|
||||||
|
|
||||||
typedef struct {
|
typedef enum {
|
||||||
int8_t type;
|
|
||||||
int8_t level;
|
|
||||||
__data_compress_init initFn;
|
|
||||||
__data_compress_l1_fn_t l1CmprFn;
|
|
||||||
__data_decompress_l1_fn_t l1DecmprFn;
|
|
||||||
__data_compress_l2_fn_t l2CmprFn;
|
|
||||||
__data_decompress_l2_fn_t l2DecmprFn;
|
|
||||||
} TCompressPara;
|
|
||||||
|
|
||||||
typedef enum L1Compress {
|
|
||||||
L1_UNKNOWN = 0,
|
L1_UNKNOWN = 0,
|
||||||
L1_SIMPLE_8B,
|
L1_SIMPLE_8B,
|
||||||
L1_XOR,
|
L1_XOR,
|
||||||
L1_RLE,
|
L1_RLE,
|
||||||
L1_DELTAD,
|
L1_DELTAD,
|
||||||
L1_DISABLED = 0xFF,
|
L1_DISABLED = 0xFF,
|
||||||
} EL1CompressFuncType;
|
} TCmprL1Type;
|
||||||
|
|
||||||
typedef enum L2Compress {
|
typedef enum {
|
||||||
L2_UNKNOWN = 0,
|
L2_UNKNOWN = 0,
|
||||||
L2_LZ4,
|
L2_LZ4,
|
||||||
L2_ZLIB,
|
L2_ZLIB,
|
||||||
|
@ -272,7 +262,20 @@ typedef enum L2Compress {
|
||||||
L2_TSZ,
|
L2_TSZ,
|
||||||
L2_XZ,
|
L2_XZ,
|
||||||
L2_DISABLED = 0xFF,
|
L2_DISABLED = 0xFF,
|
||||||
} EL2ComressFuncType;
|
} TCmprL2Type;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
L2_LVL_NOCHANGE = 0,
|
||||||
|
L2_LVL_LOW,
|
||||||
|
L2_LVL_MEDIUM,
|
||||||
|
L2_LVL_HIGH,
|
||||||
|
L2_LVL_DISABLED = 0xFF,
|
||||||
|
} TCmprLvlType;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
char *name;
|
||||||
|
uint8_t lvl[3]; // l[0] = 'low', l[1] = 'mid', l[2] = 'high'
|
||||||
|
} TCmprLvlSet;
|
||||||
|
|
||||||
int32_t tcompressDebug(uint32_t cmprAlg, uint8_t *l1Alg, uint8_t *l2Alg, uint8_t *level);
|
int32_t tcompressDebug(uint32_t cmprAlg, uint8_t *l1Alg, uint8_t *l2Alg, uint8_t *level);
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
#include "cJSON.h"
|
#include "cJSON.h"
|
||||||
#include "clientInt.h"
|
#include "clientInt.h"
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
|
#include "tcol.h"
|
||||||
|
#include "tcompression.h"
|
||||||
#include "tdatablock.h"
|
#include "tdatablock.h"
|
||||||
#include "tdef.h"
|
#include "tdef.h"
|
||||||
#include "tglobal.h"
|
#include "tglobal.h"
|
||||||
|
@ -27,7 +29,7 @@
|
||||||
static tb_uid_t processSuid(tb_uid_t suid, char* db) { return suid + MurmurHash3_32(db, strlen(db)); }
|
static tb_uid_t processSuid(tb_uid_t suid, char* db) { return suid + MurmurHash3_32(db, strlen(db)); }
|
||||||
|
|
||||||
static char* buildCreateTableJson(SSchemaWrapper* schemaRow, SSchemaWrapper* schemaTag, char* name, int64_t id,
|
static char* buildCreateTableJson(SSchemaWrapper* schemaRow, SSchemaWrapper* schemaTag, char* name, int64_t id,
|
||||||
int8_t t) {
|
int8_t t, SColCmprWrapper* pColCmprRow) {
|
||||||
char* string = NULL;
|
char* string = NULL;
|
||||||
cJSON* json = cJSON_CreateObject();
|
cJSON* json = cJSON_CreateObject();
|
||||||
if (json == NULL) {
|
if (json == NULL) {
|
||||||
|
@ -67,6 +69,23 @@ static char* buildCreateTableJson(SSchemaWrapper* schemaRow, SSchemaWrapper* sch
|
||||||
cJSON* isPk = cJSON_CreateBool(s->flags & COL_IS_KEY);
|
cJSON* isPk = cJSON_CreateBool(s->flags & COL_IS_KEY);
|
||||||
cJSON_AddItemToObject(column, "isPrimarykey", isPk);
|
cJSON_AddItemToObject(column, "isPrimarykey", isPk);
|
||||||
cJSON_AddItemToArray(columns, column);
|
cJSON_AddItemToArray(columns, column);
|
||||||
|
|
||||||
|
if (pColCmprRow == NULL || pColCmprRow->nCols <= i) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SColCmpr* pColCmpr = pColCmprRow->pColCmpr + i;
|
||||||
|
const char* encode = columnEncodeStr(COMPRESS_L1_TYPE_U32(pColCmpr->alg));
|
||||||
|
const char* compress = columnCompressStr(COMPRESS_L2_TYPE_U32(pColCmpr->alg));
|
||||||
|
const char* level = columnLevelStr(COMPRESS_L2_TYPE_LEVEL_U32(pColCmpr->alg));
|
||||||
|
|
||||||
|
cJSON* encodeJson = cJSON_CreateString(encode);
|
||||||
|
cJSON_AddItemToObject(column, "encode", encodeJson);
|
||||||
|
|
||||||
|
cJSON* compressJson = cJSON_CreateString(compress);
|
||||||
|
cJSON_AddItemToObject(column, "compress", compressJson);
|
||||||
|
|
||||||
|
cJSON* levelJson = cJSON_CreateString(level);
|
||||||
|
cJSON_AddItemToObject(column, "level", levelJson);
|
||||||
}
|
}
|
||||||
cJSON_AddItemToObject(json, "columns", columns);
|
cJSON_AddItemToObject(json, "columns", columns);
|
||||||
|
|
||||||
|
@ -205,7 +224,7 @@ static char* processCreateStb(SMqMetaRsp* metaRsp) {
|
||||||
if (tDecodeSVCreateStbReq(&coder, &req) < 0) {
|
if (tDecodeSVCreateStbReq(&coder, &req) < 0) {
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
string = buildCreateTableJson(&req.schemaRow, &req.schemaTag, req.name, req.suid, TSDB_SUPER_TABLE);
|
string = buildCreateTableJson(&req.schemaRow, &req.schemaTag, req.name, req.suid, TSDB_SUPER_TABLE, &req.colCmpr);
|
||||||
_err:
|
_err:
|
||||||
uDebug("create stable return, sql json:%s", string);
|
uDebug("create stable return, sql json:%s", string);
|
||||||
tDecoderClear(&coder);
|
tDecoderClear(&coder);
|
||||||
|
@ -373,8 +392,8 @@ static char* processCreateTable(SMqMetaRsp* metaRsp) {
|
||||||
if (pCreateReq->type == TSDB_CHILD_TABLE) {
|
if (pCreateReq->type == TSDB_CHILD_TABLE) {
|
||||||
string = buildCreateCTableJson(req.pReqs, req.nReqs);
|
string = buildCreateCTableJson(req.pReqs, req.nReqs);
|
||||||
} else if (pCreateReq->type == TSDB_NORMAL_TABLE) {
|
} else if (pCreateReq->type == TSDB_NORMAL_TABLE) {
|
||||||
string =
|
string = buildCreateTableJson(&pCreateReq->ntb.schemaRow, NULL, pCreateReq->name, pCreateReq->uid,
|
||||||
buildCreateTableJson(&pCreateReq->ntb.schemaRow, NULL, pCreateReq->name, pCreateReq->uid, TSDB_NORMAL_TABLE);
|
TSDB_NORMAL_TABLE, &pCreateReq->colCmpr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -179,6 +179,7 @@ int32_t l2DecompressImpl_tsz(const char *const input, const int32_t inputSize, c
|
||||||
#if defined(WINDOWS) || defined(_TD_DARWIN_64)
|
#if defined(WINDOWS) || defined(_TD_DARWIN_64)
|
||||||
// do nothing
|
// do nothing
|
||||||
#else
|
#else
|
||||||
|
|
||||||
int32_t l2ComressInitImpl_zlib(char *lossyColumns, float fPrecision, double dPrecision, uint32_t maxIntervals,
|
int32_t l2ComressInitImpl_zlib(char *lossyColumns, float fPrecision, double dPrecision, uint32_t maxIntervals,
|
||||||
uint32_t intervals, int32_t ifAdtFse, const char *compressor) {
|
uint32_t intervals, int32_t ifAdtFse, const char *compressor) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -226,7 +227,7 @@ int32_t l2ComressInitImpl_zstd(char *lossyColumns, float fPrecision, double dPre
|
||||||
|
|
||||||
int32_t l2CompressImpl_zstd(const char *const input, const int32_t inputSize, char *const output, int32_t outputSize,
|
int32_t l2CompressImpl_zstd(const char *const input, const int32_t inputSize, char *const output, int32_t outputSize,
|
||||||
const char type, int8_t lvl) {
|
const char type, int8_t lvl) {
|
||||||
size_t len = ZSTD_compress(output + 1, outputSize - 1, input, inputSize, ZSTD_CLEVEL_DEFAULT);
|
size_t len = ZSTD_compress(output + 1, outputSize - 1, input, inputSize, lvl);
|
||||||
if (len > inputSize) {
|
if (len > inputSize) {
|
||||||
output[0] = 0;
|
output[0] = 0;
|
||||||
memcpy(output + 1, input, inputSize);
|
memcpy(output + 1, input, inputSize);
|
||||||
|
@ -253,7 +254,7 @@ int32_t l2ComressInitImpl_xz(char *lossyColumns, float fPrecision, double dPreci
|
||||||
}
|
}
|
||||||
int32_t l2CompressImpl_xz(const char *const input, const int32_t inputSize, char *const output, int32_t outputSize,
|
int32_t l2CompressImpl_xz(const char *const input, const int32_t inputSize, char *const output, int32_t outputSize,
|
||||||
const char type, int8_t lvl) {
|
const char type, int8_t lvl) {
|
||||||
size_t len = FL2_compress(output + 1, outputSize - 1, input, inputSize, 0);
|
size_t len = FL2_compress(output + 1, outputSize - 1, input, inputSize, lvl);
|
||||||
if (len > inputSize) {
|
if (len > inputSize) {
|
||||||
output[0] = 0;
|
output[0] = 0;
|
||||||
memcpy(output + 1, input, inputSize);
|
memcpy(output + 1, input, inputSize);
|
||||||
|
@ -274,14 +275,19 @@ int32_t l2DecompressImpl_xz(const char *const input, const int32_t compressedSiz
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TCompressL1FnSet compressL1Dict[] = {{"PLAIN", NULL, tsCompressPlain2, tsDecompressPlain2},
|
TCmprL1FnSet compressL1Dict[] = {{"PLAIN", NULL, tsCompressPlain2, tsDecompressPlain2},
|
||||||
{"SIMPLE-8B", NULL, tsCompressINTImp2, tsDecompressINTImp2},
|
{"SIMPLE-8B", NULL, tsCompressINTImp2, tsDecompressINTImp2},
|
||||||
{"DELTAI", NULL, tsCompressTimestampImp2, tsDecompressTimestampImp2},
|
{"DELTAI", NULL, tsCompressTimestampImp2, tsDecompressTimestampImp2},
|
||||||
{"BIT-PACKING", NULL, tsCompressBoolImp2, tsDecompressBoolImp2},
|
{"BIT-PACKING", NULL, tsCompressBoolImp2, tsDecompressBoolImp2},
|
||||||
{"DELTAD", NULL, tsCompressDoubleImp2, tsDecompressDoubleImp2}};
|
{"DELTAD", NULL, tsCompressDoubleImp2, tsDecompressDoubleImp2}};
|
||||||
|
|
||||||
|
TCmprLvlSet compressL2LevelDict[] = {
|
||||||
|
{"unknown", .lvl = {1, 2, 3}}, {"lz4", .lvl = {1, 2, 3}}, {"zlib", .lvl = {1, 6, 9}},
|
||||||
|
{"zstd", .lvl = {1, 11, 22}}, {"tsz", .lvl = {1, 2, 3}}, {"xz", .lvl = {1, 6, 9}},
|
||||||
|
};
|
||||||
|
|
||||||
#if defined(WINDOWS) || defined(_TD_DARWIN_64)
|
#if defined(WINDOWS) || defined(_TD_DARWIN_64)
|
||||||
TCompressL2FnSet compressL2Dict[] = {
|
TCmprL2FnSet compressL2Dict[] = {
|
||||||
{"unknown", l2ComressInitImpl_disabled, l2CompressImpl_disabled, l2DecompressImpl_disabled},
|
{"unknown", l2ComressInitImpl_disabled, l2CompressImpl_disabled, l2DecompressImpl_disabled},
|
||||||
{"lz4", l2ComressInitImpl_lz4, l2CompressImpl_lz4, l2DecompressImpl_lz4},
|
{"lz4", l2ComressInitImpl_lz4, l2CompressImpl_lz4, l2DecompressImpl_lz4},
|
||||||
{"zlib", l2ComressInitImpl_lz4, l2CompressImpl_lz4, l2DecompressImpl_lz4},
|
{"zlib", l2ComressInitImpl_lz4, l2CompressImpl_lz4, l2DecompressImpl_lz4},
|
||||||
|
@ -289,7 +295,7 @@ TCompressL2FnSet compressL2Dict[] = {
|
||||||
{"tsz", l2ComressInitImpl_tsz, l2CompressImpl_tsz, l2DecompressImpl_tsz},
|
{"tsz", l2ComressInitImpl_tsz, l2CompressImpl_tsz, l2DecompressImpl_tsz},
|
||||||
{"xz", l2ComressInitImpl_lz4, l2CompressImpl_lz4, l2DecompressImpl_lz4}};
|
{"xz", l2ComressInitImpl_lz4, l2CompressImpl_lz4, l2DecompressImpl_lz4}};
|
||||||
#else
|
#else
|
||||||
TCompressL2FnSet compressL2Dict[] = {
|
TCmprL2FnSet compressL2Dict[] = {
|
||||||
{"unknown", l2ComressInitImpl_disabled, l2CompressImpl_disabled, l2DecompressImpl_disabled},
|
{"unknown", l2ComressInitImpl_disabled, l2CompressImpl_disabled, l2DecompressImpl_disabled},
|
||||||
{"lz4", l2ComressInitImpl_lz4, l2CompressImpl_lz4, l2DecompressImpl_lz4},
|
{"lz4", l2ComressInitImpl_lz4, l2CompressImpl_lz4, l2DecompressImpl_lz4},
|
||||||
{"zlib", l2ComressInitImpl_zlib, l2CompressImpl_zlib, l2DecompressImpl_zlib},
|
{"zlib", l2ComressInitImpl_zlib, l2CompressImpl_zlib, l2DecompressImpl_zlib},
|
||||||
|
@ -299,6 +305,17 @@ TCompressL2FnSet compressL2Dict[] = {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int8_t tsGetCompressL2Level(uint8_t alg, uint8_t lvl) {
|
||||||
|
if (lvl == L2_LVL_LOW) {
|
||||||
|
return compressL2LevelDict[alg].lvl[0];
|
||||||
|
} else if (lvl == L2_LVL_MEDIUM) {
|
||||||
|
return compressL2LevelDict[alg].lvl[1];
|
||||||
|
} else if (lvl == L2_LVL_HIGH) {
|
||||||
|
return compressL2LevelDict[alg].lvl[2];
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static const int32_t TEST_NUMBER = 1;
|
static const int32_t TEST_NUMBER = 1;
|
||||||
#define is_bigendian() ((*(char *)&TEST_NUMBER) == 0)
|
#define is_bigendian() ((*(char *)&TEST_NUMBER) == 0)
|
||||||
#define SIMPLE8B_MAX_INT64 ((uint64_t)1152921504606846974LL)
|
#define SIMPLE8B_MAX_INT64 ((uint64_t)1152921504606846974LL)
|
||||||
|
@ -2704,7 +2721,8 @@ int32_t tsDecompressBigint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int
|
||||||
uTrace("encode:%s, compress:%s, level:%d, type:%s, l1:%d", compressL1Dict[l1].name, compressL2Dict[l2].name, \
|
uTrace("encode:%s, compress:%s, level:%d, type:%s, l1:%d", compressL1Dict[l1].name, compressL2Dict[l2].name, \
|
||||||
lvl, tDataTypes[type].name, l1); \
|
lvl, tDataTypes[type].name, l1); \
|
||||||
int32_t len = compressL1Dict[l1].comprFn(pIn, nEle, pBuf, type); \
|
int32_t len = compressL1Dict[l1].comprFn(pIn, nEle, pBuf, type); \
|
||||||
return compressL2Dict[l2].comprFn(pBuf, len, pOut, nOut, type, lvl); \
|
int8_t alvl = tsGetCompressL2Level(l2, lvl); \
|
||||||
|
return compressL2Dict[l2].comprFn(pBuf, len, pOut, nOut, type, alvl); \
|
||||||
} else { \
|
} else { \
|
||||||
uTrace("dencode:%s, decompress:%s, level:%d, type:%s", compressL1Dict[l1].name, compressL2Dict[l2].name, lvl, \
|
uTrace("dencode:%s, decompress:%s, level:%d, type:%s", compressL1Dict[l1].name, compressL2Dict[l2].name, lvl, \
|
||||||
tDataTypes[type].name); \
|
tDataTypes[type].name); \
|
||||||
|
@ -2715,7 +2733,8 @@ int32_t tsDecompressBigint(void *pIn, int32_t nIn, int32_t nEle, void *pOut, int
|
||||||
if (compress) { \
|
if (compress) { \
|
||||||
uTrace("encode:%s, compress:%s, level:%d, type:%s", "disabled", compressL2Dict[l1].name, lvl, \
|
uTrace("encode:%s, compress:%s, level:%d, type:%s", "disabled", compressL2Dict[l1].name, lvl, \
|
||||||
tDataTypes[type].name); \
|
tDataTypes[type].name); \
|
||||||
return compressL2Dict[l2].comprFn(pIn, nIn, pOut, nOut, type, lvl); \
|
int8_t alvl = tsGetCompressL2Level(l2, lvl); \
|
||||||
|
return compressL2Dict[l2].comprFn(pIn, nIn, pOut, nOut, type, alvl); \
|
||||||
} else { \
|
} else { \
|
||||||
uTrace("dencode:%s, dcompress:%s, level:%d, type:%s", "disabled", compressL2Dict[l1].name, lvl, \
|
uTrace("dencode:%s, dcompress:%s, level:%d, type:%s", "disabled", compressL2Dict[l1].name, lvl, \
|
||||||
tDataTypes[type].name); \
|
tDataTypes[type].name); \
|
||||||
|
@ -2913,127 +2932,6 @@ int32_t tsDecompressBigint2(void *pIn, int32_t nIn, int32_t nEle, void *pOut, in
|
||||||
FUNC_COMPRESS_IMPL(pIn, nIn, nEle, pOut, nOut, cmprAlg, pBuf, nBuf, TSDB_DATA_TYPE_BIGINT, 0);
|
FUNC_COMPRESS_IMPL(pIn, nIn, nEle, pOut, nOut, cmprAlg, pBuf, nBuf, TSDB_DATA_TYPE_BIGINT, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// int32_t tsFindCompressAlg(int8_t dataType, uint8_t compress, TCompressL1FnSet *l1Fn, TCompressL2FnSet *l2Fn);
|
|
||||||
|
|
||||||
// int32_t tsCompressImpl(int8_t type, void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t cmprAlg,
|
|
||||||
// void *pBuf, int32_t nBuf) {
|
|
||||||
// TCompressL1FnSet fn1;
|
|
||||||
// TCompressL2FnSet fn2;
|
|
||||||
|
|
||||||
// if (tsFindCompressAlg(type, cmprAlg, &fn1, &fn2)) return -1;
|
|
||||||
|
|
||||||
// int32_t len = 0;
|
|
||||||
// uint8_t l1 = COMPRESS_L1_TYPE_U8(cmprAlg);
|
|
||||||
// uint8_t l2 = COMPRESS_L2_TYPE_U8(cmprAlg);
|
|
||||||
// uint8_t lvl = COMPRESS_L2_TYPE_LEVEL_U8(cmprAlg);
|
|
||||||
|
|
||||||
// if (l2 == L2_DISABLED) {
|
|
||||||
// len = fn1.comprFn(pIn, nEle, pOut, type);
|
|
||||||
// } else {
|
|
||||||
// len = fn1.comprFn(pIn, nEle, pBuf, type);
|
|
||||||
// len = fn2.comprFn(pBuf, len, pOut, nOut, type, lvl);
|
|
||||||
// }
|
|
||||||
// return len;
|
|
||||||
// }
|
|
||||||
// int32_t tsDecompressImpl(int8_t type, void *pIn, int32_t nIn, int32_t nEle, void *pOut, int32_t nOut, uint8_t
|
|
||||||
// cmprAlg,
|
|
||||||
// void *pBuf, int32_t nBuf) {
|
|
||||||
// TCompressL1FnSet fn1;
|
|
||||||
// TCompressL2FnSet fn2;
|
|
||||||
|
|
||||||
// if (tsFindCompressAlg(type, cmprAlg, &fn1, &fn2) != 0) return -1;
|
|
||||||
|
|
||||||
// uint8_t l1 = COMPRESS_L1_TYPE_U8(cmprAlg);
|
|
||||||
// uint8_t l2 = COMPRESS_L2_TYPE_U8(cmprAlg);
|
|
||||||
// uint8_t lvl = COMPRESS_L2_TYPE_LEVEL_U8(cmprAlg);
|
|
||||||
// uint32_t len = 0;
|
|
||||||
// if (l2 == L2_DISABLED) {
|
|
||||||
// len = fn1.decomprFn(pIn, nEle, pOut, type);
|
|
||||||
// } else {
|
|
||||||
// len = fn2.decomprFn(pIn, nIn, pBuf, nBuf, type);
|
|
||||||
// if (len < 0) return -1;
|
|
||||||
// len = fn1.decomprFn(pBuf, nEle, pOut, type);
|
|
||||||
// }
|
|
||||||
// return len;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// int32_t tsFindCompressAlg(int8_t dataType, uint8_t compress, TCompressL1FnSet *l1Fn, TCompressL2FnSet *l2Fn) {
|
|
||||||
// uint8_t l1 = COMPRESS_L1_TYPE_U8(compress);
|
|
||||||
// uint8_t l2 = COMPRESS_L2_TYPE_U8(compress);
|
|
||||||
// uint8_t lvl = COMPRESS_L2_TYPE_LEVEL_U8(compress);
|
|
||||||
|
|
||||||
// static int32_t l1Sz = sizeof(compressL1Dict) / sizeof(compressL1Dict[0]);
|
|
||||||
// if (l1 >= l1Sz) return -1;
|
|
||||||
|
|
||||||
// static int32_t l2Sz = sizeof(compressL2Dict) / sizeof(compressL2Dict[0]);
|
|
||||||
// if (l2 >= l2Sz) return -1;
|
|
||||||
|
|
||||||
// *l1Fn = compressL1Dict[l1];
|
|
||||||
// *l2Fn = compressL2Dict[l2];
|
|
||||||
// return 0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// typedef struct {
|
|
||||||
// int8_t dtype;
|
|
||||||
// SArray *l1Set;
|
|
||||||
// SArray *l2Set;
|
|
||||||
// } TCompressCompatible;
|
|
||||||
|
|
||||||
// SHashObj *algSet = NULL;
|
|
||||||
|
|
||||||
// int32_t tsCompressSetInit() {
|
|
||||||
// algSet = taosHashInit(24, taosGetDefaultHashFunction(TSDB_DATA_TYPE_INT), false, HASH_ENTRY_LOCK);
|
|
||||||
// for (int i = TSDB_DATA_TYPE_NULL; i < TSDB_DATA_TYPE_MAX; i++) {
|
|
||||||
// TCompressCompatible p;
|
|
||||||
// p.dtype = i;
|
|
||||||
// p.l1Set = taosArrayInit(4, sizeof(int8_t));
|
|
||||||
// p.l2Set = taosArrayInit(4, sizeof(int8_t));
|
|
||||||
|
|
||||||
// for (int8_t j = L1_DISABLED; j < L1_MAX; j++) {
|
|
||||||
// taosArrayPush(p.l1Set, &j);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// for (int8_t j = L2_DISABLED; j < L2_MAX; j++) {
|
|
||||||
// taosArrayPush(p.l2Set, &j);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// taosHashPut(algSet, &i, sizeof(i), &p, sizeof(TCompressCompatible));
|
|
||||||
// }
|
|
||||||
// return 0;
|
|
||||||
// }
|
|
||||||
// int32_t tsCompressSetDestroy() {
|
|
||||||
// void *p = taosHashIterate(algSet, NULL);
|
|
||||||
// while (p) {
|
|
||||||
// TCompressCompatible *v = p;
|
|
||||||
// taosArrayDestroy(v->l1Set);
|
|
||||||
// taosArrayDestroy(v->l2Set);
|
|
||||||
|
|
||||||
// taosHashIterate(algSet, p);
|
|
||||||
// }
|
|
||||||
// return 0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// int32_t tsValidCompressAlgByDataTypes(int8_t type, int8_t compress) {
|
|
||||||
// // compress alg
|
|
||||||
// int8_t l1 = COMPRESS_L1_TYPE_U8(compress);
|
|
||||||
// int8_t l2 = COMPRESS_L2_TYPE_U8(compress);
|
|
||||||
// int8_t lvl = COMPRESS_L2_TYPE_LEVEL_U8(compress);
|
|
||||||
|
|
||||||
// TCompressCompatible *p = taosHashGet(algSet, &type, sizeof(type));
|
|
||||||
// if (p == NULL) return -1;
|
|
||||||
|
|
||||||
// if (p->dtype != type) return -1;
|
|
||||||
|
|
||||||
// if (taosArraySearch(p->l1Set, &l1, compareInt8Val, 0) == NULL) {
|
|
||||||
// return -1;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (taosArraySearch(p->l2Set, &l2, compareInt8Val, 0) == NULL) {
|
|
||||||
// return -1;
|
|
||||||
// }
|
|
||||||
// return 0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
int32_t tcompressDebug(uint32_t cmprAlg, uint8_t *l1Alg, uint8_t *l2Alg, uint8_t *level) {
|
int32_t tcompressDebug(uint32_t cmprAlg, uint8_t *l1Alg, uint8_t *l2Alg, uint8_t *level) {
|
||||||
DEFINE_VAR(cmprAlg)
|
DEFINE_VAR(cmprAlg)
|
||||||
*l1Alg = l1;
|
*l1Alg = l1;
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "taos.h"
|
#include "taos.h"
|
||||||
#include "types.h"
|
|
||||||
#include "tmsg.h"
|
#include "tmsg.h"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
static int running = 1;
|
static int running = 1;
|
||||||
TdFilePtr g_fp = NULL;
|
TdFilePtr g_fp = NULL;
|
||||||
|
@ -412,7 +412,8 @@ int buildStable(TAOS* pConn, TAOS_RES* pRes) {
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
pRes = taos_query(pConn,
|
pRes = taos_query(pConn,
|
||||||
"CREATE STABLE `meters_summary` (`_wstart` TIMESTAMP, `current` FLOAT, `groupid` INT, `location` VARCHAR(16)) TAGS (`group_id` BIGINT UNSIGNED)");
|
"CREATE STABLE `meters_summary` (`_wstart` TIMESTAMP, `current` FLOAT, `groupid` INT, `location` "
|
||||||
|
"VARCHAR(16)) TAGS (`group_id` BIGINT UNSIGNED)");
|
||||||
if (taos_errno(pRes) != 0) {
|
if (taos_errno(pRes) != 0) {
|
||||||
printf("failed to create super table meters_summary, reason:%s\n", taos_errstr(pRes));
|
printf("failed to create super table meters_summary, reason:%s\n", taos_errstr(pRes));
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -420,7 +421,8 @@ int buildStable(TAOS* pConn, TAOS_RES* pRes) {
|
||||||
taos_free_result(pRes);
|
taos_free_result(pRes);
|
||||||
|
|
||||||
pRes = taos_query(pConn,
|
pRes = taos_query(pConn,
|
||||||
" CREATE TABLE `t_d2a450ee819dcf7576f0282d9ac22dbc` USING `meters_summary` (`group_id`) TAGS (13135550082773579308)");
|
" CREATE TABLE `t_d2a450ee819dcf7576f0282d9ac22dbc` USING `meters_summary` (`group_id`) TAGS "
|
||||||
|
"(13135550082773579308)");
|
||||||
if (taos_errno(pRes) != 0) {
|
if (taos_errno(pRes) != 0) {
|
||||||
printf("failed to create super table meters_summary, reason:%s\n", taos_errstr(pRes));
|
printf("failed to create super table meters_summary, reason:%s\n", taos_errstr(pRes));
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -435,7 +437,8 @@ int buildStable(TAOS* pConn, TAOS_RES* pRes) {
|
||||||
taos_free_result(pRes);
|
taos_free_result(pRes);
|
||||||
#else
|
#else
|
||||||
pRes = taos_query(pConn,
|
pRes = taos_query(pConn,
|
||||||
"create stream meters_summary_s trigger at_once IGNORE EXPIRED 0 into meters_summary as select _wstart, max(current) as current, "
|
"create stream meters_summary_s trigger at_once IGNORE EXPIRED 0 into meters_summary as select "
|
||||||
|
"_wstart, max(current) as current, "
|
||||||
"groupid, location from meters partition by groupid, location interval(10m)");
|
"groupid, location from meters partition by groupid, location interval(10m)");
|
||||||
if (taos_errno(pRes) != 0) {
|
if (taos_errno(pRes) != 0) {
|
||||||
printf("failed to create super table meters_summary, reason:%s\n", taos_errstr(pRes));
|
printf("failed to create super table meters_summary, reason:%s\n", taos_errstr(pRes));
|
||||||
|
@ -539,7 +542,8 @@ int32_t create_topic() {
|
||||||
|
|
||||||
if (g_conf.subTable) {
|
if (g_conf.subTable) {
|
||||||
char topic[128] = {0};
|
char topic[128] = {0};
|
||||||
sprintf(topic, "create topic meters_summary_t1 %s as stable meters_summary", g_conf.meta == 0 ? "with meta" : "only meta");
|
sprintf(topic, "create topic meters_summary_t1 %s as stable meters_summary",
|
||||||
|
g_conf.meta == 0 ? "with meta" : "only meta");
|
||||||
pRes = taos_query(pConn, topic);
|
pRes = taos_query(pConn, topic);
|
||||||
if (taos_errno(pRes) != 0) {
|
if (taos_errno(pRes) != 0) {
|
||||||
printf("failed to create topic meters_summary_t1, reason:%s\n", taos_errstr(pRes));
|
printf("failed to create topic meters_summary_t1, reason:%s\n", taos_errstr(pRes));
|
||||||
|
@ -653,8 +657,15 @@ void initLogFile() {
|
||||||
if (g_conf.subTable) {
|
if (g_conf.subTable) {
|
||||||
char* result[] = {
|
char* result[] = {
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"meters_summary\",\"columns\":[{\"name\":\"_"
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"meters_summary\",\"columns\":[{\"name\":\"_"
|
||||||
"wstart\",\"type\":9,\"isPrimarykey\":false},{\"name\":\"current\",\"type\":6,\"isPrimarykey\":false},{\"name\":\"groupid\",\"type\":4,\"isPrimarykey\":false},{\"name\":"
|
"wstart\",\"type\":9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"}"
|
||||||
"\"location\",\"type\":8,\"length\":16,\"isPrimarykey\":false}],\"tags\":[{\"name\":\"group_id\",\"type\":14}]}",
|
",{\"name\":\"current\",\"type\":6,\"isPrimarykey\":false,\"encode\":\"delta-d\",\"compress\":\"lz4\","
|
||||||
|
"\"level\":\"medium\"},{"
|
||||||
|
"\"name\":\"groupid\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\","
|
||||||
|
"\"level\":\"medium\"},{\"name\":"
|
||||||
|
"\"location\",\"type\":8,\"length\":16,\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":\"lz4\","
|
||||||
|
"\"level\":\"medium\"}],\"tags\":[{\"name\":\"group_id\","
|
||||||
|
"\"type\":14}"
|
||||||
|
"]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"t_d2a450ee819dcf7576f0282d9ac22dbc\",\"using\":"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"t_d2a450ee819dcf7576f0282d9ac22dbc\",\"using\":"
|
||||||
"\"meters_summary\",\"tagNum\":1,\"tags\":[{\"name\":\"group_id\",\"type\":14,\"value\":1.313555008277358e+"
|
"\"meters_summary\",\"tagNum\":1,\"tags\":[{\"name\":\"group_id\",\"type\":14,\"value\":1.313555008277358e+"
|
||||||
"19}],\"createList\":[]}"};
|
"19}],\"createList\":[]}"};
|
||||||
|
@ -664,56 +675,107 @@ void initLogFile() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
char* result[] = {
|
char* result[] = {
|
||||||
"{\"type\":\"create\",\"tableType\":\"normal\",\"tableName\":\"tb1\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
"{\"type\":\"create\",\"tableType\":\"normal\",\"tableName\":\"tb1\",\"columns\":[{\"name\":\"ts\","
|
||||||
"9,\"isPrimarykey\":false},{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":4,\"isPrimarykey\":false}],\"tags\":[]}",
|
"\"type\":"
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"st1\",\"columns\":[{\"name\":\"ts\",\"type\":9,\"isPrimarykey\":false}"
|
"9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"},{\"name\":\"c1\","
|
||||||
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":false},{\"name\":\"c3\",\"type\":8,\"length\":64,\"isPrimarykey\":false},{"
|
"\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":\"medium\"},{"
|
||||||
"\"name\":\"c4\",\"type\":5,\"isPrimarykey\":false}],\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":"
|
"\"name\":\"c2\",\"type\":"
|
||||||
|
"4,"
|
||||||
|
"\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":\"medium\"}],\"tags\":[]}",
|
||||||
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"st1\",\"columns\":[{\"name\":\"ts\","
|
||||||
|
"\"type\":9,"
|
||||||
|
"\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"}"
|
||||||
|
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":"
|
||||||
|
"\"medium\"},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":false,\"encode\":\"delta-d\",\"compress\":\"lz4\","
|
||||||
|
"\"level\":\"medium\"}"
|
||||||
|
",{"
|
||||||
|
"\"name\":\"c3\",\"type\":8,\"length\":64,\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":"
|
||||||
|
"\"lz4\",\"level\":\"medium\"},{"
|
||||||
|
"\"name\":\"c4\",\"type\":5,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":"
|
||||||
|
"\"medium\"}],\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":"
|
||||||
|
"\"t3\","
|
||||||
|
"\"type\":10,\"length\":"
|
||||||
"8},{\"name\":\"t4\",\"type\":1},{\"name\":\"t2\",\"type\":8,\"length\":64}]}",
|
"8},{\"name\":\"t4\",\"type\":1},{\"name\":\"t2\",\"type\":8,\"length\":64}]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct0\",\"using\":\"st1\",\"tagNum\":4,\"tags\":["
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct0\",\"using\":\"st1\",\"tagNum\":4,"
|
||||||
|
"\"tags\":["
|
||||||
"{\"name\":\"t1\",\"type\":4,\"value\":1000},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"ttt\\\"\"},{"
|
"{\"name\":\"t1\",\"type\":4,\"value\":1000},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"ttt\\\"\"},{"
|
||||||
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct1\",\"using\":\"st1\",\"tagNum\":4,\"tags\":["
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct1\",\"using\":\"st1\",\"tagNum\":4,"
|
||||||
|
"\"tags\":["
|
||||||
"{\"name\":\"t1\",\"type\":4,\"value\":2000}],\"createList\":[]}",
|
"{\"name\":\"t1\",\"type\":4,\"value\":2000}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct2\",\"using\":\"st1\",\"tagNum\":4,\"tags\":["
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct2\",\"using\":\"st1\",\"tagNum\":4,"
|
||||||
|
"\"tags\":["
|
||||||
"],\"createList\":[]}",
|
"],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct3\",\"using\":\"st1\",\"tagNum\":4,\"tags\":["
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct3\",\"using\":\"st1\",\"tagNum\":4,"
|
||||||
|
"\"tags\":["
|
||||||
"{\"name\":\"t1\",\"type\":4,\"value\":5000}],\"createList\":[]}",
|
"{\"name\":\"t1\",\"type\":4,\"value\":5000}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"columns\":[{\"name\":\"ts\",\"type\":9,\"isPrimarykey\":false}"
|
"{\"type\":\"create\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"columns\":[{\"name\":\"ts\","
|
||||||
",{\"name\":\"c2\",\"type\":10,\"length\":8,\"isPrimarykey\":false},{\"name\":\"cc3\",\"type\":5,\"isPrimarykey\":false}],\"tags\":[]}",
|
"\"type\":9,"
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"jt\",\"columns\":[{\"name\":\"ts\",\"type\":9,\"isPrimarykey\":false},"
|
"\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"},{\"name\":\"c2\","
|
||||||
"{\"name\":\"i\",\"type\":4,\"isPrimarykey\":false}],\"tags\":[{\"name\":\"t\",\"type\":15}]}",
|
"\"type\":10,\"length\":8,\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":\"lz4\",\"level\":"
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"jt1\",\"using\":\"jt\",\"tagNum\":1,\"tags\":[{"
|
"\"medium\"},{\"name\":\"cc3\",\"type\":5,"
|
||||||
|
"\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":\"medium\"}],\"tags\":[]}",
|
||||||
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"jt\",\"columns\":[{\"name\":\"ts\","
|
||||||
|
"\"type\":9,"
|
||||||
|
"\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"},"
|
||||||
|
"{\"name\":\"i\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":"
|
||||||
|
"\"medium\"}],\"tags\":[{\"name\":\"t\",\"type\":15}]}",
|
||||||
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"jt1\",\"using\":\"jt\",\"tagNum\":1,"
|
||||||
|
"\"tags\":[{"
|
||||||
"\"name\":\"t\",\"type\":15,\"value\":\"{\\\"k1\\\":1,\\\"k2\\\":\\\"hello\\\"}\"}],\"createList\":[]}",
|
"\"name\":\"t\",\"type\":15,\"value\":\"{\\\"k1\\\":1,\\\"k2\\\":\\\"hello\\\"}\"}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"jt2\",\"using\":\"jt\",\"tagNum\":1,\"tags\":[]"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"jt2\",\"using\":\"jt\",\"tagNum\":1,"
|
||||||
|
"\"tags\":[]"
|
||||||
",\"createList\":[]}",
|
",\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"stt\",\"columns\":[{\"name\":\"ts\",\"type\":9,\"isPrimarykey\":false}"
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"stt\",\"columns\":[{\"name\":\"ts\","
|
||||||
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":false},{\"name\":\"c3\",\"type\":8,\"length\":16,\"isPrimarykey\":false}],"
|
"\"type\":9,"
|
||||||
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\",\"type\":"
|
"\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"}"
|
||||||
|
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\","
|
||||||
|
"\"level\":"
|
||||||
|
"\"medium\"},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":"
|
||||||
|
"false,\"encode\":\"delta-d\",\"compress\":\"lz4\",\"level\":\"medium\"},{"
|
||||||
|
"\"name\":\"c3\",\"type\":8,\"length\":16,\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":"
|
||||||
|
"\"lz4\",\"level\":\"medium\"}],"
|
||||||
|
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\","
|
||||||
|
"\"type\":"
|
||||||
"1}]}",
|
"1}]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"sttb\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"sttb\",\"columns\":[{\"name\":\"ts\","
|
||||||
"9,\"isPrimarykey\":false},{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":false},{\"name\":\"c3\",\"type\":8,\"length\":16,\"isPrimarykey\":false}],"
|
"\"type\":"
|
||||||
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\",\"type\":"
|
"9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"},{\"name\":"
|
||||||
|
"\"c1\","
|
||||||
|
"\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":\"medium\"},{"
|
||||||
|
"\"name\":\"c2\",\"type\":6,"
|
||||||
|
"\"isPrimarykey\":false,\"encode\":\"delta-d\",\"compress\":\"lz4\",\"level\":\"medium\"},{\"name\":"
|
||||||
|
"\"c3\","
|
||||||
|
"\"type\":8,\"length\":16,\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":\"lz4\",\"level\":"
|
||||||
|
"\"medium\"}],"
|
||||||
|
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\","
|
||||||
|
"\"type\":"
|
||||||
"1}]}",
|
"1}]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt1\",\"using\":\"stt\",\"tagNum\":3,\"tags\":"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt1\",\"using\":\"stt\",\"tagNum\":3,"
|
||||||
|
"\"tags\":"
|
||||||
"[{\"name\":\"t1\",\"type\":4,\"value\":2},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt1\\\"\"},{"
|
"[{\"name\":\"t1\",\"type\":4,\"value\":2},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt1\\\"\"},{"
|
||||||
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"sttb1\",\"using\":\"sttb\",\"tagNum\":3,"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"sttb1\",\"using\":\"sttb\",\"tagNum\":3,"
|
||||||
"\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":4},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"sttb1\\\"\"}"
|
"\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":4},{\"name\":\"t3\",\"type\":10,\"value\":"
|
||||||
|
"\"\\\"sttb1\\\"\"}"
|
||||||
",{\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
",{\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt2\",\"using\":\"stt\",\"tagNum\":3,\"tags\":"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt2\",\"using\":\"stt\",\"tagNum\":3,"
|
||||||
|
"\"tags\":"
|
||||||
"[{\"name\":\"t1\",\"type\":4,\"value\":43},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt2\\\"\"},{"
|
"[{\"name\":\"t1\",\"type\":4,\"value\":43},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt2\\\"\"},{"
|
||||||
"\"name\":\"t4\",\"type\":1,\"value\":0}],\"createList\":[]}",
|
"\"name\":\"t4\",\"type\":1,\"value\":0}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"sttb2\",\"using\":\"sttb\",\"tagNum\":3,"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"sttb2\",\"using\":\"sttb\",\"tagNum\":3,"
|
||||||
"\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":54},{\"name\":\"t3\",\"type\":10,\"value\":"
|
"\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":54},{\"name\":\"t3\",\"type\":10,\"value\":"
|
||||||
"\"\\\"sttb2\\\"\"},{\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
"\"\\\"sttb2\\\"\"},{\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt3\",\"using\":\"stt\",\"tagNum\":3,\"tags\":"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt3\",\"using\":\"stt\",\"tagNum\":3,"
|
||||||
|
"\"tags\":"
|
||||||
"[{\"name\":\"t1\",\"type\":4,\"value\":23},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt3\\\"\"},{"
|
"[{\"name\":\"t1\",\"type\":4,\"value\":23},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt3\\\"\"},{"
|
||||||
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"sttb3\",\"using\":\"sttb\",\"tagNum\":3,"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"sttb3\",\"using\":\"sttb\",\"tagNum\":3,"
|
||||||
"\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":4},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"sttb3\\\"\"}"
|
"\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":4},{\"name\":\"t3\",\"type\":10,\"value\":"
|
||||||
|
"\"\\\"sttb3\\\"\"}"
|
||||||
",{\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
",{\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt4\",\"using\":\"stt\",\"tagNum\":3,\"tags\":"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt4\",\"using\":\"stt\",\"tagNum\":3,"
|
||||||
|
"\"tags\":"
|
||||||
"[{\"name\":\"t1\",\"type\":4,\"value\":433},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt4\\\"\"},{"
|
"[{\"name\":\"t1\",\"type\":4,\"value\":433},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt4\\\"\"},{"
|
||||||
"\"name\":\"t4\",\"type\":1,\"value\":0}],\"createList\":[]}",
|
"\"name\":\"t4\",\"type\":1,\"value\":0}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"sttb4\",\"using\":\"sttb\",\"tagNum\":3,"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"sttb4\",\"using\":\"sttb\",\"tagNum\":3,"
|
||||||
|
@ -727,23 +789,36 @@ void initLogFile() {
|
||||||
} else {
|
} else {
|
||||||
if (g_conf.meta) {
|
if (g_conf.meta) {
|
||||||
if (g_conf.subTable) {
|
if (g_conf.subTable) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
char* result[] = {
|
char* result[] = {
|
||||||
"{\"type\":\"create\",\"tableType\":\"normal\",\"tableName\":\"tb1\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
"{\"type\":\"create\",\"tableType\":\"normal\",\"tableName\":\"tb1\",\"columns\":[{\"name\":\"ts\","
|
||||||
"9,\"isPrimarykey\":false},{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":4,\"isPrimarykey\":false}],\"tags\":[]}",
|
"\"type\":"
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"st1\",\"columns\":[{\"name\":\"ts\",\"type\":9,\"isPrimarykey\":false}"
|
"9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"},{\"name\":"
|
||||||
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":false},{\"name\":\"c3\",\"type\":8,\"length\":16,\"isPrimarykey\":false}],"
|
"\"c1\",\"type\":4,\"isPrimarykey\":false,"
|
||||||
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\",\"type\":"
|
"\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":\"medium\"},{\"name\":\"c2\",\"type\":4,"
|
||||||
|
"\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":\"medium\"}],\"tags\":[]}",
|
||||||
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"st1\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
||||||
|
"9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"}"
|
||||||
|
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\","
|
||||||
|
"\"level\":\"medium\"},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":false,\"encode\":\"delta-d\","
|
||||||
|
"\"compress\":\"lz4\",\"level\":\"medium\"},{"
|
||||||
|
"\"name\":\"c3\",\"type\":8,\"length\":16,\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":"
|
||||||
|
"\"lz4\",\"level\":\"medium\"}],"
|
||||||
|
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\","
|
||||||
|
"\"type\":"
|
||||||
"1}]}",
|
"1}]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct0\",\"using\":\"st1\",\"tagNum\":3,\"tags\":["
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct0\",\"using\":\"st1\",\"tagNum\":3,"
|
||||||
|
"\"tags\":["
|
||||||
"{\"name\":\"t1\",\"type\":4,\"value\":1000},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"ttt\\\"\"},{"
|
"{\"name\":\"t1\",\"type\":4,\"value\":1000},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"ttt\\\"\"},{"
|
||||||
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct1\",\"using\":\"st1\",\"tagNum\":3,\"tags\":["
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct1\",\"using\":\"st1\",\"tagNum\":3,"
|
||||||
|
"\"tags\":["
|
||||||
"{\"name\":\"t1\",\"type\":4,\"value\":2000}],\"createList\":[]}",
|
"{\"name\":\"t1\",\"type\":4,\"value\":2000}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct2\",\"using\":\"st1\",\"tagNum\":3,\"tags\":["
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct2\",\"using\":\"st1\",\"tagNum\":3,"
|
||||||
|
"\"tags\":["
|
||||||
"],\"createList\":[]}",
|
"],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct3\",\"using\":\"st1\",\"tagNum\":3,\"tags\":["
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct3\",\"using\":\"st1\",\"tagNum\":3,"
|
||||||
|
"\"tags\":["
|
||||||
"{\"name\":\"t1\",\"type\":4,\"value\":3000}],\"createList\":[]}",
|
"{\"name\":\"t1\",\"type\":4,\"value\":3000}],\"createList\":[]}",
|
||||||
"{\"type\":\"alter\",\"tableType\":\"super\",\"tableName\":\"st1\",\"alterType\":5,\"colName\":\"c4\","
|
"{\"type\":\"alter\",\"tableType\":\"super\",\"tableName\":\"st1\",\"alterType\":5,\"colName\":\"c4\","
|
||||||
"\"colType\":5}",
|
"\"colType\":5}",
|
||||||
|
@ -755,8 +830,11 @@ void initLogFile() {
|
||||||
"\"colValue\":\"5000\",\"colValueNull\":false}",
|
"\"colValue\":\"5000\",\"colValueNull\":false}",
|
||||||
"{\"type\":\"drop\",\"tableNameList\":[\"ct3\",\"ct1\"]}",
|
"{\"type\":\"drop\",\"tableNameList\":[\"ct3\",\"ct1\"]}",
|
||||||
"{\"type\":\"drop\",\"tableType\":\"super\",\"tableName\":\"st1\"}",
|
"{\"type\":\"drop\",\"tableType\":\"super\",\"tableName\":\"st1\"}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"columns\":[{\"name\":\"ts\",\"type\":9,\"isPrimarykey\":false}"
|
"{\"type\":\"create\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
||||||
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":10,\"length\":4,\"isPrimarykey\":false}],\"tags\":[]}",
|
"9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"},{\"name\":"
|
||||||
|
"\"c1\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":"
|
||||||
|
"\"medium\"},{\"name\":\"c2\",\"type\":10,\"length\":4,"
|
||||||
|
"\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":\"lz4\",\"level\":\"medium\"}],\"tags\":[]}",
|
||||||
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":5,\"colName\":\"c3\","
|
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":5,\"colName\":\"c3\","
|
||||||
"\"colType\":5}",
|
"\"colType\":5}",
|
||||||
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":7,\"colName\":\"c2\","
|
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":7,\"colName\":\"c2\","
|
||||||
|
@ -766,25 +844,48 @@ void initLogFile() {
|
||||||
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":9}",
|
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":9}",
|
||||||
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":6,\"colName\":\"c1\"}",
|
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":6,\"colName\":\"c1\"}",
|
||||||
"{\"type\":\"drop\",\"tableNameList\":[\"n1\"]}",
|
"{\"type\":\"drop\",\"tableNameList\":[\"n1\"]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"jt\",\"columns\":[{\"name\":\"ts\",\"type\":9,\"isPrimarykey\":false},"
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"jt\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
||||||
"{\"name\":\"i\",\"type\":4,\"isPrimarykey\":false}],\"tags\":[{\"name\":\"t\",\"type\":15}]}",
|
"9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"},"
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"jt1\",\"using\":\"jt\",\"tagNum\":1,\"tags\":[{"
|
"{\"name\":\"i\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":"
|
||||||
|
"\"medium\"}],\"tags\":[{\"name\":\"t\",\"type\":15}]}",
|
||||||
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"jt1\",\"using\":\"jt\",\"tagNum\":1,\"tags\":"
|
||||||
|
"[{"
|
||||||
"\"name\":\"t\",\"type\":15,\"value\":\"{\\\"k1\\\":1,\\\"k2\\\":\\\"hello\\\"}\"}],\"createList\":[]}",
|
"\"name\":\"t\",\"type\":15,\"value\":\"{\\\"k1\\\":1,\\\"k2\\\":\\\"hello\\\"}\"}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"jt2\",\"using\":\"jt\",\"tagNum\":1,\"tags\":[]"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"jt2\",\"using\":\"jt\",\"tagNum\":1,\"tags\":"
|
||||||
|
"[]"
|
||||||
",\"createList\":[]}",
|
",\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"st1\",\"columns\":[{\"name\":\"ts\",\"type\":9,\"isPrimarykey\":false},"
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"st1\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
||||||
"{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":false},{\"name\":\"c3\",\"type\":8,\"length\":16,\"isPrimarykey\":false}],"
|
"9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"},"
|
||||||
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\",\"type\":1}]}",
|
"{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":"
|
||||||
|
"\"medium\"},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":"
|
||||||
|
"false,\"encode\":\"delta-d\",\"compress\":\"lz4\",\"level\":\"medium\"},{\"name\":\"c3\",\"type\":8,"
|
||||||
|
"\"length\":16,\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":\"lz4\",\"level\":\"medium\"}],"
|
||||||
|
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\","
|
||||||
|
"\"type\":1}]}",
|
||||||
"{\"type\":\"drop\",\"tableType\":\"super\",\"tableName\":\"st1\"}",
|
"{\"type\":\"drop\",\"tableType\":\"super\",\"tableName\":\"st1\"}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"stt\",\"columns\":[{\"name\":\"ts\",\"type\":9,\"isPrimarykey\":false}"
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"stt\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
||||||
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":false},{\"name\":\"c3\",\"type\":8,\"length\":16,\"isPrimarykey\":false}],"
|
"9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"}"
|
||||||
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\",\"type\":"
|
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\","
|
||||||
|
"\"level\":\"medium\"},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":"
|
||||||
|
"false,\"encode\":\"delta-d\",\"compress\":\"lz4\",\"level\":\"medium\"},{"
|
||||||
|
"\"name\":\"c3\",\"type\":8,\"length\":16,\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":"
|
||||||
|
"\"lz4\",\"level\":\"medium\"}],"
|
||||||
|
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\","
|
||||||
|
"\"type\":"
|
||||||
"1}]}",
|
"1}]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"sttb\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"sttb\",\"columns\":[{\"name\":\"ts\","
|
||||||
"9,\"isPrimarykey\":false},{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":false},{\"name\":\"c3\",\"type\":8,\"length\":16,\"isPrimarykey\":false}],"
|
"\"type\":"
|
||||||
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\",\"type\":"
|
"9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"},{\"name\":"
|
||||||
|
"\"c1\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":"
|
||||||
|
"\"medium\"},{\"name\":\"c2\",\"type\":6,"
|
||||||
|
"\"isPrimarykey\":false,\"encode\":\"delta-d\",\"compress\":\"lz4\",\"level\":\"medium\"},{\"name\":\"c3\","
|
||||||
|
"\"type\":8,\"length\":16,\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":\"lz4\",\"level\":"
|
||||||
|
"\"medium\"}],"
|
||||||
|
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\","
|
||||||
|
"\"type\":"
|
||||||
"1}]}",
|
"1}]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt1\",\"using\":\"stt\",\"tagNum\":3,\"tags\":"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt1\",\"using\":\"stt\",\"tagNum\":3,"
|
||||||
|
"\"tags\":"
|
||||||
"[{\"name\":\"t1\",\"type\":4,\"value\":2},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt1\\\"\"},{"
|
"[{\"name\":\"t1\",\"type\":4,\"value\":2},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt1\\\"\"},{"
|
||||||
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[{\"tableName\":\"stt1\",\"using\":\"stt\","
|
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[{\"tableName\":\"stt1\",\"using\":\"stt\","
|
||||||
"\"tagNum\":3,\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":2},{\"name\":\"t3\",\"type\":10,\"value\":"
|
"\"tagNum\":3,\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":2},{\"name\":\"t3\",\"type\":10,\"value\":"
|
||||||
|
@ -795,7 +896,8 @@ void initLogFile() {
|
||||||
"\"\\\"stt2\\\"\"},{\"name\":\"t4\",\"type\":1,\"value\":0}]},{\"tableName\":\"sttb2\",\"using\":\"sttb\","
|
"\"\\\"stt2\\\"\"},{\"name\":\"t4\",\"type\":1,\"value\":0}]},{\"tableName\":\"sttb2\",\"using\":\"sttb\","
|
||||||
"\"tagNum\":3,\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":54},{\"name\":\"t3\",\"type\":10,\"value\":"
|
"\"tagNum\":3,\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":54},{\"name\":\"t3\",\"type\":10,\"value\":"
|
||||||
"\"\\\"sttb2\\\"\"},{\"name\":\"t4\",\"type\":1,\"value\":1}]}]}",
|
"\"\\\"sttb2\\\"\"},{\"name\":\"t4\",\"type\":1,\"value\":1}]}]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt3\",\"using\":\"stt\",\"tagNum\":3,\"tags\":"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt3\",\"using\":\"stt\",\"tagNum\":3,"
|
||||||
|
"\"tags\":"
|
||||||
"[{\"name\":\"t1\",\"type\":4,\"value\":23},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt3\\\"\"},{"
|
"[{\"name\":\"t1\",\"type\":4,\"value\":23},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt3\\\"\"},{"
|
||||||
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[{\"tableName\":\"stt3\",\"using\":\"stt\","
|
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[{\"tableName\":\"stt3\",\"using\":\"stt\","
|
||||||
"\"tagNum\":3,\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":23},{\"name\":\"t3\",\"type\":10,\"value\":"
|
"\"tagNum\":3,\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":23},{\"name\":\"t3\",\"type\":10,\"value\":"
|
||||||
|
@ -816,9 +918,17 @@ void initLogFile() {
|
||||||
if (g_conf.subTable) {
|
if (g_conf.subTable) {
|
||||||
char* result[] = {
|
char* result[] = {
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"meters_summary\",\"columns\":[{\"name\":\"_"
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"meters_summary\",\"columns\":[{\"name\":\"_"
|
||||||
"wstart\",\"type\":9,\"isPrimarykey\":false},{\"name\":\"current\",\"type\":6,\"isPrimarykey\":false},{\"name\":\"groupid\",\"type\":4,\"isPrimarykey\":false},{\"name\":"
|
"wstart\",\"type\":9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":"
|
||||||
"\"location\",\"type\":8,\"length\":16,\"isPrimarykey\":false}],\"tags\":[{\"name\":\"group_id\",\"type\":14}]}",
|
"\"medium\"},{\"name\":\"current\",\"type\":6,\"isPrimarykey\":false,\"encode\":\"delta-d\",\"compress\":"
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"t_d2a450ee819dcf7576f0282d9ac22dbc\",\"using\":"
|
"\"lz4\",\"level\":\"medium\"},{"
|
||||||
|
"\"name\":\"groupid\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\","
|
||||||
|
"\"level\":\"medium\"},{\"name\":"
|
||||||
|
"\"location\",\"type\":8,\"length\":16,\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":\"lz4\","
|
||||||
|
"\"level\":\"medium\"}],\"tags\":[{\"name\":\"group_id\","
|
||||||
|
"\"type\":"
|
||||||
|
"14}]}",
|
||||||
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"t_d2a450ee819dcf7576f0282d9ac22dbc\","
|
||||||
|
"\"using\":"
|
||||||
"\"meters_summary\",\"tagNum\":1,\"tags\":[{\"name\":\"group_id\",\"type\":14,\"value\":1.313555008277358e+"
|
"\"meters_summary\",\"tagNum\":1,\"tags\":[{\"name\":\"group_id\",\"type\":14,\"value\":1.313555008277358e+"
|
||||||
"19}],\"createList\":[]}"};
|
"19}],\"createList\":[]}"};
|
||||||
|
|
||||||
|
@ -826,23 +936,36 @@ void initLogFile() {
|
||||||
taosFprintfFile(pFile2, result[i]);
|
taosFprintfFile(pFile2, result[i]);
|
||||||
taosFprintfFile(pFile2, "\n");
|
taosFprintfFile(pFile2, "\n");
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
char* result[] = {
|
char* result[] = {
|
||||||
"{\"type\":\"create\",\"tableType\":\"normal\",\"tableName\":\"tb1\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
"{\"type\":\"create\",\"tableType\":\"normal\",\"tableName\":\"tb1\",\"columns\":[{\"name\":\"ts\","
|
||||||
"9,\"isPrimarykey\":false},{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":4,\"isPrimarykey\":false}],\"tags\":[]}",
|
"\"type\":9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"},{"
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"st1\",\"columns\":[{\"name\":\"ts\",\"type\":9,\"isPrimarykey\":false}"
|
"\"name\":\"c1\",\"type\":4,"
|
||||||
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":false},{\"name\":\"c3\",\"type\":8,\"length\":16,\"isPrimarykey\":false}],"
|
"\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":\"medium\"},{\"name\":"
|
||||||
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\",\"type\":"
|
"\"c2\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":"
|
||||||
|
"\"medium\"}],\"tags\":[]}",
|
||||||
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"st1\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
||||||
|
"9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"}"
|
||||||
|
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\","
|
||||||
|
"\"level\":\"medium\"},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":"
|
||||||
|
"false,\"encode\":\"delta-d\",\"compress\":\"lz4\",\"level\":\"medium\"},{"
|
||||||
|
"\"name\":\"c3\",\"type\":8,\"length\":16,\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":"
|
||||||
|
"\"lz4\",\"level\":\"medium\"}],"
|
||||||
|
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\","
|
||||||
|
"\"type\":"
|
||||||
"1}]}",
|
"1}]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct0\",\"using\":\"st1\",\"tagNum\":3,\"tags\":["
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct0\",\"using\":\"st1\",\"tagNum\":3,"
|
||||||
|
"\"tags\":["
|
||||||
"{\"name\":\"t1\",\"type\":4,\"value\":1000},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"ttt\\\"\"},{"
|
"{\"name\":\"t1\",\"type\":4,\"value\":1000},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"ttt\\\"\"},{"
|
||||||
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct1\",\"using\":\"st1\",\"tagNum\":3,\"tags\":["
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct1\",\"using\":\"st1\",\"tagNum\":3,"
|
||||||
|
"\"tags\":["
|
||||||
"{\"name\":\"t1\",\"type\":4,\"value\":2000}],\"createList\":[]}",
|
"{\"name\":\"t1\",\"type\":4,\"value\":2000}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct2\",\"using\":\"st1\",\"tagNum\":3,\"tags\":["
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct2\",\"using\":\"st1\",\"tagNum\":3,"
|
||||||
|
"\"tags\":["
|
||||||
"],\"createList\":[]}",
|
"],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct3\",\"using\":\"st1\",\"tagNum\":3,\"tags\":["
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"ct3\",\"using\":\"st1\",\"tagNum\":3,"
|
||||||
|
"\"tags\":["
|
||||||
"{\"name\":\"t1\",\"type\":4,\"value\":3000}],\"createList\":[]}",
|
"{\"name\":\"t1\",\"type\":4,\"value\":3000}],\"createList\":[]}",
|
||||||
"{\"type\":\"alter\",\"tableType\":\"super\",\"tableName\":\"st1\",\"alterType\":5,\"colName\":\"c4\","
|
"{\"type\":\"alter\",\"tableType\":\"super\",\"tableName\":\"st1\",\"alterType\":5,\"colName\":\"c4\","
|
||||||
"\"colType\":5}",
|
"\"colType\":5}",
|
||||||
|
@ -853,8 +976,11 @@ void initLogFile() {
|
||||||
"{\"type\":\"alter\",\"tableType\":\"child\",\"tableName\":\"ct3\",\"alterType\":4,\"colName\":\"t1\","
|
"{\"type\":\"alter\",\"tableType\":\"child\",\"tableName\":\"ct3\",\"alterType\":4,\"colName\":\"t1\","
|
||||||
"\"colValue\":\"5000\",\"colValueNull\":false}",
|
"\"colValue\":\"5000\",\"colValueNull\":false}",
|
||||||
"{\"type\":\"delete\",\"sql\":\"delete from `ct3` where `ts` >= 1626006833600 and `ts` <= 1626006833605\"}",
|
"{\"type\":\"delete\",\"sql\":\"delete from `ct3` where `ts` >= 1626006833600 and `ts` <= 1626006833605\"}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"columns\":[{\"name\":\"ts\",\"type\":9,\"isPrimarykey\":false}"
|
"{\"type\":\"create\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
||||||
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":10,\"length\":4,\"isPrimarykey\":false}],\"tags\":[]}",
|
"9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"}"
|
||||||
|
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\","
|
||||||
|
"\"level\":\"medium\"},{\"name\":\"c2\",\"type\":10,\"length\":4,"
|
||||||
|
"\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":\"lz4\",\"level\":\"medium\"}],\"tags\":[]}",
|
||||||
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":5,\"colName\":\"c3\","
|
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":5,\"colName\":\"c3\","
|
||||||
"\"colType\":5}",
|
"\"colType\":5}",
|
||||||
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":7,\"colName\":\"c2\","
|
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":7,\"colName\":\"c2\","
|
||||||
|
@ -863,21 +989,39 @@ void initLogFile() {
|
||||||
"\"colNewName\":\"cc3\"}",
|
"\"colNewName\":\"cc3\"}",
|
||||||
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":9}",
|
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":9}",
|
||||||
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":6,\"colName\":\"c1\"}",
|
"{\"type\":\"alter\",\"tableType\":\"normal\",\"tableName\":\"n1\",\"alterType\":6,\"colName\":\"c1\"}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"jt\",\"columns\":[{\"name\":\"ts\",\"type\":9,\"isPrimarykey\":false},"
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"jt\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
||||||
"{\"name\":\"i\",\"type\":4,\"isPrimarykey\":false}],\"tags\":[{\"name\":\"t\",\"type\":15}]}",
|
"9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"},"
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"jt1\",\"using\":\"jt\",\"tagNum\":1,\"tags\":[{"
|
"{\"name\":\"i\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":"
|
||||||
|
"\"medium\"}],\"tags\":[{\"name\":\"t\",\"type\":15}]}",
|
||||||
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"jt1\",\"using\":\"jt\",\"tagNum\":1,\"tags\":"
|
||||||
|
"[{"
|
||||||
"\"name\":\"t\",\"type\":15,\"value\":\"{\\\"k1\\\":1,\\\"k2\\\":\\\"hello\\\"}\"}],\"createList\":[]}",
|
"\"name\":\"t\",\"type\":15,\"value\":\"{\\\"k1\\\":1,\\\"k2\\\":\\\"hello\\\"}\"}],\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"jt2\",\"using\":\"jt\",\"tagNum\":1,\"tags\":[]"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"jt2\",\"using\":\"jt\",\"tagNum\":1,\"tags\":"
|
||||||
|
"[]"
|
||||||
",\"createList\":[]}",
|
",\"createList\":[]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"stt\",\"columns\":[{\"name\":\"ts\",\"type\":9,\"isPrimarykey\":false}"
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"stt\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
||||||
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":false},{\"name\":\"c3\",\"type\":8,\"length\":16,\"isPrimarykey\":false}],"
|
"9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"}"
|
||||||
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\",\"type\":"
|
",{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\","
|
||||||
|
"\"level\":\"medium\"},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":"
|
||||||
|
"false,\"encode\":\"delta-d\",\"compress\":\"lz4\",\"level\":\"medium\"},{"
|
||||||
|
"\"name\":\"c3\",\"type\":8,\"length\":16,\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":"
|
||||||
|
"\"lz4\",\"level\":\"medium\"}],"
|
||||||
|
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\","
|
||||||
|
"\"type\":"
|
||||||
"1}]}",
|
"1}]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"sttb\",\"columns\":[{\"name\":\"ts\",\"type\":"
|
"{\"type\":\"create\",\"tableType\":\"super\",\"tableName\":\"sttb\",\"columns\":[{\"name\":\"ts\","
|
||||||
"9,\"isPrimarykey\":false},{\"name\":\"c1\",\"type\":4,\"isPrimarykey\":false},{\"name\":\"c2\",\"type\":6,\"isPrimarykey\":false},{\"name\":\"c3\",\"type\":8,\"length\":16,\"isPrimarykey\":false}],"
|
"\"type\":"
|
||||||
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\",\"type\":"
|
"9,\"isPrimarykey\":false,\"encode\":\"delta-i\",\"compress\":\"lz4\",\"level\":\"medium\"},{\"name\":"
|
||||||
|
"\"c1\",\"type\":4,\"isPrimarykey\":false,\"encode\":\"simple8b\",\"compress\":\"lz4\",\"level\":"
|
||||||
|
"\"medium\"},{\"name\":\"c2\",\"type\":6,"
|
||||||
|
"\"isPrimarykey\":false,\"encode\":\"delta-d\",\"compress\":\"lz4\",\"level\":\"medium\"},{\"name\":\"c3\","
|
||||||
|
"\"type\":8,\"length\":16,\"isPrimarykey\":false,\"encode\":\"disabled\",\"compress\":\"lz4\",\"level\":"
|
||||||
|
"\"medium\"}],"
|
||||||
|
"\"tags\":[{\"name\":\"t1\",\"type\":4},{\"name\":\"t3\",\"type\":10,\"length\":8},{\"name\":\"t4\","
|
||||||
|
"\"type\":"
|
||||||
"1}]}",
|
"1}]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt1\",\"using\":\"stt\",\"tagNum\":3,\"tags\":"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt1\",\"using\":\"stt\",\"tagNum\":3,"
|
||||||
|
"\"tags\":"
|
||||||
"[{\"name\":\"t1\",\"type\":4,\"value\":2},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt1\\\"\"},{"
|
"[{\"name\":\"t1\",\"type\":4,\"value\":2},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt1\\\"\"},{"
|
||||||
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[{\"tableName\":\"stt1\",\"using\":\"stt\","
|
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[{\"tableName\":\"stt1\",\"using\":\"stt\","
|
||||||
"\"tagNum\":3,\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":2},{\"name\":\"t3\",\"type\":10,\"value\":"
|
"\"tagNum\":3,\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":2},{\"name\":\"t3\",\"type\":10,\"value\":"
|
||||||
|
@ -888,7 +1032,8 @@ void initLogFile() {
|
||||||
"\"\\\"stt2\\\"\"},{\"name\":\"t4\",\"type\":1,\"value\":0}]},{\"tableName\":\"sttb2\",\"using\":\"sttb\","
|
"\"\\\"stt2\\\"\"},{\"name\":\"t4\",\"type\":1,\"value\":0}]},{\"tableName\":\"sttb2\",\"using\":\"sttb\","
|
||||||
"\"tagNum\":3,\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":54},{\"name\":\"t3\",\"type\":10,\"value\":"
|
"\"tagNum\":3,\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":54},{\"name\":\"t3\",\"type\":10,\"value\":"
|
||||||
"\"\\\"sttb2\\\"\"},{\"name\":\"t4\",\"type\":1,\"value\":1}]}]}",
|
"\"\\\"sttb2\\\"\"},{\"name\":\"t4\",\"type\":1,\"value\":1}]}]}",
|
||||||
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt3\",\"using\":\"stt\",\"tagNum\":3,\"tags\":"
|
"{\"type\":\"create\",\"tableType\":\"child\",\"tableName\":\"stt3\",\"using\":\"stt\",\"tagNum\":3,"
|
||||||
|
"\"tags\":"
|
||||||
"[{\"name\":\"t1\",\"type\":4,\"value\":23},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt3\\\"\"},{"
|
"[{\"name\":\"t1\",\"type\":4,\"value\":23},{\"name\":\"t3\",\"type\":10,\"value\":\"\\\"stt3\\\"\"},{"
|
||||||
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[{\"tableName\":\"stt3\",\"using\":\"stt\","
|
"\"name\":\"t4\",\"type\":1,\"value\":1}],\"createList\":[{\"tableName\":\"stt3\",\"using\":\"stt\","
|
||||||
"\"tagNum\":3,\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":23},{\"name\":\"t3\",\"type\":10,\"value\":"
|
"\"tagNum\":3,\"tags\":[{\"name\":\"t1\",\"type\":4,\"value\":23},{\"name\":\"t3\",\"type\":10,\"value\":"
|
||||||
|
@ -946,7 +1091,6 @@ void testConsumeExcluded(int topic_type){
|
||||||
tmq_conf_set(conf, "auto.offset.reset", "earliest");
|
tmq_conf_set(conf, "auto.offset.reset", "earliest");
|
||||||
tmq_conf_set(conf, "msg.consume.excluded", "1");
|
tmq_conf_set(conf, "msg.consume.excluded", "1");
|
||||||
|
|
||||||
|
|
||||||
tmq_conf_set_auto_commit_cb(conf, tmq_commit_cb_print, NULL);
|
tmq_conf_set_auto_commit_cb(conf, tmq_commit_cb_print, NULL);
|
||||||
tmq_t* tmq = tmq_consumer_new(conf, NULL, 0);
|
tmq_t* tmq = tmq_consumer_new(conf, NULL, 0);
|
||||||
assert(tmq);
|
assert(tmq);
|
||||||
|
@ -968,14 +1112,10 @@ void testConsumeExcluded(int topic_type){
|
||||||
tmq_raw_data raw = {0};
|
tmq_raw_data raw = {0};
|
||||||
tmq_get_raw(msg, &raw);
|
tmq_get_raw(msg, &raw);
|
||||||
if (topic_type == 1) {
|
if (topic_type == 1) {
|
||||||
assert(raw.raw_type != 2 && raw.raw_type != 4 &&
|
assert(raw.raw_type != 2 && raw.raw_type != 4 && raw.raw_type != TDMT_VND_CREATE_STB &&
|
||||||
raw.raw_type != TDMT_VND_CREATE_STB &&
|
raw.raw_type != TDMT_VND_ALTER_STB && raw.raw_type != TDMT_VND_CREATE_TABLE &&
|
||||||
raw.raw_type != TDMT_VND_ALTER_STB &&
|
raw.raw_type != TDMT_VND_ALTER_TABLE && raw.raw_type != TDMT_VND_DELETE);
|
||||||
raw.raw_type != TDMT_VND_CREATE_TABLE &&
|
assert(raw.raw_type == TDMT_VND_DROP_STB || raw.raw_type == TDMT_VND_DROP_TABLE);
|
||||||
raw.raw_type != TDMT_VND_ALTER_TABLE &&
|
|
||||||
raw.raw_type != TDMT_VND_DELETE);
|
|
||||||
assert(raw.raw_type == TDMT_VND_DROP_STB ||
|
|
||||||
raw.raw_type == TDMT_VND_DROP_TABLE);
|
|
||||||
} else if (topic_type == 2) {
|
} else if (topic_type == 2) {
|
||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue