Updated Branches: refs/heads/0.1.5 ff29884ab -> 827ba0c48
Working on BLUR-78. Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/f4759824 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/f4759824 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/f4759824 Branch: refs/heads/0.1.5 Commit: f47598248b1e4d3038f77e654630b534df7a6614 Parents: ff29884 Author: Aaron McCurry <[email protected]> Authored: Sun May 5 15:29:53 2013 -0400 Committer: Aaron McCurry <[email protected]> Committed: Sun May 5 15:29:53 2013 -0400 ---------------------------------------------------------------------- src/blur-shell/pom.xml | 2 +- .../java/org/apache/blur/shell/GetRowCommand.java | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f4759824/src/blur-shell/pom.xml ---------------------------------------------------------------------- diff --git a/src/blur-shell/pom.xml b/src/blur-shell/pom.xml index 8f65787..e0dde12 100644 --- a/src/blur-shell/pom.xml +++ b/src/blur-shell/pom.xml @@ -76,7 +76,7 @@ under the License. </dependencies> <build> - <finalName>blur-shell</finalName> + <finalName>blur-shell-${project.version}</finalName> <plugins> <plugin> http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/f4759824/src/blur-shell/src/main/java/org/apache/blur/shell/GetRowCommand.java ---------------------------------------------------------------------- diff --git a/src/blur-shell/src/main/java/org/apache/blur/shell/GetRowCommand.java b/src/blur-shell/src/main/java/org/apache/blur/shell/GetRowCommand.java index 9ba1f7e..0b10ee3 100644 --- a/src/blur-shell/src/main/java/org/apache/blur/shell/GetRowCommand.java +++ b/src/blur-shell/src/main/java/org/apache/blur/shell/GetRowCommand.java @@ -30,8 +30,7 @@ import org.apache.thrift.TException; public class GetRowCommand extends Command { @Override - public void doit(PrintWriter out, Client client, String[] args) - throws CommandException, TException, BlurException { + public void doit(PrintWriter out, Client client, String[] args) throws CommandException, TException, BlurException { if (args.length != 3) { throw new CommandException("Invalid args: " + help()); } @@ -42,8 +41,15 @@ public class GetRowCommand extends Command { selector.setRowId(rowId); FetchResult fetchRow = client.fetchRow(tablename, selector); FetchRowResult rowResult = fetchRow.getRowResult(); + if (rowResult == null) { + out.println("Row [" + rowId + "] not found."); + return; + } Row row = rowResult.getRow(); - + if (row == null) { + out.println("Row [" + rowId + "] not found."); + return; + } out.println(row); }
