标签:des style blog io ar color 使用 sp java
解决:
使用Timestamp代替java.sql.Date:
long curMillis = System.currentTimeMillis(); Timestamp currentDate = new Timestamp(curMillis); Date time = DateUtils.parseDate(errorCodeCountBean.getTime(), NginxConfig.TIME_PATTERN); String sql = "insert into ERROR_CODE_COUNT (ID, ERRCODECOUNT,TIME,CREATE_DATE,UPDATE_DATE) VALUES (?,?,?,?,?)"; pstmt = conn.prepareStatement(sql); pstmt.setLong(1, curMillis); pstmt.setInt(2, errorCodeCountBean.getErrcodecount()); pstmt.setTimestamp(3, new Timestamp(time.getTime())); pstmt.setTimestamp(4, currentDate); pstmt.setTimestamp(5, currentDate);
下面的printBolt对象使用了两次:
PrinterBolt printBolt=new PrinterBolt(); builder.setBolt("print", printBolt,1).shuffleGrouping("ErrorCodeStatisticsBolt"); builder.setBolt("print", printBolt,1).shuffleGrouping("UVRealTimeBolt");
Exception in thread "main" java.lang.IllegalArgumentException: Bolt has already been declared for id print
at backtype.storm.topology.TopologyBuilder.validateUnusedId(TopologyBuilder.java:212)
at backtype.storm.topology.TopologyBuilder.setBolt(TopologyBuilder.java:139)
at backtype.storm.topology.TopologyBuilder.setBolt(TopologyBuilder.java:171)
at com.handpay.hawkeye.core.storm.topology.LogTopology.main(LogTopology.java:62)
标签:des style blog io ar color 使用 sp java
原文地址:http://www.cnblogs.com/muzhongjiang/p/4128812.html