Documentation > Debugging > Execution Output Logs

Java Log Files

The Java portion of H-Store uses log4j to generate all debug messages. All of the log output generated by the H-Store nodes in the cluster will be automatically sent back to the machine where you invoked the hstore-benchmark target from the command-line. The log files will be automatically split into separate files in directory defined in the site.log_dir configuration parameter.

In the root directory of the H-Store repository, there is a file log4j.properties that controls the debug out portion of the Java frontend. This file is read in when the system starts at each node and then is polled every 10 seconds to check for changes. Note that this file is only local to the HStoreSite running from that directory (i.e., the files is not automatically sent to other hosts in the H-Store cluster).

To enable debug output for a particular class file or package, you need to add entry into log4j.properties and declare what output level you want for it. There are three different log levels for log4j:

  • INFO
  • DEBUG
  • TRACE

For example, to enable DEBUG output for the HStoreSite class, one would add the following entry to the properties file:

log4j.logger.edu.brown.hstore.HStoreSite=DEBUG

Each log message generated by the system will be tagged based on the thread that generated it. You can reference the table below to determine which thread a message is from (see also the thread name variables in HStoreConstants).

Thread Identifier Description
HXX-YYY The thread that is assigned to a PartitionExecutor. The XX portion of the name represents the HStoreSite id, while the YY represents the unique partition id.
HXX-coord The HStoreCoordinator thread. This thread is responsible for managing distributed transactions in the system.
HXX-queue To be written…
HXX-listen The VoltProcedureListener thread. This is the thread that listens for incoming transaction requests from clients and either queues them immediately in PartitionExecutor if they are single-partitioned, or hands them off to H-Store’s TransactionQueueManager.

Execution Engine Debug Levels

The C++ portion of H-Store uses logging levels that are defined at compile time. These levels are defined in debuglog.h. Every log message will appear in their corresponding HStoreSite log output file (as defined in site.log_dir). If you need to change these levels to debug a certain feature, you must recompile the engine and set the site.exec_ee_log_level parameter to one of the following levels:

100 TRACE All log messages are printed. Note that this will significantly reduce the performance of the engine at runtime.
200 DEBUG Only debug messages are printed.
300 INFO Only info messages are printed.
400 WARN Only warning messages are printed.
500 ERROR Only fatal error messages are printed. This is the default setting.
1000 DISABLE All output messages from the engine are suppressed. Some exceptions may be propagated up into the HStoreSite, but the log files will not include additional information.

To use the Execution Engine with a more verbose log-level, you can pass the site.exec_ee_log_level parameter at compilation time. You pass in either the log level name or its value. Note that we have to recompile the engine from scratch in order to ensure that the log-level value is propagated.

For example, to enable DEBUG level messages, you will execute the following command:

ant clean-cpp build -Dsite.exec_ee_log_level=200

Using the name of the log level also works as well:

ant clean-cpp build -Dsite.exec_ee_log_level=DEBUG