/// <summary>
 /// Creates the payload for a MapReduce request.
 /// </summary>
 /// <param name="userName">
 /// The user name.
 /// </param>
 /// <param name="details">
 /// The details.
 /// </param>
 /// <returns>
 /// A string that represents the payload for the request.
 /// </returns>
 public string SerializeMapReduceRequest(string userName, MapReduceJobCreateParameters details)
 {
     details.ArgumentNotNull("details");
     var values = new List<KeyValuePair<string, string>>();
     values.AddRange(this.SerializeJobRequest(userName, details, details.JobName, details.Arguments, details.Defines));
     values.Add(new KeyValuePair<string, string>(WebHCatConstants.Jar, details.JarFile));
     values.Add(new KeyValuePair<string, string>(WebHCatConstants.Class, details.ClassName));
     var retval = this.ConvertItems(values.Where(kvp => kvp.Value != null));
     return retval;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates the payload for a MapReduce request.
        /// </summary>
        /// <param name="userName">
        /// The user name.
        /// </param>
        /// <param name="details">
        /// The details.
        /// </param>
        /// <returns>
        /// A string that represents the payload for the request.
        /// </returns>
        public string SerializeMapReduceRequest(string userName, MapReduceJobCreateParameters details)
        {
            details.ArgumentNotNull("details");
            var values = new List <KeyValuePair <string, string> >();

            values.AddRange(this.SerializeJobRequest(userName, details, details.JobName, details.Arguments, details.Defines));
            values.Add(new KeyValuePair <string, string>(WebHCatConstants.Jar, details.JarFile));
            values.Add(new KeyValuePair <string, string>(WebHCatConstants.Class, details.ClassName));
            var retval = this.ConvertItems(values.Where(kvp => kvp.Value != null));

            return(retval);
        }