@Override public void open(Configuration parameters) throws Exception { super.open(parameters); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); partCounter = 0; this.writer = writerTemplate.duplicate(); bucketState = new BucketState(); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); this.client = new SiteToSiteClient.Builder().fromConfig(clientConfig).build(); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); int subtaskIdx = getRuntimeContext().getIndexOfThisSubtask(); dos = new DataOutputStream( new BufferedOutputStream( new FileOutputStream(allPartitions.get(subtaskIdx)))); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); this.processingTimeService = ((StreamingRuntimeContext) getRuntimeContext()).getProcessingTimeService(); long currentProcessingTime = processingTimeService.getCurrentProcessingTime(); processingTimeService.registerTimer(currentProcessingTime + bucketCheckInterval, this); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); StreamingRuntimeContext context = (StreamingRuntimeContext) getRuntimeContext(); writer.open(context.getIndexOfThisSubtask(), context.getNumberOfParallelSubtasks()); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); RuntimeContext ctx = getRuntimeContext(); outputFormat.setRuntimeContext(ctx); outputFormat.open(ctx.getIndexOfThisSubtask(), ctx.getNumberOfParallelSubtasks()); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); state = new State<>(); processingTimeService = ((StreamingRuntimeContext) getRuntimeContext()).getProcessingTimeService(); long currentProcessingTime = processingTimeService.getCurrentProcessingTime(); processingTimeService.registerTimer(currentProcessingTime + inactiveBucketCheckInterval, this); this.clock = new Clock() { @Override public long currentTimeMillis() { return processingTimeService.getCurrentProcessingTime(); } }; }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); getRuntimeContext().addAccumulator(NUM_ELEMENTS_ACCUMULATOR, new IntCounter()); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); Preconditions.checkState(getRuntimeContext().getNumberOfParallelSubtasks() == 1); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); getRuntimeContext().addAccumulator(NUM_ELEMENTS_ACCUMULATOR, new IntCounter()); }
@Override public void open(final Configuration parameters) throws Exception { super.open(parameters); adder.initialise(); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); flushJedis = new Jedis(config.redisHost); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); flushJedis = new Jedis(config.redisHost); flushJedis.select(1); // select db 1 }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); StreamingRuntimeContext context = (StreamingRuntimeContext) getRuntimeContext(); // get the target stream stream = target == STD_OUT ? System.out : System.err; // set the prefix if we have a >1 parallelism prefix = (context.getNumberOfParallelSubtasks() > 1) ? ((context.getIndexOfThisSubtask() + 1) + "> ") : null; }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); influxDB = InfluxDBFactory.connect("http://localhost:8086", "admin", "admin"); influxDB.createDatabase(dataBaseName); influxDB.enableBatch(2000, 100, TimeUnit.MILLISECONDS); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); this.processingTimeService = ((StreamingRuntimeContext) getRuntimeContext()).getProcessingTimeService(); long currentProcessingTime = processingTimeService.getCurrentProcessingTime(); processingTimeService.registerTimer(currentProcessingTime + bucketCheckInterval, this); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); this.processingTimeService = ((StreamingRuntimeContext) getRuntimeContext()).getProcessingTimeService(); long currentProcessingTime = processingTimeService.getCurrentProcessingTime(); processingTimeService.registerTimer(currentProcessingTime + bucketCheckInterval, this); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); StreamingRuntimeContext context = (StreamingRuntimeContext) getRuntimeContext(); writer.open(context.getIndexOfThisSubtask(), context.getNumberOfParallelSubtasks()); }
@Override public void open(Configuration parameters) throws Exception { super.open(parameters); StreamingRuntimeContext context = (StreamingRuntimeContext) getRuntimeContext(); writer.open(context.getIndexOfThisSubtask(), context.getNumberOfParallelSubtasks()); }