flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Wilson <fajwil...@gmail.com>
Subject Re: Enabling JMX Reporter on a Local Mini Cluster
Date Mon, 08 Apr 2019 10:19:31 GMT
Originally I had:

*public static void *main(String[] args) {

StreamExecutionEnvironment env = StreamExecutionEnvironment.


This was nice because this would work just as well in my kubernetes
deployment as it did when I just ran the main directly.

However there’s no way to set configuration in the case where the local
environment is selected (when I run main directly).

I am currently writing:

Configuration conf = *new *Configuration();
StreamExecutionEnvironment env = LocalStreamEnvironment.
*createLocalEnvironment*(8, conf);

This is fair enough for experimentation I suppose. It just a shame that the
second bit of code is specific to the local environment.

However, I was thinking of using the JMXReporter in performance tests, so
it would be nice to find a general solution to this.

Perhaps I will just parameterise all my Pipeline classes by
StreamExecutionEvironment i.e.

*// constructor**public *FooPipeline(StreamExecutionEnvironment env) {


And drop in the standard environment or the test environment as
appropriate. This is simple enough but I was just emailing this list
because at first (before I started experimenting with metrics)  it seemed
that this wouldn’t be necessary.



On Fri, 5 Apr 2019 at 16:51, Frank Wilson <fajwilson@gmail.com> wrote:

> What's the best way to enable the JMX Reporter while I am developing an
> applicaiton in an IDE? The reason is I would like to experiment with adding
> detailed metrics to my pipelines (and also see what standard operators
> provide) without having to deploy to a regular cluster.
> Thanks,
> Frank

View raw message