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

JENA-1481, JENA-1586: Delete databases and expel from JVM #458

Merged
merged 1 commit into from Aug 12, 2018

Conversation

afs
Copy link
Member

@afs afs commented Aug 10, 2018

No description provided.

Copy link
Member

@ajs6f ajs6f left a comment

Choose a reason for hiding this comment

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

Two very small questions, but basically LGTM.

public static void deleteAll(Path start) {
// Walks down the tree and deletes directories on the way backup.
try {
Files.walkFileTree(start, new SimpleFileVisitor<Path>() {
Copy link
Member

Choose a reason for hiding this comment

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

Could this new SimpleFileVisitor be broken out as a static inner class?

Copy link
Member Author

Choose a reason for hiding this comment

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

Could do though I prefer to put the action code near to its usage, all in the method. (It is also an idiom (e.g. stackoverflow) to inline the visitor.)

Copy link
Member

Choose a reason for hiding this comment

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

I'm not worried about it. I'm always a bit suspicious on anon inner classes because of the occasional GC problems, but I think I'm letting my suspicions run away from me.

action.log.info(format("[%d] Deleted database files %s", action.id, pDatabase)) ;
}
} catch (RuntimeIOException e) {
e.printStackTrace();
Copy link
Member

Choose a reason for hiding this comment

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

Should this be sent to a logger?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, done.

Copy link
Member

@kinow kinow left a comment

Choose a reason for hiding this comment

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

Some comments added in the other PR.

@asfgit asfgit merged commit 5a51311 into apache:master Aug 12, 2018
@afs afs deleted the fuseki-db-delete branch August 12, 2018 09:59
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.

None yet

4 participants