This is an automated email from the ASF dual-hosted git repository.

wanghailin pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new ebe7744221 fix typo (#6611)
ebe7744221 is described below

commit ebe7744221ca51e4c2258895702e05f2fd3fbaae
Author: xiaochen <[email protected]>
AuthorDate: Fri Mar 29 10:36:34 2024 +0800

    fix typo (#6611)
---
 .../core/starter/flowcontrol/FlowControlGate.java  |  6 ++---
 .../starter/flowcontrol/FlowControlStrategy.java   | 30 +++++++++++-----------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git 
a/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/flowcontrol/FlowControlGate.java
 
b/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/flowcontrol/FlowControlGate.java
index 5d06366e3a..fed891a5eb 100644
--- 
a/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/flowcontrol/FlowControlGate.java
+++ 
b/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/flowcontrol/FlowControlGate.java
@@ -32,15 +32,15 @@ public class FlowControlGate {
 
     private FlowControlGate(FlowControlStrategy flowControlStrategy) {
         final int bytesPerSecond = flowControlStrategy.getBytesPerSecond();
-        final int countPreSecond = flowControlStrategy.getCountPreSecond();
+        final int countPerSecond = flowControlStrategy.getCountPerSecond();
         this.bytesRateLimiter =
                 bytesPerSecond == DEFAULT_VALUE
                         ? Optional.empty()
                         : Optional.of(RateLimiter.create(bytesPerSecond));
         this.countRateLimiter =
-                countPreSecond == DEFAULT_VALUE
+                countPerSecond == DEFAULT_VALUE
                         ? Optional.empty()
-                        : Optional.of(RateLimiter.create(countPreSecond));
+                        : Optional.of(RateLimiter.create(countPerSecond));
     }
 
     public void audit(SeaTunnelRow row) {
diff --git 
a/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/flowcontrol/FlowControlStrategy.java
 
b/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/flowcontrol/FlowControlStrategy.java
index 923dccee0d..2a41362724 100644
--- 
a/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/flowcontrol/FlowControlStrategy.java
+++ 
b/seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/flowcontrol/FlowControlStrategy.java
@@ -29,23 +29,23 @@ public final class FlowControlStrategy {
 
     private final int bytesPerSecond;
 
-    private final int countPreSecond;
+    private final int countPerSecond;
 
-    FlowControlStrategy(int bytesPerSecond, int countPreSecond) {
-        if (bytesPerSecond <= 0 || countPreSecond <= 0) {
+    FlowControlStrategy(int bytesPerSecond, int countPerSecond) {
+        if (bytesPerSecond <= 0 || countPerSecond <= 0) {
             throw new IllegalArgumentException(
-                    "bytesPerSecond and countPreSecond must be positive");
+                    "bytesPerSecond and countPerSecond must be positive");
         }
         this.bytesPerSecond = bytesPerSecond;
-        this.countPreSecond = countPreSecond;
+        this.countPerSecond = countPerSecond;
     }
 
     public int getBytesPerSecond() {
         return bytesPerSecond;
     }
 
-    public int getCountPreSecond() {
-        return countPreSecond;
+    public int getCountPerSecond() {
+        return countPerSecond;
     }
 
     public static Builder builder() {
@@ -56,7 +56,7 @@ public final class FlowControlStrategy {
 
         private int bytesPerSecond = Integer.MAX_VALUE;
 
-        private int countPreSecond = Integer.MAX_VALUE;
+        private int countPerSecond = Integer.MAX_VALUE;
 
         private Builder() {}
 
@@ -65,20 +65,20 @@ public final class FlowControlStrategy {
             return this;
         }
 
-        public Builder countPerSecond(int countPreSecond) {
-            this.countPreSecond = countPreSecond;
+        public Builder countPerSecond(int countPerSecond) {
+            this.countPerSecond = countPerSecond;
             return this;
         }
 
         public FlowControlStrategy build() {
-            return new FlowControlStrategy(bytesPerSecond, countPreSecond);
+            return new FlowControlStrategy(bytesPerSecond, countPerSecond);
         }
     }
 
-    public static FlowControlStrategy of(int bytesPerSecond, int 
countPreSecond) {
+    public static FlowControlStrategy of(int bytesPerSecond, int 
countPerSecond) {
         return FlowControlStrategy.builder()
                 .bytesPerSecond(bytesPerSecond)
-                .countPerSecond(countPreSecond)
+                .countPerSecond(countPerSecond)
                 .build();
     }
 
@@ -86,8 +86,8 @@ public final class FlowControlStrategy {
         return 
FlowControlStrategy.builder().bytesPerSecond(bytesPerSecond).build();
     }
 
-    public static FlowControlStrategy ofCount(int countPreSecond) {
-        return 
FlowControlStrategy.builder().countPerSecond(countPreSecond).build();
+    public static FlowControlStrategy ofCount(int countPerSecond) {
+        return 
FlowControlStrategy.builder().countPerSecond(countPerSecond).build();
     }
 
     public static FlowControlStrategy fromMap(Map<String, Object> envOption) {

Reply via email to