<commit_before>package clusters

import (
	"fmt"
	"strconv"
	"strings"
	kclient "k8s.io/kubernetes/pkg/client/unversioned"
)

type ClusterConfig struct {

	MasterCount int
	WorkerCount int
	Name string
	SparkMasterConfig string
	SparkWorkerConfig string
}


var defaultConfig ClusterConfig = ClusterConfig{
								MasterCount: 1,
	                                                        WorkerCount: 1,
								Name: "default",
								SparkMasterConfig: "",
								SparkWorkerConfig: ""}

const Defaultname = "default"
const failOnMissing = true
const allowMissing = false

const MasterCountMustBeOne = "cluster configuration must have a masterCount of 1"
const WorkerCountMustBeAtLeastOne = "cluster configuration may not have a workerCount less than 1"
const ErrorWhileProcessing = "'%s', %s"
const NamedConfigDoesNotExist = "named config '%s' does not exist"


// This function is meant to support testability
func GetDefaultConfig() ClusterConfig {
	return defaultConfig
}

func assignConfig(res *ClusterConfig, src ClusterConfig) {
	if src.MasterCount != 0 {
		res.MasterCount = src.MasterCount
	}
	if src.WorkerCount != 0 {
		res.WorkerCount = src.WorkerCount
	}

	if src.SparkMasterConfig != "" {
		res.SparkMasterConfig = src.SparkMasterConfig
	}
	if src.SparkWorkerConfig != "" {
		res.SparkWorkerConfig = src.SparkWorkerConfig
	}<commit_msg>Name of clusterconfig should be returned.<commit_after>package clusters

import (
	"fmt"
	"strconv"
	"strings"
	kclient "k8s.io/kubernetes/pkg/client/unversioned"
)

type ClusterConfig struct {

	MasterCount int
	WorkerCount int
	Name string
	SparkMasterConfig string
	SparkWorkerConfig string
}


var defaultConfig ClusterConfig = ClusterConfig{
								MasterCount: 1,
	                                                        WorkerCount: 1,
								Name: "default",
								SparkMasterConfig: "",
								SparkWorkerConfig: ""}

const Defaultname = "default"
const failOnMissing = true
const allowMissing = false

const MasterCountMustBeOne = "cluster configuration must have a masterCount of 1"
const WorkerCountMustBeAtLeastOne = "cluster configuration may not have a workerCount less than 1"
const ErrorWhileProcessing = "'%s', %s"
const NamedConfigDoesNotExist = "named config '%s' does not exist"


// This function is meant to support testability
func GetDefaultConfig() ClusterConfig {
	return defaultConfig
}

func assignConfig(res *ClusterConfig, src ClusterConfig) {
        if src.Name != "" {
		res.Name = src.Name
        }
	if src.MasterCount != 0 {
		res.MasterCount = src.MasterCount
	}
	if src.WorkerCount != 0 {
		res.WorkerCount = src.WorkerCount
	}

	if src.SparkMasterConfig != "" {
		res.SparkMasterConfig = src.SparkMasterConfig
	}
	if src.SparkWorkerConfig != "" {
		res.SparkWorkerConfig = src.SparkWorkerConfig
	}
{'fraction_non_alphanumeric': 0.08261802575107297, 'fraction_numerical': 0.005007153075822604, 'mean_word_length': 3.518578352180937, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2942721', 'n_tokens_mistral': 907, 'n_tokens_neox': 806, 'n_words': 231}