Skip to content

Commit

Permalink
Merge pull request #167 from sowmya-dixit/release-5.1.3-s3n
Browse files Browse the repository at this point in the history
WFS execution issue fixes
  • Loading branch information
manjudr authored Mar 4, 2024
2 parents 8bca99e + 4e237ff commit 49fd59b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions analytics-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<maven.compiler.target>11</maven.compiler.target>
<encoding>UTF-8</encoding>
<scoverage.plugin.version>1.1.1</scoverage.plugin.version>
<CLOUD_STORE_GROUP_ID>org.sunbird</CLOUD_STORE_GROUP_ID>
<CLOUD_STORE_ARTIFACT_ID>cloud-store-sdk_2.12</CLOUD_STORE_ARTIFACT_ID>
<CLOUD_STORE_VERSION>1.4.6</CLOUD_STORE_VERSION>
</properties>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,9 @@ object OCIProvider extends ICloudStorageProvider {
JobLogger.log("Configuring OCI Access Key & Secret Key to SparkContext")
sc.hadoopConfiguration.set("fs.s3n.awsAccessKeyId", key);
sc.hadoopConfiguration.set("fs.s3n.awsSecretAccessKey", secret);
val storageEndpoint = AppConf.getConfig("cloud_storage_endpoint_with_protocol")
if (storageEndpoint.nonEmpty) {
sc.hadoopConfiguration.set("fs.s3n.endpoint", storageEndpoint)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ import org.ekstep.analytics.framework.Level._
import org.ekstep.analytics.framework.Period._
import org.ekstep.analytics.framework.util.CloudStorageProviders.setSparkCSPConfigurations
import org.ekstep.analytics.framework.{DtRange, Event, JobConfig, _}

import scala.collection.mutable.ListBuffer
//import org.ekstep.analytics.framework.conf.AppConf
import java.util.zip.{ZipEntry, ZipOutputStream}

import org.apache.commons.lang3.StringUtils
import org.joda.time.format.{DateTimeFormat, DateTimeFormatter}
import org.joda.time.{DateTime, DateTimeZone, Days, LocalDate, Weeks, Years}
Expand Down Expand Up @@ -91,7 +89,9 @@ object CommonUtil {
}

val sc = new SparkContext(conf)
setSparkCSPConfigurations(sc, AppConf.getConfig("cloud_storage_type"), None, None)
val key = AppConf.getConfig("storage.key.config")
val secret = AppConf.getConfig("storage.secret.config")
setSparkCSPConfigurations(sc, AppConf.getConfig("cloud_storage_type"), Option(key), Option(secret))
JobLogger.log("Spark Context initialized")
sc
}
Expand Down

0 comments on commit 49fd59b

Please sign in to comment.