diff --git a/_e2e/raw2science.out.expected b/_e2e/raw2science.out.expected index 74ec960..9dbdd79 100644 --- a/_e2e/raw2science.out.expected +++ b/_e2e/raw2science.out.expected @@ -1,5 +1,6 @@ spark-submit --master "k8s://https://127.0.0.1:34729" \ --deploy-mode cluster \ + --conf spark.executor.instances=1 \ --conf spark.kubernetes.namespace=default \ --conf spark.kubernetes.authenticate.driver.serviceAccountName=spark \ --conf spark.kubernetes.container.image="param_image" \ diff --git a/_e2e/stream2raw.out.expected b/_e2e/stream2raw.out.expected index fe260d2..3a59423 100644 --- a/_e2e/stream2raw.out.expected +++ b/_e2e/stream2raw.out.expected @@ -1,5 +1,6 @@ spark-submit --master "k8s://https://127.0.0.1:34729" \ --deploy-mode cluster \ + --conf spark.executor.instances=1 \ --conf spark.kubernetes.namespace=default \ --conf spark.kubernetes.authenticate.driver.serviceAccountName=spark \ --conf spark.kubernetes.container.image="param_image" \ @@ -15,8 +16,8 @@ spark-submit --master "k8s://https://127.0.0.1:34729" \ --conf spark.hadoop.fs.s3a.impl="org.apache.hadoop.fs.s3a.S3AFileSystem" \ --conf spark.driver.memory=1Gi \ --conf spark.executor.memory=1Gi \ - --conf spark.kubernetes.driver.request.cores=1 \ - --conf spark.kubernetes.executor.request.cores=1 \ + --conf spark.driver.cores=1 \ + --conf spark.executor.cores=1 \ local:///home/fink/fink-broker/bin/stream2raw.py \ -log_level "INFO" \ -online_data_prefix "s3a://fink-broker-online-20000101" \ diff --git a/cmd/util.go b/cmd/util.go index 471684b..48ed617 100644 --- a/cmd/util.go +++ b/cmd/util.go @@ -85,12 +85,13 @@ func applyVarTemplate(template string, night string) string { return format(template, &TmplData{Night: night}) } -func convertToBytes(input map[string]string) map[string][]byte { - output := make(map[string][]byte) - - for key, str := range input { - output[key] = []byte(str) +func convertToBytes(src map[string]string) map[string][]byte { + if src == nil { + return nil } - - return output + dst := make(map[string][]byte, len(src)) + for k, v := range src { + dst[k] = []byte(v) + } + return dst }