-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #275 from ClickHouse/add-query-id
Adding a more comprehensive way of tracking queries across methods
- Loading branch information
Showing
12 changed files
with
186 additions
and
193 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
v1.0.8 | ||
v1.0.9 |
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
240 changes: 80 additions & 160 deletions
240
src/main/java/com/clickhouse/kafka/connect/sink/db/ClickHouseWriter.java
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
43 changes: 43 additions & 0 deletions
43
src/main/java/com/clickhouse/kafka/connect/util/QueryIdentifier.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,43 @@ | ||
package com.clickhouse.kafka.connect.util; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
public class QueryIdentifier { | ||
|
||
private static final Logger LOGGER = LoggerFactory.getLogger(QueryIdentifier.class); | ||
private final String topic; | ||
private final int partition; | ||
private final long minOffset; | ||
private final long maxOffset; | ||
private final String queryId; | ||
|
||
public QueryIdentifier(String topic, int partition, long minOffset, long maxOffset, String queryId) { | ||
this.topic = topic; | ||
this.partition = partition; | ||
this.minOffset = minOffset; | ||
this.maxOffset = maxOffset; | ||
this.queryId = queryId; | ||
} | ||
|
||
public String toString() { | ||
return String.format("Topic: [%s], Partition: [%s], MinOffset: [%s], MaxOffset: [%s], (QueryId: [%s])", | ||
topic, partition, minOffset, maxOffset, queryId); | ||
} | ||
|
||
public String getQueryId() { | ||
return queryId; | ||
} | ||
public String getTopic() { | ||
return topic; | ||
} | ||
public int getPartition() { | ||
return partition; | ||
} | ||
public long getMinOffset() { | ||
return minOffset; | ||
} | ||
public long getMaxOffset() { | ||
return maxOffset; | ||
} | ||
} |
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
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
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
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