@@ -75,18 +75,20 @@ public Map<String, PeerStatusJsonV2> getPeersStatus() {
75
75
Function <ResultSet , Void > function = rs -> {
76
76
try {
77
77
String key = rs .getString (1 );
78
- log .debug ("Checking key " + key );
79
78
String value = rs .getString (2 );
80
- PeerStatusJsonV2 peerStatus = gson .fromJson (value , PeerStatusJsonV2 .class );
81
- peerStatus .status (PeerStatusString .valueOf (rs .getString ("status" )));
82
- updateNodesWithPeer (peerStatus );
83
- $ .put (key , peerStatus );
79
+ try {
80
+ PeerStatusJsonV2 peerStatus = gson .fromJson (value , PeerStatusJsonV2 .class );
81
+ peerStatus .status (PeerStatusString .valueOf (rs .getString ("status" )));
82
+ updateNodesWithPeer (peerStatus );
83
+ $ .put (key , peerStatus );
84
+ } catch (JsonSyntaxException e ) {
85
+ log .error ("Got json exception while trying to parse line of key " + key + ", will skip this node" ,
86
+ e );
87
+ return null ;
88
+ }
84
89
return null ;
85
90
} catch (SQLException e ) {
86
91
throw ExceptionUtils .asUnchecked (e );
87
- } catch (JsonSyntaxException e ) {
88
- log .error ("Got json exception while trying to parse line, will skip this node" , e );
89
- return null ;
90
92
}
91
93
};
92
94
dbUtils .executeQueryCompressed ("select * from " + TABLE_NAME , function );
0 commit comments