/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new PutTool(), args)); } }
/** {@inheritDoc} */ @Override protected void setup() throws IOException { Preconditions.checkArgument((mColumnURIFlag != null) && !mColumnURIFlag.isEmpty(), "Specify a target table to write synthesized data to with " + "--table=fiji://hbase-address/fiji-instance/table"); mColumnURI = FijiURI.newBuilder(mColumnURIFlag).build(); Preconditions.checkArgument(mColumnURI.getTable() != null, "No table specified in target URI '{}'. " + "Specify a target table to write synthesized data to with " + "--table=fiji://hbase-address/fiji-instance/table", mColumnURI); Preconditions.checkArgument(mColumnURI.getColumns().size() == 1, "Invalid target column '{}', specify exactly one column in URI with " + "--target=fiji://hbase-address/fiji-instance/table/family:qualifier", mColumnURI); Preconditions.checkArgument(mColumnURI.getColumns().get(0).isFullyQualified(), "Missing column qualifier in '{}', specify exactly one column in URI with " + "--target=fiji://hbase-address/fiji-instance/table/family:qualifier", mColumnURI); mFiji = Fiji.Factory.open(mColumnURI, getConf()); mTable = mFiji.openTable(mColumnURI.getTable()); }