<commit_before>﻿using Microsoft.Experimental.Azure.JavaPlatform;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Microsoft.Experimental.Azure.Hive
{
	/// <summary>
	/// Configuration for a Hive server.
	/// </summary>
	public sealed class HiveServerConfig : HadoopStyleXmlConfig
	{
		private readonly int _port;
		private readonly string _metastoreUris;

		/// <summary>
		/// Creates the config.
		/// </summary>
		/// <param name="port">The port to listen on.</param>
		/// <param name="metastoreUris">The URI of the metastore service to connect to.</param>
		public HiveServerConfig(int port, string metastoreUris)
		{
			_port = port;
			_metastoreUris = metastoreUris;
		}

		/// <summary>
		/// The configuration properties.
		/// </summary>
		protected override IEnumerable<KeyValuePair<string, string>> ConfigurationProperties
		{
			get
			{
				return new Dictionary<string, string>()
				{
					{ "hive.metastore.uris", _metastoreUris },
					{ "hive.server2.thrift.port", _port.ToString() },
				};
			}
		}
	}
}<commit_msg>Add freeform extra properties to HiveServerConfig<commit_after>﻿using Microsoft.Experimental.Azure.JavaPlatform;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Microsoft.Experimental.Azure.Hive
{
	/// <summary>
	/// Configuration for a Hive server.
	/// </summary>
	public sealed class HiveServerConfig : HadoopStyleXmlConfig
	{
		private readonly int _port;
		private readonly string _metastoreUris;
		private readonly ImmutableDictionary<string, string> _extraProperties;

		/// <summary>
		/// Creates the config.
		/// </summary>
		/// <param name="port">The port to listen on.</param>
		/// <param name="metastoreUris">The URI of the metastore service to connect to.</param>
		/// <param name="extraProperties">Any extra configuration properties to set.</param>
		public HiveServerConfig(int port, string metastoreUris, ImmutableDictionary<string, string> extraProperties = null)
		{
			_port = port;
			_metastoreUris = metastoreUris;
			_extraProperties = extraProperties ?? ImmutableDictionary<string, string>.Empty;
		}

		/// <summary>
		/// The configuration properties.
		/// </summary>
		protected override IEnumerable<KeyValuePair<string, string>> ConfigurationProperties
		{
			get
			{
				return _extraProperties.Concat(new Dictionary<string, string>()
				{
					{ "hive.metastore.uris", _metastoreUris },
					{ "hive.server2.thrift.port", _port.ToString() },
				});
			}
		}
	}
}
{'fraction_non_alphanumeric': 0.12276700874192323, 'fraction_numerical': 0.0007601672367920942, 'mean_word_length': 3.7854545454545456, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 34, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6078494', 'n_tokens_mistral': 885, 'n_tokens_neox': 783, 'n_words': 193}