提交 9a55077b 编写于 作者: Z zyyang

change

上级 e783e017
...@@ -42,13 +42,13 @@ public class TdEngineSuperDataGen { ...@@ -42,13 +42,13 @@ public class TdEngineSuperDataGen {
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
try { try {
for (long i = 0; i < rowCount; i++) { for (long i = 0; i < rowCount; i++) {
sb = new StringBuilder("insert into " + kv.getKey() + " using sdata tags(" + kv.getValue() + "," sb = new StringBuilder("insert into " + kv.getKey() + " using sdata tags(" + kv.getValue() + "," + kv.getKey() + ") values('");
+ kv.getKey() + ") values('");
d = d.plusSeconds(1); d = d.plusSeconds(1);
sb.append(d.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.MS"))); sb.append(d.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.MS")));
sb.append("'," + i + "," + r.nextInt(100) + "," + r.nextInt(100) + ",'"); sb.append("'," + i + "," + r.nextInt(100) + "," + r.nextInt(100) + ",'");
sb.append(DigestUtils.md5Hex(d.toString())); sb.append(DigestUtils.md5Hex(d.toString()));
sb.append("')"); sb.append("')");
System.out.println("SQL >>> " + sb.toString());
stmt.executeUpdate(sb.toString()); stmt.executeUpdate(sb.toString());
} }
} catch (SQLException e) { } catch (SQLException e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册