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

Piping prune function through the VersionedStore factory method #476

Merged
merged 3 commits into from
Mar 12, 2014

Conversation

declerambaul
Copy link

Alternatively one could also pass a PrunedSpace directly, though I prefer passing a function. Either way it seems useful, as currently the only way to prune is to extend BatchedStore and override.

@ianoc
Copy link
Collaborator

ianoc commented Mar 11, 2014

The current approach would be to add a proxy batched store

new myClass(store: BatchedStore) extends ProxyBatchedStore...etc..

Though i've no issue with it being a constructor arg here. Will take a look when the build is green in more detail

@ianoc
Copy link
Collaborator

ianoc commented Mar 11, 2014

(restarted as looks like might just be transient test issues)

def apply[K, V](
rootPath: String,
versionsToKeep: Int = VersionedKeyValSource.defaultVersionsToKeep,
pruneFn: ((K,V), Timestamp) => Boolean = PrunedSpace.neverPruned.prune _)(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looking at this in more detail, it looks like this Should be a PrunedSpace, and if we want a PrunedSpace apply method that takes the pruning function?

def apply(fn: (K,V), Timestamp) => Boolean) = new PrunedSpace....

@declerambaul
Copy link
Author

Makes sense, updated accordingly.

@ianoc
Copy link
Collaborator

ianoc commented Mar 11, 2014

LGTM, will merge when green. Thanks!

ianoc added a commit that referenced this pull request Mar 12, 2014
Piping prune function through the VersionedStore factory method
@ianoc ianoc merged commit 5eebe77 into develop Mar 12, 2014
@ianoc ianoc deleted the dcl/prune branch March 12, 2014 16:50
@ianoc
Copy link
Collaborator

ianoc commented Mar 12, 2014

Merged, thanks!

snoble pushed a commit to snoble/summingbird that referenced this pull request Sep 8, 2017
Disable coveralls, shows up as builds pending that are long finished
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