-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spline #328 Add template resource files to runable modules
- Loading branch information
Showing
9 changed files
with
123 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# | ||
# Copyright 2017 ABSA Group Limited | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# =================================================================================================== | ||
# THIS FILE CONTAINS DEFAULT SPLINE SPARK AGENT PROPERTIES. | ||
# =================================================================================================== | ||
# | ||
# Spline mode: DISABLED|REQUIRED|BEST_EFFORT | ||
spline.mode=BEST_EFFORT | ||
# Fully specified class name implementing {LineageDispatcher} trait. | ||
# The class must have a constructor with a single parameter of type {org.apache.commons.configuration.Configuration} | ||
spline.lineage_dispatcher.className=za.co.absa.spline.harvester.dispatcher.HttpLineageDispatcher | ||
# Required for {HttpLineageDispatcher}. Base URL of the Spline Producer REST API endpoint | ||
spline.producer.url= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
spark/agent/src/main/scala/za/co/absa/spline/harvester/conf/DefaultSplineConfiguration.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright 2019 ABSA Group Limited | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package za.co.absa.spline.harvester.conf | ||
|
||
import org.apache.commons.configuration.{CompositeConfiguration, PropertiesConfiguration, SystemConfiguration} | ||
import org.apache.spark.sql.SparkSession | ||
import za.co.absa.spline.harvester.conf.DefaultSplineConfiguration._ | ||
|
||
import scala.collection.JavaConverters._ | ||
import scala.util.Try | ||
|
||
object DefaultSplineConfiguration { | ||
private val propertiesFileName = "spline.properties" | ||
} | ||
|
||
class DefaultSplineConfiguration(sparkSession: SparkSession) | ||
extends CompositeConfiguration(Seq( | ||
Some(new HadoopConfiguration(sparkSession.sparkContext.hadoopConfiguration)), | ||
Some(new SparkConfiguration(sparkSession.sparkContext.getConf)), | ||
Some(new SystemConfiguration), | ||
Try(new PropertiesConfiguration(propertiesFileName)).toOption | ||
).flatten.asJava) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters