|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.giraph.BspCase
public class BspCase
Extended TestCase for making setting up Bsp testing.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.zookeeper.Watcher |
|---|
org.apache.zookeeper.Watcher.Event |
| Field Summary | |
|---|---|
static String |
READER_VERTICES
|
| Constructor Summary | |
|---|---|
BspCase(String testName)
Create the test case |
|
| Method Summary | |
|---|---|
static String |
getCallingMethodName()
|
int |
getNumResults(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path outputPath)
Read all parts- files in the output and count their lines. |
int |
getNumWorkers()
Get the number of workers used in the BSP application |
static org.apache.hadoop.fs.FileStatus |
getSinglePartFileStatus(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path partDirPath)
Get the single part file status and make sure there is only one part |
protected org.apache.hadoop.fs.Path |
getTempPath(String name)
Create a temporary path |
String |
getZooKeeperList()
Get the ZooKeeper list |
protected GiraphJob |
prepareJob(String name,
GiraphConfiguration conf)
Prepare a GiraphJob for test purposes |
protected GiraphJob |
prepareJob(String name,
GiraphConfiguration conf,
org.apache.hadoop.fs.Path outputPath)
Prepare a GiraphJob for test purposes |
void |
process(org.apache.zookeeper.WatchedEvent event)
|
static void |
removeAndSetOutput(GiraphJob job,
org.apache.hadoop.fs.Path outputPath)
Helper method to remove an old output directory if it exists, and set the output path for any VertexOutputFormat that uses FileOutputFormat. |
boolean |
runningInDistributedMode()
Are the tests executed on a real hadoop instance? |
void |
setUp()
|
org.apache.hadoop.conf.Configuration |
setupConfiguration(GiraphJob job)
Adjust the configuration to the basic test case |
void |
tearDown()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String READER_VERTICES
| Constructor Detail |
|---|
public BspCase(String testName)
testName - name of the test case| Method Detail |
|---|
public final org.apache.hadoop.conf.Configuration setupConfiguration(GiraphJob job)
throws IOException
IOExceptionprotected org.apache.hadoop.fs.Path getTempPath(String name)
name - name of the file to create in the temporary folder
protected GiraphJob prepareJob(String name,
GiraphConfiguration conf)
throws IOException
name - identifying name for jobconf - GiraphConfiguration describing which classes to use
IOException - if anything goes wrong
protected GiraphJob prepareJob(String name,
GiraphConfiguration conf,
org.apache.hadoop.fs.Path outputPath)
throws IOException
name - identifying name for jobconf - GiraphConfiguration describing which classes to useoutputPath - Where to right output to
IOException - if anything goes wrongpublic int getNumWorkers()
public String getZooKeeperList()
public boolean runningInDistributedMode()
public static org.apache.hadoop.fs.FileStatus getSinglePartFileStatus(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path partDirPath)
throws IOException
conf - Configuration to get the file system frompartDirPath - Directory where the single part file should exist
IOException
public int getNumResults(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path outputPath)
throws IOException
conf - ConfigurationoutputPath - Output path
IOExceptionpublic void setUp()
public void tearDown()
throws IOException
IOExceptionpublic void process(org.apache.zookeeper.WatchedEvent event)
process in interface org.apache.zookeeper.Watcher
public static void removeAndSetOutput(GiraphJob job,
org.apache.hadoop.fs.Path outputPath)
throws IOException
job - Job to set the output path foroutputPath - Path to output
IOExceptionpublic static String getCallingMethodName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||