private static void ConfigStormComponent(StormComponent storm, HDInsight.ClusterCreateParameters inputs)
 {
     storm.StormConfiguration.AddRange(inputs.StormConfiguration.Select(prop => new Property { Name = prop.Key, Value = prop.Value }));
 }
        /// <summary>
        /// Generate ClusterCreateParameters object for 3.X cluster with Hadoop and Storm.
        /// </summary>
        /// <param name="inputs">Cluster creation parameter inputs.</param>
        /// <returns>The corresponding ClusterCreateParameter object.</returns>
        internal static ClusterCreateParameters Create3XClusterForMapReduceAndStormTemplate(HDInsight.ClusterCreateParameters inputs)
        {
            if (inputs == null)
            {
                throw new ArgumentNullException("inputs");
            }

            var cluster = Create3XClusterFromMapReduceTemplate(inputs);

            var masterRole = cluster.Components.OfType<YarnComponent>().Single().ResourceManagerRole;
            var workerRole = cluster.Components.OfType<YarnComponent>().Single().NodeManagerRole;

            //Add Storm component
            StormComponent storm = new StormComponent
            {
                MasterRole = masterRole,
                WorkerRole = workerRole
            };
            ConfigStormComponent(storm, inputs);
            cluster.Components.Add(storm);

            return cluster;
        }