-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
197 additions
and
113 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
src/main/java/com/vinted/flink/bigquery/metric/AsyncBigQueryStreamMetrics.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.vinted.flink.bigquery.metric; | ||
|
||
import java.util.concurrent.atomic.AtomicInteger; | ||
|
||
public class AsyncBigQueryStreamMetrics { | ||
|
||
private long batchCount = 0; | ||
private double batchSizeInMb = 0.0; | ||
private long splitBatchCount = 0; | ||
private int timeoutCount = 0; | ||
private final AtomicInteger inflightRequests = new AtomicInteger(0); | ||
|
||
public void incSplitCount() { | ||
splitBatchCount += 1; | ||
} | ||
public void updateSize(long sizeInBytes) { | ||
batchSizeInMb = sizeInBytes / 1000000.0; | ||
} | ||
|
||
public long getBatchCount() { | ||
return batchCount; | ||
} | ||
|
||
public void setBatchCount(long batchCount) { | ||
this.batchCount = batchCount; | ||
} | ||
|
||
public double getBatchSizeInMb() { | ||
return batchSizeInMb; | ||
} | ||
|
||
public long getSplitBatchCount() { | ||
return splitBatchCount; | ||
} | ||
|
||
public int getTimeoutCount() { | ||
return timeoutCount; | ||
} | ||
|
||
public void incrementTimeoutCount() { | ||
this.timeoutCount++; | ||
} | ||
|
||
public int getInflightRequests() { | ||
return inflightRequests.get(); | ||
} | ||
|
||
public void incrementInflightRequests() { | ||
this.inflightRequests.incrementAndGet(); | ||
} | ||
|
||
public void decrementInflightRequests() { | ||
this.inflightRequests.decrementAndGet(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 0 additions & 79 deletions
79
src/main/java/com/vinted/flink/bigquery/sink/async/AsyncBigQuerySinkBuilder.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.