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:
  1. specified via the --configDir option
  2. specified via the $CGE_CONFIG_FILE_NAME environment variable
  3. specified via the $CGE_CONFIG_DIR_NAME environment variable
  4. located in the working directory from which the command-line interface is launched
  5. located in the .cge directory, which in turn is located under the home directory, as defined by the $HOME environment variable
Only the first properties file found will be used. Enabling verbose mode displays output detailing exactly which properties file (if any) are used. If present, values from this file are used unless these are specifically overridden using command line options. Use the get-configuration command to view additional detail, such as the locations being searched, which file is used, and the effective properties. The following properties are currently supported:
Table 1. CGE Property Files
PropertySupported ValuesEquivalent Command Line OptionDescription
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-keysTrue / False--trust-keysEliminates 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.hostServerHost--server-hostSets the default host on which the front end launched by the fe Command will accept HTTP requests
cge.cli.server.portcge.cli.server.port--server-portSets the default port number on which the front end launched by the fe command will accept HTTP requests
cge.cli.server.securityShiroConfiguration--securitySets the Apache Shiro configuration file used to configure user authentication for the front end.
cge.cli.server.ssl.enabledTrue/False--sslSets whether SSL is enabled for the front end.
cge.cli.server.ssl.laxTrue/False--ssl-laxSets whether the SSL configuration for the front end should permit older cyphers and protocols.
cge.cli.server.ssl.keystoreKeystoreFile--keystoreSets the location of the Java key store used to provide the SSL certificate for the front en.
cge.cli.server.ssl.passwordKeystorePasswordSets the password needed to unlock the Java key store which provides the SSL certificate for the front end.
cge.cli.server.ssl.key-passwordCertificatePasswordSets the password needed to unlock the SSL certificate within the Java keystore.
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.
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 algebra
This 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.rq
This 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 $1
This 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.rq
Here, 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.