Skip to content

Commit

Permalink
Number of Copies required to be >2
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin C Presley committed Jul 25, 2021
1 parent 0513c04 commit d1c5c61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/src/specification/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Insertion
---------

Inserts a local file given by the path within a hydra repo associated with the following Name. Insertion
requires the number nodes to be ``2xNum_Copies`` and it is advised to have the number of copies at least be 2
requires the number nodes to be ``2xNum_Copies`` and it is required to have the number of copies at least be 2
so that if one fails, nodes can download the file from the other node that has the file.

Assuming this is ran being in the root directory, the following is a template on ways to run
Expand Down
7 changes: 5 additions & 2 deletions ndn_hydra/client/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,11 @@ def interpret_help() -> None:
# Configure Arguments
if vars.function == "insert":
if not os.path.isfile(vars.path):
print('Error: path specified is not an actual file. Unable to insert.')
sys.exit()
print('Error: path specified is not an actual file. Unable to insert.')
sys.exit()
if vars.copies < 2:
print('Error: insufficient number of copies, must be 2 or above.')
sys.exit()
return vars

class HydraClient():
Expand Down

0 comments on commit d1c5c61

Please sign in to comment.