Gld Configuration: Difference between revisions
No edit summary |
|||
Line 13: | Line 13: | ||
=Service Configuration= | =Service Configuration= | ||
= | "type" is mandatory, it specifies the type of service. Possible values: | ||
* "cache" (see [[#Cache_Service_Configuration|Cache Service Configuration]] below for specifics) | |||
* "jms" | |||
* "http" | |||
==Implementation== | |||
The implementation section defines the [[Gld_Concepts#Extension|gld extension]] to use. The extension contains implementation-specific details essential to connect to, and interact with the target service. | |||
===Implementation Name=== | |||
The implementation "name" specifies the name of the [[Gld_Concepts#Extension|gld extension]] that will be instantiated. For more details about extension names, see "[[Gld_Concepts#Extension_Name|Extension Name]]" section. | |||
<pre> | |||
service: | |||
implementation: | |||
name: <extension-name> | |||
</pre> | |||
===Implementation Class=== | |||
Optionally, the implementation may be specified by its fully qualified class name: | |||
<pre> | |||
service: | |||
implementation: | |||
class: some.fully.qualified.class.Name | |||
</pre> | |||
Note that an implementation may be specified either by name or class, but not both. The configuration parsing will fail both the name and the class are found. The class, and its dependents, must be available on the [[Gld_Concepts#Extension_Classpath|extension class path]]. | |||
===Client Libraries Configuration=== | |||
====Client Libraries Available in the Operational Environment==== | |||
<font color=red>TODO: replace with a real example</font> | |||
<pre> | |||
service: | |||
implementation: | |||
name: jboss-datagrid-7 | |||
classpath: ${JDG_HOME}/client/hotrod.jar | |||
... | |||
</pre> | |||
Also see: | |||
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;"> | |||
:[[Gld_Concepts#Target_Service_Client_Libraries|Target Service Client Libraries]] | |||
</blockquote> | |||
====Client Libraries Shipped with the gld Distribution==== | |||
<font color=red>TODO: replace with a real example</font> | |||
<pre> | <pre> | ||
service: | service: | ||
implementation: | |||
name: jboss-datagrid-7 | |||
version: 7.0.0 | |||
... | |||
</pre> | </pre> | ||
=Cache Service Configuration= | Also see: | ||
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;"> | |||
:[[Gld_Concepts#Target_Service_Client_Libraries|Target Service Client Libraries]] | |||
</blockquote> | |||
==Cache Service Configuration== | |||
<pre> | <pre> | ||
Line 43: | Line 103: | ||
Known cache extension implementations: | Known cache extension implementations: | ||
==jboss-datagrid-7== | ===jboss-datagrid-7=== | ||
{{Internal|jboss-datagrid-7 Gld Extension|jboss-datagrid-7}} | {{Internal|jboss-datagrid-7 Gld Extension|jboss-datagrid-7}} | ||
=Load Configuration= | |||
<pre> | |||
service: | |||
... | |||
load: | |||
threads: 10 | |||
requests|operations|messages: 1000 # optional, if not specified load will be generated forever | |||
</pre> | |||
==Generic Load Strategy Configuration== | ==Generic Load Strategy Configuration== | ||
Line 114: | Line 245: | ||
file: test.csv | file: test.csv | ||
</pre> | </pre> | ||
Revision as of 04:02, 13 January 2017
Internal
Configuration
-c <cofiguration-file.yml>
If the configuration file is not specified on the command line (where it has priority), it is looked up a value of GLD_CONF_FILE environment variable.
Service Configuration
"type" is mandatory, it specifies the type of service. Possible values:
- "cache" (see Cache Service Configuration below for specifics)
- "jms"
- "http"
Implementation
The implementation section defines the gld extension to use. The extension contains implementation-specific details essential to connect to, and interact with the target service.
Implementation Name
The implementation "name" specifies the name of the gld extension that will be instantiated. For more details about extension names, see "Extension Name" section.
service: implementation: name: <extension-name>
Implementation Class
Optionally, the implementation may be specified by its fully qualified class name:
service: implementation: class: some.fully.qualified.class.Name
Note that an implementation may be specified either by name or class, but not both. The configuration parsing will fail both the name and the class are found. The class, and its dependents, must be available on the extension class path.
Client Libraries Configuration
Client Libraries Available in the Operational Environment
TODO: replace with a real example
service: implementation: name: jboss-datagrid-7 classpath: ${JDG_HOME}/client/hotrod.jar ...
Also see:
Client Libraries Shipped with the gld Distribution
TODO: replace with a real example
service: implementation: name: jboss-datagrid-7 version: 7.0.0 ...
Also see:
Cache Service Configuration
service: type: cache key-size: 10 # optional, if not specified, the default value is 12 characters value-size: 1024 # optional, if not specified, the default value is 512 characters implementation: ... load-strategy: ...
For details on how to configure a specific implementation, see Implementation below.
Known cache extension implementations:
jboss-datagrid-7
Load Configuration
service: ... load: threads: 10 requests|operations|messages: 1000 # optional, if not specified load will be generated forever
Generic Load Strategy Configuration
load-strategy: class: <fully-qualified-class-name>
read-then-write-on-miss Load Strategy Configuration
service: type: cache ... load-strategy: name: read-then-write-on-miss reuse-value: false
reuse-value
By default, the load strategy randomly generates the first entry value and then keeps reusing it, as a speed optimization (reuse-value: "true"). To change this behavior and configure the load strategy to generate a new random value every times it needs one, set "reuse-value" to "false". Configuring the load strategy to not reuse values will make it somewhat slower.
write-then-read Load Strategy Configuration
service: type: cache ... load-strategy: name: write-then-read reuse-value: false read-to-write|write-to-read: <integer>
reuse-value
See reuse-value above.
read-to-write
write-to-read
Store Configuration
store: type: hierarchical directory: ../store # if relative, is relative to the position of the configuration file
Output Configuration
Specifies where various types of outputs go. Can be used to configure logging, stdout, stderr and most importantly, the collected statistics.
Statistics Output Configuration
output: statistics: file: test.csv