/** * 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 CreateTableTool(), args)); } }
/** {@inheritDoc} */ @Override protected void setup() throws Exception { super.setup(); mFiji = Fiji.Factory.open(mTableURI, getConf()); }
getPrintStream().println("Parsing table layout: " + mLayout); final Path path = new Path(mLayout); final FileSystem fs = fileSystemSpecified(path) ? path.getFileSystem(getConf()) : FileSystem.getLocal(getConf()); final FSDataInputStream inputStream = fs.open(path); final TableLayoutDesc tableLayout = FijiTableLayout.readTableLayoutDescFromJSON(inputStream); int hbaseTimeout = getConf().getInt("hbase.rpc.timeout", 60000); hbaseTimeout = hbaseTimeout * 10; getConf().setInt("hbase.rpc.timeout", hbaseTimeout); getPrintStream().println("Creating Fiji table " + mTableURI); if (mNumRegions >= 1) { final FileSystem splitKeyPathFs = fileSystemSpecified(splitKeyFilePath) ? splitKeyFilePath.getFileSystem(getConf()) : FileSystem.getLocal(getConf()); final FSDataInputStream splitKeyFileInputStream = splitKeyPathFs.open(splitKeyFilePath);