Hyrax - Frequently Asked Questions
1 Regular expression matches in BES
There are two regular expression matches in the BES, both configured in the BES configuration file bes.conf.
The TypeMatch regular expression is used to match file names with their type. For example, a file ending with the extension .hdf would match and be handled by the hdf4 module.
Note: The regular expression must match the file including the path to the file.
The TypeMatch parameter is a list of handler/module names and a regular expression separated by a colon. If the regular expression matches an item, then the BES uses the associated handler/module. Each <handler>:<regular expression> pair is followed by a semicolon. This is used when creating containers in the BES (the 'set container' command). The example regular expression says to use the 'h4' handler for any file with an extension of 'hdf', 'HDF' or 'eos' which may also end in '.gz' or '.bz2' or '.Z'. In the latter case the file will be treated as a compressed file.
- Include/Exclude directive
The Include/Exclude parameters in the BES configuration file tells the BES what files and directories to include/exclude in its catalog response. Normally, when a client asks for a data catalog, all files and directories are shown. Use the following two parameters to customize this behavior. Each parameter is a list of regular expressions, each followed by a semicolon (last one must also end with a semicolon as in the example below.) First, the Include parameter is applied to the node, and then the Exclude parameter is applied. All collections of nodes are shown. In the default values below, all nodes are included (the Include parameter) except those that begin with a dot (the Exclude parameter).
Example: BES.Catalog.catalog.Include=; BES.Catalog.catalog.Exclude=^\..*;
- There is a binary included in the distribution that will allow you to test a regular expression. The besregtest binary is run with the type of regular expression (type, include or exclude), the regular expression enclosed in quotes, and then the list of things to match. Here is the output of the usage of besregtest:
Usage: besregtest include|exclude|type <regular_expression> <string_to_match> samples: besregtest include "123456;" 01234567 matches 6 of 8 characters besregtest include "^123456$;" 01234567 does not match besregtest include "^123456$;" 123456 matches all 6 of 6 characters besregtest include ".*\.nc$;" fnoc1.nc matches besregtest include ".*\.nc$;" fnoc1.ncd does not matche besregtest type "nc:.*\.nc$;nc:.*\.nc\.gz$;ff:.*\.dat$;ff:.*\.dat\.gz$;" fnoc1.nc matches type nc
- Examples of the TypeMatch parameter:
% besregtest type "nc:.*\.nc(\.bz2|\.gz|\.Z)?$|.*/JA2_[OIG]P[NRS]_.*$;" jason2/gdr/gdr/cycle004/JA2_GPN_2PTP004_069_20080813_105815_20080813_115428 expression ".*\.nc(\.bz2|\.gz|\.Z)?$|.*JA2_[OIG]P[NRS]_.*$" matches exactly, type = nc Matches anything that ends with .nc OR anything that ends with a file that begins with JA2_; then one of O, I, G; then P; then one of N, R, S; followed by an underscore and anything else.
2 BES: unable to start properly because can not determine memory keys.
In release 1.4.1 of Hyrax, which includes release 3.6.0 of the BES, we fixed a typo in the BES configuration file. Unfortunately, this produces an error when you start up the BES if the configuration still contains the typo. The error message is:
BES: unable to start properly because can not determine memory keys.
To correct this, please change the parameter BES.Memory.GlobalArea.MaximunHeapSize to BES.Memory.GlobalArea.MaximumHeapSize.
3 The service dap has already been registered
Starting with Hyrax 1.6.0, the BES configuration has changed. It used to be that each handler/module would modify the bes.conf file, or the user would have to modify the bes.conf file, in order to enable that module. Now, the handler/module installs a .conf file in the directory modules under <prefix>/etc/bes/modules. The bes.conf file exists in <prefix>/etc/bes, and includes any .conf files located in the modules directory.
If you've installed the new BES for Hyrax 1.6, and then modify your bes.conf file like you've done in the past, this could cause problems like duplicate modules registered, duplicate services registered, etc...
So, in the new bes.conf file, there is a line:
which is empty. Leave it empty. The .conf files in the modules directory, such as nc.conf, will contain a line that looks like this:
The only items that you will need to change in the bes.conf file is:
BES.ServerAdministrator= BES.User= BES.Group= BES.LogName=<path_to>/bes.log BES.CacheDir=<path_to_bes_cache_directory>