(final String[] args)
| 100 | } |
| 101 | |
| 102 | public static void main(final String[] args) throws Exception { |
| 103 | ensureArguments(args, 3, -1); |
| 104 | |
| 105 | final Cmd cmd = commands.get(args[1]); |
| 106 | if (cmd == null) { |
| 107 | fatalUsage("Unknown command: " + args[1], 2); |
| 108 | } |
| 109 | |
| 110 | final HBaseClient client = new HBaseClient(args[0]); |
| 111 | |
| 112 | try { |
| 113 | cmd.execute(client, args); |
| 114 | } catch (Exception e) { |
| 115 | LOG.error("Unexpected exception caught in main", e); |
| 116 | } |
| 117 | |
| 118 | System.out.println("Starting shutdown..."); |
| 119 | LOG.debug("Shutdown returned " + client.shutdown().joinUninterruptibly()); |
| 120 | System.out.println("Exiting..."); |
| 121 | } |
| 122 | |
| 123 | private static interface Cmd { |
| 124 | void execute(HBaseClient client, String[] args) throws Exception; |
nothing calls this directly
no test coverage detected