Hadoop : JPS can not find Java installed

前端 未结 11 1859
一生所求
一生所求 2021-01-03 14:48

my configurations are

hduser@worker1:/usr/local/hadoop/conf$ jps
The program \'jps\' can be found in the following packages:
 * openjdk-6-jdk
 * openjdk-7-jd         


        
11条回答
  •  一整个雨季
    2021-01-03 15:24

    I have found the solution for the missing JPS command. I was installing Hadoop 1.x on ubuntu machine in a pseudo distributed mode. I used Java-7-openJDK to provide for the Java commands and tools. For some reason there was a java-1.6.0-openjdk-devel for version 6 but none for version 7 specifically debian and ubuntu distributions. I am not sure if the same is true for Fedora and Redhat. So the best answer as that time was using the linux command

    ps -aux | grep java

    I hated doing that because Hadoop daemons start with so many options that each result fills up more than a screen. Apart from seeing that java is running it is impossible to see what hadoop daemons are running. Hence i came up with a short soultion in the form of one line shell script

    This is my JPS scirpt for open JDK

    !#/bin/bash

    ps -aux | grep java | awk '{print $12}'

    END

    I saved these two lines in a file named jps and stored it in the hadoop/bin directory with execute permissions

    **Here is the result of the script hduser@localhsot# ./jps

    -Dproc-namenode

    -Dproc-datanode

    -Dproc-JobTracker

    -Dproc-TaskTracker**

提交回复
热议问题