@Test public void testParseNameServices() throws Exception { Map<String, String> hdfsSiteConfigMap = new HashMap<String, String>(); hdfsSiteConfigMap.put("dfs.nameservices", "serviceOne"); String[] result = BlueprintConfigurationProcessor.parseNameServices(hdfsSiteConfigMap); assertNotNull("Resulting array was null", result); assertEquals("Incorrect array size", 1, result.length); assertEquals("Incorrect value for returned name service", "serviceOne", result[0]); hdfsSiteConfigMap.put("dfs.internal.nameservices", "serviceTwo"); result = BlueprintConfigurationProcessor.parseNameServices(hdfsSiteConfigMap); assertNotNull("Resulting array was null", result); assertEquals("Incorrect array size", 1, result.length); assertEquals("Incorrect value for returned name service", "serviceTwo", result[0]); hdfsSiteConfigMap.put("dfs.internal.nameservices", " serviceTwo, serviceThree, serviceFour"); String[] resultTwo = BlueprintConfigurationProcessor.parseNameServices(hdfsSiteConfigMap); assertNotNull("Resulting array was null", resultTwo); assertEquals("Incorrect array size", 3, resultTwo.length); assertEquals("Incorrect value for returned name service", "serviceTwo", resultTwo[0]); assertEquals("Incorrect value for returned name service", "serviceThree", resultTwo[1]); assertEquals("Incorrect value for returned name service", "serviceFour", resultTwo[2]); }
static String[] parseNameServices(Map<String, String> properties) { String nameServices = properties.get("dfs.internal.nameservices"); if (nameServices == null) { nameServices = properties.get("dfs.nameservices"); } return splitAndTrimStrings(nameServices); }
BlueprintConfigurationProcessor { static String[] parseNameServices(Map<String, String> properties) { String nameServices = properties.get("dfs.internal.nameservices"); if (nameServices == null) { nameServices = properties.get("dfs.nameservices"); } return splitAndTrimStrings(nameServices); } }
BlueprintConfigurationProcessor { static String[] parseNameServices(Map<String, String> properties) { String nameServices = properties.get("dfs.internal.nameservices"); if (nameServices == null) { nameServices = properties.get("dfs.nameservices"); } return splitAndTrimStrings(nameServices); } BlueprintConfigurationProcessor(ClusterTopology clusterTopology); }
BlueprintConfigurationProcessor { static String[] parseNameServices(Map<String, String> properties) { String nameServices = properties.get("dfs.internal.nameservices"); if (nameServices == null) { nameServices = properties.get("dfs.nameservices"); } return splitAndTrimStrings(nameServices); } BlueprintConfigurationProcessor(ClusterTopology clusterTopology); Map<String, Map<String, PropertyUpdater>> getRemovePropertyUpdaters(); void initRemovePropertyUpdaters(); Collection<String> getRequiredHostGroups(); Set<String> doUpdateForClusterCreate(); void doUpdateForBlueprintExport(); void doNameNodeHAUpdate(); void doYarnResourceManagerHAUpdate(); void doOozieServerHAUpdate(); }
BlueprintConfigurationProcessor { static String[] parseNameServices(Map<String, String> properties) { String nameServices = properties.get("dfs.internal.nameservices"); if (nameServices == null) { nameServices = properties.get("dfs.nameservices"); } return splitAndTrimStrings(nameServices); } BlueprintConfigurationProcessor(ClusterTopology clusterTopology); Map<String, Map<String, PropertyUpdater>> getRemovePropertyUpdaters(); void initRemovePropertyUpdaters(); Collection<String> getRequiredHostGroups(); Set<String> doUpdateForClusterCreate(); void doUpdateForBlueprintExport(); void doNameNodeHAUpdate(); void doYarnResourceManagerHAUpdate(); void doOozieServerHAUpdate();  }