|
Oracle® Big Data Appliance Perfect Balance Java API Reference Release 1 (1.0) E41667-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.hadoop.balancer.Balancer
public class Balancer
This class provides the programmatic-API to run Balancer on mapred- and mapreduce-API Hadoop jobs
| Method Summary | |
|---|---|
org.apache.hadoop.conf.Configuration |
addBalancingPlan(org.apache.hadoop.conf.Configuration clientConf)Augments the supplied Configuration with information required to use the partition plan. |
static org.apache.hadoop.conf.Configuration |
configureCountingReducer(org.apache.hadoop.conf.Configuration conf)Configure a job for reducer load analysis. |
static Balancer |
createBalancer(org.apache.hadoop.conf.Configuration conf)Returns a Balancer after validating configuration properties. |
boolean |
isSamplingComplete()This is a non-blocking call. |
static boolean |
save(org.apache.hadoop.mapreduce.Job clientJob)The client must call this method after the client job completes to save the partition report and a job analyzer report into the report directory. |
static boolean |
save(org.apache.hadoop.mapred.RunningJob clientJob, org.apache.hadoop.conf.Configuration conf)The client must call this method after the client job completes to save the partition report and a job analyzer report into the report directory. |
void |
submit()This method executes sampling. |
void |
waitForCompletion()Calls submit() if it has not been called. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Balancer createBalancer(org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException,
java.lang.InterruptedException
mapred.JobConf or conf.Configuration (mapreduce)java.io.IOExceptionjava.lang.InterruptedExceptionpublic static org.apache.hadoop.conf.Configuration configureCountingReducer(org.apache.hadoop.conf.Configuration conf)
conf - the job configuration
public org.apache.hadoop.conf.Configuration addBalancingPlan(org.apache.hadoop.conf.Configuration clientConf)
throws java.io.IOException
oracle.hadoop.balancer.mapred.BalancedPartitioner or oracle.hadoop.balancer.mapreduce.BalancedPartitionerclientConf - the Configuration of the user/client jobjava.io.IOException
public void submit()
throws java.io.IOException,
java.lang.InterruptedException,
java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.InterruptedExceptionjava.lang.ClassNotFoundException
public void waitForCompletion()
throws java.io.IOException,
java.lang.InterruptedException,
java.lang.ClassNotFoundException
submit() if it has not been called. Waits for the sampling started by submit() to complete before returning.java.io.IOExceptionjava.lang.InterruptedExceptionjava.lang.ClassNotFoundExceptionpublic boolean isSamplingComplete()
public static boolean save(org.apache.hadoop.mapreduce.Job clientJob)
If the client job runs successfully, the partition report will be saved in ${mapred.output.dir}/_balancer; otherwise, the partition report will be ${oracle.hadoop.balancer.reportPath}.
This method is for jobs using the org.apache.hadoop.mapreduce interface.
If an error occurs, this method prints a warning message and returns false.
clientJob -
public static boolean save(org.apache.hadoop.mapred.RunningJob clientJob,
org.apache.hadoop.conf.Configuration conf)
If the client job runs successfully, the partition report will be saved in ${mapred.output.dir}/_balancer; otherwise, the partition report will be ${oracle.hadoop.balancer.reportPath}.
This method is for jobs using the org.apache.hadoop.mapred interface.
If an error occurs, this method prints a warning message and returns false.
clientJob - the submitted RunningJobconf - The Configuration object of clientJob It should be clientJob.getConfiguration()
|
Oracle® Big Data Appliance Perfect Balance Java API Reference Release 1 (1.0) E41667-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||