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

[Feature][Connector-V2] Iceberg-sink supports writing data to branches #6697

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

sunxiaojian
Copy link
Contributor

@sunxiaojian sunxiaojian commented Apr 12, 2024

Purpose of this pull request

closed #6686

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

"sh", "-c", "cd " + CATALOG_DIR + " && tar -zxvf " + NAMESPACE_TAR);
try {
Process process = processBuilder.start();
// 等待命令执行完成
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use English comment

fileScanTask -> {
try {
DataFile file = fileScanTask.file();
// 构建文件的输入流
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@sunxiaojian sunxiaojian force-pushed the icebergsink-support-write-branch branch from 497f5b4 to 16fed67 Compare April 12, 2024 09:43
@sunxiaojian
Copy link
Contributor Author

@hailin0 PTAL

Copy link
Contributor

@hailin0 hailin0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update docs

};

@TestTemplate
public void testInsertAndCheckDataE2e(TestContainer container)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to validate iceberg.table.commit-branch="commit-branch"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to validate iceberg.table.commit-branch="commit-branch"

'loadDataFromIcebergTableBranch()' uses 'table.newScan().useRef(commitBranch)' to specify that data should be read from a branch.

@sunxiaojian sunxiaojian force-pushed the icebergsink-support-write-branch branch 2 times, most recently from c68c01c to f859c2d Compare April 15, 2024 08:50
@sunxiaojian
Copy link
Contributor Author

@hailin0 PTAL

@hailin0
Copy link
Contributor

hailin0 commented Apr 17, 2024

please check ci error or retry

@sunxiaojian sunxiaojian force-pushed the icebergsink-support-write-branch branch 2 times, most recently from 1474a4a to 0ef8ab9 Compare April 17, 2024 15:48
@sunxiaojian
Copy link
Contributor Author

please check ci error or retry

@hailin0 done

@@ -109,13 +109,20 @@ public class SinkConfig extends CommonConfig {
.defaultValue(DataSaveMode.APPEND_DATA)
.withDescription("data save mode");

public static final Option<String> TABLES_DEFAULT_COMMIT_BRANCH =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sunxiaojian sunxiaojian force-pushed the icebergsink-support-write-branch branch from 5e55397 to 4e8fa8e Compare April 18, 2024 03:35
Copy link
Contributor

@hailin0 hailin0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

}
}
} catch (IOException e) {
e.printStackTrace();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add to log message

log.error("Extract files failed with exit code " + exitCode);
}
} catch (IOException | InterruptedException e) {
e.printStackTrace();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add to log message

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add to log message

@hailin0 done

Copy link
Contributor

@TaoZex TaoZex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@EricJoy2048 EricJoy2048 merged commit e310353 into apache:dev Apr 22, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature][Connector-V2] Iceberg-sink supports writing data to branches
4 participants