@Test public void testGetConfigKeyPath() throws URISyntaxException{ String expected = "/datasets/a1/a2"; URI clientAbsURI = new URI("etl-hdfs: ConfigKeyPath result = ConfigClientUtils.buildConfigKeyPath(clientAbsURI, mockConfigStore); Assert.assertEquals(result.toString(), expected); URI clientRelativeURI = new URI("etl-hdfs: result = ConfigClientUtils.buildConfigKeyPath(clientRelativeURI, mockConfigStore); Assert.assertEquals(result.toString(), expected); clientRelativeURI = new URI("etl-hdfs:/datasets/a1/a2"); result = ConfigClientUtils.buildConfigKeyPath(clientRelativeURI, mockConfigStore); Assert.assertEquals(result.toString(), expected); ConfigKeyPath configKey = SingleLinkedListConfigKeyPath.ROOT.createChild("data").createChild("databases").createChild("Identity"); URI adjusted = ConfigClientUtils.buildUriInClientFormat(configKey, mockConfigStore, false); Assert.assertTrue(adjusted.toString().equals("etl-hdfs:/data/databases/Identity")); adjusted = ConfigClientUtils.buildUriInClientFormat(configKey, mockConfigStore, true); Assert.assertTrue(adjusted.toString().equals("etl-hdfs: }
public static ConfigKeyPath getConfigKeyPath(String input) { ConfigKeyPath result = SingleLinkedListConfigKeyPath.ROOT; String[] paths = input.split("/"); for (String p : paths) { if (p.equals("")) { continue; } result = result.createChild(p); } return result; }
ConfigClientUtils { public static ConfigKeyPath getConfigKeyPath(String input) { ConfigKeyPath result = SingleLinkedListConfigKeyPath.ROOT; String[] paths = input.split("/"); for (String p : paths) { if (p.equals("")) { continue; } result = result.createChild(p); } return result; } }
ConfigClientUtils { public static ConfigKeyPath getConfigKeyPath(String input) { ConfigKeyPath result = SingleLinkedListConfigKeyPath.ROOT; String[] paths = input.split("/"); for (String p : paths) { if (p.equals("")) { continue; } result = result.createChild(p); } return result; }  }
ConfigClientUtils { public static ConfigKeyPath getConfigKeyPath(String input) { ConfigKeyPath result = SingleLinkedListConfigKeyPath.ROOT; String[] paths = input.split("/"); for (String p : paths) { if (p.equals("")) { continue; } result = result.createChild(p); } return result; }  static ConfigKeyPath buildConfigKeyPath(URI configKeyURI, ConfigStore cs); static URI buildUriInClientFormat(ConfigKeyPath configKeyPath, ConfigStore cs, boolean returnURIWithAuthority); static Collection<URI> buildUriInClientFormat(Collection<ConfigKeyPath> configKeyPaths, ConfigStore cs,
      boolean returnURIWithAuthority); static ConfigKeyPath getConfigKeyPath(String input); static List<ConfigKeyPath> getConfigKeyPath(List<String> input); static boolean isAncestorOrSame(URI descendant, URI ancestor); static boolean stringSame(String l, String r); static boolean isAncestorOrSame(ConfigKeyPath descendant, ConfigKeyPath ancestor); static Optional<Config> getOptionalRuntimeConfig(Properties properties); }
ConfigClientUtils { public static ConfigKeyPath getConfigKeyPath(String input) { ConfigKeyPath result = SingleLinkedListConfigKeyPath.ROOT; String[] paths = input.split("/"); for (String p : paths) { if (p.equals("")) { continue; } result = result.createChild(p); } return result; }  static ConfigKeyPath buildConfigKeyPath(URI configKeyURI, ConfigStore cs); static URI buildUriInClientFormat(ConfigKeyPath configKeyPath, ConfigStore cs, boolean returnURIWithAuthority); static Collection<URI> buildUriInClientFormat(Collection<ConfigKeyPath> configKeyPaths, ConfigStore cs,
      boolean returnURIWithAuthority); static ConfigKeyPath getConfigKeyPath(String input); static List<ConfigKeyPath> getConfigKeyPath(List<String> input); static boolean isAncestorOrSame(URI descendant, URI ancestor); static boolean stringSame(String l, String r); static boolean isAncestorOrSame(ConfigKeyPath descendant, ConfigKeyPath ancestor); static Optional<Config> getOptionalRuntimeConfig(Properties properties);  }