Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "SMILA/Project Concepts/CrawlerController Remote Management"

m
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
  
 
=== How to manage CrawlerController remotely ===
 
=== How to manage CrawlerController remotely ===
Bundle org.eclipse.eilf.management.crawlercontroller allows remote management of the CrawlerController.
+
Bundle org.eclipse.smila.management.crawlercontroller allows remote management of the CrawlerController.
Currently the following methods of the CrawlerController are offered for management:  
+
Currently the following methods of the CrawlerController are offered for management:
 +
 
 
- startCrawl(String dataSourceId),
 
- startCrawl(String dataSourceId),
 +
 
- stopCrawl(String dataSourceId),
 
- stopCrawl(String dataSourceId),
 +
 
- getStatus(String dataSourceId)
 
- getStatus(String dataSourceId)
 +
 
- getActiveCrawls()
 
- getActiveCrawls()
  
To activate remote JMX management EILF application must be started with the following JVM arguments:
+
 
 +
To activate remote JMX management SMILA application must be started with the following JVM arguments:
 
<source lang="text">
 
<source lang="text">
 
-Dcom.sun.management.jmxremote
 
-Dcom.sun.management.jmxremote

Latest revision as of 04:23, 15 October 2008

Description.

How to manage CrawlerController remotely

Bundle org.eclipse.smila.management.crawlercontroller allows remote management of the CrawlerController. Currently the following methods of the CrawlerController are offered for management:

- startCrawl(String dataSourceId),

- stopCrawl(String dataSourceId),

- getStatus(String dataSourceId)

- getActiveCrawls()


To activate remote JMX management SMILA application must be started with the following JVM arguments:

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.port=9004

CrawlerController can be managed with any JMX agent, for example JConsole.

JMX agent application

JMX agent application (jmxagent) allows remote management of the CrawlerController and batch execution of the CrawlerController methods. Jmxagent is available as bundle of the SMILA project org.eclipse.smila.monitoring.jmxagent, but it will be also compiled into the jmxagent-folder of SMILA. It can be started as a java application in Eclipse, or from console with the appropriate run script from build directory (run.bat or run.sh). You can also check sample batch execution script startcrawl.sh or starcrawl.bat.


Configuring the JMX agent application

Using command line arguments

jmxagent run.bat or run.sh script must be provided with the following arguments:

  • agent - remote management agent name to connect to (org.eclipse.smila.connectivity.framework.CrawlerController for the CrawlerController management agent)
Remote management agent is a bundle that provides service that implements org.eclipse.smila.management.ManagementAgent interface.
  • cmd - command to execute, for example startCrawl;
  • dataSourceId - optional parameter, if dataSourceId is missing it's assumed that operation doesn't have any parameters.

For example:

run.bat -agent=org.eclipse.smila.connectivity.framework.CrawlerController -cmd=startCrawl -dataSourceId=file

In addition, following JMX configuration arguments can be provided (optionally):

  • host - JMX server host (default is localhost)
  • port - JMX server port number (default is 9004)

Using properties file.

JMX agent application can be also configured using configuration.properties file. By default it contains default values for host and port properties. Any other command line arguments described above can be placed into configuration.properties file too. Properties from this file will be overridden by the provided corresponding command line properties. The default values host=localhost and port=9004 will be used even if host or port was not specified neither in command line nor in properties file.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.