Installing custom calendars and custom plotting themes
Deephaven users can create custom business calendars and custom plotting themes.
Once a custom calendar or custom theme is created and saved, the file(s) will need to be installed on the server(s) as described below:
- Copy the
.calendar
files to/etc/sysconfig/illumon.d/calendars
, and ensure the.calendar
files are readable by userdbquery
. - Copy the
.theme
files to/etc/sysconfig/illumon.d/chartthemes
, and ensure the.theme
files are readable by userdbquery
.
The Client Update Service will need to be restarted to register the new files:
sudo monit restart client_update_service
Upon completion of these steps, the custom calendar and/or custom theme file(s) should be available to all users.
Defining override calendars
The property Calendar.resourcePath
is used to allow for overrides of built-in calendars. When set, any calendars in the specified directory are given priority over built-in calendars with the same name. This is useful when adding new custom holiday dates or extending the holiday calendar beyond the built-in calendar's last known date. By default, the property is not set.
For convenience, many customers set the path to be the same as the custom-calendar path, which means that custom calendars and override calendars are in the same directory. However, using the same path as the custom calendars is not required. The property is used from different scopes by the swing client and by processes on the server, with unique values, typically:
-
# defined at the global level, is used for server-level processes and workers: Calendar.resourcePath=/etc/sysconfig/illumon.d/calendars
-
# defined within a `[service.name=iris_console]` stanza, is used for the swing client: [service.name=iris_console] { Calendar.resourcePath=<devroot>/calendars }
Warning
If an override calendar is placed in /etc/sysconfig/illumon.d/calendars
and the Calendar.resourcePath
is not set, workers may fail to start because of the conflicting calendars. Setting Calendar.resourcePath=/etc/sysconfig/illumon.d/calendars
tells workers that the override is given priority, and the built-in calendar of the same name is ignored.
The following additional properties may be configured:
Calendar.default=USNYSE
- defaults toUSNYSE
; used to define the default calendar for all processes.Calendar.errorOnStale=true
- defaults totrue
; if business-date logic goes beyond the last defined holiday in the calendar, an exception will be thrown. If disabled (set tofalse
), then a warning will be logged instead (up to once per business-calendar per worker).Calendar.allowStaleAfterDays=MIN_LONG
- defaults toMIN_LONG
; may be set system-wide in props or per-query to allow querying beyond the known holidays. For example, if we assume that we always have (at least) 2 years of “real” data, we could set this to730
(2 years in days). Querying days beyond that will (potentially) be a guess, but permitted. If the holiday-data does not go out a full 2 years, an exception will continue to be thrown ifCalendar.errorOnStale=true
.Calendar.knownStale
- optional; no default. A comma-separated list of known stale calendar-names. The values{“GLOBAL”, “USNY”}
will be auto-appended to any values defined by this property. If internally-defined calendars are unused by the client, they may be added to this list so there are no warnings.