org.apache.hadoop.fs.http.server
Class FSOperations.FSCreate

java.lang.Object
  extended by org.apache.hadoop.fs.http.server.FSOperations.FSCreate
All Implemented Interfaces:
FileSystemAccess.FileSystemExecutor<Void>
Enclosing class:
FSOperations

@InterfaceAudience.Private
public static class FSOperations.FSCreate
extends Object
implements FileSystemAccess.FileSystemExecutor<Void>

Executor that performs a create FileSystemAccess files system operation.


Constructor Summary
FSOperations.FSCreate(InputStream is, String path, short perm, boolean override, short repl, long blockSize)
          Creates a Create executor.
 
Method Summary
 Void execute(org.apache.hadoop.fs.FileSystem fs)
          Executes the filesystem operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSOperations.FSCreate

public FSOperations.FSCreate(InputStream is,
                             String path,
                             short perm,
                             boolean override,
                             short repl,
                             long blockSize)
Creates a Create executor.

Parameters:
is - input stream to for the file to create.
path - path of the file to create.
perm - permission for the file.
override - if the file should be overriden if it already exist.
repl - the replication factor for the file.
blockSize - the block size for the file.
Method Detail

execute

public Void execute(org.apache.hadoop.fs.FileSystem fs)
             throws IOException
Executes the filesystem operation.

Specified by:
execute in interface FileSystemAccess.FileSystemExecutor<Void>
Parameters:
fs - filesystem instance to use.
Returns:
The URI of the created file.
Throws:
IOException - thrown if an IO error occured.


Copyright © 2014 Apache Software Foundation. All Rights Reserved.