This is an automated email from the ASF dual-hosted git repository.

oleewere pushed a commit to branch cloud-storage-poc
in repository https://gitbox.apache.org/repos/asf/ambari-infra.git

commit ffeeb1a28900609f7b5961eecc277f3d8be0fbd0
Author: Oliver Szabo <[email protected]>
AuthorDate: Wed Jan 2 15:57:23 2019 +0100

    Add cloud support
---
 ambari-infra-assembly/build.xml                    | 28 +++++++--
 ambari-infra-manager-it/pom.xml                    |  4 +-
 ambari-infra-manager/pom.xml                       |  6 +-
 ambari-infra-solr-plugin/pom.xml                   | 71 ++++++++++++++++++++++
 .../apache/hadoop/fs/s3n/S3NativeFileSystem.java   | 39 ++++++++++++
 pom.xml                                            |  3 +
 6 files changed, 141 insertions(+), 10 deletions(-)

diff --git a/ambari-infra-assembly/build.xml b/ambari-infra-assembly/build.xml
index 488f1af..ccaf5ca 100644
--- a/ambari-infra-assembly/build.xml
+++ b/ambari-infra-assembly/build.xml
@@ -6,9 +6,7 @@
    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.
@@ -37,6 +35,26 @@
     <move file="target/${common-fileupload.jar.name}"
           
toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/>
 
+    <delete>
+      <fileset 
dir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/">
+        <include name="hadoop-*.jar"/>
+      </fileset>
+    </delete>
+
+    <copy 
todir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/">
+      <fileset dir="${infra.solr.plugin.dir}/target/libs">
+        <include name="hadoop-*.jar"/>
+        <include name="aws-java*.jar"/>
+        <include name="azure-*.jar"/>
+        <include name="wildfly*.jar"/>
+        <include name="jetty-uti*.jar"/>
+        <include name="gcs*.jar"/>
+        <include name="google*.jar"/>
+        <include name="util-*.jar"/>
+        <include name="jets3t-*.jar"/>
+      </fileset>
+    </copy>
+
     <copy 
file="${infra.solr.plugin.dir}/target/ambari-infra-solr-plugin-${project.version}.jar"
           
toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/>
     <copy 
file="${infra.solr.plugin.dir}/target/libs/ambari-metrics-common-${ambari-metrics.version}.jar"
@@ -46,13 +64,13 @@
     <chmod file="${project.build.directory}/solr/bin/**" perm="755"/>
     <chmod file="${project.build.directory}/solr/server/scripts/**" 
perm="755"/>
 
-    <copy todir="${project.build.directory}" >
+    <copy todir="${project.build.directory}">
       <fileset dir="${jenkins.docker.folder}" includes="**"/>
     </copy>
-    <copy todir="${project.build.directory}/docker-infra-solr/solr" >
+    <copy todir="${project.build.directory}/docker-infra-solr/solr">
       <fileset dir="${project.build.directory}/solr" includes="**"/>
     </copy>
-    <copy todir="${project.build.directory}/docker-infra-solr/solr-client" >
+    <copy todir="${project.build.directory}/docker-infra-solr/solr-client">
       <fileset dir="${solr.client.dir}/target/package" includes="**"/>
     </copy>
   </target>
diff --git a/ambari-infra-manager-it/pom.xml b/ambari-infra-manager-it/pom.xml
index 5edab8a..2775b89 100644
--- a/ambari-infra-manager-it/pom.xml
+++ b/ambari-infra-manager-it/pom.xml
@@ -102,7 +102,7 @@
     <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-common</artifactId>
-      <version>${hadoop.version}</version>
+      <version>${hadoop3.version}</version>
       <scope>test</scope>
       <exclusions>
         <exclusion>
@@ -158,7 +158,7 @@
     <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-hdfs-client</artifactId>
-      <version>${hadoop.version}</version>
+      <version>${hadoop3.version}</version>
     </dependency>
     <dependency>
       <groupId>org.apache.logging.log4j</groupId>
diff --git a/ambari-infra-manager/pom.xml b/ambari-infra-manager/pom.xml
index d821cd5..4162f60 100644
--- a/ambari-infra-manager/pom.xml
+++ b/ambari-infra-manager/pom.xml
@@ -329,7 +329,7 @@
     <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-common</artifactId>
