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

Support for listing only cached links in refs command #2446

Closed
wants to merge 4 commits into from

Conversation

sivachandran
Copy link
Contributor

Added "--cached" option to "refs" command that lists only cached links. Also added "linksize" token in format to print the size of the link. By listing only cached refs and their sizes we can easily find the cache/download progress of an object.

License: MIT
Signed-off-by: Sivachandran [email protected]

cmds.BoolOption("edges", "e", "Emit edge format: `<from> -> <to>`."),
cmds.BoolOption("unique", "u", "Omit duplicate refs from output."),
cmds.BoolOption("recursive", "r", "Recursively list links of child nodes."),
cmds.BoolOption("cached", "List only links of child nodes cached locally"),
Copy link
Member

Choose a reason for hiding this comment

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

Needs final period.

@whyrusleeping
Copy link
Member

@sivachandran I finally got #2257 merged. If you want to continue on here, let me know.

Added "--cached" option to "refs" command that lists only cached links. Also added "linksize" token in format to print the size of the link. By listing only cached refs and their sizes we can easily find the cache/download progress of an object.

License: MIT
Signed-off-by: Sivachandran <[email protected]>
License: MIT
Signed-off-by: Sivachandran <[email protected]>
Link cached status was determined by checking the presence of link hash in blockstore. Now link cached status is determined by successfully getting node from DAG.

License: MIT
Signed-off-by: Sivachandran <[email protected]>
@sivachandran
Copy link
Contributor Author

@whyrusleeping Updated the changes based on PR #2257. But NodeGetter is not returning ErrNotFound when the node is not found, rather it returns "failed to fetch all nodes" error.

@sivachandran
Copy link
Contributor Author

#257

@whyrusleeping whyrusleeping added the need/review Needs a review label May 14, 2016
@whyrusleeping
Copy link
Member

@sivachandran pr #2257 has been merged, if you'd like to continue this PR that would be good. We'd love to have a generalized way to listed the subset of refs under a given hash that are cached locally for a 'best effort' pin mechanism for mfs. this is very relevant to that effort

@whyrusleeping
Copy link
Member

Has been idle for about a year. Closing for now. Please do feel free to reopen this as necessary. Closing old PRs just helps us more easily see what needs immediate attention

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

Successfully merging this pull request may close these issues.

3 participants