Skip to content

Commit

Permalink
spline #831 - rename "appName" back to "name"
Browse files Browse the repository at this point in the history
  • Loading branch information
wajda committed Apr 6, 2021
1 parent 8508e13 commit 98bda85
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function eventLineageOverviewGraph(startEvent, maxDepth) {
: {
"_id": vert._key,
"_class": "za.co.absa.spline.consumer.service.model.ExecutionNode",
"name": vert.appName
"name": vert.name
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ object DataSource {
* from the inputs to the output.
*/
case class ExecutionPlan(
appName: Option[ExecutionPlan.AppName],
name: Option[ExecutionPlan.Name],
systemInfo: Map[String, Any],
agentInfo: Map[String, Any],
extra: Map[String, Any],
override val _key: ArangoDocument.Key
) extends Vertex with RootEntity

object ExecutionPlan {
type AppName = String
type Name = String
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import za.co.absa.spline.producer.{model => v1}
import scala.PartialFunction.condOpt

trait ExecutionPlanComponentConverterFactory {
def appNameExtractor: v1.ExecutionPlan => Option[v1_1.ExecutionPlan.AppName]
def execPlanNameExtractor: v1.ExecutionPlan => Option[v1_1.ExecutionPlan.Name]
def attributeConverter: Option[CachingConverter {type To = v1_1.Attribute}]
def expressionConverter: Option[CachingConverter {type To = v1_1.ExpressionLike}]
def outputConverter: Option[OperationOutputConverter]
Expand All @@ -34,7 +34,7 @@ trait ExecutionPlanComponentConverterFactory {
object ExecutionPlanComponentConverterFactory {

object EmptyFactory extends ExecutionPlanComponentConverterFactory {
override def appNameExtractor: v1.ExecutionPlan => Option[v1_1.ExecutionPlan.AppName] = _ => None
override def execPlanNameExtractor: v1.ExecutionPlan => Option[v1_1.ExecutionPlan.Name] = _ => None

override def attributeConverter: Option[AttributeConverter with CachingConverter] = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ object ModelMapperV1 extends ModelMapper {
val maybeExpressionConverter = epccf.expressionConverter
val maybeOutputConverter = epccf.outputConverter
val objectConverter = epccf.objectConverter
val planNameExtractor = epccf.appNameExtractor
val planNameExtractor = epccf.execPlanNameExtractor

val operationConverter = new OperationConverter(objectConverter, maybeOutputConverter) with CachingConverter

Expand All @@ -63,7 +63,7 @@ object ModelMapperV1 extends ModelMapper {

ExecutionPlan(
id = plan1.id,
appName = planNameExtractor(plan1),
name = planNameExtractor(plan1),
operations = operations,
attributes = attributes,
expressions = maybeExpressions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import scala.util.Try

class SparkSplineExecutionPlanComponentConverterFactory(agentVersion: String, plan1: v1.ExecutionPlan) extends ExecutionPlanComponentConverterFactory {

override def appNameExtractor: v1.ExecutionPlan => Option[v1_1.ExecutionPlan.AppName] = _.extraInfo.get(FieldNamesV1.PlanExtraInfo.AppName).map(_.toString)
override def execPlanNameExtractor: v1.ExecutionPlan => Option[v1_1.ExecutionPlan.Name] = _.extraInfo.get(FieldNamesV1.PlanExtraInfo.AppName).map(_.toString)

override def expressionConverter: Option[CachingConverter {type To = v1_1.ExpressionLike}] = Some(_expressionConverter)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import java.util.UUID

case class ExecutionPlan(
id: UUID = UUID.randomUUID(),
appName: Option[ExecutionPlan.AppName],
name: Option[ExecutionPlan.Name],

operations: Operations,
attributes: Seq[Attribute] = Nil,
Expand All @@ -41,7 +41,7 @@ case class ExecutionPlan(
}

object ExecutionPlan {
type AppName = String
type Name = String
type DataSourceUri = String
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ object ExecutionPlansControllerDeserFixAspectSpec {

ExecutionPlan(
id = planId,
appName = None,
name = None,
operations = Operations(
write = WriteOperation(
id = "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ExecutionPlanPersistentModelBuilder private(

def build(): ExecutionPlanPersistentModel = {
val pmExecutionPlan = pm.ExecutionPlan(
appName = ep.appName,
name = ep.name,
_key = ep.id.toString,
systemInfo = ep.systemInfo.toJsonAs[Map[String, Any]],
agentInfo = ep.agentInfo.map(_.toJsonAs[Map[String, Any]]).orNull,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class ExecutionProducerRepositoryImpl @Autowired()(db: ArangoDatabaseAsync) exte
| RETURN {
| "${ExecutionPlanDetails.ExecutionPlanId}" : ep._key,
| "${ExecutionPlanDetails.FrameworkName}" : CONCAT(ep.systemInfo.name, " ", ep.systemInfo.version),
| "${ExecutionPlanDetails.ApplicationName}" : ep.appName,
| "${ExecutionPlanDetails.ApplicationName}" : ep.name,
| "${ExecutionPlanDetails.DataSourceUri}" : writeOp.outputSource,
| "${ExecutionPlanDetails.DataSourceType}" : writeOp.extra.destinationType,
| "${ExecutionPlanDetails.Append}" : writeOp.append
Expand Down

0 comments on commit 98bda85

Please sign in to comment.