gl_processor.jar

The gl_processor.jar utility processes the General Ledger (GL) information loaded in the Event Repository and stores the resulting GL summary data in the same MongoDB system as the Event Repository. If you support multi-tenancy, each tenant has its own Event Repository.

Syntax

java -jar gl_processor.jar glDate(yyyy-mm-dd) gl_processor.yaml [tenantId]
java -jar gl_processor.jar -p password gl_processor.yaml [tenantId]

Options

The gl_processor.jar utility has the following options.

-p password
Encrypt and save the specified password in the specified properties file.
glDate(yyyy-mm-dd)
The GL date of all the MATRIXX events whose GL information is to be included in the daily summary record. The revenues that could be recognized for all wallets associated with this GL date are included in journal entries in the GL daily summary records.
gl_processor.yaml
Properties file the utility reads when run. You can use any name for your properties file.
tenantId
The string ID of the tenant Event Repository to process events.

Example

Generate a GL daily summary record for the GL date 2016-02-01 (February 1, 2016):

java -jar /opt/mtx/bin/gl_processor.jar 2016-02-01 /opt/mtx/data/gl_processor.yaml tenantId

Enabling Trace Logging

To enable tracing in the gl_processor.jar utility, add a Log4j 2.x configuration file log4j2-utilities-debugging.xml (or any name you choose) similar to the following in the /opt/mtx/conf directory. The Logger sub-element <Logger name='com.matrixx.glprocessor' level='trace' /> is what triggers log messages from gl_processor.jar:.

<?xml version='1.0' encoding='UTF-8'?>
<Configuration status='warn'>
    <Properties>
        <Property name='basePath'>${sys:MTX_LOG_DIR:-${env:MTX_LOG_DIR}}</Property>
    </Properties>
    <Appenders>
        <Console name='stdout' target='SYSTEM_OUT'>
            <PatternLayout>
                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5p | %-26.26X{requestId} | %-24.24t | %-60.60c | %m%n%xEx</pattern>
            </PatternLayout>
        </Console>
        <RollingFile fileName='${basePath}/utility_monitor.log' filePattern='${basePath}/utility_monitor-%i.log.gz' name='R'>
            <PatternLayout>
                <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5p | %-26.26X{requestId} | %-24.24t | %-60.60c | %m%n%xEx</pattern>
            </PatternLayout>
            <Policies>
                <SizeBasedTriggeringPolicy size='20 MB' />
            </Policies>
            <DefaultRolloverStrategy max='10' />
        </RollingFile>
    </Appenders>
    <Loggers>
        <Logger name='com.matrixx.glprocessor' level='trace' />
        <root level='error'>
            <AppenderRef ref='R' />
        </root>
    </Loggers>
</Configuration>

The following command specifies a log4j 2.x configuration file called log4j2-utilities-debugging.xml and processes records for February 5th, 2019 using a properties file called gl_processor.yaml:

java -Dlog4j.configurationFile=file:log4j2-utilities-debugging.xml -jar /opt/mtx/bin/gl_processor.jar 2019-02-05 gl_processor.yaml [tenantId]

For more information about GL support for multi-tenancy, see the discussion about GL for multi-tenancy.