Skip to content

Conversation

@ness-upenderchinthala
Copy link

No description provided.

Copy link

@pavel-hp pavel-hp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my comments.

Also I cannot pass Tests. Here is ./gradlew test results

➜  upender-flink-training git:(master) ✗ ./gradlew test  

Welcome to Gradle 7.1!

Here are the highlights of this release:
 - Faster incremental Java compilation
 - Easier source set configuration in the Kotlin DSL

For more details see https://docs.gradle.org/7.1/release-notes.html


> Task :hourly-tips:test

org.apache.flink.training.exercises.hourlytips.HourlyTipsTest > testMaxAcrossDrivers FAILED
    org.apache.flink.runtime.client.JobExecutionException at JobResult.java:144
        Caused by: org.apache.flink.runtime.JobException at ExecutionFailureHandler.java:138
            Caused by: java.lang.RuntimeException at TumblingEventTimeWindows.java:83

org.apache.flink.training.exercises.hourlytips.HourlyTipsTest > testOneDriverOneTip FAILED
    org.apache.flink.runtime.client.JobExecutionException at JobResult.java:144
        Caused by: org.apache.flink.runtime.JobException at ExecutionFailureHandler.java:138
            Caused by: java.lang.RuntimeException at TumblingEventTimeWindows.java:83

org.apache.flink.training.exercises.hourlytips.HourlyTipsTest > testTipsAreSummedByHour FAILED
    org.apache.flink.runtime.client.JobExecutionException at JobResult.java:144
        Caused by: org.apache.flink.runtime.JobException at ExecutionFailureHandler.java:138
            Caused by: java.lang.RuntimeException at TumblingEventTimeWindows.java:83

3 tests completed, 3 failed

> Task :hourly-tips:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':hourly-tips:test'.
> There were failing tests. See the report at: file:///upender-flink-training/hourly-tips/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8s
21 actionable tasks: 5 executed, 16 up-to-date
➜  upender-flink-training git:(master) ✗ 

@VisibleForTesting
public static class AlertFunction extends KeyedProcessFunction<Long, TaxiRide, Long> {

private ValueState<TaxiRide> rideState;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this class implement Serializable interface
It has to be transient
private transient ValueState<TaxiRide> rideState;
Also I recommend to specify
serialVersionUID
private static final long serialVersionUID = 1L;


public static class EnrichmentFunction
extends RichCoFlatMapFunction<TaxiRide, TaxiFare, RideAndFare> {
private ValueState<TaxiRide> rideState;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this class implement Serializable interface
It has to be transient
Also I recommend to specify
serialVersionUID

@ness-upenderchinthala
Copy link
Author

Updated suggested changes

@alpinegizmo
Copy link
Contributor

Thank you for your contribution.

However, we don't want the exercises to work out-of-the-box. Solutions are provided if you want to see how to satisfy each use case. The purpose of the exercise classes is to provide a starting point, so that you can create your own solutions without having to write the entire application from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants