Skip to content

Commit 1db521e

Browse files
committed
Removed qualified names
1 parent 28a931f commit 1db521e

File tree

31 files changed

+93
-189
lines changed

31 files changed

+93
-189
lines changed

flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/pattern/Pattern.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ public Pattern<T, F> oneOrMore() {
387387
* applied.
388388
* @throws MalformedPatternException if the quantifier is not applicable to this pattern.
389389
*/
390-
public Pattern<T, F> oneOrMore(@Nullable java.time.Duration windowTime) {
390+
public Pattern<T, F> oneOrMore(@Nullable Duration windowTime) {
391391
checkIfNoNotPattern();
392392
checkIfQuantifierApplied();
393393
this.quantifier = Quantifier.looping(quantifier.getConsumingStrategy());
@@ -417,7 +417,7 @@ public Pattern<T, F> greedy() {
417417
* @throws MalformedPatternException if the quantifier is not applicable to this pattern.
418418
*/
419419
public Pattern<T, F> times(int times) {
420-
return times(times, (java.time.Duration) null);
420+
return times(times, null);
421421
}
422422

423423
/**
@@ -429,7 +429,7 @@ public Pattern<T, F> times(int times) {
429429
* @return The same pattern with number of times applied
430430
* @throws MalformedPatternException if the quantifier is not applicable to this pattern.
431431
*/
432-
public Pattern<T, F> times(int times, @Nullable java.time.Duration windowTime) {
432+
public Pattern<T, F> times(int times, @Nullable Duration windowTime) {
433433
checkIfNoNotPattern();
434434
checkIfQuantifierApplied();
435435
Preconditions.checkArgument(times > 0, "You should give a positive number greater than 0.");
@@ -447,7 +447,7 @@ public Pattern<T, F> times(int times, @Nullable java.time.Duration windowTime) {
447447
* @throws MalformedPatternException if the quantifier is not applicable to this pattern.
448448
*/
449449
public Pattern<T, F> times(int from, int to) {
450-
return times(from, to, (java.time.Duration) null);
450+
return times(from, to, null);
451451
}
452452

453453
/**
@@ -460,7 +460,7 @@ public Pattern<T, F> times(int from, int to) {
460460
* @return The same pattern with the number of times range applied
461461
* @throws MalformedPatternException if the quantifier is not applicable to this pattern.
462462
*/
463-
public Pattern<T, F> times(int from, int to, @Nullable java.time.Duration windowTime) {
463+
public Pattern<T, F> times(int from, int to, @Nullable Duration windowTime) {
464464
checkIfNoNotPattern();
465465
checkIfQuantifierApplied();
466466
this.quantifier = Quantifier.times(quantifier.getConsumingStrategy());
@@ -481,7 +481,7 @@ public Pattern<T, F> times(int from, int to, @Nullable java.time.Duration window
481481
* @throws MalformedPatternException if the quantifier is not applicable to this pattern.
482482
*/
483483
public Pattern<T, F> timesOrMore(int times) {
484-
return timesOrMore(times, (java.time.Duration) null);
484+
return timesOrMore(times, null);
485485
}
486486

487487
/**
@@ -496,7 +496,7 @@ public Pattern<T, F> timesOrMore(int times) {
496496
* applied.
497497
* @throws MalformedPatternException if the quantifier is not applicable to this pattern.
498498
*/
499-
public Pattern<T, F> timesOrMore(int times, @Nullable java.time.Duration windowTime) {
499+
public Pattern<T, F> timesOrMore(int times, @Nullable Duration windowTime) {
500500
checkIfNoNotPattern();
501501
checkIfQuantifierApplied();
502502
this.quantifier = Quantifier.looping(quantifier.getConsumingStrategy());

flink-runtime/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
import org.apache.flink.util.OutputTag;
6262
import org.apache.flink.util.Preconditions;
6363

64+
import java.time.Duration;
65+
6466
import static org.apache.flink.util.Preconditions.checkArgument;
6567
import static org.apache.flink.util.Preconditions.checkNotNull;
6668

@@ -133,7 +135,7 @@ public AllWindowedStream<T, W> trigger(Trigger<? super T, ? super W> trigger) {
133135
* <p>Setting an allowed lateness is only valid for event-time windows.
134136
*/
135137
@PublicEvolving
136-
public AllWindowedStream<T, W> allowedLateness(java.time.Duration lateness) {
138+
public AllWindowedStream<T, W> allowedLateness(Duration lateness) {
137139
final long millis = lateness.toMillis();
138140
checkArgument(millis >= 0, "The allowed lateness cannot be negative.");
139141

@@ -144,7 +146,7 @@ public AllWindowedStream<T, W> allowedLateness(java.time.Duration lateness) {
144146
/**
145147
* Send late arriving data to the side output identified by the given {@link OutputTag}. Data is
146148
* considered late after the watermark has passed the end of the window plus the allowed
147-
* lateness set using {@link #allowedLateness(java.time.Duration)}.
149+
* lateness set using {@link #allowedLateness(Duration)}.
148150
*
149151
* <p>You can get the stream of late data using {@link
150152
* SingleOutputStreamOperator#getSideOutput(OutputTag)} on the {@link

flink-runtime/src/main/java/org/apache/flink/streaming/api/datastream/CoGroupedStreams.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import javax.annotation.Nullable;
4646

4747
import java.io.IOException;
48+
import java.time.Duration;
4849
import java.util.ArrayList;
4950
import java.util.List;
5051
import java.util.Objects;
@@ -204,7 +205,7 @@ public <W extends Window> WithWindow<T1, T2, KEY, W> window(
204205
assigner,
205206
null,
206207
null,
207-
(java.time.Duration) null);
208+
null);
208209
}
209210
}
210211
}
@@ -236,7 +237,7 @@ public static class WithWindow<T1, T2, KEY, W extends Window> {
236237

237238
private final Evictor<? super TaggedUnion<T1, T2>, ? super W> evictor;
238239

239-
@Nullable private final java.time.Duration allowedLateness;
240+
@Nullable private final Duration allowedLateness;
240241

241242
private WindowedStream<TaggedUnion<T1, T2>, KEY, W> windowedStream;
242243

@@ -249,7 +250,7 @@ protected WithWindow(
249250
WindowAssigner<? super TaggedUnion<T1, T2>, W> windowAssigner,
250251
Trigger<? super TaggedUnion<T1, T2>, ? super W> trigger,
251252
Evictor<? super TaggedUnion<T1, T2>, ? super W> evictor,
252-
@Nullable java.time.Duration allowedLateness) {
253+
@Nullable Duration allowedLateness) {
253254
this.input1 = input1;
254255
this.input2 = input2;
255256

@@ -305,11 +306,10 @@ public WithWindow<T1, T2, KEY, W> evictor(
305306
/**
306307
* Sets the time by which elements are allowed to be late.
307308
*
308-
* @see WindowedStream#allowedLateness(java.time.Duration)
309+
* @see WindowedStream#allowedLateness(Duration)
309310
*/
310311
@PublicEvolving
311-
public WithWindow<T1, T2, KEY, W> allowedLateness(
312-
@Nullable java.time.Duration newLateness) {
312+
public WithWindow<T1, T2, KEY, W> allowedLateness(@Nullable Duration newLateness) {
313313
return new WithWindow<>(
314314
input1,
315315
input2,
@@ -426,7 +426,7 @@ public <T> SingleOutputStreamOperator<T> with(
426426
}
427427

428428
@VisibleForTesting
429-
Optional<java.time.Duration> getAllowedLatenessDuration() {
429+
Optional<Duration> getAllowedLatenessDuration() {
430430
return Optional.ofNullable(allowedLateness);
431431
}
432432

flink-runtime/src/main/java/org/apache/flink/streaming/api/datastream/JoinedStreams.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
import javax.annotation.Nullable;
3838

39+
import java.time.Duration;
3940
import java.util.Optional;
4041

4142
import static java.util.Objects.requireNonNull;
@@ -190,7 +191,7 @@ public <W extends Window> WithWindow<T1, T2, KEY, W> window(
190191
assigner,
191192
null,
192193
null,
193-
(java.time.Duration) null);
194+
null);
194195
}
195196
}
196197
}
@@ -222,7 +223,7 @@ public static class WithWindow<T1, T2, KEY, W extends Window> {
222223

223224
private final Evictor<? super TaggedUnion<T1, T2>, ? super W> evictor;
224225

225-
@Nullable private final java.time.Duration allowedLateness;
226+
@Nullable private final Duration allowedLateness;
226227

227228
private CoGroupedStreams.WithWindow<T1, T2, KEY, W> coGroupedWindowedStream;
228229

@@ -236,7 +237,7 @@ protected WithWindow(
236237
WindowAssigner<? super TaggedUnion<T1, T2>, W> windowAssigner,
237238
Trigger<? super TaggedUnion<T1, T2>, ? super W> trigger,
238239
Evictor<? super TaggedUnion<T1, T2>, ? super W> evictor,
239-
@Nullable java.time.Duration allowedLateness) {
240+
@Nullable Duration allowedLateness) {
240241

241242
this.input1 = requireNonNull(input1);
242243
this.input2 = requireNonNull(input2);
@@ -294,11 +295,10 @@ public WithWindow<T1, T2, KEY, W> evictor(
294295
/**
295296
* Sets the time by which elements are allowed to be late.
296297
*
297-
* @see WindowedStream#allowedLateness(java.time.Duration)
298+
* @see WindowedStream#allowedLateness(Duration)
298299
*/
299300
@PublicEvolving
300-
public WithWindow<T1, T2, KEY, W> allowedLateness(
301-
@Nullable java.time.Duration newLateness) {
301+
public WithWindow<T1, T2, KEY, W> allowedLateness(@Nullable Duration newLateness) {
302302
return new WithWindow<>(
303303
input1,
304304
input2,
@@ -486,7 +486,7 @@ public <T> SingleOutputStreamOperator<T> with(
486486
}
487487

488488
@VisibleForTesting
489-
Optional<java.time.Duration> getAllowedLatenessDuration() {
489+
Optional<Duration> getAllowedLatenessDuration() {
490490
return Optional.ofNullable(allowedLateness);
491491
}
492492

flink-runtime/src/main/java/org/apache/flink/streaming/api/datastream/KeyedStream.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,7 @@ public <R> SingleOutputStreamOperator<R> process(
429429

430430
/**
431431
* Join elements of this {@link KeyedStream} with elements of another {@link KeyedStream} over a
432-
* time interval that can be specified with {@link IntervalJoin#between(java.time.Duration,
433-
* java.time.Duration)}.
432+
* time interval that can be specified with {@link IntervalJoin#between(Duration, Duration)}.
434433
*
435434
* @param otherStream The other keyed stream to join this keyed stream with
436435
* @param <T1> Type parameter of elements in the other stream
@@ -500,8 +499,7 @@ public IntervalJoin<T1, T2, KEY> inProcessingTime() {
500499
* @param upperBound The upper bound. Needs to be bigger than or equal to the lowerBound
501500
*/
502501
@PublicEvolving
503-
public IntervalJoined<T1, T2, KEY> between(
504-
java.time.Duration lowerBound, java.time.Duration upperBound) {
502+
public IntervalJoined<T1, T2, KEY> between(Duration lowerBound, Duration upperBound) {
505503
if (timeBehaviour != TimeBehaviour.EventTime) {
506504
throw new UnsupportedTimeCharacteristicException(
507505
"Time-bounded stream joins are only supported in event time");

flink-runtime/src/main/java/org/apache/flink/streaming/api/datastream/WindowedStream.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
import org.apache.flink.streaming.runtime.operators.windowing.WindowOperatorBuilder;
4343
import org.apache.flink.util.OutputTag;
4444

45+
import java.time.Duration;
46+
4547
import static org.apache.flink.util.Preconditions.checkNotNull;
4648

4749
/**
@@ -104,15 +106,15 @@ public WindowedStream<T, K, W> trigger(Trigger<? super T, ? super W> trigger) {
104106
* <p>Setting an allowed lateness is only valid for event-time windows.
105107
*/
106108
@PublicEvolving
107-
public WindowedStream<T, K, W> allowedLateness(java.time.Duration lateness) {
109+
public WindowedStream<T, K, W> allowedLateness(Duration lateness) {
108110
builder.allowedLateness(lateness);
109111
return this;
110112
}
111113

112114
/**
113115
* Send late arriving data to the side output identified by the given {@link OutputTag}. Data is
114116
* considered late after the watermark has passed the end of the window plus the allowed
115-
* lateness set using {@link #allowedLateness(java.time.Duration)}.
117+
* lateness set using {@link #allowedLateness(Duration)}.
116118
*
117119
* <p>You can get the stream of late data using {@link
118120
* SingleOutputStreamOperator#getSideOutput(OutputTag)} on the {@link

flink-runtime/src/main/java/org/apache/flink/streaming/api/windowing/assigners/SlidingEventTimeWindows.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.apache.flink.streaming.api.windowing.triggers.Trigger;
2727
import org.apache.flink.streaming.api.windowing.windows.TimeWindow;
2828

29+
import java.time.Duration;
2930
import java.util.ArrayList;
3031
import java.util.Collection;
3132
import java.util.List;
@@ -115,7 +116,7 @@ public String toString() {
115116
* @param slide The slide interval of the generated windows.
116117
* @return The time policy.
117118
*/
118-
public static SlidingEventTimeWindows of(java.time.Duration size, java.time.Duration slide) {
119+
public static SlidingEventTimeWindows of(Duration size, Duration slide) {
119120
return new SlidingEventTimeWindows(size.toMillis(), slide.toMillis(), 0);
120121
}
121122

@@ -138,8 +139,7 @@ public static SlidingEventTimeWindows of(java.time.Duration size, java.time.Dura
138139
* @param offset The offset which window start would be shifted by.
139140
* @return The time policy.
140141
*/
141-
public static SlidingEventTimeWindows of(
142-
java.time.Duration size, java.time.Duration slide, java.time.Duration offset) {
142+
public static SlidingEventTimeWindows of(Duration size, Duration slide, Duration offset) {
143143
return new SlidingEventTimeWindows(size.toMillis(), slide.toMillis(), offset.toMillis());
144144
}
145145

flink-runtime/src/main/java/org/apache/flink/streaming/api/windowing/assigners/SlidingProcessingTimeWindows.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.apache.flink.streaming.api.windowing.triggers.Trigger;
2727
import org.apache.flink.streaming.api.windowing.windows.TimeWindow;
2828

29+
import java.time.Duration;
2930
import java.util.ArrayList;
3031
import java.util.Collection;
3132
import java.util.List;
@@ -109,8 +110,7 @@ public String toString() {
109110
* @param slide The slide interval of the generated windows.
110111
* @return The time policy.
111112
*/
112-
public static SlidingProcessingTimeWindows of(
113-
java.time.Duration size, java.time.Duration slide) {
113+
public static SlidingProcessingTimeWindows of(Duration size, Duration slide) {
114114
return new SlidingProcessingTimeWindows(size.toMillis(), slide.toMillis(), 0);
115115
}
116116

@@ -133,8 +133,7 @@ public static SlidingProcessingTimeWindows of(
133133
* @param offset The offset which window start would be shifted by.
134134
* @return The time policy.
135135
*/
136-
public static SlidingProcessingTimeWindows of(
137-
java.time.Duration size, java.time.Duration slide, java.time.Duration offset) {
136+
public static SlidingProcessingTimeWindows of(Duration size, Duration slide, Duration offset) {
138137
return new SlidingProcessingTimeWindows(
139138
size.toMillis(), slide.toMillis(), offset.toMillis());
140139
}

flink-runtime/src/main/java/org/apache/flink/streaming/api/windowing/assigners/TumblingEventTimeWindows.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.apache.flink.streaming.api.windowing.triggers.Trigger;
2727
import org.apache.flink.streaming.api.windowing.windows.TimeWindow;
2828

29+
import java.time.Duration;
2930
import java.util.Collection;
3031
import java.util.Collections;
3132

@@ -109,7 +110,7 @@ public String toString() {
109110
* @param size The size of the generated windows.
110111
* @return The time policy.
111112
*/
112-
public static TumblingEventTimeWindows of(java.time.Duration size) {
113+
public static TumblingEventTimeWindows of(Duration size) {
113114
return new TumblingEventTimeWindows(size.toMillis(), 0, WindowStagger.ALIGNED);
114115
}
115116

@@ -130,7 +131,7 @@ public static TumblingEventTimeWindows of(java.time.Duration size) {
130131
* @param size The size of the generated windows.
131132
* @param offset The offset which window start would be shifted by.
132133
*/
133-
public static TumblingEventTimeWindows of(java.time.Duration size, java.time.Duration offset) {
134+
public static TumblingEventTimeWindows of(Duration size, Duration offset) {
134135
return new TumblingEventTimeWindows(
135136
size.toMillis(), offset.toMillis(), WindowStagger.ALIGNED);
136137
}
@@ -146,7 +147,7 @@ public static TumblingEventTimeWindows of(java.time.Duration size, java.time.Dur
146147
*/
147148
@PublicEvolving
148149
public static TumblingEventTimeWindows of(
149-
java.time.Duration size, java.time.Duration offset, WindowStagger windowStagger) {
150+
Duration size, Duration offset, WindowStagger windowStagger) {
150151
return new TumblingEventTimeWindows(size.toMillis(), offset.toMillis(), windowStagger);
151152
}
152153

flink-runtime/src/main/java/org/apache/flink/streaming/api/windowing/assigners/TumblingProcessingTimeWindows.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.apache.flink.streaming.api.windowing.triggers.Trigger;
2727
import org.apache.flink.streaming.api.windowing.windows.TimeWindow;
2828

29+
import java.time.Duration;
2930
import java.util.Collection;
3031
import java.util.Collections;
3132

@@ -106,7 +107,7 @@ public String toString() {
106107
* @param size The size of the generated windows.
107108
* @return The time policy.
108109
*/
109-
public static TumblingProcessingTimeWindows of(java.time.Duration size) {
110+
public static TumblingProcessingTimeWindows of(Duration size) {
110111
return new TumblingProcessingTimeWindows(size.toMillis(), 0, WindowStagger.ALIGNED);
111112
}
112113

@@ -128,8 +129,7 @@ public static TumblingProcessingTimeWindows of(java.time.Duration size) {
128129
* @param offset The offset which window start would be shifted by.
129130
* @return The time policy.
130131
*/
131-
public static TumblingProcessingTimeWindows of(
132-
java.time.Duration size, java.time.Duration offset) {
132+
public static TumblingProcessingTimeWindows of(Duration size, Duration offset) {
133133
return new TumblingProcessingTimeWindows(
134134
size.toMillis(), offset.toMillis(), WindowStagger.ALIGNED);
135135
}
@@ -146,7 +146,7 @@ public static TumblingProcessingTimeWindows of(
146146
*/
147147
@PublicEvolving
148148
public static TumblingProcessingTimeWindows of(
149-
java.time.Duration size, java.time.Duration offset, WindowStagger windowStagger) {
149+
Duration size, Duration offset, WindowStagger windowStagger) {
150150
return new TumblingProcessingTimeWindows(size.toMillis(), offset.toMillis(), windowStagger);
151151
}
152152

0 commit comments

Comments
 (0)