public URI getDefaultURI() { URI topologyCatalogURI = getTopologyCatalogURI(); Config topologyCfg = getConfig(); String name = topologyCfg.hasPath(ConfigurationKeys.TOPOLOGY_NAME_KEY) ? topologyCfg.getString(ConfigurationKeys.TOPOLOGY_NAME_KEY) : "default"; String group = topologyCfg.hasPath(ConfigurationKeys.TOPOLOGY_GROUP_KEY) ? topologyCfg.getString(ConfigurationKeys.TOPOLOGY_GROUP_KEY) : "default"; try { return new URI(topologyCatalogURI.getScheme(), topologyCatalogURI.getAuthority(), "/" + group + "/" + name, null, null); } catch (URISyntaxException e) { throw new RuntimeException("Unable to create default TopologySpec URI:" + e, e); } }
public String getDefaultDescription() { Config topologyConf = getConfig(); return topologyConf.hasPath(ConfigurationKeys.TOPOLOGY_DESCRIPTION_KEY) ? topologyConf.getString(ConfigurationKeys.TOPOLOGY_DESCRIPTION_KEY) : "Gobblin topology " + getURI(); }
public TopologySpec build() { Preconditions.checkNotNull(this.uri); Preconditions.checkNotNull(this.version); return new TopologySpec(getURI(), getVersion(), getDescription(), getConfig(), getConfigAsProperties(), getSpecExceutorInstance()); }
public URI getDefaultURI() { URI topologyCatalogURI = getTopologyCatalogURI(); Config topologyCfg = getConfig(); String name = topologyCfg.hasPath(ConfigurationKeys.TOPOLOGY_NAME_KEY) ? topologyCfg.getString(ConfigurationKeys.TOPOLOGY_NAME_KEY) : "default"; String group = topologyCfg.hasPath(ConfigurationKeys.TOPOLOGY_GROUP_KEY) ? topologyCfg.getString(ConfigurationKeys.TOPOLOGY_GROUP_KEY) : "default"; try { return new URI(topologyCatalogURI.getScheme(), topologyCatalogURI.getAuthority(), "/" + group + "/" + name, null, null); } catch (URISyntaxException e) { throw new RuntimeException("Unable to create default TopologySpec URI:" + e, e); } }
public String getDefaultDescription() { Config topologyConf = getConfig(); return topologyConf.hasPath(ConfigurationKeys.TOPOLOGY_DESCRIPTION_KEY) ? topologyConf.getString(ConfigurationKeys.TOPOLOGY_DESCRIPTION_KEY) : "Gobblin topology " + getURI(); }
public TopologySpec build() { Preconditions.checkNotNull(this.uri); Preconditions.checkNotNull(this.version); return new TopologySpec(getURI(), getVersion(), getDescription(), getConfig(), getConfigAsProperties(), getSpecExceutorInstance()); }