Skip to content

Commit

Permalink
Merge pull request #417 from CPSSD/release-0.5.0
Browse files Browse the repository at this point in the history
Release 0.5.0
  • Loading branch information
Conor Griffin authored Mar 15, 2018
2 parents 87ecbe4 + c1b33a0 commit 5ace12c
Show file tree
Hide file tree
Showing 70 changed files with 4,389 additions and 724 deletions.
682 changes: 546 additions & 136 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cli"
version = "0.3.0"
version = "0.5.0"
authors = ["Cerberus Authors <[email protected]>"]

[dependencies]
Expand All @@ -11,3 +11,4 @@ error-chain = "0.11.0"
grpc = "0.2.1"
prettytable-rs = "^0.6"
uuid = { version = "0.5", features = ["v4"] }
util = { path = "../util" }
4 changes: 4 additions & 0 deletions cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ extern crate grpc;
#[macro_use]
extern crate prettytable;
extern crate uuid;
extern crate util;

extern crate cerberus_proto;

Expand Down Expand Up @@ -51,7 +52,10 @@ fn run() -> Result<()> {
println!("Getting Cluster Status...");
runner::cluster_status(&client)
}
("cancel", sub) => runner::cancel(&client, sub),
("status", Some(sub)) => runner::status(&client, sub),
("upload", Some(sub)) => runner::upload(&master_addr, sub),
("download", Some(sub)) => runner::download(&master_addr, sub),
_ => Err(matches.usage().into()),
}
}
59 changes: 59 additions & 0 deletions cli/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,65 @@ pub fn parse_command_line<'a>() -> ArgMatches<'a> {
.takes_value(true)
.default_value("")
.required(false),
)
.arg(
Arg::with_name("priority")
.long("priority")
.short("p")
.help("Priority of the MapReduce. Valid values are 1 to 10")
.takes_value(true)
.required(false),
)
)
.subcommand(
SubCommand::with_name("cancel")
.about("Cancels a running or queued MapReduce. If no id is provided it will cancel the most recently schceduled job")
.arg(
Arg::with_name("id")
.short("i")
.help("ID of the MapReduce to cancel")
.required(false)
.takes_value(true),
),
)
.subcommand(
SubCommand::with_name("upload")
.about("Uploads a file or directory to the cluster distributed filesystem")
.arg(
Arg::with_name("local_path")
.short("l")
.long("local_path")
.help("Path of the file or directory on the local machine")
.required(true)
.takes_value(true),
)
.arg(
Arg::with_name("remote_path")
.short("r")
.long("remote_path")
.help("Path of the file or directory on the cluster. The local file path will be used if this is not provided")
.required(false)
.takes_value(true),
),
)
.subcommand(
SubCommand::with_name("download")
.about("Downloads a file or directory from the cluster distributed filesystem")
.arg(
Arg::with_name("remote_path")
.short("r")
.long("remote_path")
.help("Path of the file or directory on the distributed filesystem")
.required(true)
.takes_value(true),
)
.arg(
Arg::with_name("local_path")
.short("l")
.long("local_path")
.help("Directory or file to store the file or directory")
.required(true)
.takes_value(true),
),
)
.subcommand(SubCommand::with_name("cluster_status").about(
Expand Down
Loading

0 comments on commit 5ace12c

Please sign in to comment.