-      <version>${hadoop.version}</version>
+      <version>${hadoop3.version}</version>
       <exclusions>
         <exclusion>
           <groupId>javax.servlet</groupId>
@@ -402,7 +402,7 @@
     <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-aws</artifactId>
-      <version>${hadoop.version}</version>
+      <version>${hadoop3.version}</version>
       <exclusions>
         <exclusion>
           <groupId>com.amazonaws</groupId>
@@ -433,7 +433,7 @@
     <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-hdfs-client</artifactId>
-      <version>${hadoop.version}</version>
+      <version>${hadoop3.version}</version>
       <exclusions>
         <exclusion>
           <groupId>com.fasterxml.jackson.core</groupId>
diff --git a/ambari-infra-solr-plugin/pom.xml b/ambari-infra-solr-plugin/pom.xml
index 516b582..96061be 100644
--- a/ambari-infra-solr-plugin/pom.xml
+++ b/ambari-infra-solr-plugin/pom.xml
@@ -39,6 +39,77 @@
       <version>${ambari-metrics.version}</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-aws</artifactId>
+      <version>${hadoop.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>com.amazonaws</groupId>
+          <artifactId>aws-java-sdk-bundle</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>com.amazonaws</groupId>
+      <artifactId>aws-java-sdk-core</artifactId>
+      <version>${aws-sdk.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>com.amazonaws</groupId>
+      <artifactId>aws-java-sdk-s3</artifactId>
+      <version>${aws-sdk.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>com.amazonaws</groupId>
+      <artifactId>aws-java-sdk-dynamodb</artifactId>
+      <version>${aws-sdk.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-auth</artifactId>
+      <version>${hadoop.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-common</artifactId>
+      <version>${hadoop.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-hdfs</artifactId>
+      <version>${hadoop.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-annotations</artifactId>
+      <version>${hadoop.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>net.java.dev.jets3t</groupId>
+      <artifactId>jets3t</artifactId>
+      <version>0.9.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-azure</artifactId>
+      <version>${hadoop.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-azure-datalake</artifactId>
+      <version>${hadoop.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.mortbay.jetty</groupId>
+      <artifactId>jetty-util</artifactId>
+      <version>6.1.26</version>
+    </dependency>
+    <dependency>
+      <groupId>com.google.cloud.bigdataoss</groupId>
+      <artifactId>gcs-connector</artifactId>
+      <version>hadoop2-1.9.11</version>
+    </dependency>
+    <dependency>
       <groupId>org.apache.solr</groupId>
       <artifactId>solr-test-framework</artifactId>
       <version>${solr.version}</version>
diff --git 
a/ambari-infra-solr-plugin/src/main/java/org/apache/hadoop/fs/s3n/S3NativeFileSystem.java
 
b/ambari-infra-solr-plugin/src/main/java/org/apache/hadoop/fs/s3n/S3NativeFileSystem.java
new file mode 100644
index 0000000..619f08b
--- /dev/null
+++ 
b/ambari-infra-solr-plugin/src/main/java/org/apache/hadoop/fs/s3n/S3NativeFileSystem.java
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+package org.apache.hadoop.fs.s3n;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.DelegateToFileSystem;
+import org.apache.hadoop.fs.s3native.NativeS3FileSystem;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+public class S3NativeFileSystem extends DelegateToFileSystem {
+
+  public S3NativeFileSystem(URI theUri, Configuration conf) throws 
IOException, URISyntaxException {
+    super(theUri, new NativeS3FileSystem(), conf, "s3n", false);
+  }
+
+  @Override
+  public int getUriDefaultPort() {
+    return -1;
+  }
+}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 2941b55..07970f2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,6 +38,9 @@
     <ambari-metrics.version>2.7.0.0.0</ambari-metrics.version>
     <skipSurefireTests>false</skipSurefireTests>
     <log4j2.version>2.10.0</log4j2.version>
+    <aws-sdk.version>1.11.445</aws-sdk.version>
+    <hadoop.version>2.7.3.2.6.5.3004-13</hadoop.version>
+    <hadoop3.version>3.1.1</hadoop3.version>
   </properties>
 
   <licenses>

Reply via email to