Commit d4f299b7 d4f299b7624cae2cf65d4ba3fdac98de82c97454 by Christian Gerdes

Added a quick fix for issue #5 by catching the condition of value to

high to fit into a java.lang.Long and change the value to Long.MAX_VALUE
instead. This occurred on the stats value named "prefetch clients -
default"
on some systems (value was a 22 byte number).
1 parent c3cb46d9
No preview for this file type
No preview for this file type
...@@ -9,7 +9,17 @@ class Collector { ...@@ -9,7 +9,17 @@ class Collector {
9 9
10 public void update(ResultSet rset) throws Throwable { 10 public void update(ResultSet rset) throws Throwable {
11 while(rset.next()) { 11 while(rset.next()) {
12 updateValue(rset.getTimestamp(1), rset.getString(2), rset.getLong(3)); 12 // Add try catch for issue #5
13 Timestamp ts = rset.getTimestamp(1);
14 String name = rset.getString(2);
15 Long value;
16 try {
17 value = rset.getLong(3);
18 }
19 catch (java.sql.SQLException e) {
20 value = Long.MAX_VALUE;
21 }
22 updateValue(ts, name, value);
13 } 23 }
14 rset.close(); 24 rset.close();
15 } 25 }
......