Repository: ambari Updated Branches: refs/heads/branch-2.5 09944fa58 -> 7cf35b082
AMBARI-21277. Fail to create solr clients in Log Search / Log Feeder with openjdk8 (Oliver Szabo via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7cf35b08 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7cf35b08 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7cf35b08 Branch: refs/heads/branch-2.5 Commit: 7cf35b08245ddf560d1c8d35027f477bc6864872 Parents: 09944fa Author: Sumit Mohanty <[email protected]> Authored: Mon Jun 19 16:21:46 2017 -0700 Committer: Sumit Mohanty <[email protected]> Committed: Mon Jun 19 16:21:46 2017 -0700 ---------------------------------------------------------------------- .../ambari-logsearch-logfeeder/pom.xml | 6 + .../ambari-logsearch-logfeeder/pom.xml.orig | 265 +++++++++++++++++++ .../ambari-logsearch-logfeeder/pom.xml.rej | 21 ++ .../ambari-logsearch-portal/pom.xml | 4 + .../logsearch/common/ExternalServerClient.java | 4 +- 5 files changed, 298 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/7cf35b08/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml b/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml index 49122e8..1ad59b3 100644 --- a/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml +++ b/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml @@ -143,6 +143,12 @@ <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-common</artifactId> <version>${hadoop.version}</version> + <exclusions> + <exclusion> + <groupId>commons-httpclient</groupId> + <artifactId>commons-httpclient</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> http://git-wip-us.apache.org/repos/asf/ambari/blob/7cf35b08/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml.orig ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml.orig b/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml.orig new file mode 100644 index 0000000..ce784cb --- /dev/null +++ b/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml.orig @@ -0,0 +1,265 @@ +<?xml version="1.0"?> +<!-- + 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. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <parent> + <artifactId>ambari-logsearch</artifactId> + <groupId>org.apache.ambari</groupId> + <version>2.0.0.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + + <artifactId>ambari-logsearch-logfeeder</artifactId> + <packaging>jar</packaging> + <name>Ambari Logsearch Log Feeder</name> + <url>http://maven.apache.org</url> + + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.ambari</groupId> + <artifactId>ambari-logsearch-appender</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.ambari</groupId> + <artifactId>ambari-logsearch-config-zookeeper</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.easymock</groupId> + <artifactId>easymock</artifactId> + <version>3.4</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.17</version> + </dependency> + <dependency> + <groupId>io.thekraken</groupId> + <artifactId>grok</artifactId> + <version>0.1.4</version> + </dependency> + <dependency> + <groupId>org.apache.solr</groupId> + <artifactId>solr-solrj</artifactId> + <version>${solr.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.jackson</groupId> + <artifactId>jackson-core-asl</artifactId> + <version>1.9.13</version> + </dependency> + <dependency> + <groupId>org.codehaus.jackson</groupId> + <artifactId>jackson-mapper-asl</artifactId> + <version>1.9.13</version> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.1.1</version> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>18.0</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.20</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.7.20</version> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-csv</artifactId> + <version>1.2</version> + </dependency> + <dependency> + <groupId>org.apache.kafka</groupId> + <artifactId>kafka-clients</artifactId> + <version>0.9.0.0</version> + </dependency> + <dependency> + <groupId>org.codehaus.jackson</groupId> + <artifactId>jackson-xc</artifactId> + <version>1.9.13</version> + </dependency> + <dependency> + <groupId>org.apache.ambari</groupId> + <artifactId>ambari-metrics-common</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.amazonaws</groupId> + <artifactId>aws-java-sdk-s3</artifactId> + <version>1.11.5</version> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-compress</artifactId> + <version>1.11</version> + </dependency> + <dependency> + <groupId>com.amazonaws</groupId> + <artifactId>aws-java-sdk-iam</artifactId> + <version>1.11.5</version> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-common</artifactId> + <version>${hadoop.version}</version> + <exclusions> + <exclusion> + <groupId>org.apache.curator</groupId> + <artifactId>curator-framework</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.curator</groupId> + <artifactId>curator-client</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.curator</groupId> + <artifactId>curator-recipes</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-hdfs</artifactId> + <version>${hadoop.version}</version> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>${common.io.version}</version> + </dependency> + </dependencies> + <build> + <finalName>LogFeeder</finalName> + <pluginManagement> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.0</version> + </plugin> + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.8</version> + </plugin> + </plugins> + </pluginManagement> + + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.3</version> + <configuration> + <source>1.7</source> + <target>1.7</target> + </configuration> + </plugin> + + <!-- Exec main class plugin --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.2.1</version> + <executions> + <execution> + <goals> + <goal>java</goal> + </goals> + </execution> + </executions> + <configuration> + <mainClass>org.apache.ambari.logfeeder.LogFeeder</mainClass> + <!-- <arguments> <argument></argument> </arguments> --> + </configuration> + </plugin> + <!-- copy-dependencies --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.8</version> + <executions> + <execution> + <id>copy-dependencies</id> + <phase>package</phase> + + <goals> + <goal>copy-dependencies</goal> + + </goals> + <configuration> + <artifactItems>*</artifactItems> + <outputAbsoluteArtifactFilename>true</outputAbsoluteArtifactFilename> + <outputDirectory>${basedir}/target/libs</outputDirectory> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>false</overWriteSnapshots> + <overWriteIfNewer>true</overWriteIfNewer> + </configuration> + </execution> + </executions> + </plugin> + <!-- ant pacakge --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.7</version> + <executions> + <execution> + <phase>package</phase> + <configuration> + <target> + <ant antfile="build.xml"> + <target name="package"/> + </ant> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> http://git-wip-us.apache.org/repos/asf/ambari/blob/7cf35b08/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml.rej ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml.rej b/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml.rej new file mode 100644 index 0000000..a060622 --- /dev/null +++ b/ambari-logsearch/ambari-logsearch-logfeeder/pom.xml.rej @@ -0,0 +1,21 @@ +*************** +*** 143,148 **** + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-common</artifactId> + <version>${hadoop.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> +--- 143,154 ---- + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-common</artifactId> + <version>${hadoop.version}</version> ++ <exclusions> ++ <exclusion> ++ <groupId>commons-httpclient</groupId> ++ <artifactId>commons-httpclient</artifactId> ++ </exclusion> ++ </exclusions> + </dependency> + <dependency> + <groupId>org.apache.hadoop</groupId> http://git-wip-us.apache.org/repos/asf/ambari/blob/7cf35b08/ambari-logsearch/ambari-logsearch-portal/pom.xml ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/pom.xml b/ambari-logsearch/ambari-logsearch-portal/pom.xml index a439266..ec0bd43 100755 --- a/ambari-logsearch/ambari-logsearch-portal/pom.xml +++ b/ambari-logsearch/ambari-logsearch-portal/pom.xml @@ -628,6 +628,10 @@ <groupId>com.sun.jersey</groupId> <artifactId>jersey-server</artifactId> </exclusion> + <exclusion> + <groupId>commons-httpclient</groupId> + <artifactId>commons-httpclient</artifactId> + </exclusion> </exclusions> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/ambari/blob/7cf35b08/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/common/ExternalServerClient.java ---------------------------------------------------------------------- diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/common/ExternalServerClient.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/common/ExternalServerClient.java index df00c15..99844f5 100644 --- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/common/ExternalServerClient.java +++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/common/ExternalServerClient.java @@ -20,13 +20,13 @@ package org.apache.ambari.logsearch.common; import javax.inject.Inject; import javax.inject.Named; +import javax.security.auth.login.CredentialException; import javax.ws.rs.client.Invocation; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.Response; import org.apache.ambari.logsearch.conf.AuthPropsConfig; import org.apache.ambari.logsearch.util.SSLUtil; -import org.apache.commons.httpclient.auth.InvalidCredentialsException; import org.apache.log4j.Logger; import org.glassfish.jersey.client.JerseyClient; import org.glassfish.jersey.client.JerseyClientBuilder; @@ -70,7 +70,7 @@ public class ExternalServerClient { Response response = invocationBuilder.get(); if (response.getStatus() != Response.Status.OK.getStatusCode() && response.getStatus() != Response.Status.FOUND.getStatusCode()) { - throw new InvalidCredentialsException(String.format("External auth failed with status code: %d, response: %s", + throw new CredentialException(String.format("External auth failed with status code: %d, response: %s", response.getStatus(), response.readEntity(String.class))); } return response.readEntity(klass);
