Cray Graph Engine (CGE) Properties File
Describes how the cge.properties file can be used to set command line options globally. Provides information about using the properties file to define command aliases.
A cge.properties file can be used to specify some command options, thus eliminating the need to explicitly state them with every command invocation.
The properties file can be:
If there is a properties file that overrides the default value, it will be indicated in the logging and will contain a warning to alert the user of the fact that they have set it in the properties file.
- specified via the --configDir option
- specified via the
$CGE_CONFIG_FILE_NAMEenvironment variable - specified via the
$CGE_CONFIG_DIR_NAMEenvironment variable - located in the working directory from which the command-line interface is launched
- located in the .cge directory, which in turn is located under the home directory, as defined by the
$HOMEenvironment variable
| Property | Supported Values | Equivalent Command Line Option | Description |
|---|---|---|---|
cge.cli.db.host
| Host | --db-host --dbhost | Host name of a CGE server that the CLI will connect to if the --dbhost option is not used. |
cge.cli.db.port
| Port | --db-port
--dbport | Port number of a CGE server that the CLI will connect to if the --dbport option is not used. |
cge.cli.trust-keys | True / False | --trust-keys | Eliminates the need for a first-time interactive CLI command each time you start using a server on a new TCP/IP port number combination. |
cge.cli.server.host | ServerHost | --server-host | Sets the default host on which the front end launched by the fe Command will accept HTTP requests |
cge.cli.server.port | cge.cli.server.port | --server-port | Sets the default port number on which the front end launched by the fe command will accept HTTP requests |
cge.cli.server.security | ShiroConfiguration | --security | Sets the Apache Shiro configuration file used to configure user authentication for the front end. |
cge.cli.server.ssl.enabled | True/False | --ssl | Sets whether SSL is enabled for the front end. |
cge.cli.server.ssl.lax | True/False | --ssl-lax | Sets whether the SSL configuration for the front end should permit older cyphers and protocols. |
cge.cli.server.ssl.keystore | KeystoreFile | --keystore | Sets the location of the Java key store used to provide the SSL certificate for the front en. |
cge.cli.server.ssl.password | KeystorePassword | Sets the password needed to unlock the Java key store which provides the SSL certificate for the front end. | |
cge.cli.server.ssl.key-password | CertificatePassword | Sets the password needed to unlock the SSL certificate within the Java keystore. |
CAUTION: Leaving an out of date properties file around can interfere with correct communications with the database server with no clear reason.
Defining Command Aliases
The properties file may also be used to define command aliases. These are essentially shortcuts to other commands. An alias is defined in the following manner:$ cge.cli.alias.algebra=compile -c algebraThis defines a new alias algebra which simply invokes the compile command passing in the -c Algebra option. The CLI can then be invoked using the following command:
$ cge-cli algebra example.rqThis would compile the given query into algebra and is equivalent to running the following command:
$ cge-cli compile -c algebra example.rq
Restrictions
Command aliases are subject to the following restrictions:- Aliases cannot override built-in commands.
- Aliases cannot be defined recursively, which means that an alias cannot be defined in terms of another alias.
Advanced Command Alias Definition
Certain advanced functions can be performed on aliases, such as using positional parameters. For example, consider the following definition:$ cge.cli.alias.c=compile -c $1This creates the
c alias, which invokes the compile command. However, it uses a positional parameter for the value of the -c option. With this definition, the CLI can be invoked in the following manner:$ cge-cli c rpn example.rqHere, the first argument after the alias is injected into the expansion of the alias so this is equivalent to running the following:
$ cge-cli compile -c rpn example.rq
CAUTION: A positional parameter that receives no value will be passed through as-is, which will likely result in parser errors.