/** @deprecated use addToRotation(String) instead */ @Deprecated // TODO: Remove on Vespa 8 public void addToRotation(Object clusterIdentifier) { addToRotation((String) clusterIdentifier); }
/** @deprecated use removeFromRotation(String) instead */ @Deprecated // TODO: Remove on Vespa 8 public void removeFromRotation(Object clusterIdentifier) { removeFromRotation((String) clusterIdentifier); }
private void updateAndLogRotationState() { final boolean currentlyInRotation = vipStatus.isInRotation(); final boolean previousRotationAnswer = previouslyInRotation; previouslyInRotation = currentlyInRotation; if (previousRotationAnswer != currentlyInRotation) { if (currentlyInRotation) { log.log(LogLevel.INFO, "Putting container back into rotation by serving status.html again."); } else { log.log(LogLevel.WARNING, "Removing container from rotation by no longer serving status.html."); } } }
private void updateSufficientCoverage(Group group, boolean sufficientCoverage) { // update VIP status if we direct dispatch to this group and coverage status changed if (usesDirectDispatchTo(group) && sufficientCoverage != group.hasSufficientCoverage()) { if (sufficientCoverage) { vipStatus.addToRotation(clusterId); } else { vipStatus.removeFromRotation(clusterId); } } group.setHasSufficientCoverage(sufficientCoverage); }
/** Do not use, for internal testing purposes only. **/ ClusterSearcher(Set<String> documentTypes) { this.documentTypes = documentTypes; monitor = new ClusterMonitor(this, new QrMonitorConfig(new QrMonitorConfig.Builder()), Optional.of(new VipStatus())); cacheHitRatio = new Value("com.yahoo.prelude.cluster.ClusterSearcher.ClusterSearcher().dummy", Statistics.nullImplementation, new Value.Parameters()); clusterModelName = "testScenario"; fs4ResourcePool = null; maxQueryTimeout = DEFAULT_MAX_QUERY_TIMEOUT; maxQueryCacheTimeout = DEFAULT_MAX_QUERY_CACHE_TIMEOUT; }
private void updateVipStatus() { if ( ! vipStatus.isPresent()) return; if ( ! hasInformationAboutAllNodes()) return; if (hasWorkingNodesWithDocumentsOnline()) { vipStatus.get().addToRotation(nodeManager.getId().stringValue()); } else { vipStatus.get().removeFromRotation(nodeManager.getId().stringValue()); } }
/** Used by the cluster monitor to manage node status */ @Override public void failed(Node node) { node.setWorking(false); // Take ourselves out if we usually dispatch only to our own host if (usesDirectDispatchTo(node)) vipStatus.removeFromRotation(clusterId); }
/** Used by the cluster monitor to manage node status */ @Override public void working(Node node) { node.setWorking(true); if (usesDirectDispatchTo(node)) vipStatus.addToRotation(clusterId); }
private StatusResponse() { super(com.yahoo.jdisc.http.HttpResponse.Status.OK); // status may be overwritten below if (vipStatus != null && ! vipStatus.isInRotation()) { searchContainerOutOfService(); } else if (accessDisk) { preSlurpFile(); } else { vipRespond(); } }