2015-03-30 16 views
5

मैं अमेज़ॅन ईएमआर का उपयोग कर Wikipedia article view dataset का विश्लेषण करने की कोशिश कर रहा हूं। इस डेटा सेट में तीन महीने की अवधि (1 जनवरी 2011 - 31 मार्च 2011) पर पृष्ठ दृश्य आंकड़े शामिल हैं। मैं उस समय के अधिकांश विचारों के साथ लेख ढूंढने की कोशिश कर रहा हूं। यहाँ कोड मैं का उपयोग कर रहा है:एडब्ल्यूएस ईएमआर चरण विफल हुई नौकरियों के रूप में विफल रहा

public class mostViews { 

public static class Map extends MapReduceBase implements Mapper<LongWritable, Text, Text, IntWritable> { 

    private final static IntWritable views = new IntWritable(1); 
    private Text article = new Text(); 

    public void map(LongWritable key, Text value, OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException { 

     String line = value.toString(); 

     String[] words = line.split(" "); 
     article.set(words[1]); 
     views.set(Integer.parseInt(words[2])); 
     output.collect(article, views); 
    } 
} 

public static class Reduce extends MapReduceBase implements Reducer<Text, IntWritable, Text, IntWritable> { 

    public void reduce(Text key, Iterator<IntWritable> values, OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException { 

     int sum = 0; 

     while (values.hasNext()) 
     { 
      sum += values.next().get(); 
     } 
     output.collect(key, new IntWritable(sum)); 
    } 
} 

public static void main(String[] args) throws Exception { 
    JobConf conf = new JobConf(mostViews.class); 
    conf.setJobName("wordcount"); 

    conf.setOutputKeyClass(Text.class); 
    conf.setOutputValueClass(IntWritable.class); 

    conf.setMapperClass(Map.class); 
    conf.setCombinerClass(Reduce.class); 
    conf.setReducerClass(Reduce.class); 

    conf.setInputFormat(TextInputFormat.class); 
    conf.setOutputFormat(TextOutputFormat.class); 

    FileInputFormat.setInputPaths(conf, new Path(args[0])); 
    FileOutputFormat.setOutputPath(conf, new Path(args[1])); 

    JobClient.runJob(conf); 
} 
} 

कोड में ही काम करता है, लेकिन जब मैं एक क्लस्टर बना सकते हैं और एक कस्टम जार जोड़ने के लिए, यह कभी कभी विफल रहता है, लेकिन दूसरी बार यह काम करता है। पूरे डेटासेट का उपयोग इनपुट के रूप में विफल होने का कारण बनता है, लेकिन एक महीने का उपयोग करके, जनवरी, यह पूरा हो जाता है। पूरे डेटासेट का उपयोग करके चलाने के बाद, मैं 'नियंत्रक' लॉग फ़ाइल को देखा और इस है, जो मुझे लगता है कि प्रासंगिक है पाया:

2015-03-10T11:50:12.437Z INFO Synchronously wait child process to complete :  hadoop jar /mnt/var/lib/hadoop/steps/s-22ZUAWNM... 
2015-03-10T12:05:10.505Z INFO Process still running 
2015-03-10T12:20:12.573Z INFO Process still running 
2015-03-10T12:35:14.642Z INFO Process still running 
2015-03-10T12:50:16.711Z INFO Process still running 
2015-03-10T13:05:18.779Z INFO Process still running 
2015-03-10T13:20:20.848Z INFO Process still running 
2015-03-10T13:35:22.916Z INFO Process still running 
2015-03-10T13:50:24.986Z INFO Process still running 
2015-03-10T14:05:27.056Z INFO Process still running 
2015-03-10T14:20:29.126Z INFO Process still running 
2015-03-10T14:35:31.196Z INFO Process still running 
2015-03-10T14:50:33.266Z INFO Process still running 
2015-03-10T15:05:35.337Z INFO Process still running 
2015-03-10T15:11:37.366Z INFO waitProcessCompletion ended with exit code 1 :  hadoop jar /mnt/var/lib/hadoop/steps/s-22ZUAWNM... 
2015-03-10T15:11:40.064Z INFO Step created jobs: job_1425988140328_0001 
2015-03-10T15:11:50.072Z WARN Step failed as jobs it created failed.  Ids:job_1425988140328_0001 

किसी को भी मुझे बता सकते हैं क्या गलत हो रहा है, और क्या मैं इसे ठीक करने के लिए कर सकते हैं? तथ्य यह है कि यह एक महीने के लिए काम करता है लेकिन दो या तीन महीने के लिए मुझे नहीं लगता है कि डेटा सेट बहुत बड़ा हो सकता है, लेकिन मुझे यकीन नहीं है। मैं अभी भी इस पूरे हडोप/ईएमआर चीज के लिए नया हूं इसलिए यदि कोई जानकारी है तो मैंने मुझे छोड़ दिया है। कोई भी मदद या सलाह बहुत सराहनीय होगी।

अग्रिम धन्यवाद!

+0

क्या आपको समाधान मिला? –

+0

बिल्कुल नहीं, मैंने बस डेटा सेट के आकार को कम कर दिया और यह तब काम करना प्रतीत होता था। मुझे अभी भी पता नहीं है कि यह पहली जगह क्यों हुआ। – spoon

उत्तर

0

आमतौर पर एचडीएफएस (ईएमआर नोड की हार्ड डिस्क) या मेमोरी पर, जब आप अंतरिक्ष से बाहर निकलते हैं तो ये त्रुटियां होती हैं। "/ MNT/var/lib/Hadoop/कदम/एस 22ZUAWNM ..."

दूसरी बात मैं करने की कोशिश करेंगे:

पहले, मैं लॉग जो संदेश को निर्देशित पढ़ने के लिए कोशिश कर रहा द्वारा शुरू होगा एक बड़ा ईएमआर बनाएं (अधिक डिस्क और रैम या अधिक कोर उदाहरणों के साथ ईसी 2 उदाहरण)।

संबंधित मुद्दे