Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-21 Thread Till Rohrmann
Alright. Thanks for letting me know. I will take a look at the PR. Cheers, Till On Tue, Oct 20, 2020 at 8:00 PM Dan Hill wrote: > -others. > > I can't add you as a watcher to the issue (I lack permissions). > https://issues.apache.org/jira/projects/FLINK/issues/FLINK-19721?filter=reportedbyme >

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-16 Thread Till Rohrmann
Hi Dan, I think it is a good idea to use an exponential backoff strategy in the RpcGatewayRetriever. So from my side you can open an issue and a PR for fixing it. Cheers, Till On Fri, Oct 16, 2020 at 7:24 PM Dan Hill wrote: > To be clear, I'd be fine coding this. > > On Fri, Oct 16, 2020 at 9:

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-10 Thread Dan Hill
No, thanks! I used JobClient to getJobStatus and sleep if it was not terminal. I'll switch to this. On Sat, Oct 10, 2020 at 12:50 AM Aljoscha Krettek wrote: > Hi Dan, > > did you try using the JobClient you can get from the TableResult to wait > for job completion? You can get a CompletableFu

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-10 Thread Aljoscha Krettek
Hi Dan, did you try using the JobClient you can get from the TableResult to wait for job completion? You can get a CompletableFuture for the JobResult which should help you. Best, Aljoscha On 08.10.20 23:55, Dan Hill wrote: I figured out the issue. The join caused part of the job's executi

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-08 Thread Dan Hill
I figured out the issue. The join caused part of the job's execution to be delayed. I added my own hacky wait condition into the test to make sure the join job finishes first and it's fine. What common test utilities exist for Flink? I found flink/flink-test-utils-parent. I implemented a simpl

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-08 Thread Austin Cawley-Edwards
Can't comment on the SQL issues, but here's our exact setup for Bazel and Junit5 w/ the resource files approach: https://github.com/fintechstudios/vp-operator-demo-ff-virtual-2020/tree/master/tools/junit Best, Austin On Thu, Oct 8, 2020 at 2:41 AM Dan Hill wrote: > I was able to get finer grain

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-07 Thread Dan Hill
I was able to get finer grained logs showing. I switched from -Dlog4j.configuration to -Dlog4j.configurationFile and it worked. With my larger test case, I was hitting a silent log4j error. When I created a small test case to just test logging, I received a log4j error. Here is a tar

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-07 Thread Dan Hill
Switching to junit4 did not help. If I make a request to the url returned from MiniClusterWithClientResource.flinkCluster.getClusterClient().getWebInterfaceURL(), I get {"errors":["Not found."]}. I'm not sure if this is intentional. On Tue, Oct 6, 2020 at 4:16 PM Dan Hill wrote: > @Aljoscha

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-06 Thread Dan Hill
@Aljoscha - Thanks! That setup lets fixing the hacky absolute path reference. However, the actual log calls are not printing to the console. Only errors appear in my terminal window and the test logs. Maybe console logger does not work for this junit setup. I'll see if the file version works.

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-06 Thread Austin Cawley-Edwards
What Aljoscha suggested is what works for us! On Tue, Oct 6, 2020 at 6:58 PM Aljoscha Krettek wrote: > Hi Dan, > > to make the log properties file work this should do it: assuming the > log4j.properties is in //src/main/resources. You will need a BUILD.bazel > in that directory that has only the

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-06 Thread Aljoscha Krettek
Hi Dan, to make the log properties file work this should do it: assuming the log4j.properties is in //src/main/resources. You will need a BUILD.bazel in that directory that has only the line "exports_files(["log4j.properties"]). Then you can reference it in your test via "resources = ["//src/

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-06 Thread Dan Hill
I'm trying to use Table API for my job. I'll soon try to get a test working for my stream job. - I'll parameterize so I can have different sources and sink for tests. How should I mock out a Kafka source? For my test, I was planning on changing the input to be from a temp file (instead of Kafka).

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-06 Thread Dan Hill
Thanks! Great to know. I copied this junit5-jupiter-starter-bazel rule into my repository (I don't think junit5 is supported directly with java_test yet). I tried a few ways of bundling `log4j.properties` into

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-06 Thread Austin Cawley-Edwards
Oops, this is actually the JOIN issue thread [1]. Guess I should revise my previous "haven't had issues" statement hah. Sorry for the spam! [1]: apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Streaming-SQL-Job-Switches-to-FINISHED-before-all-records-processed-td38382.html On Tue, Oc

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-06 Thread Austin Cawley-Edwards
Unless it's related to this issue[1], which was w/ my JOIN and time characteristics, though not sure that applies for batch. Best, Austin [1]: apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Flink-SQL-Streaming-Join-Creates-Duplicates-td37764.html On Tue, Oct 6, 2020 at 6:20 PM Aus

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-06 Thread Austin Cawley-Edwards
Hey Dan, We use Junit5 and Bazel to run Flink SQL tests on a mini cluster and haven’t had issues, though we’re only testing on streaming jobs. Happy to help setting up logging with that if you’d like. Best, Austin On Tue, Oct 6, 2020 at 6:02 PM Dan Hill wrote: > I don't think any of the gotch

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-06 Thread Dan Hill
I don't think any of the gotchas apply to me (at the bottom of this link). https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/testing.html#junit-rule-miniclusterwithclientresource I'm assuming for a batch job that I don't have to do anything for: "You can implement a custom parallel

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-06 Thread Dan Hill
I've tried to enable additional logging for a few hours today. I think something with junit5 is swallowing the logs. I'm using Bazel and junit5. I setup MiniClusterResourceConfiguration using a custom extension. Are there any known issues with Flink and junit5? I can try switching to junit4. W

Re: Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-06 Thread Aljoscha Krettek
Hi Dan, there were some bugs and quirks in the MiniCluster that we recently fixed: - https://issues.apache.org/jira/browse/FLINK-19123 - https://issues.apache.org/jira/browse/FLINK-19264 But I think they are probably unrelated to your case. Could you enable logging and see from the logs whet

Issue with Flink - unrelated executeSql causes other executeSqls to fail.

2020-10-05 Thread Dan Hill
I'm writing a test for a batch job using MiniClusterResourceConfiguration. Here's a simple description of my working test case: 1) I use TableEnvironment.executeSql(...) to create a source and sink table using tmp filesystem directory. 2) I use executeSql to insert some test data into the source t