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

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


The following commit(s) were added to refs/heads/s3-poc by this push:
     new 3e230bc  Add jet3t and S3N filesystem implementation
3e230bc is described below

commit 3e230bc5452c63fae25764161b3e3a8832db4998
Author: Oliver Szabo <oleew...@gmail.com>
AuthorDate: Mon Dec 24 12:15:13 2018 +0100

    Add jet3t and S3N filesystem implementation
---
 ambari-infra-assembly/pom.xml                      |  5 +++
 ambari-infra-solr-plugin/pom.xml                   |  5 +++
 .../main/java/org/apache/hadoop/fs/s3n/S3N.java    | 39 ++++++++++++++++++++++
 3 files changed, 49 insertions(+)

diff --git a/ambari-infra-assembly/pom.xml b/ambari-infra-assembly/pom.xml
index f460f88..42d65b9 100644
--- a/ambari-infra-assembly/pom.xml
+++ b/ambari-infra-assembly/pom.xml
@@ -48,6 +48,7 @@
     
<aws-java-sdk-core.jar.name>aws-java-sdk-core-${aws-sdk.version}.jar</aws-java-sdk-core.jar.name>
     
<aws-java-sdk-s3.jar.name>aws-java-sdk-s3-${aws-sdk.version}.jar</aws-java-sdk-s3.jar.name>
     
<aws-java-sdk-dynamodb.jar.name>aws-java-sdk-dynamodb-${aws-sdk.version}.jar</aws-java-sdk-dynamodb.jar.name>
+    <jets3t.jar.name>jets3t-0.9.4.jar</jets3t.jar.name>
     <jenkins.docker.folder>../jenkins/containers</jenkins.docker.folder>
   </properties>
 
@@ -215,6 +216,8 @@
                         <include name="hadoop-*.jar"/>
                       </fileset>
                     </copy>
+                    <copy 
file="${infra.solr.plugin.dir}/target/libs/${jets3t.jar.name}"
+                          
toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/>
 
                     <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/"/>
@@ -428,6 +431,8 @@
                         <include name="hadoop-*.jar"/>
                       </fileset>
                     </copy>
+                    <copy 
file="${infra.solr.plugin.dir}/target/libs/${jets3t.jar.name}"
+                          
toDir="${project.build.directory}/solr/server/solr-webapp/webapp/WEB-INF/lib/"/>
 
                     <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/"/>
diff --git a/ambari-infra-solr-plugin/pom.xml b/ambari-infra-solr-plugin/pom.xml
index ada3feb..c52f5d7 100644
--- a/ambari-infra-solr-plugin/pom.xml
+++ b/ambari-infra-solr-plugin/pom.xml
@@ -85,6 +85,11 @@
       <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.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/S3N.java 
b/ambari-infra-solr-plugin/src/main/java/org/apache/hadoop/fs/s3n/S3N.java
new file mode 100644
index 0000000..ede6dbd
--- /dev/null
+++ b/ambari-infra-solr-plugin/src/main/java/org/apache/hadoop/fs/s3n/S3N.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 S3N extends DelegateToFileSystem {
+
+  public S3N(URI theUri, Configuration conf) throws IOException, 
URISyntaxException {
+    super(theUri, new NativeS3FileSystem(), conf, "s3n", false);
+  }
+
+  @Override
+  public int getUriDefaultPort() {
+    return -1;
+  }
+}

Reply via email to