Skip to content

Commit

Permalink
Rename processing types
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian Święcki committed Jul 15, 2021
1 parent c9c88b1 commit d7e75a8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ categoriesConfig: {
"fraud": "streaming",
}
```
For each category you have to define its processing type (`streaming` in examples above). You can read about processing
For each category you have to define its scenario type (`streaming` in examples above). You can read about processing
types and their configurations below.

### Process Toolbar Configuration
Expand Down Expand Up @@ -332,11 +332,11 @@ akka {
* `environment` - key of environment (used e.g. for alerts) - e.g. test or production
* `attachmentsPath` - location on disk where attachments will be stored

##Processing types
##Scenario types
One installation of Nussknacker can handle many different processing engines - currently the main supported engine is
Flink in streaming mode. Processing engines are defined in `scenarioTypes` section. You can e.g. have two processing
types pointing to separate Flink clusters. Each processing engine has its name (e.g. `flinkStreaming`).
Processing type configuration consists of two main parts:
Scenario type configuration consists of two main parts:
* engine configuration
* model configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class DefinitionResources(modelDataProvider: ProcessingTypeDataProvider[ModelDat
}
} ~ dictResources.route(processingTypeData.modelData)
}.getOrElse {
complete(HttpResponse(status = StatusCodes.NotFound, entity = s"Processing type: $processingType not found"))
complete(HttpResponse(status = StatusCodes.NotFound, entity = s"Scenario type: $processingType not found"))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class QueryableStateResources(typeToConfig: ProcessingTypeDataProvider[Processin

private def fetchState(processingType: String, jobId: String, queryName: String, key: Option[String]): Future[String] = {
typeToConfig.forTypeUnsafe(processingType).queryableClient match {
case None => Future.failed(new Exception(s"Queryable client not found for processing type $processingType"))
case None => Future.failed(new Exception(s"Queryable client not found for scenario type $processingType"))
case Some(queryableClient) =>
key match {
case Some(k) => queryableClient.fetchJsonState(jobId, queryName, k)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ class BasicProcessingTypeDataReload(loadMethod: () => ProcessingTypeDataProvider
@volatile private var current: ProcessingTypeDataProvider[ProcessingTypeData] = loadMethod()

override def reloadAll(): Unit = synchronized {
logger.info("Reloading processing type data")
logger.info("Reloading scenario type data")
val old = current
current = loadMethod()
logger.info("Processing type data reloaded, closing old models")
logger.info("Scenario type data reloaded, closing old models")
old.all.values.foreach(_.close())
logger.info("Processing type data reloading finished")
logger.info("Scenario type data reloading finished")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ class DefinitionResourcesSpec extends FunSpec with ScalatestRouteTest with FailF

private implicit final val string: FromEntityUnmarshaller[String] = Unmarshaller.stringUnmarshaller.forContentTypes(ContentTypeRange.*)

it("should handle missing processing type") {
it("should handle missing scenario type") {
getProcessDefinitionData("foo", Map.empty[String, Long].asJson) ~> check {
status shouldBe StatusCodes.NotFound
}
}

it("should return definition data for existing processing type") {
it("should return definition data for existing scenario type") {
getProcessDefinitionData(existingProcessingType, Map.empty[String, Long].asJson) ~> check {
status shouldBe StatusCodes.OK

Expand Down

0 comments on commit d7e75a8

Please sign in to comment.