@Test( expected = IllegalArgumentException.class ) public void shouldFailWithNoFieldName () { config.set( WEIGHT_CONFIG_PARAMETER, .5 ); operator.init( initCtx ); }
@Override public SchedulingStrategy init ( final InitCtx ctx ) { this.outputSchema = ctx.getOutputPortSchema( 0 ); final OperatorConfig config = ctx.getConfig(); this.weight = config.getOrFail( WEIGHT_CONFIG_PARAMETER ); this.fieldName = config.getOrFail( FIELD_NAME_CONFIG_PARAMETER ); this.windowSchema = new PortRuntimeSchemaBuilder( EXACT_FIELD_SET, asList( new RuntimeSchemaField( VALUE_FIELD, Double.class ), new RuntimeSchemaField( TUPLE_COUNT_FIELD, Integer.class ) ) ).build(); return scheduleWhenTuplesAvailableOnDefaultPort( 1 ); }
ExponentialMovingAverageAggregationOperator implements Operator { @Override public SchedulingStrategy init ( final InitCtx ctx ) { this.outputSchema = ctx.getOutputPortSchema( 0 ); final OperatorConfig config = ctx.getConfig(); this.weight = config.getOrFail( WEIGHT_CONFIG_PARAMETER ); this.fieldName = config.getOrFail( FIELD_NAME_CONFIG_PARAMETER ); this.windowSchema = new PortRuntimeSchemaBuilder( EXACT_FIELD_SET, asList( new RuntimeSchemaField( VALUE_FIELD, Double.class ), new RuntimeSchemaField( TUPLE_COUNT_FIELD, Integer.class ) ) ).build(); return scheduleWhenTuplesAvailableOnDefaultPort( 1 ); } }
ExponentialMovingAverageAggregationOperator implements Operator { @Override public SchedulingStrategy init ( final InitCtx ctx ) { this.outputSchema = ctx.getOutputPortSchema( 0 ); final OperatorConfig config = ctx.getConfig(); this.weight = config.getOrFail( WEIGHT_CONFIG_PARAMETER ); this.fieldName = config.getOrFail( FIELD_NAME_CONFIG_PARAMETER ); this.windowSchema = new PortRuntimeSchemaBuilder( EXACT_FIELD_SET, asList( new RuntimeSchemaField( VALUE_FIELD, Double.class ), new RuntimeSchemaField( TUPLE_COUNT_FIELD, Integer.class ) ) ).build(); return scheduleWhenTuplesAvailableOnDefaultPort( 1 ); }  }
ExponentialMovingAverageAggregationOperator implements Operator { @Override public SchedulingStrategy init ( final InitCtx ctx ) { this.outputSchema = ctx.getOutputPortSchema( 0 ); final OperatorConfig config = ctx.getConfig(); this.weight = config.getOrFail( WEIGHT_CONFIG_PARAMETER ); this.fieldName = config.getOrFail( FIELD_NAME_CONFIG_PARAMETER ); this.windowSchema = new PortRuntimeSchemaBuilder( EXACT_FIELD_SET, asList( new RuntimeSchemaField( VALUE_FIELD, Double.class ), new RuntimeSchemaField( TUPLE_COUNT_FIELD, Integer.class ) ) ).build(); return scheduleWhenTuplesAvailableOnDefaultPort( 1 ); }  @Override SchedulingStrategy init( final InitCtx ctx ); @Override void invoke( final InvocationCtx ctx ); }
ExponentialMovingAverageAggregationOperator implements Operator { @Override public SchedulingStrategy init ( final InitCtx ctx ) { this.outputSchema = ctx.getOutputPortSchema( 0 ); final OperatorConfig config = ctx.getConfig(); this.weight = config.getOrFail( WEIGHT_CONFIG_PARAMETER ); this.fieldName = config.getOrFail( FIELD_NAME_CONFIG_PARAMETER ); this.windowSchema = new PortRuntimeSchemaBuilder( EXACT_FIELD_SET, asList( new RuntimeSchemaField( VALUE_FIELD, Double.class ), new RuntimeSchemaField( TUPLE_COUNT_FIELD, Integer.class ) ) ).build(); return scheduleWhenTuplesAvailableOnDefaultPort( 1 ); }  @Override SchedulingStrategy init( final InitCtx ctx ); @Override void invoke( final InvocationCtx ctx ); static final String WEIGHT_CONFIG_PARAMETER; static final String FIELD_NAME_CONFIG_PARAMETER; static final String VALUE_FIELD; }