Skip to content

System Configuration

Attilio Mattiocco edited this page Feb 24, 2016 · 25 revisions
  1. Configuration file behaviour
  2. Configuration file location
  3. Configuring logs
  4. Network settings
  5. Provider settings
  6. Other settings

Configuration file behaviour

The configuration of the java library has impacts on the behaviour of all the connectors and can be modified by means of the configuration.properties file.

The connector reads the configuration just once, when the java library is first loaded by the JVM.

Configuration file location

The connector looks for the configuration file in the current directory first and, if the file is not found, it tries to read the SDMX_CONF environment variable. If this variable is not set or the file is not found again, a default configuration is applied (default configuration should fit most environments, anyway).

Configuring logs

The tracing level is set, by default, to INFO and writes to stdout. To modify it you can change some of the following parameters:

SDMX.level = FINER
### Logging configuration
#handlers= java.util.logging.FileHandler
handlers= java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = FINER
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

You can modify the trace level, format and destination. Refer to the Java Util Logging documentation for details.

Network settings

If you have to use the connectors through a proxy, you can instruct the conncectors about it. If you have just a proxy in your environment, the http.proxy.default key should fit all your needs. However, if needed, you can also specify different provider URLs for different proxies, adding http.proxy.name0, http.proxy.name0.urls, http.proxy.name1, http.proxy.name1.urls, etc.

#### Network configuration
http.proxy.default = yourProxyHostDefault:yourProxyPortDefault
http.proxy.name0 = yourProxyHostname0:yourProxyPort0
http.proxy.name0.urls = sdw-wsrest.ecb.europa.eu,stats.oecd.org, ...

If your proxy needs authentication (we only support kerberos and basic type), you can specify it by the following entries:

KERBEROS

http.auth.preference = Kerberos
java.security.krb5.conf = yourKRB5ConfigurationFile
java.security.auth.login.config = yourJAASLoginConfigurationFile

BASIC

http.auth.preference = basic
http.auth.user = yourDomain\\yourUser (OPTIONAL)
http.auth.pw = yourPassword (OPTIONAL)

NOTE about basic authentication:
It is not advisable to leave the password in a plain text file. For this reason, if basic auth is configured, but user and password fields are not filled, the connector will interactively ask for proxy credentials at startup.

###HTTPS and certificates

If a provider uses the HTTPS protocol, the Java Virtual Machine has to be instructed for using a keystore where the provider certificates have been loaded. In this case you can use the following configuration property:

javax.net.ssl.trustStore = full/path/to/your/KeyStore

If you want to temporarily disable certificate check (this is useful for testing purposes, but not advisable in general), you can do it using the following property:

ssl.disable.cert.check = false

###Timeouts

By default all network timeouts (read and connect) are set to 0 (that means no timeout). If you want to override the timeouts for all connectors you can use the read.timeout and connect.timeout properties. E.g.:

# set 60 seconds
connect.timeout = 60000
read.timeout = 60000

You can also override the timeouts for one provider only using the PROVIDER_ID_read.timeout and PROVIDER_ID_connect.timeout properties. E.g.:

# set 60 seconds
ECB.connect.timeout = 60000
ECB.read.timeout = 60000

Provider settings

Sdmx Connectors is able, out of the box, to retrieve data from various data providers. Appropriate and well tested defaults are used for these builtin providers. However, should you ever need to overwrite these defaults, you can do so via properties. These properties are:

  • providers.PROVIDER_ID.name, i.e. the name identifying the provider
  • providers.PROVIDER_ID.endpoint, i.e. the URL that acts as entry point for the web service to be contacted
  • providers.PROVIDER_ID.needsCredentials, i.e. whether authentication is needed
  • providers.PROVIDER_ID.needsURLEncoding, i.e. whether it is necessary to percent-encode the URL
  • providers.PROVIDER_ID.supportsCompression, i.e. whether the provider can compress the data to be returned, using gzip
  • providers.PROVIDER_ID.description, i.e. a human-friendly description of the provider, such as a full name instead of an acronym

Please be sure to replace PROVIDER_ID with the id of the provider you wish to change (e.g. ECB, ISTAT, OECD, etc.). For example, in order to turn compression off for the ECB web service:

providers.ECB.supportsCompression = false

NOTE: this feature can be useful for adding new providers (only full SDMX 2.1) by configuration. For achieving this, the configuration key external.providers can be used. It has to contain a comma separated list of elements that correspond to the ids of the providers that you want to add. The remaining characteristics of the providers can be set using the previous configuration keys (note that providers.PROVIDER_ID.endpoint is mandatory) . E.g.:

external.providers = TEST
providers.TEST.endpoint= http://example.provider

Other settings

Language

The default language of the connectors is English. This means that, if names and descriptions for the SDMX elements are found in multiple languages, they will be returned in english (if present). To change the preferred language you can use the sdmx.lang property to a valid locale. E.g.:

sdmx.lang = it

Eurostat delayed response

The Eurostat provider could, in case of large responses, return the results after a delay and in a specific URL location. The connector is able to handle this mechanism and, by default, it will poll the correct URL every 6 seconds for 10 times. If you want to change the maximum number of polling attempts, you can use the late.response.retries property. E.g.

late.response.retries = 20

Excel specific properties

The default order for the observations is by increasing time. If you want to change it you can use the reverse.dump key:

reverse.dump = true

The results can be obtained as a table by setting the table.dump key:

table.dump = true