private void init(Tuple input){
  profileConfig=(ProfileConfig)input.getValueByField("profile");
  measurement=new ProfileMeasurement(profileConfig.getProfile(),input.getStringByField("entity"),getTimestamp(),periodDurationMillis,TimeUnit.MILLISECONDS);
  try {
    JSONObject message=(JSONObject)input.getValueByField("message");
    Map<String,String> expressions=profileConfig.getInit();
    expressions.forEach(null);
  }
 catch (  ParseException e) {
    String msg=format("Bad 'init' expression: %s, profile=%s, entity=%s",e.getMessage(),measurement.getProfileName(),measurement.getEntity());
    throw new ParseException(msg,e);
  }
}

private void init ( Tuple input ) { profileConfig = ( ProfileConfig ) input . getValueByField ( "profile" ) ; measurement = new ProfileMeasurement ( profileConfig . getProfile ( ) , input . getStringByField ( "entity" ) , getTimestamp ( ) , periodDurationMillis , TimeUnit . MILLISECONDS ) ; try { JSONObject message = ( JSONObject ) input . getValueByField ( "message" ) ; Map < String , String > expressions = profileConfig . getInit ( ) ; expressions . forEach ( null ) ; } catch ( ParseException e ) { String msg = format ( "Bad 'init' expression: %s, profile=%s, entity=%s" , e . getMessage ( ) , measurement . getProfileName ( ) , measurement . getEntity ( ) ) ; throw new ParseException ( msg , e ) ; } }
initialize the bolt . occurs when the first tuple is received at the start of each window period .
