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

Co-authored-by: Shuduo Sang <sdsang@taosdata.com>
This commit is contained in:
Shuduo Sang 2021-04-02 17:09:13 +08:00 committed by GitHub
parent 3d2706fea2
commit 945013bd11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 14 deletions

View File

@ -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) {
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) {