Bläddra i källkod

HADOOP-10454. Provide FileContext version of har file system. Contributed by Koji Noguchi, Jason Lowe and Kihwal Lee.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1584439 13f79535-47bb-0310-9956-ffa450edef68
Kihwal Lee 11 år sedan
förälder
incheckning
4a6c8cfa72

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -12,6 +12,9 @@ Release 0.23.11 - UNRELEASED
 
     HADOOP-10164. Allow UGI to login with a known Subject (bobby)
 
+    HADOOP-10454. Provide FileContext version of har file system. (kihwal
+    via jeagles)
+
   OPTIMIZATIONS
     
   BUG FIXES

+ 38 - 0
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFs.java

@@ -0,0 +1,38 @@
+/**
+* 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;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.apache.hadoop.conf.Configuration;
+
+public class HarFs extends DelegateToFileSystem {
+  HarFs(final URI theUri, final Configuration conf)
+      throws IOException, URISyntaxException {
+    super(theUri, new HarFileSystem(), conf, "har", true);
+  }
+
+  @Override
+  public int getUriDefaultPort() {
+    return -1;
+  }
+}
+

+ 5 - 0
hadoop-common-project/hadoop-common/src/main/resources/core-default.xml

@@ -282,6 +282,11 @@
   <description>The AbstractFileSystem for file: uris.</description>
 </property>
 
+<property>
+  <name>fs.AbstractFileSystem.har.impl</name>
+  <value>org.apache.hadoop.fs.HarFs</value>
+  <description>The AbstractFileSystem for har: uris.</description>
+</property> 
 
 <property>
   <name>fs.AbstractFileSystem.hdfs.impl</name>