Hi Everyone,
I am able to stop Index agent using DFC or API and now, looking DFC code to stop xPlore server. Can any one give some suggestion?
Regards, Kashif
If there are Accepted Answers, those will be shown by default. You can switch to 'All Replies' by selecting the tab below.
What code do use use to stop Index Agent?
Hi,
I will use below code to stop IA.
public void shutdownIA(IDfSession sess) throws DfException { IDfPersistentObject FTIndexObj = ( IDfPersistentObject) sess.getObjectByQualification( "dm_fulltext_index where is_standby = false"); String indexName = FTIndexObj.getString("index_name"); //Query definition String query = "NULL,FTINDEX_AGENT_ADMIN,NAME,S," + indexName + ",AGENT_INSTANCE_NAME,S,all,ACTION,S,shutdown"; DfClientX clientX = new DfClientX(); IDfQuery q = clientX.getQuery(); q.setDQL(query); try { IDfCollection col = q.execute(sess, IDfQuery.DF_APPLY); } catch (DfException e) { e.printStackTrace(); } }
******DQL and API to shutdown and start IA******
select index_name from dm_fulltext_index; HOST._9200_IndexAgent
select object_name from dm_ftindex_agent_config; HOST_9220_IndexAgentconfig
Shutdown IA - apply,c,,FTINDEX_AGENT_ADMIN,NAME,S,HOST._9200_IndexAgent,AGENT_INSTANCE_NAME,S,HOST_9220_IndexAgentconfig,ACTION,S,shutdown
Start IA - apply,c,,FTINDEX_AGENT_ADMIN,NAME,S,HOST._9200_IndexAgent,AGENT_INSTANCE_NAME,S,HOST_9220_IndexAgentconfig,ACTION,S,start
This looks like this API that xplore provided to do this. I presume you already search the xplore documentation to see if there is something similar for xplore server. It probably doesnt exist, since server is core service (required for searching) and agents are only required for indexing (which isnt "core" per se).
Yes, I already searched xplore documentation but not able to find it. My requirement is to create the automated xPlore custom job. The job should restart the xPlore services and IA automatically on scheduled time.
You could always do this as chron job at OS level.