protected void tryRefillHeaders ( JSONObject eachRow ) { if ( eachRow == null ) { return ; } if ( eachRow . keySet ( ) . size ( ) > baseFieldNames . size ( ) - 1 ) { //i.e excluding timestamp, if the sizes are not same then we have not covered all field names baseFieldNames . clear ( ) ; baseFieldNames . add ( "timestamp" ) ; baseFieldNames . addAll ( eachRow . keySet ( ) ) ; } }
Will attempt to refill headers if we see more fields .