Skip to content

Commit 49fd59b

Browse files
authored
Merge pull request #167 from sowmya-dixit/release-5.1.3-s3n
WFS execution issue fixes
2 parents 8bca99e + 4e237ff commit 49fd59b

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

analytics-core/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
<maven.compiler.target>11</maven.compiler.target>
1717
<encoding>UTF-8</encoding>
1818
<scoverage.plugin.version>1.1.1</scoverage.plugin.version>
19+
<CLOUD_STORE_GROUP_ID>org.sunbird</CLOUD_STORE_GROUP_ID>
20+
<CLOUD_STORE_ARTIFACT_ID>cloud-store-sdk_2.12</CLOUD_STORE_ARTIFACT_ID>
21+
<CLOUD_STORE_VERSION>1.4.6</CLOUD_STORE_VERSION>
1922
</properties>
2023

2124
<repositories>

analytics-core/src/main/scala/org/ekstep/analytics/framework/util/CSPUtils.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,9 @@ object OCIProvider extends ICloudStorageProvider {
6565
JobLogger.log("Configuring OCI Access Key & Secret Key to SparkContext")
6666
sc.hadoopConfiguration.set("fs.s3n.awsAccessKeyId", key);
6767
sc.hadoopConfiguration.set("fs.s3n.awsSecretAccessKey", secret);
68+
val storageEndpoint = AppConf.getConfig("cloud_storage_endpoint_with_protocol")
69+
if (storageEndpoint.nonEmpty) {
70+
sc.hadoopConfiguration.set("fs.s3n.endpoint", storageEndpoint)
71+
}
6872
}
6973
}

analytics-core/src/main/scala/org/ekstep/analytics/framework/util/CommonUtil.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ import org.ekstep.analytics.framework.Level._
1616
import org.ekstep.analytics.framework.Period._
1717
import org.ekstep.analytics.framework.util.CloudStorageProviders.setSparkCSPConfigurations
1818
import org.ekstep.analytics.framework.{DtRange, Event, JobConfig, _}
19-
2019
import scala.collection.mutable.ListBuffer
2120
//import org.ekstep.analytics.framework.conf.AppConf
2221
import java.util.zip.{ZipEntry, ZipOutputStream}
23-
2422
import org.apache.commons.lang3.StringUtils
2523
import org.joda.time.format.{DateTimeFormat, DateTimeFormatter}
2624
import org.joda.time.{DateTime, DateTimeZone, Days, LocalDate, Weeks, Years}
@@ -91,7 +89,9 @@ object CommonUtil {
9189
}
9290

9391
val sc = new SparkContext(conf)
94-
setSparkCSPConfigurations(sc, AppConf.getConfig("cloud_storage_type"), None, None)
92+
val key = AppConf.getConfig("storage.key.config")
93+
val secret = AppConf.getConfig("storage.secret.config")
94+
setSparkCSPConfigurations(sc, AppConf.getConfig("cloud_storage_type"), Option(key), Option(secret))
9595
JobLogger.log("Spark Context initialized")
9696
sc
9797
}

0 commit comments

Comments
 (0)