提交 9aae8d37 编写于 作者: Z zhaoyanggh

change name

上级 e78b1e47
...@@ -303,7 +303,7 @@ typedef struct SSuperTable_S { ...@@ -303,7 +303,7 @@ typedef struct SSuperTable_S {
uint64_t lenOfTagOfOneRow; uint64_t lenOfTagOfOneRow;
char* sampleDataBuf; char* sampleDataBuf;
bool sampleTs; bool useSampleTs;
uint32_t tagSource; // 0: rand, 1: tag sample uint32_t tagSource; // 0: rand, 1: tag sample
char* tagDataBuf; char* tagDataBuf;
...@@ -2762,8 +2762,8 @@ static int printfInsertMeta() { ...@@ -2762,8 +2762,8 @@ static int printfInsertMeta() {
g_Dbs.db[i].superTbls[j].sampleFormat); g_Dbs.db[i].superTbls[j].sampleFormat);
printf(" sampleFile: \033[33m%s\033[0m\n", printf(" sampleFile: \033[33m%s\033[0m\n",
g_Dbs.db[i].superTbls[j].sampleFile); g_Dbs.db[i].superTbls[j].sampleFile);
printf(" sampleTs: \033[33m%s\033[0m\n", printf(" useSampleTs: \033[33m%s\033[0m\n",
g_Dbs.db[i].superTbls[j].sampleTs ? "yes" : "no"); g_Dbs.db[i].superTbls[j].useSampleTs ? "yes" : "no");
printf(" tagsFile: \033[33m%s\033[0m\n", printf(" tagsFile: \033[33m%s\033[0m\n",
g_Dbs.db[i].superTbls[j].tagsFile); g_Dbs.db[i].superTbls[j].tagsFile);
printf(" columnCount: \033[33m%d\033[0m\n ", printf(" columnCount: \033[33m%d\033[0m\n ",
...@@ -5708,20 +5708,20 @@ static bool getMetaFromInsertJsonFile(cJSON* root) { ...@@ -5708,20 +5708,20 @@ static bool getMetaFromInsertJsonFile(cJSON* root) {
goto PARSE_OVER; goto PARSE_OVER;
} }
cJSON *sampleTs = cJSON_GetObjectItem(stbInfo, "sample_ts"); cJSON *useSampleTs = cJSON_GetObjectItem(stbInfo, "use_sample_ts");
if (sampleTs && sampleTs->type == cJSON_String if (useSampleTs && useSampleTs->type == cJSON_String
&& sampleTs->valuestring != NULL) { && useSampleTs->valuestring != NULL) {
if (0 == strncasecmp(sampleTs->valuestring, "yes", 3)) { if (0 == strncasecmp(useSampleTs->valuestring, "yes", 3)) {
g_Dbs.db[i].superTbls[j].sampleTs = true; g_Dbs.db[i].superTbls[j].useSampleTs = true;
} else if (0 == strncasecmp(sampleTs->valuestring, "no", 2)){ } else if (0 == strncasecmp(useSampleTs->valuestring, "no", 2)){
g_Dbs.db[i].superTbls[j].sampleTs = false; g_Dbs.db[i].superTbls[j].useSampleTs = false;
} else { } else {
g_Dbs.db[i].superTbls[j].sampleTs = false; g_Dbs.db[i].superTbls[j].useSampleTs = false;
} }
} else if (!sampleTs) { } else if (!useSampleTs) {
g_Dbs.db[i].superTbls[j].sampleTs = false; g_Dbs.db[i].superTbls[j].useSampleTs = false;
} else { } else {
errorPrint("%s", "failed to read json, sample_ts not found\n"); errorPrint("%s", "failed to read json, use_sample_ts not found\n");
goto PARSE_OVER; goto PARSE_OVER;
} }
...@@ -6485,7 +6485,7 @@ static int getRowDataFromSample( ...@@ -6485,7 +6485,7 @@ static int getRowDataFromSample(
} }
int dataLen = 0; int dataLen = 0;
if(stbInfo->sampleTs) { if(stbInfo->useSampleTs) {
dataLen += snprintf(dataBuf + dataLen, maxLen - dataLen, dataLen += snprintf(dataBuf + dataLen, maxLen - dataLen,
"(%s", "(%s",
stbInfo->sampleDataBuf stbInfo->sampleDataBuf
...@@ -6931,7 +6931,7 @@ static int prepareSampleForStb(SSuperTable *stbInfo) { ...@@ -6931,7 +6931,7 @@ static int prepareSampleForStb(SSuperTable *stbInfo) {
int ret; int ret;
if (0 == strncasecmp(stbInfo->dataSource, "sample", strlen("sample"))) { if (0 == strncasecmp(stbInfo->dataSource, "sample", strlen("sample"))) {
if(stbInfo->sampleTs) { if(stbInfo->useSampleTs) {
getAndSetRowsFromCsvFile(stbInfo); getAndSetRowsFromCsvFile(stbInfo);
} }
ret = generateSampleFromCsvForStb(stbInfo); ret = generateSampleFromCsvForStb(stbInfo);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册