com.cloudera.hoop.fs
Class FSSetReplication

java.lang.Object
  extended by com.cloudera.hoop.fs.FSSetReplication
All Implemented Interfaces:
Hadoop.FileSystemExecutor<org.json.simple.JSONObject>

public class FSSetReplication
extends Object
implements Hadoop.FileSystemExecutor<org.json.simple.JSONObject>

Executor that performs a set-replication Hadoop files system operation.


Constructor Summary
FSSetReplication(String path, short replication)
          Creates a set-replication executor.
 
Method Summary
 org.json.simple.JSONObject 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

FSSetReplication

public FSSetReplication(String path,
                        short replication)
Creates a set-replication executor.

Parameters:
path - path to set the replication factor.
replication - replication factor to set.
Method Detail

execute

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

Specified by:
execute in interface Hadoop.FileSystemExecutor<org.json.simple.JSONObject>
Parameters:
fs - filesystem instance to use.
Returns:
true if the replication value was set, false otherwise.
Throws:
IOException - thrown if an IO error occured.


Copyright © 2012 Cloudera. All Rights Reserved.