typesafe-config

Submit an application property file with Spark typesafe config

你离开我真会死。 提交于 2020-05-12 07:18:07
问题 Please, I need your help, I'm trying to submit an external configuration file for my spark application using typesafe config. I'm loading the application.conf file in my application code like this: lazy val conf = ConfigFactory.load() File content ingestion{ process { value = "sas" } sas { origin{ value = "/route" } destination{ value = "/route" } extension{ value = ".sas7bdat" } file{ value = "mytable" } month{ value = "201010,201011" } table{ value = "tbl" } } } My spark submit is spark2

unknown configuration format: hocon (supported formats are: [json, raw, properties]

梦想的初衷 提交于 2020-02-04 23:19:12
问题 I am trying to use the Hocon format for configuration in Vertx. I have also added the maven dependency for it. <dependency> <groupId>com.typesafe</groupId> <artifactId>config</artifactId> <version>1.3.3</version> </dependency> <dependency> <groupId>io.vertx</groupId> <artifactId>vertx-config-hocon</artifactId> <version>3.5.1</version> </dependency> The code compiles fine in eclipse. Vertx vertx = Vertx.vertx(); DeploymentOptions options = new DeploymentOptions(); ConfigStoreOptions store =

Merging multiple TypeSafe Config files and resolving only after they are all merged

自闭症网瘾萝莉.ら 提交于 2020-01-11 15:36:08
问题 I am writing test code to validate a RESTful service. I want to be able to point it at any of our different environments by simply changing an environment variable before executing the tests. I want to be able to merge three different config files: conf/env/default.conf - the default configuration values for all environments conf/env/<env>.conf - the environment-specific values application.conf - the user's overrides of any of the above The idea is that I don't want everything in a single

how to resolve NoSuchMethodError on typesafe config?

吃可爱长大的小学妹 提交于 2019-12-25 07:48:42
问题 I'm getting this error when trying to run my project. Exception in thread "main" java.lang.NoSuchMethodError: com.typesafe.config.Config.getDuration(Ljava/lang/String;)Ljava/time/Duration; tried to clear ivy2 cache with no success . this is how my build sbt looks like : scalaVersion := "2.11.7" scalacOptions := Seq("-unchecked", "-feature", "-deprecation", "-encoding", "utf8") resolvers ++= Seq( Resolver.sonatypeRepo("releases"), Resolver.sonatypeRepo("snapshots"), Resolver.bintrayRepo(

cant override Typesafe configuration on commmandline in spark

此生再无相见时 提交于 2019-12-24 03:40:16
问题 I have a typesafe configuration application.conf in the src/main/resources folder which is loaded by default. A single value can be overridden by specifying: --conf spark.driver.extraJavaOptions=-DsomeValue="foo" However, specifying a complete new, i.e. overriding application.conf file like: spark-submit \ --class my.Class \ --master "local[2]" \ --files foo.conf \ --conf spark.driver.extraClassPath="-Dconfig.file=file:foo.conf" \ --conf spark.driver.extraJavaOptions=-Dvalue="abcd" \ job.jar

What diference between -Dconfig.resource and -Dconfig.file in akka?

吃可爱长大的小学妹 提交于 2019-12-23 19:15:12
问题 According to the Akka Configuration documentation: What is the difference between the -Dconfig.resource and -Dconfig.file arguments? 回答1: System properties can be used to force a different config source: config.resource specifies a resource name - not a basename, i.e. application.conf not application config.file specifies a filesystem path, again it should include the extension, not be a basename config.url specifies a URL Loading configuration with -Dconfig.file is the way to specify an

How print akka configuration at startup?

…衆ロ難τιáo~ 提交于 2019-12-23 07:03:24
问题 I have a akka project with several config files. Is it possible to print akka merged configuration event when application starts (or stops) with errors? 回答1: From Configuration: If the system or config property akka.log-config-on-start is set to on , then the complete configuration at INFO level is logged when the actor system is started. Add the configuration in your config file to print the entire configuration as akka { log-config-on-start = "on" } 来源: https://stackoverflow.com/questions

Typesafe Config in Spark

蓝咒 提交于 2019-12-21 17:42:06
问题 I've defined a default configuration in my Spark application which is tucked in src/main/resources/reference.conf . I use ConfigFactory.load() to obtain the configuration. When I run the application with spark-submit it picks up these defaults. However, when I only want to override a few of the configurations available in reference.conf and provide application.conf , it does not seem to pick up these overrides. From the documentation I thought that application.conf is merged with reference

Executable Jar cannot find typesafe/config application.conf on classpath

那年仲夏 提交于 2019-12-19 09:43:07
问题 I have a command line app that downloads some reports, processes them, then uploads data to Google Drive. I'm using Typesafe-Config for all the magic strings I need. Typesafe-Config looks on the classpath for my application.conf file and uses HOCON to map config objects to fields in my class, like this: From ~/configs/application.conf : my.homePageUrl = "https://my.home.com" From MyClass.java : private static Config config = ConfigFactory.load(); private static final String HOME_URL = config

Spring Environment backed by Typesafe Config

人盡茶涼 提交于 2019-12-18 14:15:29
问题 I want to use typesafe config (HOCON config files) in my project, which facilitate easy and organized application configuration. Currently I am using normal Java properties file(application.properties) and which is difficult to handle on big project. My project is a Spring MVC (Not a spring boot project). Is there a way to back my Spring Environment (that I am getting injected to my services) to be backed by typesafe config. Which should not brake my existing Environment usage Like @Value