AmbariImpl extends AbstractSoftwareManager implements SoftwareManager { @SuppressWarnings("unchecked") @Override public String getSupportedConfigs(HadoopStack stack) { Map<String, Object> configs = new HashMap<String, Object>(); ApiStackServiceList apiStackServiceList = apiManager.getStackServiceListWithConfigurations(stack.getVendor(), stack.getFullVersion()); for (ApiStackService apiStackService : apiStackServiceList.getApiStackServices()) { for (ApiConfiguration apiConfiguration : apiStackService.getApiConfigurations()) { ApiConfigurationInfo apiConfigurationInfo = apiConfiguration.getApiConfigurationInfo(); String configType = apiConfigurationInfo.getType().split(".xml")[0]; String configProperty = apiConfigurationInfo.getPropertyName(); Set<String> configProperties = new HashSet<String>(); if (configs.isEmpty()) { configProperties.add(configProperty); } else { if (configs.containsKey(configType)) { configProperties = (Set<String>) configs.get(configType); configProperties.add(configProperty); } } configs.put(configType, configProperties); } } return ApiUtils.objectToJson(configs); } AmbariImpl(String amServerHost, int port, String username,
         String password, String privateKey);  AmbariImpl(URL url, String username, String password, String privateKey); protected  AmbariImpl(AmbariManagerClientbuilder clientbuilder, String privateKey); @Override String getName(); @Override String getDescription(); @Override String getType(); @Override boolean echo(); @Override boolean validateServerVersion(); @Override HealthStatus getStatus(); @Override List<HadoopStack> getSupportedStacks(); @SuppressWarnings("unchecked") @Override String getSupportedConfigs(HadoopStack stack); @Override boolean createCluster(ClusterBlueprint blueprint,
         ClusterReportQueue reportQueue); @Override String exportBlueprint(String clusterName); @Override List<String> validateRolesForScaleOut(NodeGroupInfo group); @Override void validateRolesForShrink(NodeGroupInfo groupInfo); @Override void updateInfrastructure(ClusterBlueprint blueprint); @Override boolean reconfigCluster(ClusterBlueprint blueprint,
         ClusterReportQueue reports); @Override boolean scaleOutCluster(ClusterBlueprint blueprint, List<String> addedNodeNames,
         ClusterReportQueue reports, boolean forceScaleOut); boolean scaleOutCluster(ClusterBlueprint blueprint, List<String> addedNodeNames,
         ClusterReportQueue reports); boolean startCluster(ClusterBlueprint clusterBlueprint, ClusterReportQueue reportQueue); @Override boolean startCluster(ClusterBlueprint clusterBlueprint, ClusterReportQueue reports, boolean forceStart); @Override boolean deleteCluster(ClusterBlueprint clusterBlueprint, ClusterReportQueue reports); @Override boolean onStopCluster(ClusterBlueprint clusterBlueprint, ClusterReportQueue reports); @Override boolean onDeleteCluster(ClusterBlueprint clusterBlueprint, ClusterReportQueue reports); @Override boolean onDeleteNodes(ClusterBlueprint blueprint, List<String> nodeNames); @Override boolean decomissionNodes(String clusterName, List<NodeInfo> nodes,
         ClusterReportQueue reports); @Override void decommissionNode(ClusterBlueprint blueprint, String nodeGroupName, String nodeName, ClusterReportQueue reportQueue); @Override boolean recomissionNode(String clusterName, NodeInfo node, ClusterReportQueue reportQueue); @Override boolean comissionNodes(String clusterName, List<NodeInfo> nodes,
         ClusterReportQueue reports); @Override boolean startNodes(String clusterName, List<NodeInfo> nodes,
         ClusterReportQueue reports); @Override boolean stopNodes(String clusterName, List<NodeInfo> nodes,
         ClusterReportQueue reports); @Override ClusterReport queryClusterStatus(ClusterBlueprint blueprint); @Override boolean validateBlueprint(ClusterBlueprint blueprint); @Override boolean hasHbase(ClusterBlueprint blueprint); @Override boolean hasMgmtRole(List<String> roles); @Override boolean isComputeOnlyRoles(List<String> roles); @Override boolean twoDataDisksRequired(NodeGroupInfo group); @Override boolean hasComputeMasterGroup(ClusterBlueprint blueprint); @Override String getVersion(); @Override HadoopStack getDefaultStack(); ApiManager getApiManager(); void setApiManager(ApiManager apiManager); int getRequestMaxRetryTimes(); @Override boolean hasMountPointStartwithDatax(String clusterName); @Override void restartClusterRequiredServices(ClusterBlueprint blueprint, ClusterReportQueue reports); static final String MIN_SUPPORTED_VERSION; }
@Test(groups = { "TestAmbariImpl" }) public void testGetSupportedConfigs() { System.out.println("Supported configurations: " + provider.getSupportedConfigs(blueprint.getHadoopStack())); Assert.assertNotNull(provider.getSupportedConfigs(blueprint.getHadoopStack())); }