Repository: oozie Updated Branches: refs/heads/master 33d60996a -> f1a8e174d
Fix filesystem issue (satishsaley, asasvari, gezapeti) (cherry picked from commit b98c37eeaf993e37f87225a114fb6cedce174168) Change-Id: I5c5cbe61604e22f112204c130ebbdcab099039c5 Project: http://git-wip-us.apache.org/repos/asf/oozie/repo Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/f1a8e174 Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/f1a8e174 Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/f1a8e174 Branch: refs/heads/master Commit: f1a8e174db5744ffdafcf97431c5de4952816edb Parents: 33d6099 Author: satishsaley <satishsa...@apache.org> Authored: Sat Jan 6 12:26:14 2018 -0800 Committer: Gezapeti Cseh <gezap...@apache.org> Committed: Wed Feb 7 14:40:26 2018 +0100 ---------------------------------------------------------------------- .../oozie/action/hadoop/HbaseCredentials.java | 7 + .../oozie/action/hadoop/JavaActionExecutor.java | 15 + .../apache/oozie/service/ShareLibService.java | 26 +- .../main/resources/oozie-hbase-client-site.xml | 24 + webapp/pom.xml | 6 + .../apache/hadoop/fs/RawLocalFileSystem.java | 641 +++++++++++++++++++ 6 files changed, 717 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/oozie/blob/f1a8e174/core/src/main/java/org/apache/oozie/action/hadoop/HbaseCredentials.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/oozie/action/hadoop/HbaseCredentials.java b/core/src/main/java/org/apache/oozie/action/hadoop/HbaseCredentials.java index 4d63c04..8fc03b8 100644 --- a/core/src/main/java/org/apache/oozie/action/hadoop/HbaseCredentials.java +++ b/core/src/main/java/org/apache/oozie/action/hadoop/HbaseCredentials.java @@ -44,6 +44,13 @@ import org.apache.oozie.util.XLog; * */ public class HbaseCredentials implements CredentialsProvider { + static final String OOZIE_HBASE_CLIENT_SITE_XML = "oozie-hbase-client-site.xml"; + static final String HBASE_USE_DYNAMIC_JARS = "hbase.dynamic.jars.dir"; + + static { + Configuration.addDefaultResource(OOZIE_HBASE_CLIENT_SITE_XML); + } + /* (non-Javadoc) * @see org.apache.oozie.action.hadoop.Credentials#addtoJobConf(org.apache.hadoop.mapred.JobConf, * org.apache.oozie.action.hadoop.CredentialsProperties, org.apache.oozie.action.ActionExecutor.Context) http://git-wip-us.apache.org/repos/asf/oozie/blob/f1a8e174/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java b/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java index 85802b7..bc0f405 100644 --- a/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java +++ b/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java @@ -1016,6 +1016,11 @@ public class JavaActionExecutor extends ActionExecutor { String consoleUrl; String launcherId = LauncherHelper.getRecoveryId(launcherConf, context.getActionDir(), context .getRecoveryId()); + + removeHBaseSettingFromOozieDefaultResource(launcherConf); + removeHBaseSettingFromOozieDefaultResource(actionConf); + + boolean alreadyRunning = launcherId != null; // if user-retry is on, always submit new launcher @@ -1062,6 +1067,16 @@ public class JavaActionExecutor extends ActionExecutor { } } + private void removeHBaseSettingFromOozieDefaultResource(final Configuration jobConf) { + final String[] propertySources = jobConf.getPropertySources(HbaseCredentials.HBASE_USE_DYNAMIC_JARS); + if (propertySources != null && propertySources.length > 0 && + propertySources[0].contains(HbaseCredentials.OOZIE_HBASE_CLIENT_SITE_XML)) { + jobConf.unset(HbaseCredentials.HBASE_USE_DYNAMIC_JARS); + LOG.debug(String.format("Unset [%s] inserted from default Oozie resource XML [%s]", + HbaseCredentials.HBASE_USE_DYNAMIC_JARS, HbaseCredentials.OOZIE_HBASE_CLIENT_SITE_XML)); + } + } + protected void addAppNameContext(WorkflowAction action, Context context) { String oozieActionName = String.format("oozie:launcher:T=%s:W=%s:A=%s:ID=%s", getType(), http://git-wip-us.apache.org/repos/asf/oozie/blob/f1a8e174/core/src/main/java/org/apache/oozie/service/ShareLibService.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/oozie/service/ShareLibService.java b/core/src/main/java/org/apache/oozie/service/ShareLibService.java index 974dc7b..a901567 100644 --- a/core/src/main/java/org/apache/oozie/service/ShareLibService.java +++ b/core/src/main/java/org/apache/oozie/service/ShareLibService.java @@ -19,7 +19,10 @@ package org.apache.oozie.service; import java.io.File; +import java.io.FileInputStream; import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; @@ -49,6 +52,7 @@ import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.PathFilter; import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.io.IOUtils; import org.apache.oozie.action.ActionExecutor; import org.apache.oozie.action.hadoop.JavaActionExecutor; import org.apache.oozie.client.rest.JsonUtils; @@ -264,7 +268,7 @@ public class ShareLibService implements Service, Instrumentable { List<Path> listOfPaths = new ArrayList<Path>(); for (String localJarStr : localJarSet) { File localJar = new File(localJarStr); - fs.copyFromLocalFile(new Path(localJar.getPath()), executorDir); + copyFromLocalFile(localJar, fs, executorDir); Path path = new Path(executorDir, localJar.getName()); listOfPaths.add(path); LOG.info(localJar.getName() + " uploaded to " + executorDir.toString()); @@ -273,6 +277,23 @@ public class ShareLibService implements Service, Instrumentable { } + private static boolean copyFromLocalFile(File src, FileSystem dstFS, Path dstDir) throws IOException { + Path dst = new Path(dstDir, src.getName()); + InputStream in=null; + OutputStream out = null; + try { + in = new FileInputStream(src); + out = dstFS.create(dst, true); + IOUtils.copyBytes(in, out, dstFS.getConf(), true); + } catch (IOException e) { + IOUtils.closeStream(out); + IOUtils.closeStream(in); + throw e; + } + return true; + + } + /** * Gets the path recursively. * @@ -810,7 +831,7 @@ public class ShareLibService implements Service, Instrumentable { if (shareLibSymlinkMapping != null && !shareLibSymlinkMapping.isEmpty() && shareLibSymlinkMapping.values() != null && !shareLibSymlinkMapping.values().isEmpty()) { StringBuffer bf = new StringBuffer(); - for (Entry<String, Map<Path, Path>> entry : shareLibSymlinkMapping.entrySet()) + for (Entry<String, Map<Path, Path>> entry : shareLibSymlinkMapping.entrySet()) { if (entry.getKey() != null && !entry.getValue().isEmpty()) { for (Path path : entry.getValue().keySet()) { bf.append(path).append("(").append(entry.getKey()).append(")").append("=>") @@ -818,6 +839,7 @@ public class ShareLibService implements Service, Instrumentable { .get(entry.getKey()).get(path) : "").append(","); } } + } return bf.toString(); } return "(none)"; http://git-wip-us.apache.org/repos/asf/oozie/blob/f1a8e174/core/src/main/resources/oozie-hbase-client-site.xml ---------------------------------------------------------------------- diff --git a/core/src/main/resources/oozie-hbase-client-site.xml b/core/src/main/resources/oozie-hbase-client-site.xml new file mode 100644 index 0000000..cc67f9e --- /dev/null +++ b/core/src/main/resources/oozie-hbase-client-site.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- + 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. +--> +<configuration> + <property> + <name>hbase.use.dynamic.jars</name> + <value>false</value> + </property> +</configuration> http://git-wip-us.apache.org/repos/asf/oozie/blob/f1a8e174/webapp/pom.xml ---------------------------------------------------------------------- diff --git a/webapp/pom.xml b/webapp/pom.xml index 7aa1663..2c839ba 100644 --- a/webapp/pom.xml +++ b/webapp/pom.xml @@ -142,6 +142,12 @@ <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </dependency> + + <dependency> + <groupId>org.apache.hadoop</groupId> + <artifactId>hadoop-client</artifactId> + <scope>provided</scope> + </dependency> </dependencies> <build> http://git-wip-us.apache.org/repos/asf/oozie/blob/f1a8e174/webapp/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java ---------------------------------------------------------------------- diff --git a/webapp/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java b/webapp/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java new file mode 100644 index 0000000..8392445 --- /dev/null +++ b/webapp/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java @@ -0,0 +1,641 @@ +/** + * 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.FileNotFoundException; +import java.io.IOException; +import java.net.URI; +import java.util.EnumSet; +import java.util.List; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.Options.ChecksumOpt; +import org.apache.hadoop.fs.Options.Rename; +import org.apache.hadoop.fs.permission.AclEntry; +import org.apache.hadoop.fs.permission.AclStatus; +import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.security.AccessControlException; +import org.apache.hadoop.security.Credentials; +import org.apache.hadoop.security.token.Token; +import org.apache.hadoop.util.Progressable; +import org.apache.oozie.util.XLog; + +public class RawLocalFileSystem extends FileSystem { + + public RawLocalFileSystem() { + // No error here as FileSystem should initialize when loading from ServiceLoader + XLog.getLog(this.getClass()).info("Initializing restricted local file system"); + } + + @Override + public void initialize(URI name, Configuration conf) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public String getScheme() { + // Called in FileSystem initialization using ServiceLoader + return "file"; + } + + @Override + protected URI getCanonicalUri() { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + protected URI canonicalizeUri(URI uri) { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + protected int getDefaultPort() { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public String getCanonicalServiceName() { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public String getName() { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public Path makeQualified(Path path) { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public Token<?> getDelegationToken(String renewer) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public Token<?>[] addDelegationTokens(String renewer, Credentials credentials) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FileSystem[] getChildFileSystems() { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + protected void checkPath(Path path) { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public BlockLocation[] getFileBlockLocations(Path p, long start, long len) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FsServerDefaults getServerDefaults() throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FsServerDefaults getServerDefaults(Path p) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public Path resolvePath(Path p) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataInputStream open(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream create(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream create(Path f, boolean overwrite) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream create(Path f, Progressable progress) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream create(Path f, short replication) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream create(Path f, short replication, Progressable progress) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, Progressable progress) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, short replication, long blockSize) + throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, short replication, long blockSize, + Progressable progress) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream create(Path f, FsPermission permission, EnumSet<CreateFlag> flags, int bufferSize, + short replication, long blockSize, Progressable progress) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream create(Path f, FsPermission permission, EnumSet<CreateFlag> flags, int bufferSize, + short replication, long blockSize, Progressable progress, ChecksumOpt checksumOpt) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + protected FSDataOutputStream primitiveCreate(Path f, FsPermission absolutePermission, EnumSet<CreateFlag> flag, + int bufferSize, short replication, long blockSize, Progressable progress, ChecksumOpt checksumOpt) + throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + protected boolean primitiveMkdir(Path f, FsPermission absolutePermission) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + protected void primitiveMkdir(Path f, FsPermission absolutePermission, boolean createParent) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream createNonRecursive(Path f, boolean overwrite, int bufferSize, short replication, + long blockSize, Progressable progress) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream createNonRecursive(Path f, FsPermission permission, boolean overwrite, int bufferSize, + short replication, long blockSize, Progressable progress) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream createNonRecursive(Path f, FsPermission permission, EnumSet<CreateFlag> flags, int bufferSize, + short replication, long blockSize, Progressable progress) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public boolean createNewFile(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream append(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream append(Path f, int bufferSize) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void concat(Path trg, Path[] psrcs) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public short getReplication(Path src) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public boolean setReplication(Path src, short replication) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + protected void rename(Path src, Path dst, Rename... options) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public boolean delete(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public boolean deleteOnExit(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public boolean cancelDeleteOnExit(Path f) { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + protected void processDeleteOnExit() { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public boolean exists(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public boolean isDirectory(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public boolean isFile(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public long getLength(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public ContentSummary getContentSummary(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public RemoteIterator<Path> listCorruptFileBlocks(Path path) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FileStatus[] listStatus(Path f, PathFilter filter) throws FileNotFoundException, IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FileStatus[] listStatus(Path[] files) throws FileNotFoundException, IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FileStatus[] listStatus(Path[] files, PathFilter filter) throws FileNotFoundException, IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FileStatus[] globStatus(Path pathPattern) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FileStatus[] globStatus(Path pathPattern, PathFilter filter) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public RemoteIterator<LocatedFileStatus> listLocatedStatus(Path f) throws FileNotFoundException, IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + protected RemoteIterator<LocatedFileStatus> listLocatedStatus(Path f, PathFilter filter) + throws FileNotFoundException, IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public RemoteIterator<LocatedFileStatus> listFiles(Path f, boolean recursive) + throws FileNotFoundException, IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public Path getHomeDirectory() { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + protected Path getInitialWorkingDirectory() { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public boolean mkdirs(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void copyFromLocalFile(Path src, Path dst) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void moveFromLocalFile(Path[] srcs, Path dst) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void moveFromLocalFile(Path src, Path dst) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void copyFromLocalFile(boolean delSrc, Path src, Path dst) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void copyFromLocalFile(boolean delSrc, boolean overwrite, Path[] srcs, Path dst) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void copyFromLocalFile(boolean delSrc, boolean overwrite, Path src, Path dst) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void copyToLocalFile(Path src, Path dst) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void moveToLocalFile(Path src, Path dst) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void copyToLocalFile(boolean delSrc, Path src, Path dst) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void copyToLocalFile(boolean delSrc, Path src, Path dst, boolean useRawLocalFileSystem) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public Path startLocalOutput(Path fsOutputFile, Path tmpLocalFile) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void completeLocalOutput(Path fsOutputFile, Path tmpLocalFile) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void close() throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public long getUsed() throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public long getBlockSize(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public long getDefaultBlockSize() { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public long getDefaultBlockSize(Path f) { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public short getDefaultReplication() { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public short getDefaultReplication(Path path) { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + protected Path fixRelativePart(Path p) { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void createSymlink(Path target, Path link, boolean createParent) + throws AccessControlException, FileAlreadyExistsException, FileNotFoundException, ParentNotDirectoryException, + UnsupportedFileSystemException, IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FileStatus getFileLinkStatus(Path f) + throws AccessControlException, FileNotFoundException, UnsupportedFileSystemException, IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public boolean supportsSymlinks() { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public Path getLinkTarget(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + protected Path resolveLink(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FileChecksum getFileChecksum(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void setVerifyChecksum(boolean verifyChecksum) { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void setWriteChecksum(boolean writeChecksum) { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FsStatus getStatus() throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FsStatus getStatus(Path p) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void setPermission(Path p, FsPermission permission) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void setOwner(Path p, String username, String groupname) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void setTimes(Path p, long mtime, long atime) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public Path createSnapshot(Path path, String snapshotName) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void renameSnapshot(Path path, String snapshotOldName, String snapshotNewName) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void deleteSnapshot(Path path, String snapshotName) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void modifyAclEntries(Path path, List<AclEntry> aclSpec) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void removeAclEntries(Path path, List<AclEntry> aclSpec) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void removeDefaultAcl(Path path) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void removeAcl(Path path) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void setAcl(Path path, List<AclEntry> aclSpec) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public AclStatus getAclStatus(Path path) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public URI getUri() { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); } + + @Override + public FSDataInputStream open(Path f, int bufferSize) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, + long blockSize, Progressable progress) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public boolean rename(Path src, Path dst) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public boolean delete(Path f, boolean recursive) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FileStatus[] listStatus(Path f) throws FileNotFoundException, IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public void setWorkingDirectory(Path new_dir) { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public Path getWorkingDirectory() { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public boolean mkdirs(Path f, FsPermission permission) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + + @Override + public FileStatus getFileStatus(Path f) throws IOException { + throw new UnsupportedOperationException("Accessing local file system is not allowed"); + } + +}