Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Feature/fix bugs hdfs #353

Merged
merged 4 commits into from
Nov 10, 2013
Merged

Feature/fix bugs hdfs #353

merged 4 commits into from
Nov 10, 2013

Conversation

ianoc
Copy link
Collaborator

@ianoc ianoc commented Nov 9, 2013

@johnynek Looking at how we were using this, there's no locking/state written out. Does it need it/do we have it somewhere else?

@ianoc
Copy link
Collaborator Author

ianoc commented Nov 9, 2013

Fixes #352

val keepers = versions.takeRight(versionsToKeep).toSet
versions
.filter(keepers.contains(_))
.foreach(deleteVersion(_))
Copy link
Collaborator

Choose a reason for hiding this comment

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

isn't this going to drop versions to keep?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't you want filterNot(keepers)? (note set extends function so that is legit.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

True, good catch -- Also do we actually need cleanup? I don't see it called.

@johnynek
Copy link
Collaborator

Looks great! Thanks for porting this!

@johnynek
Copy link
Collaborator

You are right. The HDFSState never writes that a job is running to prevent two from running at the same time. That would be really nice: try to create a file, and if that file is more recent than a threshold (to prevent a crash from deadlocking us), we stop in prepare. Else, we have created a file, and then we go on.

We didn't handle that yet:
#354

johnynek added a commit that referenced this pull request Nov 10, 2013
@johnynek johnynek merged commit 6029e6f into develop Nov 10, 2013
@johnynek johnynek deleted the feature/fix_bugs_hdfs branch November 10, 2013 19:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants