Skip to content
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

Fix bq standard mode #15180

Merged
merged 7 commits into from
Aug 2, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ protected void startTracked() {
public void acceptTracked(final AirbyteMessage message) {
if (message.getType() == Type.STATE) {
lastStateMessage = message;
outputRecordCollector.accept(message);
} else if (message.getType() == Type.RECORD) {
processRecord(message);
} else {
LOGGER.warn("Unexpected message: {}", message.getType());
}
}

private void processRecord(AirbyteMessage message) {
private void processRecord(final AirbyteMessage message) {
final var pair = AirbyteStreamNameNamespacePair.fromRecordMessage(message.getRecord());
uploaderMap.get(pair).upload(message);
}
Expand All @@ -60,7 +61,7 @@ public void close(final boolean hasFailed) {
uploaderMap.values().forEach(uploader -> {
try {
uploader.close(hasFailed, outputRecordCollector, lastStateMessage);
} catch (Exception e) {
} catch (final Exception e) {
exceptionsThrown.add(e);
LOGGER.error("Exception while closing uploader {}", uploader, e);
}
Expand Down