this can be on one line (it can also be just `hadoopDataStream.foreach(hadoopFlushMethod.invoke(_))`)