Uploaded image for project: 'CDH (READ-ONLY)'
  1. CDH (READ-ONLY)
  2. DISTRO-550

"Could not find or load main class " error in using "hadoop classname" execution MR job

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: CDH4.4.0
    • Fix Version/s: None
    • Component/s: MapReduce
    • Labels:
      None
    • Environment:
      Red Hat Enterprise Linux Server release 6.2 (Santiago)

      Description

      When i execute class file use hadoop class , i get "Could not find or load main class",and i find in CDH4.4.0 hadoop classpath lack of '::' ,which exist in CDH4.3 hadoop classpath,when i add it to classpath it's run without error

      [root@CHBM224 ~]# hadoop classpath
      /etc/hadoop/conf:/usr/lib/hadoop/lib/:/usr/lib/hadoop/.//:/usr/lib/hadoop-hdfs/./:/usr/lib/hadoop-hdfs/lib/:/usr/lib/hadoop-hdfs/.//:/usr/lib/hadoop-yarn/lib/:/usr/lib/hadoop-yarn/.//:/usr/lib/hadoop-mapreduce/lib/:/usr/lib/hadoop-ma preduce/.//
      [root@CHBM224 ~]# export 'CLASSPATH=/etc/hadoop/conf:/usr/lib/hadoop/lib/:/usr/lib/hadoop/.//:/usr/lib/hadoop-hdfs/./:/usr/lib/hadoop-hdfs/lib/:/usr/lib/hadoop-hdfs/.//:/usr/lib/hadoop-yarn/lib/:/usr/lib/hadoop-yarn/.//:/usr/lib/hadoo p-mapreduce/lib/:/usr/lib/hadoop-mapreduce/.//::'
      [root@CHBM224 ~]# cd scripts/test/
      [root@CHBM224 test]# /usr/java/jdk1.7.0_25/bin/java -Xmx1000m -Dhadoop.log.dir=/ usr/lib/hadoop/logs -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/usr/lib/hado op -Dhadoop.id.str= -Dhadoop.root.logger=INFO,console -Djava.library.path=/usr/l ib/hadoop/lib/native -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv 4Stack=true -Dhadoop.security.logger=INFO,NullAppender com/test/demo/WordCount
      teragen <num rows> <output dir>
      [root@CHBM224 test]# export 'CLASSPATH=/etc/hadoop/conf:/usr/lib/hadoop/lib/:/u sr/lib/hadoop/.//:/usr/lib/hadoop-hdfs/./:/usr/lib/hadoop-hdfs/lib/:/usr/lib/h adoop-hdfs/.//:/usr/lib/hadoop-yarn/lib/:/usr/lib/hadoop-yarn/.//:/usr/lib/ha doop-mapreduce/lib/:/usr/lib/hadoop-mapreduce/.//'
      [root@CHBM224 test]# /usr/java/jdk1.7.0_25/bin/java -Xmx1000m -Dhadoop.log.dir=/ usr/lib/hadoop/logs -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/usr/lib/hado op -Dhadoop.id.str= -Dhadoop.root.logger=INFO,console -Djava.library.path=/usr/l ib/hadoop/lib/native -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv 4Stack=true -Dhadoop.security.logger=INFO,NullAppender com/test/demo/WordCount
      Error: Could not find or load main class com.test.demo.WordCount

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              justlooks Alex Kim
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: