1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/dolphindb-Tutorials_CN

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
hastreaming.dos 2.3 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
xiaodanzhang Отправлено 11.09.2020 07:42 a391e19
def createSt(tableName,cacheLimit,retentionMinutes){
n = 1000000;
tableSchema = streamTable(n:0, ["fwname","filename","source_address","source_port","destination_address","destination_port","nat_source_address","nat_source_port","starttime","stoptime","elapsed_time"] , [SYMBOL,STRING,INT,INT,INT,INT,INT,INT,DATETIME,DATETIME,INT] )
enableTableShareAndPersistence(tableSchema,tableName, false, false,cacheLimit,retentionMinutes,1)
}
createSt("natlogrecords",1000000,1440)
def createHaSt(tableName,groupId,cacheLimit,keyColumn,retentionMinutes){
m = "tag" + string(0..199)
t1=table(1:0, ["fwname","filename","source_address","source_port","destination_address","destination_port","nat_source_address","nat_source_port","starttime","stoptime","elapsed_time"] join m, [SYMBOL,STRING,INT,INT,INT,INT,INT,INT,DATETIME,DATETIME,INT] join take(DOUBLE,200) )
//t1=table(1:0, ["fwname","filename","source_address","source_port","destination_address","destination_port","nat_source_address","nat_source_port","starttime","stoptime","elapsed_time"] , [SYMBOL,STRING,INT,INT,INT,INT,INT,INT,DATETIME,DATETIME,INT] )
haStreamTable(groupId,t1,tableName,cacheLimit,keyColumn,retentionMinutes)
}
createHaSt("natlogrecords",groupId,1000000,"",1440)
def createSt(tableName,cacheLimit,retentionMinutes){
n = 1000000;
m = "tag" + string(0..199)
tableSchema = streamTable(n:0, ["fwname","filename","source_address","source_port","destination_address","destination_port","nat_source_address","nat_source_port","starttime","stoptime","elapsed_time"] join m, [SYMBOL,STRING,INT,INT,INT,INT,INT,INT,DATETIME,DATETIME,INT] join take(DOUBLE,200) )
enableTableShareAndPersistence(tableSchema,tableName, true, false,cacheLimit,retentionMinutes,1)
}
createSt("natlogrecords211",1000000,1440)
def createHaSt(tableName,groupId,cacheLimit,keyColumn,retentionMinutes){
m = "tag" + string(0..199)
t1=table(1:0, ["fwname","filename","source_address","source_port","destination_address","destination_port","nat_source_address","nat_source_port","starttime","stoptime","elapsed_time"] join m, [SYMBOL,STRING,INT,INT,INT,INT,INT,INT,DATETIME,DATETIME,INT] join take(DOUBLE,200) )
haStreamTable(groupId,t1,tableName,cacheLimit,keyColumn,retentionMinutes)
}
createHaSt("natlogrecords211",groupId,1000000,"",1440)

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/dolphindb-Tutorials_CN.git
git@api.gitlife.ru:oschina-mirror/dolphindb-Tutorials_CN.git
oschina-mirror
dolphindb-Tutorials_CN
dolphindb-Tutorials_CN
master