@Test public void testCommon() throws Exception { Configuration conf = HadoopConfigurationBuilder.buildCommonConfiguration( clusterSpec, cluster, defaults); assertThat(Iterators.size(conf.getKeys()), is(3)); assertThat(conf.getString("p1"), is("common1")); assertThat(conf.getString("p2"), is("common2")); assertThat(conf.getString("fs.default.name"), matches("hdfs: }
@VisibleForTesting static Configuration buildCommonConfiguration(ClusterSpec clusterSpec, Cluster cluster, Configuration defaults) throws ConfigurationException, IOException { Configuration config = build(clusterSpec, cluster, defaults, "hadoop-common"); Instance namenode = cluster .getInstanceMatching(role(HadoopNameNodeClusterActionHandler.ROLE)); LOG.debug("hadoop building common configuration, with hostname "+namenode.getPublicHostName()); config.setProperty("fs.default.name", String.format("hdfs: namenode.getPublicHostName())); return config; }
HadoopConfigurationBuilder { @VisibleForTesting static Configuration buildCommonConfiguration(ClusterSpec clusterSpec, Cluster cluster, Configuration defaults) throws ConfigurationException, IOException { Configuration config = build(clusterSpec, cluster, defaults, "hadoop-common"); Instance namenode = cluster .getInstanceMatching(role(HadoopNameNodeClusterActionHandler.ROLE)); LOG.debug("hadoop building common configuration, with hostname "+namenode.getPublicHostName()); config.setProperty("fs.default.name", String.format("hdfs: namenode.getPublicHostName())); return config; } }
HadoopConfigurationBuilder { @VisibleForTesting static Configuration buildCommonConfiguration(ClusterSpec clusterSpec, Cluster cluster, Configuration defaults) throws ConfigurationException, IOException { Configuration config = build(clusterSpec, cluster, defaults, "hadoop-common"); Instance namenode = cluster .getInstanceMatching(role(HadoopNameNodeClusterActionHandler.ROLE)); LOG.debug("hadoop building common configuration, with hostname "+namenode.getPublicHostName()); config.setProperty("fs.default.name", String.format("hdfs: namenode.getPublicHostName())); return config; }  }
HadoopConfigurationBuilder { @VisibleForTesting static Configuration buildCommonConfiguration(ClusterSpec clusterSpec, Cluster cluster, Configuration defaults) throws ConfigurationException, IOException { Configuration config = build(clusterSpec, cluster, defaults, "hadoop-common"); Instance namenode = cluster .getInstanceMatching(role(HadoopNameNodeClusterActionHandler.ROLE)); LOG.debug("hadoop building common configuration, with hostname "+namenode.getPublicHostName()); config.setProperty("fs.default.name", String.format("hdfs: namenode.getPublicHostName())); return config; }  static Statement buildCommon(String path, ClusterSpec clusterSpec,
      Cluster cluster); static Statement buildHdfs(String path, ClusterSpec clusterSpec,
      Cluster cluster, Set<String> dataDirectories); static Statement buildMapReduce(String path, ClusterSpec clusterSpec,
      Cluster cluster, Set<String> dataDirectories); static Statement buildHadoopEnv(String path, ClusterSpec clusterSpec,
      Cluster cluster); }
HadoopConfigurationBuilder { @VisibleForTesting static Configuration buildCommonConfiguration(ClusterSpec clusterSpec, Cluster cluster, Configuration defaults) throws ConfigurationException, IOException { Configuration config = build(clusterSpec, cluster, defaults, "hadoop-common"); Instance namenode = cluster .getInstanceMatching(role(HadoopNameNodeClusterActionHandler.ROLE)); LOG.debug("hadoop building common configuration, with hostname "+namenode.getPublicHostName()); config.setProperty("fs.default.name", String.format("hdfs: namenode.getPublicHostName())); return config; }  static Statement buildCommon(String path, ClusterSpec clusterSpec,
      Cluster cluster); static Statement buildHdfs(String path, ClusterSpec clusterSpec,
      Cluster cluster, Set<String> dataDirectories); static Statement buildMapReduce(String path, ClusterSpec clusterSpec,
      Cluster cluster, Set<String> dataDirectories); static Statement buildHadoopEnv(String path, ClusterSpec clusterSpec,
      Cluster cluster);  }