Fork me on GitHub

Configuration

Framework configuration file

HSN framework is configured through the configuration file located at /etc/hsn2/framework.conf. An example of this file is provided below.

workflow.repository = /etc/hsn2/workflows/
AMQP.queues.framework.low= fw:l
AMQP.queues.framework.high= fw:h
AMQP.services= feeder-list, webclient, capture, swf-cve, shell-scdbg, js-sta, reporter, norm-url, rb-officecat, rb-pdffox
AMQP.queues.objectStore.high= os:h
AMQP.queues.objectStore.low= os:l
AMQP.server.address= 127.0.0.1

# Exchange name for monitoring. Default value: notify
# You can bind to it and consume monitoring messages while
# job is in progress.
#AMQP.exchange.monitoring= notify

# Exchange name for common use. Default value: main
#AMQP.exchange.common= main

# Exchange name for service to bind to. Default value: direct
#AMQP.exchange.services= direct

jobs.sequence.file=/opt/hsn2/framework/jobId.seq

# Uncomment it if you would like to limit number of maximum
# simultaneously processing jobs. If parameter is not specified
# or is less or equal to 0 there is unlimited maximum jobs.
#
# jobs.limit=10

You usually do not have to change any of these. However, these are the most commonly tweaked values:

AMQP.services

List of all service names.

AMQP.server.address

Address of the RabbitMQ installation.

Command line parameters

Each service can be configured by adjusting its command line parameters. These can be done in /etc/init.d/hsn2-<service_name> file. You just have to modify the HSN_COMPONENT_PARAMS variable. Example of this variable declaration is provided below.

HSN2_COMPONENT_PARAMS="--connector 127.0.0.1 \
--dataStore http://127.0.0.1:8080 \
--maxThreads 30"

Parameters common for all services are:

connector

Address of the RabbitMQ installation.

dataStore

Address of the data store component (default port on which it listens is 8080).

maxThreads

Number of threads on which the service will run. If it is a Python it is a number of processes. This is due to the CPython implementation solution called Global Interpreter Lock.

Framework

Framework accepts only one command line parameter:

configPath

Path to the framework configuration file.

JavaScript Static Analyzer

JavaScript Static Analyzer (js_sta) accepts three parameters which are correlated to the way it process contexts:

trainingSet

Location of the Weka ARFF training set

libPath

Location of libngrams, should not usually be changed, unless you know what you are doing

whitelistPath

Path to the whitelist file.

In order to understand this parameters please read JavaScript static analyzer documentation.