Skip to content

Commit ebe7744

Browse files
fix typo (#6611)
1 parent 831d002 commit ebe7744

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/flowcontrol/FlowControlGate.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ public class FlowControlGate {
3232

3333
private FlowControlGate(FlowControlStrategy flowControlStrategy) {
3434
final int bytesPerSecond = flowControlStrategy.getBytesPerSecond();
35-
final int countPreSecond = flowControlStrategy.getCountPreSecond();
35+
final int countPerSecond = flowControlStrategy.getCountPerSecond();
3636
this.bytesRateLimiter =
3737
bytesPerSecond == DEFAULT_VALUE
3838
? Optional.empty()
3939
: Optional.of(RateLimiter.create(bytesPerSecond));
4040
this.countRateLimiter =
41-
countPreSecond == DEFAULT_VALUE
41+
countPerSecond == DEFAULT_VALUE
4242
? Optional.empty()
43-
: Optional.of(RateLimiter.create(countPreSecond));
43+
: Optional.of(RateLimiter.create(countPerSecond));
4444
}
4545

4646
public void audit(SeaTunnelRow row) {

seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/flowcontrol/FlowControlStrategy.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,23 @@ public final class FlowControlStrategy {
2929

3030
private final int bytesPerSecond;
3131

32-
private final int countPreSecond;
32+
private final int countPerSecond;
3333

34-
FlowControlStrategy(int bytesPerSecond, int countPreSecond) {
35-
if (bytesPerSecond <= 0 || countPreSecond <= 0) {
34+
FlowControlStrategy(int bytesPerSecond, int countPerSecond) {
35+
if (bytesPerSecond <= 0 || countPerSecond <= 0) {
3636
throw new IllegalArgumentException(
37-
"bytesPerSecond and countPreSecond must be positive");
37+
"bytesPerSecond and countPerSecond must be positive");
3838
}
3939
this.bytesPerSecond = bytesPerSecond;
40-
this.countPreSecond = countPreSecond;
40+
this.countPerSecond = countPerSecond;
4141
}
4242

4343
public int getBytesPerSecond() {
4444
return bytesPerSecond;
4545
}
4646

47-
public int getCountPreSecond() {
48-
return countPreSecond;
47+
public int getCountPerSecond() {
48+
return countPerSecond;
4949
}
5050

5151
public static Builder builder() {
@@ -56,7 +56,7 @@ public static class Builder {
5656

5757
private int bytesPerSecond = Integer.MAX_VALUE;
5858

59-
private int countPreSecond = Integer.MAX_VALUE;
59+
private int countPerSecond = Integer.MAX_VALUE;
6060

6161
private Builder() {}
6262

@@ -65,29 +65,29 @@ public Builder bytesPerSecond(int bytesPerSecond) {
6565
return this;
6666
}
6767

68-
public Builder countPerSecond(int countPreSecond) {
69-
this.countPreSecond = countPreSecond;
68+
public Builder countPerSecond(int countPerSecond) {
69+
this.countPerSecond = countPerSecond;
7070
return this;
7171
}
7272

7373
public FlowControlStrategy build() {
74-
return new FlowControlStrategy(bytesPerSecond, countPreSecond);
74+
return new FlowControlStrategy(bytesPerSecond, countPerSecond);
7575
}
7676
}
7777

78-
public static FlowControlStrategy of(int bytesPerSecond, int countPreSecond) {
78+
public static FlowControlStrategy of(int bytesPerSecond, int countPerSecond) {
7979
return FlowControlStrategy.builder()
8080
.bytesPerSecond(bytesPerSecond)
81-
.countPerSecond(countPreSecond)
81+
.countPerSecond(countPerSecond)
8282
.build();
8383
}
8484

8585
public static FlowControlStrategy ofBytes(int bytesPerSecond) {
8686
return FlowControlStrategy.builder().bytesPerSecond(bytesPerSecond).build();
8787
}
8888

89-
public static FlowControlStrategy ofCount(int countPreSecond) {
90-
return FlowControlStrategy.builder().countPerSecond(countPreSecond).build();
89+
public static FlowControlStrategy ofCount(int countPerSecond) {
90+
return FlowControlStrategy.builder().countPerSecond(countPerSecond).build();
9191
}
9292

9393
public static FlowControlStrategy fromMap(Map<String, Object> envOption) {

0 commit comments

Comments
 (0)