summaryrefslogtreecommitdiffstats
path: root/container-search/src
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2017-08-08 14:43:16 +0200
committerJon Bratseth <bratseth@yahoo-inc.com>2017-08-08 14:43:16 +0200
commit7510d59aa2871477f2890cf065aa29eb925e1905 (patch)
treed68d14e679cb45130f81682ea537fe072171acd7 /container-search/src
parent87668e92c81930db4cd981c03978c674696ce44b (diff)
Remove unnecessary instances of the character sequence 'yca'
Diffstat (limited to 'container-search/src')
-rw-r--r--container-search/src/main/java/com/yahoo/search/federation/http/HTTPParameters.java38
-rw-r--r--container-search/src/main/java/com/yahoo/search/federation/http/HTTPSearcher.java50
-rw-r--r--container-search/src/main/resources/configdefinitions/provider.def4
-rw-r--r--container-search/src/test/java/com/yahoo/search/federation/http/HttpParametersTest.java2
4 files changed, 47 insertions, 47 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/federation/http/HTTPParameters.java b/container-search/src/main/java/com/yahoo/search/federation/http/HTTPParameters.java
index c4227e06538..99dae4e20aa 100644
--- a/container-search/src/main/java/com/yahoo/search/federation/http/HTTPParameters.java
+++ b/container-search/src/main/java/com/yahoo/search/federation/http/HTTPParameters.java
@@ -42,12 +42,12 @@ public final class HTTPParameters {
private int configuredReadTimeout = -1;
private int configuredConnectionTimeout = -1;
private int connectionPoolTimeout = -1;
- private String ycaProxy = null;
- private int ycaPort = 0;
- private String ycaApplicationId = null;
- private boolean ycaUseProxy = false;
- private long ycaTtl = 0L;
- private long ycaRetry = 0L;
+ private String certificateProxy = null;
+ private int certificatePort = 0;
+ private String certificateApplicationId = null;
+ private boolean certificateUseProxy = false;
+ private long certificateTtl = 0L;
+ private long certificateRetry = 0L;
private PingOption.Enum pingOption = PingOption.NORMAL;
@@ -66,14 +66,14 @@ public final class HTTPParameters {
connectionPoolTimeout = (int) (providerConfig.connectionPoolTimeout() * 1000.0d);
retries = providerConfig.retries();
setPath(providerConfig.path());
- ycaUseProxy = providerConfig.yca().useProxy();
- if (ycaUseProxy) {
- ycaProxy = providerConfig.yca().host();
- ycaPort = providerConfig.yca().port();
+ certificateUseProxy = providerConfig.yca().useProxy();
+ if (certificateUseProxy) {
+ certificateProxy = providerConfig.yca().host();
+ certificatePort = providerConfig.yca().port();
}
- ycaApplicationId = providerConfig.yca().applicationId();
- ycaTtl = providerConfig.yca().ttl() * 1000L;
- ycaRetry = providerConfig.yca().retry() * 1000L;
+ certificateApplicationId = providerConfig.yca().applicationId();
+ certificateTtl = providerConfig.yca().ttl() * 1000L;
+ certificateRetry = providerConfig.yca().retry() * 1000L;
followRedirects = providerConfig.followRedirects();
pingOption = providerConfig.pingOption();
}
@@ -289,27 +289,27 @@ public final class HTTPParameters {
}
public String getYcaProxy() {
- return ycaProxy;
+ return certificateProxy;
}
public int getYcaPort() {
- return ycaPort;
+ return certificatePort;
}
public String getYcaApplicationId() {
- return ycaApplicationId;
+ return certificateApplicationId;
}
public boolean getYcaUseProxy() {
- return ycaUseProxy;
+ return certificateUseProxy;
}
public long getYcaTtl() {
- return ycaTtl;
+ return certificateTtl;
}
public long getYcaRetry() {
- return ycaRetry;
+ return certificateRetry;
}
}
diff --git a/container-search/src/main/java/com/yahoo/search/federation/http/HTTPSearcher.java b/container-search/src/main/java/com/yahoo/search/federation/http/HTTPSearcher.java
index 1afe08414b2..3707d7fa77a 100644
--- a/container-search/src/main/java/com/yahoo/search/federation/http/HTTPSearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/federation/http/HTTPSearcher.java
@@ -177,17 +177,17 @@ public abstract class HTTPSearcher extends ClusterSearcher<Connection> {
private final CertificateStore certificateStore;
- /** The (optional) YCA application ID. */
- private String ycaApplicationId = null;
+ /** The (optional) certificate application ID. */
+ private String certificateApplicationId = null;
- /** The (optional) YCA proxy */
- protected HttpHost ycaProxy = null;
+ /** The (optional) certificate server proxy */
+ protected HttpHost certificateProxy = null;
- /** YCA cache TTL in ms */
- private long ycaTtl = 0L;
+ /** Certificate cache TTL in ms */
+ private long certificateTtl = 0L;
- /** YCA retry rate in the cache if no cert is found, in ms */
- private long ycaRetry = 0L;
+ /** Certificate server retry rate in the cache if no cert is found, in ms */
+ private long certificateRetry = 0L;
/** Set at construction if this is using persistent connections */
private ClientConnectionManager sharedConnectionManager = null;
@@ -275,15 +275,15 @@ public abstract class HTTPSearcher extends ClusterSearcher<Connection> {
singleClientConnManagerThreadLocal =new ThreadLocal<>();
}
- initializeYCA(httpParameters, certificateStore);
+ initializeCertificate(httpParameters, certificateStore);
}
/**
- * Initialize YCA certificate and proxy if they have been set to non-null,
- * non-empty values. It will wrap thrown exceptions from the YCA layer into
+ * Initialize certificate store and proxy if they have been set to non-null,
+ * non-empty values. It will wrap thrown exceptions from the certificate store into
* RuntimeException and propagate them.
*/
- private void initializeYCA(HTTPParameters parameters, CertificateStore certificateStore) {
+ private void initializeCertificate(HTTPParameters parameters, CertificateStore certificateStore) {
String applicationId = parameters.getYcaApplicationId();
String proxy = parameters.getYcaProxy();
int port = parameters.getYcaPort();
@@ -314,7 +314,7 @@ public abstract class HTTPSearcher extends ClusterSearcher<Connection> {
}
/**
- * Initialize the YCA certificate.
+ * Initialize the certificate.
* This will warn but not throw if certificates could not be loaded, as the certificates
* are external state which can fail independently.
*/
@@ -328,9 +328,9 @@ public abstract class HTTPSearcher extends ClusterSearcher<Connection> {
}
this.useCertificate = true;
- this.ycaApplicationId = applicationId;
- this.ycaTtl = ttl;
- this.ycaRetry = retry;
+ this.certificateApplicationId = applicationId;
+ this.certificateTtl = ttl;
+ this.certificateRetry = retry;
getLogger().log(LogLevel.CONFIG, "Got certificate: " + certificate);
}
catch (Exception e) {
@@ -340,11 +340,11 @@ public abstract class HTTPSearcher extends ClusterSearcher<Connection> {
}
/**
- * Initialize the YCA proxy setting.
+ * Initialize the certificate proxy setting.
*/
private void initializeProxy(String host, int port) {
- ycaProxy = new HttpHost(host, port);
- getLogger().log(LogLevel.CONFIG,"Proxy is configured; will use proxy: " + ycaProxy);
+ certificateProxy = new HttpHost(host, port);
+ getLogger().log(LogLevel.CONFIG, "Proxy is configured; will use proxy: " + certificateProxy);
}
/**
@@ -644,8 +644,8 @@ public abstract class HTTPSearcher extends ClusterSearcher<Connection> {
/**
* Returns the set of headers to be passed in the http request to provider backend. The default
- * implementation returns null, unless YCA is in use. If YCA is used, it will return a map
- * only containing the needed YCA headers.
+ * implementation returns null, unless certificates are in use. If certificates are used, it will return a map
+ * only containing the needed certificate headers.
*/
protected Map<String, String> getRequestHeaders(Query query, Hit requestMeta) {
if (useCertificate) {
@@ -781,13 +781,13 @@ public abstract class HTTPSearcher extends ClusterSearcher<Connection> {
/**
* Creates a http client for one request. Override to customize the client
- * to use, e.g for testing. This default implementation will add the YCA
+ * to use, e.g for testing. This default implementation will add a certificate store
* proxy to params if is necessary, and then do
* <code>return new SearcherHttpClient(getConnectionManager(params), params);</code>
*/
protected HttpClient createClient(HttpParams params) {
- if (ycaProxy != null) {
- params.setParameter(ConnRoutePNames.DEFAULT_PROXY, ycaProxy);
+ if (certificateProxy != null) {
+ params.setParameter(ConnRoutePNames.DEFAULT_PROXY, certificateProxy);
}
return new SearcherHttpClient(getConnectionManager(params), params);
}
@@ -830,7 +830,7 @@ public abstract class HTTPSearcher extends ClusterSearcher<Connection> {
private Map<String, String> generateYCAHeaders() {
Map<String, String> headers = new HashMap<>();
- String certificate = certificateStore.getCertificate(ycaApplicationId, ycaTtl, ycaRetry);
+ String certificate = certificateStore.getCertificate(certificateApplicationId, certificateTtl, certificateRetry);
headers.put(YCA_HTTP_HEADER, certificate);
return headers;
}
diff --git a/container-search/src/main/resources/configdefinitions/provider.def b/container-search/src/main/resources/configdefinitions/provider.def
index dca31cb3923..3cddc085de9 100644
--- a/container-search/src/main/resources/configdefinitions/provider.def
+++ b/container-search/src/main/resources/configdefinitions/provider.def
@@ -21,9 +21,9 @@ connectionTimeout double default=-1.0
## Unit is seconds, default value is
## in com.yahoo.search.federation.http.HTTPParameters.
connectionPoolTimeout double default=-1.0
-## YCA proxy host
+## Certificate store proxy host
yca.host string default="yca-proxy.corp.yahoo.com"
-## YCA proxy port
+## Certificate store proxy port
yca.port int default=3128
## Whether a proxy is needed (i.e. should the proxy settings be used)
yca.useProxy bool default=false
diff --git a/container-search/src/test/java/com/yahoo/search/federation/http/HttpParametersTest.java b/container-search/src/test/java/com/yahoo/search/federation/http/HttpParametersTest.java
index 1edb41dad05..11f5d7d14fd 100644
--- a/container-search/src/test/java/com/yahoo/search/federation/http/HttpParametersTest.java
+++ b/container-search/src/test/java/com/yahoo/search/federation/http/HttpParametersTest.java
@@ -12,7 +12,7 @@ import static org.junit.Assert.assertTrue;
/**
* @author gjoranv
- * @author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
+ * @author Steinar Knutsen
*/
public class HttpParametersTest {