未验证 提交 945013bd 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

[TD-3653] <fix>: taosdemo json parameter cleanup. (#5665)

Co-authored-by: NShuduo Sang <sdsang@taosdata.com>
上级 3d2706fe
...@@ -263,7 +263,6 @@ typedef struct SSuperTable_S { ...@@ -263,7 +263,6 @@ typedef struct SSuperTable_S {
int lenOfTagOfOneRow; int lenOfTagOfOneRow;
char* sampleDataBuf; char* sampleDataBuf;
int sampleDataBufSize;
//int sampleRowCount; //int sampleRowCount;
//int sampleUsePos; //int sampleUsePos;
...@@ -3552,19 +3551,6 @@ static bool getMetaFromInsertJsonFile(cJSON* root) { ...@@ -3552,19 +3551,6 @@ static bool getMetaFromInsertJsonFile(cJSON* root) {
goto PARSE_OVER; goto PARSE_OVER;
} }
cJSON* sampleDataBufSize = cJSON_GetObjectItem(stbInfo, "sample_buf_size");
if (sampleDataBufSize && sampleDataBufSize->type == cJSON_Number) {
g_Dbs.db[i].superTbls[j].sampleDataBufSize = sampleDataBufSize->valueint;
if (g_Dbs.db[i].superTbls[j].sampleDataBufSize < 1024*1024) {
g_Dbs.db[i].superTbls[j].sampleDataBufSize = 1024*1024 + 1024;
}
} else if (!sampleDataBufSize) {
g_Dbs.db[i].superTbls[j].sampleDataBufSize = 1024*1024 + 1024;
} else {
printf("ERROR: failed to read json, sample_buf_size not found\n");
goto PARSE_OVER;
}
cJSON *sampleFormat = cJSON_GetObjectItem(stbInfo, "sample_format"); cJSON *sampleFormat = cJSON_GetObjectItem(stbInfo, "sample_format");
if (sampleFormat && sampleFormat->type if (sampleFormat && sampleFormat->type
== cJSON_String && sampleFormat->valuestring != NULL) { == cJSON_String && sampleFormat->valuestring != NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册