Thread.sleep(1000);
} catch(InterruptedException ignore) { }
}
}
if(!open) {
throw new TException("could not connect to meta store");
}
} else if(store.getScheme().equals("file")) {
client = new MetaStoreServer.ThriftMetaStoreHandler("temp_server", this.conf);
try {
// for some reason setOption in FB303 doesn't allow one to throw a TException,
// so I'm having it throw a RuntimeException since that doesn't require changing
// the method signature.
client.setOption("metastore.path",store.toASCIIString());
} catch(RuntimeException e) {
System.err.println("Could not setoption metastore.path to " + store.getPath());
throw new TException("could not set metastore path to: " + store.getPath());
}
} else {
throw new TException("Unknown scheme to connect to MetaStore: " + store.getScheme());
}
}