public StoreDumper(String conf) { this.graph = HugeFactory.open(conf); }
public static HugeGraph open(String path) { return open(getLocalConfig(path)); }
public static HugeGraph open(URL url) { return open(getRemoteConfig(url)); }
public static HugeGraph open() { String confPath = System.getProperty("config_path"); if (confPath == null || confPath.isEmpty()) { confPath = CONF_PATH; } try { confPath = Utils.class.getClassLoader() .getResource(confPath).getPath(); } catch (Exception ignored) { } return HugeFactory.open(confPath); }
public static HugeGraph open(URL url) { return open(getRemoteConfig(url)); }
public static HugeGraph open(String path) { return open(getLocalConfig(path)); }
public static Graph open(Configuration config) { // Inject authentication (replace HugeGraph with HugeGraphAuthProxy) return new HugeGraphAuthProxy(HugeFactory.open(config)); } }
public static TestGraph open(Configuration config) { return new TestGraph(HugeFactory.open(config)); } }
public static HugeGraph loadGraph(boolean needClear, boolean needProfile) { if (needProfile) { profile(); } registerPlugins(); String conf = "hugegraph.properties"; try { String path = ExampleUtil.class.getClassLoader() .getResource(conf).getPath(); File file = new File(path); if (file.exists() && file.isFile()) { conf = path; } } catch (Exception ignored) { } HugeGraph graph = HugeFactory.open(conf); if (needClear) { graph.clearBackend(); } graph.initBackend(); return graph; }
private static void initGraph(String config) throws InterruptedException { LOG.info("Init graph with config file: {}", config); HugeGraph graph = HugeFactory.open(config); BackendStoreSystemInfo sysInfo = new BackendStoreSystemInfo(graph); try { if (sysInfo.exist()) { LOG.info("Skip init-store due to the backend store of '{}' " + "had been initialized", graph.name()); sysInfo.checkVersion(); } else { initBackend(graph); } } finally { graph.close(); } }