From da832d4f3aa2e87cf1947ef4373977778ea6d2e0 Mon Sep 17 00:00:00 2001 From: Cao Manh Dat Date: Wed, 5 Jun 2019 15:33:21 +0100 Subject: [PATCH] SOLR-13434: Fixes problem on Java 8 build --- .../org/apache/solr/jaeger/package-info.java | 21 +++++++++++++++ .../src/java/overview.html | 26 +++++++++++++++++++ .../solr/util/tracing/HttpServletCarrier.java | 4 +-- 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 solr/contrib/jaegertracer-configurator/src/java/org/apache/solr/jaeger/package-info.java create mode 100644 solr/contrib/jaegertracer-configurator/src/java/overview.html diff --git a/solr/contrib/jaegertracer-configurator/src/java/org/apache/solr/jaeger/package-info.java b/solr/contrib/jaegertracer-configurator/src/java/org/apache/solr/jaeger/package-info.java new file mode 100644 index 00000000000..3562f362bf8 --- /dev/null +++ b/solr/contrib/jaegertracer-configurator/src/java/org/apache/solr/jaeger/package-info.java @@ -0,0 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Jaeger Tracer Configurator. + */ +package org.apache.solr.jaeger; diff --git a/solr/contrib/jaegertracer-configurator/src/java/overview.html b/solr/contrib/jaegertracer-configurator/src/java/overview.html new file mode 100644 index 00000000000..846e1703752 --- /dev/null +++ b/solr/contrib/jaegertracer-configurator/src/java/overview.html @@ -0,0 +1,26 @@ + + + +Apache Solr Search Server: Solr Jaeger Tracer Configurator contrib + +

+This package provides provides a way for you to expose Solr's tracing to Jaeger. +

+ + + diff --git a/solr/core/src/java/org/apache/solr/util/tracing/HttpServletCarrier.java b/solr/core/src/java/org/apache/solr/util/tracing/HttpServletCarrier.java index a18ce893fe5..52569bec816 100644 --- a/solr/core/src/java/org/apache/solr/util/tracing/HttpServletCarrier.java +++ b/solr/core/src/java/org/apache/solr/util/tracing/HttpServletCarrier.java @@ -32,7 +32,7 @@ public class HttpServletCarrier implements TextMap { private Iterator> it; public HttpServletCarrier(HttpServletRequest request) { - this.it = new Iterator<>() { + this.it = new Iterator>() { Enumeration headerNameIt = request.getHeaderNames(); String headerName = null; @@ -61,7 +61,7 @@ public class HttpServletCarrier implements TextMap { String key = headerName; String val = headerValue.nextElement(); - return new Map.Entry<>() { + return new Map.Entry() { @Override public String getKey() { return key;