Menu

HowToReloadModulesUsingJMX

Anonymous

Background

Impala also supports reloading of modules using a JMX interface. This allows you to explicitly initiate a module reload, and does not require you having to have any background monitoring of changes in module contents.

Setup

When Impala starts up it automatically exposes a JMX bean under the key impala:service=moduleManagementOperations, which includes an operation to invoke a module reload. Impala uses Spring JMX.

By default Impala will use Spring JMX to create a new JMX MBean server to host MBeans. You can tell Spring to locate an existing MBean server using the impala.properties entry.

jmx.locate.existing.server=true

By default you will be able to connect to the MBean server using JConsole, but only from the local machine.

Other options for connecting to the JMX are as follows:

1) Use the MX4J web interface

To enable this, you need to add the MX4J libraries into your application's classpath.

Then add the following entries into impala.properties:

expose.mx4j.adaptor=true
jmx.adaptor.port=8003

This will start an HTTP server on port 8003. At present, this is not a secure interface, so should be used with caution.

If pointing the browser to port 8003, you will see the following.

Click on the 'impala:service=moduleManagementOperations' link and you get the shown below:

The screen above allows you to explicitly invoke a module reload.

**2) Add a JSR-160 Connector **

The Spring JMX explains how to set up a JSR-160 connector to your MBean server. You can easily add the necessary support by adding an extra Spring beans to your Impala configuration:

extra.locations=custom-jmx-config.xml

Simply deploy the additional Spring bean configuration file in your web application's class path (e.g. under /WEB-INF/classses).

Note that this technique can be used to customise the creation of your MBean server and other aspects of the JMX configuration.

See more details on how to extend Impala.


Related

Wiki: HowTo
Wiki: HowToDynamicallyAddModulesUsingJMX
Wiki: HowToExtendImpala
Wiki: WikiHome

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.