Index: src/java/org/apache/hama/bsp/BSPInterface.java =================================================================== --- src/java/org/apache/hama/bsp/BSPInterface.java (리비전 0) +++ src/java/org/apache/hama/bsp/BSPInterface.java (리비전 0) @@ -0,0 +1,5 @@ +package org.apache.hama.bsp; + +public interface BSPInterface { + +} Index: src/java/org/apache/hama/bsp/BSPJobClient.java =================================================================== --- src/java/org/apache/hama/bsp/BSPJobClient.java (리비전 0) +++ src/java/org/apache/hama/bsp/BSPJobClient.java (리비전 0) @@ -0,0 +1,10 @@ +package org.apache.hama.bsp; + +public class BSPJobClient { + + public static void runJob(BSPJobConf bsp) { + // TODO Auto-generated method stub + + } + +} Index: src/java/org/apache/hama/bsp/BSPJobConf.java =================================================================== --- src/java/org/apache/hama/bsp/BSPJobConf.java (리비전 0) +++ src/java/org/apache/hama/bsp/BSPJobConf.java (리비전 0) @@ -0,0 +1,91 @@ +package org.apache.hama.bsp; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.Path; +import org.apache.hama.HamaConfiguration; +import org.apache.hama.bsp.UserInterface.MyInputFormat; +import org.apache.hama.bsp.UserInterface.MyOutputFormat; + +/** + * A BSP job configuration + */ +public class BSPJobConf extends Configuration { + + /** + * Constructor + */ + public BSPJobConf() { + // TODO Auto-generated constructor stub + } + + public BSPJobConf(HamaConfiguration conf) { + // TODO Auto-generated constructor stub + } + + /** + * Sets the user specified job name + * + * @param string + */ + public void setJobName(String string) { + // TODO Auto-generated method stub + + } + + /** + * Sets the input path. + * + * @param conf + * @param path + */ + public void setInputPath(HamaConfiguration conf, Path path) { + // TODO Auto-generated method stub + + } + + /** + * Sets the output path. + * + * @param conf + * @param path + */ + public void setOutputPath(HamaConfiguration conf, Path path) { + // TODO Auto-generated method stub + + } + + public void setBSPCode(Class theClass) { + // TODO Auto-generated method stub + + } + + public Class getBSPCode() { + return null; + } + + public void setInputFormat(Class class1) { + // TODO Auto-generated method stub + + } + + public void setOutputFormat(Class class1) { + // TODO Auto-generated method stub + + } + + public String getJobName() { + // TODO Auto-generated method stub + return null; + } + + public String getInputPath() { + // TODO Auto-generated method stub + return null; + } + + public String getOutputPath() { + // TODO Auto-generated method stub + return null; + } + +} Index: src/java/org/apache/hama/bsp/BSPMaster.java =================================================================== --- src/java/org/apache/hama/bsp/BSPMaster.java (리비전 943815) +++ src/java/org/apache/hama/bsp/BSPMaster.java (작업 사본) @@ -174,7 +174,7 @@ System.out.println("usage: HamaMaster"); System.exit(-1); } - + try { HamaConfiguration conf = new HamaConfiguration(); BSPMaster master = startMaster(conf); Index: src/test/org/apache/hama/bsp/UserInterface.java =================================================================== --- src/test/org/apache/hama/bsp/UserInterface.java (리비전 0) +++ src/test/org/apache/hama/bsp/UserInterface.java (리비전 0) @@ -0,0 +1,58 @@ +package org.apache.hama.bsp; + +import java.io.IOException; + +import org.apache.hadoop.fs.Path; +import org.apache.hama.HamaCluster; +import org.apache.hama.HamaConfiguration; +import org.apache.zookeeper.WatchedEvent; +import org.apache.zookeeper.Watcher; + +public class UserInterface extends HamaCluster implements Watcher { + private String JOBNAME = null; + private Path INPUTPATH = null; + private Path OUTPUTPATH = null; + + public void testScenario() throws InterruptedException, IOException { + HamaConfiguration conf = new HamaConfiguration(); + + // BSP job configuration + BSPJobConf bsp = new BSPJobConf(conf); + // Set the job name + bsp.setJobName(JOBNAME); + + // Set in/output path and formatter + bsp.setInputPath(conf, INPUTPATH); + bsp.setOutputPath(conf, OUTPUTPATH); + bsp.setInputFormat(MyInputFormat.class); + bsp.setOutputFormat(MyOutputFormat.class); + + // Set the BSP code + bsp.setBSPCode(MyBSP.class); + BSPJobClient.runJob(bsp); + + //******************* + // assertion checking + assertEquals(bsp.getJobName(), JOBNAME); + assertEquals(bsp.getInputPath(), INPUTPATH); + assertEquals(bsp.getOutputPath(), OUTPUTPATH); + } + + class MyBSP implements BSPInterface { + // TODO: implement some BSP example + } + + class MyInputFormat { + // TODO: implement some input Formatter + } + + class MyOutputFormat { + // TODO: implement some input Formatter + } + + @Override + public void process(WatchedEvent event) { + // TODO Auto-generated method stub + + } +}