You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by unmesha sreeveni <un...@gmail.com> on 2013/12/07 08:35:29 UTC

Decision Tree failed to execute in MR

Decision tree is working perfectly in Eclipse Juno.

               Source code is here <https://github.com/studhadoop/DT>.

But when i tried to run that in my cluster it is showing error.

Eclipse Output is
here<https://github.com/studhadoop/Execution/blob/master/output/originaleclipseoutput>

Cluster Output is
here<https://github.com/studhadoop/Execution/blob/master/output/originalclusteroutput>

Folder "C45 " is created in my local disk /user/sree

When i tried hadoop fs -ls /user/sree/C45

Nothing is in C45 and no "intermediate" files are created in my
/user/sree/C45 why is it so? It is working perfectly in Eclipse.


** UPDATE **

I updated my code to

1.Instead of

BufferedWriter bw = new BufferedWriter(new FileWriter(new
File("C45/intermediate"+id.current_index+".txt"), true));

in Reduce.java changed to

BufferedWriter bw = new BufferedWriter(new
OutputStreamWriter(fs.create(new
Path("C45/intermediate"+id.current_index+".txt"), true)));

2.Instead of

fstream = new FileInputStream("C45/intermediate"+id.current_index+".txt");DataInputStream
in = new DataInputStream(fstream);BufferedReader br = new
BufferedReader(new InputStreamReader(in));

in GainRatio.java changed to

BufferedReader br = new BufferedReader(new
InputStreamReader(fs.open(new
Path("C45/intermediate"+id.current_index+".txt"))));

It is executing,but it is not completely executed.

Edited Eclipse Output is
here<https://github.com/studhadoop/Execution/blob/master/output/editedeclipseoutput>

Edited Cluster Output is
here<https://github.com/studhadoop/Execution/blob/master/output/editedclusteroutput>

Am i doing anything wrong.

why is it not working?


-- 
*Thanks & Regards*

Unmesha Sreeveni U.B

*Junior Developer*