It seems as though you are running sqoop with a JRE - But JAVA_HOME set to JDK

后端 未结 3 946
陌清茗
陌清茗 2021-01-13 22:16

I tried to set up sqoop (sqoop-1.4.3.bin__hadoop-1.0.0) on Ubuntu. I can run the basic sqoop help etc without problems. When I run the following I get an error:



        
相关标签:
3条回答
  • 2021-01-13 22:32

    I had the same issue on Ubuntu.

    My $JAVA_HOME was correctly set to /usr/lib/jvm/java-7-openjdk-amd64, but looking into /usr/lib/jvm/java-7-openjdk-amd64/bin I noticed that "javac" was not there. That's what Sqoop needs but could not find.

    So the problem was simply that my installation of Java came without Java compiler. The solution was then very simple:

    sudo apt-get install openjdk-7-jdk
    
    0 讨论(0)
  • 2021-01-13 22:56

    Sqoop will eventually execute Hadoop shell script, so I would make sure that your Hadoop is configured properly to use the JDK instead of JRE.

    0 讨论(0)
  • 2021-01-13 22:59

    Scoop creates java classes that represent the schema of the table you are importing in. So to create the classes you need the jdk instead of the jre.

    Set the JAVA_HOME in the ./bashrc and the $HADOOP_HOME/conf/hadoop-env.sh as well.

    That should work.

    0 讨论(0)
提交回复
热议问题