From 2f77cc4980961f3c2094ca17d02fb1943fd86a0d Mon Sep 17 00:00:00 2001 From: "vitaly.terentyev" Date: Wed, 11 May 2022 13:19:37 +0400 Subject: [PATCH] [BEAM-14081] Make BatchContextImpl class abstract --- .../org/apache/beam/sdk/io/cdap/context/BatchContextImpl.java | 2 +- .../apache/beam/sdk/io/cdap/context/BatchContextImplTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdks/java/io/cdap/src/main/java/org/apache/beam/sdk/io/cdap/context/BatchContextImpl.java b/sdks/java/io/cdap/src/main/java/org/apache/beam/sdk/io/cdap/context/BatchContextImpl.java index 9b255e270290..06b174062df0 100644 --- a/sdks/java/io/cdap/src/main/java/org/apache/beam/sdk/io/cdap/context/BatchContextImpl.java +++ b/sdks/java/io/cdap/src/main/java/org/apache/beam/sdk/io/cdap/context/BatchContextImpl.java @@ -43,7 +43,7 @@ /** Class for Batch, Sink and Stream CDAP wrapper classes that use it to provide common details. */ @SuppressWarnings({"TypeParameterUnusedInFormals", "nullness"}) -public class BatchContextImpl implements BatchContext { +public abstract class BatchContextImpl implements BatchContext { private final FailureCollectorWrapper failureCollector = new FailureCollectorWrapper(); diff --git a/sdks/java/io/cdap/src/test/java/org/apache/beam/sdk/io/cdap/context/BatchContextImplTest.java b/sdks/java/io/cdap/src/test/java/org/apache/beam/sdk/io/cdap/context/BatchContextImplTest.java index 6e58d832e8dd..8f679fe3fc08 100644 --- a/sdks/java/io/cdap/src/test/java/org/apache/beam/sdk/io/cdap/context/BatchContextImplTest.java +++ b/sdks/java/io/cdap/src/test/java/org/apache/beam/sdk/io/cdap/context/BatchContextImplTest.java @@ -35,7 +35,7 @@ public class BatchContextImplTest { public void getLogicalStartTime() { /** arrange */ Timestamp expectedStartTime = new Timestamp(System.currentTimeMillis()); - BatchContextImpl context = new BatchContextImpl(); + BatchContextImpl context = new BatchSourceContextImpl(); /** act */ long actualStartTime = context.getLogicalStartTime(); @@ -47,7 +47,7 @@ public void getLogicalStartTime() { @Test public void getFailureCollector() { /** arrange */ - BatchContextImpl context = new BatchContextImpl(); + BatchContextImpl context = new BatchSinkContextImpl(); /** act */ FailureCollector failureCollector = context.getFailureCollector();