public static void main(String [] args ){ ClassLoader cl = ClassLoader.getSystemClassLoader(); URL[] urls = ((URLClassLoader) cl).getURLs(); for (URL url : urls) { System.out.println(url.getFile()); } Options options = defineOptions(); CommandLineParser parser = new GnuParser(); try { CommandLine commandLine = parser.parse(options, args); if (commandLine.hasOption(O_HELP)) { throw new ParseException(""); } String host=commandLine.getOptionValue(O_HOST); String table=commandLine.getOptionValue(O_TABLE); String port=commandLine.getOptionValue(O_PORT, "9090"); String crUser=commandLine.getOptionValue(O_CR_USER); String crPass=commandLine.getOptionValue(O_CR_PASS); HBaseClientThrift client=new HBaseClientThriftWriteFailureResistant(host, Integer.parseInt(port)); client.openConnection(); OrcidZipToHBase aug=new OrcidZipToHBase(client, table, crUser, crPass,commandLine.getOptionValue(O_INPUT_FILE)); aug.process(); client.closeConnection(); } catch (ParseException e) { usage(options); } catch (IOException| JAXBException ex) { log.error(ex.getMessage(),ex); } }
public static void main(String [] args ){ Options options = defineOptions(); CommandLineParser parser = new GnuParser(); try { CommandLine commandLine = parser.parse(options, args); if (commandLine.hasOption(O_HELP)) { throw new ParseException(""); } String host=commandLine.getOptionValue(O_HOST); String table=commandLine.getOptionValue(O_TABLE); String port=commandLine.getOptionValue(O_PORT, "9090"); String crUser=commandLine.getOptionValue(O_CR_USER); String crPass=commandLine.getOptionValue(O_CR_PASS); HBaseClientThrift client=new HBaseClientThriftWriteFailureResistant(host, Integer.parseInt(port)); client.openConnection(); Augmenter aug=new Augmenter(client, table, crUser, crPass); aug.augment(); client.closeConnection(); } catch (ParseException e) { usage(options); } }
transport.close(); transport = null; openConnection(); } else { throw ex;