Skip to content

Commit 646e71b

Browse files
committed
Add global vars scope (global singleton)
1 parent 54967f9 commit 646e71b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scala/src/main/scala/Osconfig.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ package com.ibm.ibmos2spark
33
import scala.collection.mutable.HashMap
44
import org.apache.spark.SparkContext
55

6-
val DEFAULT_SERVICE_NAME = "service"
6+
object globalVariables {
7+
val DEFAULT_SERVICE_NAME = "service"
8+
}
9+
710

811
object urlbuilder{
912
def swifturl2d(name: String, container_name: String, object_name: String): String = {
@@ -175,7 +178,7 @@ class CloudObjectStorage(sc: SparkContext, credentials: HashMap[String, String],
175178
if (configurationName != "") {
176179
return configurationName
177180
} else {
178-
return DEFAULT_SERVICE_NAME
181+
return globalVariables.DEFAULT_SERVICE_NAME
179182
}
180183
}
181184

0 commit comments

Comments
 (0)