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

Tackle "merged" dir. issue after restarting realtime node #158

Merged
merged 2 commits into from
Jun 14, 2013
Merged

Tackle "merged" dir. issue after restarting realtime node #158

merged 2 commits into from
Jun 14, 2013

Conversation

quode
Copy link
Contributor

@quode quode commented Jun 7, 2013

There was an issue if you restart realtime node and merged dir is still there it will throw exceptions. To tackle this issue a check has been added. So now only persisted dir/files will be read and anything from "merged" will be avoided.

There was an issue if you restart realtime node and merged dir is still there it will throw exceptions. To tackle this issue a check has been added. So now only persisted dir/files will be read and anything from "merged" will be avoided.
final File[] sinkFiles = sinkDir.listFiles(new FilenameFilter() {
@Override
public boolean accept(File dir, String fileName) {
return !fileName.equalsIgnoreCase("merged");
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than just checking for "merged" the problem is actually that it cannot parse an int out of the word "merged". I'd be more comfortable if this were actually a parsing check:

return Ints.tryParse(fileName) != null;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok .. that sounds fine and I hope we won't be changing logic of putting numeric names.

Put a check to make sure that we're only looking for the folder those have number-only names, to avoid "merged" directory issue.
cheddar added a commit that referenced this pull request Jun 14, 2013
Tackle "merged" dir. issue after restarting realtime node
@cheddar cheddar merged commit 87b687b into apache:master Jun 14, 2013
himanshug pushed a commit to himanshug/druid that referenced this pull request Jan 20, 2016
cherry pick druid.io changes to be able to base ci_tests on community code
suneet-s referenced this pull request in suneet-s/druid Aug 11, 2020
jihoonson pushed a commit to jihoonson/druid that referenced this pull request Feb 3, 2021
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