mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
Merge pull request #3679 from APriestman/3612_solrMetrics
Moved solr metrics further down.
This commit is contained in:
commit
9de97a7511
@ -237,9 +237,7 @@ class Ingester {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
//TODO: consider timeout thread, or vary socket timeout based on size of indexed content
|
//TODO: consider timeout thread, or vary socket timeout based on size of indexed content
|
||||||
TimingMetric metric = EnterpriseHealthMonitor.getTimingMetric("Solr: Index chunk");
|
|
||||||
solrServer.addDocument(updateDoc);
|
solrServer.addDocument(updateDoc);
|
||||||
EnterpriseHealthMonitor.submitTimingMetric(metric);
|
|
||||||
uncommitedIngests = true;
|
uncommitedIngests = true;
|
||||||
|
|
||||||
} catch (KeywordSearchModuleException | NoOpenCoreException ex) {
|
} catch (KeywordSearchModuleException | NoOpenCoreException ex) {
|
||||||
|
@ -710,7 +710,9 @@ public class Server {
|
|||||||
if (null == currentCore) {
|
if (null == currentCore) {
|
||||||
throw new NoOpenCoreException();
|
throw new NoOpenCoreException();
|
||||||
}
|
}
|
||||||
|
TimingMetric metric = EnterpriseHealthMonitor.getTimingMetric("Solr: Index chunk");
|
||||||
currentCore.addDocument(doc);
|
currentCore.addDocument(doc);
|
||||||
|
EnterpriseHealthMonitor.submitTimingMetric(metric);
|
||||||
} finally {
|
} finally {
|
||||||
currentCoreLock.readLock().unlock();
|
currentCoreLock.readLock().unlock();
|
||||||
}
|
}
|
||||||
@ -775,9 +777,7 @@ public class Server {
|
|||||||
IndexingServerProperties properties = getMultiUserServerProperties(theCase.getCaseDirectory());
|
IndexingServerProperties properties = getMultiUserServerProperties(theCase.getCaseDirectory());
|
||||||
currentSolrServer = new HttpSolrServer("http://" + properties.getHost() + ":" + properties.getPort() + "/solr"); //NON-NLS
|
currentSolrServer = new HttpSolrServer("http://" + properties.getHost() + ":" + properties.getPort() + "/solr"); //NON-NLS
|
||||||
}
|
}
|
||||||
TimingMetric metric = EnterpriseHealthMonitor.getTimingMetric("Solr: Connectivity check");
|
|
||||||
connectToSolrServer(currentSolrServer);
|
connectToSolrServer(currentSolrServer);
|
||||||
EnterpriseHealthMonitor.submitTimingMetric(metric);
|
|
||||||
|
|
||||||
} catch (SolrServerException | IOException ex) {
|
} catch (SolrServerException | IOException ex) {
|
||||||
throw new KeywordSearchModuleException(NbBundle.getMessage(Server.class, "Server.connect.exception.msg", ex.getLocalizedMessage()), ex);
|
throw new KeywordSearchModuleException(NbBundle.getMessage(Server.class, "Server.connect.exception.msg", ex.getLocalizedMessage()), ex);
|
||||||
@ -1319,11 +1319,13 @@ public class Server {
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
void connectToSolrServer(HttpSolrServer solrServer) throws SolrServerException, IOException {
|
void connectToSolrServer(HttpSolrServer solrServer) throws SolrServerException, IOException {
|
||||||
|
TimingMetric metric = EnterpriseHealthMonitor.getTimingMetric("Solr: Connectivity check");
|
||||||
CoreAdminRequest statusRequest = new CoreAdminRequest();
|
CoreAdminRequest statusRequest = new CoreAdminRequest();
|
||||||
statusRequest.setCoreName( null );
|
statusRequest.setCoreName( null );
|
||||||
statusRequest.setAction( CoreAdminParams.CoreAdminAction.STATUS );
|
statusRequest.setAction( CoreAdminParams.CoreAdminAction.STATUS );
|
||||||
statusRequest.setIndexInfoNeeded(false);
|
statusRequest.setIndexInfoNeeded(false);
|
||||||
statusRequest.process(solrServer);
|
statusRequest.process(solrServer);
|
||||||
|
EnterpriseHealthMonitor.submitTimingMetric(metric);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user