MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / main

Method main

test/Test.java:102–121  ·  view source on GitHub ↗
(final String[] args)

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 5

ensureArgumentsMethod · 0.95
fatalUsageMethod · 0.95
executeMethod · 0.95
shutdownMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected