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

Pipe: export tsfile sink #14111

Open
wants to merge 1 commit into
base: dev/1.3
Choose a base branch
from

Conversation

DanielWang2035
Copy link
Collaborator

No description provided.

Comment on lines +78 to +80
if (!exportPath.exists() && !exportPath.mkdirs()) {
throw new PipeException("Export TsFile path not exist and can't be created");
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (!exportPath.exists() && !exportPath.mkdirs()) {
throw new PipeException("Export TsFile path not exist and can't be created");
}
synchornized (ExportTsFileConnector.class) {
if (!exportPath.exists() && !exportPath.mkdirs()) {
throw new PipeException("Export TsFile path not exist and can't be created");
}
}


@Override
public void heartbeat() throws Exception {
handshake();
Copy link
Member

Choose a reason for hiding this comment

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

do nothing is better.


final PipeTsFileInsertionEvent event = (PipeTsFileInsertionEvent) tsFileInsertionEvent;
final File sourceTsFile = event.getTsFile();
final File targetPath = new File(exportPath, sourceTsFile.getName());
Copy link
Member

Choose a reason for hiding this comment

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

Different regions, the same name?

Copy link
Member

Choose a reason for hiding this comment

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

客户目录检查下载文件的时候,会不会往子目录去检测?需要确认

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems that sourceTsFile.getName() returns the name of pipe-pinned tsfiles, which include region id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants