Experiences/Hadoop

[!] WordCount 에러

프로그래머 2012. 8. 26. 02:22

[root@localhost hadoop-1.0.3]# javac -classpath hadoop-core-1.0.3.jar -d playground/classes playground/src/WordCount.java


----------

1. ERROR in playground/src/WordCount.java (at line 20)

        extends Mapper<Object, Text, Text, IntWritable>{

                ^^^^^^

The type Mapper is not generic; it cannot be parameterized with arguments <Object, Text, Text, IntWritable>

----------

2. ERROR in playground/src/WordCount.java (at line 20)

        extends Mapper<Object, Text, Text, IntWritable>{

                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Syntax error, parameterized types are only available if source level is 5.0

----------

3. ERROR in playground/src/WordCount.java (at line 25)

        public void map(Object key, Text value, Context context

                                                ^^^^^^^

Context cannot be resolved to a type

----------

4. ERROR in playground/src/WordCount.java (at line 36)

        extends Reducer<Text,IntWritable,Text,IntWritable> {

                ^^^^^^^

The type Reducer is not generic; it cannot be parameterized with arguments <Text, IntWritable, Text, IntWritable>

----------

5. ERROR in playground/src/WordCount.java (at line 36)

        extends Reducer<Text,IntWritable,Text,IntWritable> {

                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Syntax error, parameterized types are only available if source level is 5.0

----------

6. ERROR in playground/src/WordCount.java (at line 39)

        public void reduce(Text key, Iterable<IntWritable> values,

                                     ^^^^^^^^

The type Iterable is not generic; it cannot be parameterized with arguments <Int Writable>

----------

7. ERROR in playground/src/WordCount.java (at line 39)

        public void reduce(Text key, Iterable<IntWritable> values,

                                              ^^^^^^^^^^^

Syntax error, parameterized types are only available if source level is 5.0

----------

8. ERROR in playground/src/WordCount.java (at line 40)

        Context context

        ^^^^^^^

Context cannot be resolved to a type

----------

9. ERROR in playground/src/WordCount.java (at line 43)

        for (IntWritable val : values) {

             ^^^^^^^^^^^^^^^^^^^^^^^^

Syntax error, 'for each' statements are only available if source level is 5.0

----------

10. ERROR in playground/src/WordCount.java (at line 53)

        String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs();

                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The type org.apache.commons.cli.Options cannot be resolved. It is indirectly referenced from required .class files

----------

10 problems (10 errors)


도대체 이 에러들은 무엇이란 말인가.... 몇시간 째 삽질을 하고 있는 거냐구..ㅠㅠ




이것에 대한 해답은 바로 JDK를 제대로 설치하지 못한 기본기 부족함에서 나왔다..

반성하자!!

'Experiences > Hadoop' 카테고리의 다른 글

1-5. Hadoop 첫 프로그램 실습(WordCount)  (2) 2012.08.28
1-4. 하둡을 위한 개발환경 설정하기  (2) 2012.08.28
1-3. MapReduce의 이해  (0) 2012.08.27
1-2. 하둡은 무엇인가?  (0) 2012.08.26
1-1. 하둡의 소개  (0) 2012.08.26