当前位置: 首页 > news >正文

微网站开发平台有哪些好的免费申请论坛网站

微网站开发平台有哪些好的,免费申请论坛网站,网络正常但网页打不开,种子搜索引擎前言 使用时序数据库influxdb时#xff0c;我们经常需要写入大量的数据。而单单使用influxDB.write#xff08;Point#xff09;进行单条写入时#xff0c;速度过慢#xff0c;无法支撑时序数据大量写入的速度。 所以我们需要采用批量的方式进行存储#xff0c;增加写入…前言 使用时序数据库influxdb时我们经常需要写入大量的数据。而单单使用influxDB.writePoint进行单条写入时速度过慢无法支撑时序数据大量写入的速度。 所以我们需要采用批量的方式进行存储增加写入的速度。 一、使用什么方法 influxDB.write(BatchPoints batchPoints) 二、使用步骤 1.引入库 dependencygroupIdorg.influxdb/groupIdartifactIdinfluxdb-java/artifactIdversion2.10/version/dependency2.创建influxdb连接 private static String openurl http://127.0.0.1:10002;//连接地址 private static String username admin;//用户名 private static String password abc_123;//密码 private static String database test;//数据库InfluxDB influxDB InfluxDBFactory.connect(openurl, username, password); influxDB.createDatabase(database);3.创建Point Point point Point.measurement(measurement).time(System.currentTimeMillis(), TimeUnit.MILLISECONDS)//tag属性——只能存储String类型.tag(label, label)//field存储数据.addField(value, 1).addField(rt, rt).build();4.创建BatchPoints并添加Point BatchPoints batchPoints BatchPoints.database(db2019).build(); batchPoints.point(point);5.写入influxdb influxDB.write(batchPoints);三、示例 package org.example.influx;import org.influxdb.InfluxDB; import org.influxdb.InfluxDBFactory; import org.influxdb.dto.BatchPoints; import org.influxdb.dto.Point;import java.util.concurrent.TimeUnit;public class InfluxDBBatchWriter243 {private static String openurl http://10.16.8.243:8086;//连接地址private static String username admin;//用户名private static String password douzhiFANGFA1;//密码private static String database db2019;//数据库private static Point createPoint(long time){Point point Point.measurement(test2).addField(group__tag1, 297af48c06a74220aff4fcc6bcaa44c9kg).tag(host, changdong).time(time, TimeUnit.MILLISECONDS).build();return point;}public static void main(String[] args) throws InterruptedException {InfluxDB influxDB InfluxDBFactory.connect(openurl, username, password);influxDB.createDatabase(database);long time1 System.currentTimeMillis();while (true) {BatchPoints batchPoints BatchPoints.database(db2019).build();//将单条数据存储到集合中for (int i 0; i 1000; i) {time1 time1 1;batchPoints.point(createPoint(time1));}long startTime System.currentTimeMillis();influxDB.write(batchPoints);long endTime System.currentTimeMillis();System.out.println(当前时间 endTime , 写入时间 time1 , 写入用时 (endTime - startTime) 毫秒);Thread.sleep(1010);}} }
http://www.hkea.cn/news/14423028/

相关文章:

  • 这么开网站制作网站的方法有哪些
  • wordpress小说网站怎么免费永久创建网站无广告
  • 楚雄市城乡建设局网站网站备案需要拍照
  • 云服务器网站建设郴州有什么好玩的地方
  • 深圳市建设工程造价站官网开网站做销售
  • 坂田杨美企业网站建设横琴网站建设
  • 为网站开发uwp应用wordpress标签样式表
  • 什么设计网站好医疗机械网站怎么做
  • 浙江广厦建设职业技术学院网站网站开发建
  • 城乡建设网站xp怎么做网站
  • 腾讯广告建站工具哪个网站做马代路线好
  • 页面设计模板简约百度推广关键词优化
  • 凯里专注网站建设报价做网站图片多大
  • 自己如何做外贸公司网站做网站是自己公司做好还是外包好
  • 如何用博客网站做cpa品牌营销策划案例ppt
  • 做网站好的书各大网站rss订阅源地址
  • 智能建站网站做网站建设很赚钱吗
  • 网站建设方案维护潍坊百度搜索优化
  • 慈溪网站制作哪家最便宜专业的上海网站建设公司哪家好
  • 哈尔滨专业做网站公司wordpress 微信登录插件下载
  • 网站建设管理员工工资多少网站的做
  • 手机网站 微信链接宁波网站制作价格
  • 网站内容栏由什么构成微信做单网站有哪些
  • 万网网站流量深圳怎么制作公司网页
  • 个人网站域名名字wordpress 高亮代码
  • 易读网站建设晋江哪里可以学建设网站
  • 有哪个网站是成都中科大旗做的商城网站开发报价方案
  • 新乡哪里有做网站的沈阳网站建设选网龙
  • 个人 网站备案 幕布手机壳图案设计网站
  • 工伤做实的那个网站网站建设定制网站建设公司