lightbend / cloudflow

Cloudflow enables users to quickly develop, orchestrate, and operate distributed streaming applications on Kubernetes.
https://cloudflow.io
Apache License 2.0
321 stars 90 forks source link

During runLocal getting Empty config error even though parameters are passed through local.conf #153

Closed dhillonr closed 4 years ago

dhillonr commented 4 years ago

Describe the bug

After verifying blueprint successfully while doing runLocal application not able to read parameters from local.conf

After verifyBlueprint , I ran runLocal I received following error:

Streamlet [cassandra-ingress] failed to launch. Reason: empty config: No configuration setting found for key 'cassandra-ip-address'

To Reproduce My local.conf is : cassandra-ingress { cassandra-ip-address = ### cassandra-port = 9042 username = ## password = ### query = ### fetchsize = 0 } prediction-logger{ prediction-uri=## columns-list= ## }

In build.sbt

runLocalConfigFile := Some("src/main/resources/local.conf")

And I have placed local.conf in src/main/resources folder.

Expected behavior Application should be able to read params from local.conf Screenshots NA

Additional context NA

debasishg commented 4 years ago

Hi @dhillonr -

How are you accessing the config parameters ? In sample application sensor-data-scala we have an example of this in https://github.com/lightbend/cloudflow/blob/master/examples/sensor-data-scala/src/main/scala/sensordata/ValidMetricLogger.scala#L35 where the values of msg-prefix is read from the config (local.conf for local running). These are called streamlet config parameters.

Please let us know if u followed this approach. I just now ran sensor-data-scala and it runs fine with the values from local.conf.

dhillonr commented 4 years ago

Actually I declared all the config parameters but forgot to override method configParameters.

dhillonr commented 4 years ago

Even though the parameters were declared, they were not the part of streamlet descriptor.

dhillonr commented 4 years ago

overriding solved the problem.