{"id":576,"date":"2011-03-28T12:15:24","date_gmt":"2011-03-28T16:15:24","guid":{"rendered":"http:\/\/hstore.cs.brown.edu\/"},"modified":"2012-07-26T11:08:32","modified_gmt":"2012-07-26T15:08:32","slug":"debug-frontend","status":"publish","type":"page","link":"https:\/\/hstore.cs.brown.edu\/documentation\/debugging\/debug-frontend\/","title":{"rendered":"Debugging Java Frontend"},"content":{"rendered":"
The following instructions will allow you to execute a single node H-Store cluster from Eclipse. Note that you must build the EE libraries first from the command-line before you can execute these commands. In this example, we will use the TPC-C benchmark that comes with H-Store.<\/p>\n
catalog.jar=tpcc.jar\r\nsite.id=0\r\nconf=properties\/default.properties\r\n<\/pre>\n<\/li>\n
-ea\r\n-server\r\n-Xmx2048m\r\n-Xcheck:jni\r\n-Djava.library.path=obj\/release\/nativelibs<\/pre>\n<\/li>\n
\/path\/to\/h-store<\/pre>\n<\/li>\n<\/ul>\n<\/li>\n
ant hstore-prepare<\/tt> -Dproject=tpcc -Dhosts=localhost:0:0-1<\/pre>\n<\/li>\n<\/ul>\n- Execute the HStore<\/tt> profile target in Eclipse. Once it prints the message “Site is ready for action<\/tt>“, it is ready for new incoming connections. You can test that the database is online by executing the following command:\n
ant hstore-invoke<\/tt> -Dproject=tpcc -Dproc=\"@NoOp\"<\/pre>\n<\/li>\n- You can now use H-Store’s BenchmarkController<\/tt> to load data into the database. The following command will connect to the cluster running in Eclipse, load data for the target benchmark, and then immediately exit.\n
ant hstore-benchmark<\/tt> -Dproject=tpcc -Dnosites=true -Dnoexecute=true <\/pre>\n<\/ol>\nMulti-Node Clusters:<\/h3>\n
You can also debug a multi-node cluster in Eclipse. In this example, we will create a two site cluster on the same machine and then launch one of the sites in Eclipse and one of the sites from the command-line. Note that the two sites do not need to be on the same machine, but for simplicity we will assume that they are.<\/p>\n
\n
- Create a two-node \/ two-site \/ two-partition cluster project jar:\n
ant hstore-prepare<\/tt> -Dproject=tpcc -Dhosts=\"localhost:0:0;localhost:1:1\"<\/pre>\n<\/li>\n- Start the first HStoreSite<\/tt> in Eclipse using the instructions above.<\/li>\n
- Immediately start the second HStoreSite<\/tt> from the command-line using the following command. The nostart<\/tt> option is a comma-separated list of the sites that should not be started by the BenchmarkController<\/tt>. This must be executed right after the first HStoreSite<\/tt> is started in Eclipse so that the two sites can find each other on the network.\n
ant hstore-benchmark<\/tt> -Dproject=tpcc -Dnoloader=true -Dnoshutdown=true -Dnostart=0<\/pre>\n<\/li>\n- Once the first site prints the message “Site is ready for action<\/tt>” in the Eclipse console, you can then test that the database is online by executing the following command:\n
ant hstore-invoke<\/tt> -Dproject=tpcc -Dproc=\"@NoOp\"<\/pre>\n<\/li>\n<\/ol>\nH-Store Status Thread<\/h2>\n
In order to better understand what each HStoreSite<\/tt> is doing at run time, you can use the HStoreSiteStatus<\/a> feature to print non-blocking debug information about the current status of the system. <\/p>\n
The functionality of HStoreSiteStatus<\/a> can be controlled with the following H-Store configuration parameters. The site.status_show_txn_info<\/a>, site.status_show_executor_info<\/a>, and site.status_show_thread_info<\/a> options can be used to control the amount of information printed in each status update. Note that although this additional information does not cause the system to block, there is increased overhead for adding this throttling information.<\/p>\n