-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output first and last query log entries for Teradata in summary section using shared state class #567
base: main
Are you sure you want to change the base?
Conversation
@misolt could you please review it? I implemented shared state approach and applied it for Teradata logs connectors for now, as this approach was the most voted one during discussion. If it is fine, later can apply for the rest of connectors. |
dumper/app/src/main/java/com/google/edwmigration/dumper/application/dumper/MetadataDumper.java
Show resolved
Hide resolved
dumper/app/src/main/java/com/google/edwmigration/dumper/application/dumper/MetadataDumper.java
Show resolved
Hide resolved
...src/test/java/com/google/edwmigration/dumper/application/dumper/QueryLogSharedStateTest.java
Outdated
Show resolved
Hide resolved
@@ -265,9 +272,26 @@ private boolean checkRequiredTaskSuccess( | |||
return true; | |||
} | |||
|
|||
private void outputFirstAndLastQueryLogEnries(SummaryLinePrinter linePrinter) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be helpful to add tests for the logic inside this method
import java.util.concurrent.ConcurrentMap; | ||
|
||
public class QueryLogSharedState { | ||
public static final ConcurrentMap<QueryLogEntry, ZonedDateTime> queryLogEntries = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The concurrent collection suggests that this class is designed for use from multiple threads. If this is the case, please document how this is done - is it fully thread-safe and what rules need to be followed by developers using it. If any guarantees provided by the class aren't obvious then it's also good to document them.
Finding first and last query log entries for Teradata and output in summary section of Dumper.
Current summary section:
Summary section with query log entries: