@Test @Ignore("Superseded by AlfrescoSolrTrackerTest") public void testCheckNodeLong() throws AuthenticationException, IOException, JSONException { List<Node> nodes = getNodes(); when(repositoryClient.getNodes(any(GetNodesParameters.class), eq(1))).thenReturn(nodes); NodeReport nodeReport = this.metadataTracker.checkNode(DB_ID); assertNotNull(nodeReport); assertEquals(DB_ID, nodeReport.getDbid()); assertEquals(TX_ID, nodeReport.getDbTx()); }
@Override public NodeReport checkNode(Long dbid) { NodeReport nodeReport = super.checkNode(dbid); GetNodesParameters parameters = new GetNodesParameters(); parameters.setFromNodeId(dbid); parameters.setToNodeId(dbid); try { List<Node> dbnodes = client.getNodes(parameters, 1); if (dbnodes.size() == 1) { Node dbnode = dbnodes.get(0); nodeReport.setDbNodeStatus(dbnode.getStatus()); nodeReport.setDbTx(dbnode.getTxnId()); } else { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-1L); } } catch (IOException e) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-2L); } catch (JSONException e) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-3L); } catch (AuthenticationException e1) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-4L); } return nodeReport; }
MetadataTracker extends ActivatableTracker { @Override public NodeReport checkNode(Long dbid) { NodeReport nodeReport = super.checkNode(dbid); GetNodesParameters parameters = new GetNodesParameters(); parameters.setFromNodeId(dbid); parameters.setToNodeId(dbid); try { List<Node> dbnodes = client.getNodes(parameters, 1); if (dbnodes.size() == 1) { Node dbnode = dbnodes.get(0); nodeReport.setDbNodeStatus(dbnode.getStatus()); nodeReport.setDbTx(dbnode.getTxnId()); } else { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-1L); } } catch (IOException e) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-2L); } catch (JSONException e) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-3L); } catch (AuthenticationException e1) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-4L); } return nodeReport; } }
MetadataTracker extends ActivatableTracker { @Override public NodeReport checkNode(Long dbid) { NodeReport nodeReport = super.checkNode(dbid); GetNodesParameters parameters = new GetNodesParameters(); parameters.setFromNodeId(dbid); parameters.setToNodeId(dbid); try { List<Node> dbnodes = client.getNodes(parameters, 1); if (dbnodes.size() == 1) { Node dbnode = dbnodes.get(0); nodeReport.setDbNodeStatus(dbnode.getStatus()); nodeReport.setDbTx(dbnode.getTxnId()); } else { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-1L); } } catch (IOException e) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-2L); } catch (JSONException e) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-3L); } catch (AuthenticationException e1) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-4L); } return nodeReport; } MetadataTracker(Properties p, SOLRAPIClient client, String coreName,
            InformationServer informationServer);  MetadataTracker( Properties p, SOLRAPIClient client, String coreName,
                InformationServer informationServer, boolean checkRepoServicesAvailability);   MetadataTracker(); }
MetadataTracker extends ActivatableTracker { @Override public NodeReport checkNode(Long dbid) { NodeReport nodeReport = super.checkNode(dbid); GetNodesParameters parameters = new GetNodesParameters(); parameters.setFromNodeId(dbid); parameters.setToNodeId(dbid); try { List<Node> dbnodes = client.getNodes(parameters, 1); if (dbnodes.size() == 1) { Node dbnode = dbnodes.get(0); nodeReport.setDbNodeStatus(dbnode.getStatus()); nodeReport.setDbTx(dbnode.getTxnId()); } else { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-1L); } } catch (IOException e) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-2L); } catch (JSONException e) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-3L); } catch (AuthenticationException e1) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-4L); } return nodeReport; } MetadataTracker(Properties p, SOLRAPIClient client, String coreName,
            InformationServer informationServer);  MetadataTracker( Properties p, SOLRAPIClient client, String coreName,
                InformationServer informationServer, boolean checkRepoServicesAvailability);   MetadataTracker(); @Override Semaphore getWriteLock(); @Override Semaphore getRunLock(); void maintenance(); boolean hasMaintenance(); @Override NodeReport checkNode(Long dbid); NodeReport checkNode(Node node); List<Node> getFullNodesForDbTransaction(Long txid); IndexHealthReport checkIndex(Long toTx, Long fromTime, Long toTime); void addTransactionToPurge(Long txId); void addNodeToPurge(Long nodeId); void addTransactionToReindex(Long txId); void addNodeToReindex(Long nodeId); void addTransactionToIndex(Long txId); void addNodeToIndex(Long nodeId); void invalidateState(); void addQueryToReindex(String query); }
MetadataTracker extends ActivatableTracker { @Override public NodeReport checkNode(Long dbid) { NodeReport nodeReport = super.checkNode(dbid); GetNodesParameters parameters = new GetNodesParameters(); parameters.setFromNodeId(dbid); parameters.setToNodeId(dbid); try { List<Node> dbnodes = client.getNodes(parameters, 1); if (dbnodes.size() == 1) { Node dbnode = dbnodes.get(0); nodeReport.setDbNodeStatus(dbnode.getStatus()); nodeReport.setDbTx(dbnode.getTxnId()); } else { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-1L); } } catch (IOException e) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-2L); } catch (JSONException e) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-3L); } catch (AuthenticationException e1) { nodeReport.setDbNodeStatus(SolrApiNodeStatus.UNKNOWN); nodeReport.setDbTx(-4L); } return nodeReport; } MetadataTracker(Properties p, SOLRAPIClient client, String coreName,
            InformationServer informationServer);  MetadataTracker( Properties p, SOLRAPIClient client, String coreName,
                InformationServer informationServer, boolean checkRepoServicesAvailability);   MetadataTracker(); @Override Semaphore getWriteLock(); @Override Semaphore getRunLock(); void maintenance(); boolean hasMaintenance(); @Override NodeReport checkNode(Long dbid); NodeReport checkNode(Node node); List<Node> getFullNodesForDbTransaction(Long txid); IndexHealthReport checkIndex(Long toTx, Long fromTime, Long toTime); void addTransactionToPurge(Long txId); void addNodeToPurge(Long nodeId); void addTransactionToReindex(Long txId); void addNodeToReindex(Long nodeId); void addTransactionToIndex(Long txId); void addNodeToIndex(Long nodeId); void invalidateState(); void addQueryToReindex(String query);  }