config ssh

su hduser
mkdir ~/.ssh
ssh-keygen -t rsa -P ""
cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys

bash.bashrc

    export JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/
    export HADOOP_INSTALL=/opt/hadoop
    export PATH=$PATH:$HADOOP_INSTALL/bin
    export PATH=$PATH:$HADOOP_INSTALL/sbin
    export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
    export HADOOP_COMMON_HOME=$HADOOP_INSTALL
    export HADOOP_HDFS_HOME=$HADOOP_INSTALL
    export YARN_HOME=$HADOOP_INSTALL
    export HADOOP_HOME=$HADOOP_INSTALL
    export HADOOP_HEAPSIZE=100

/hdfs/tmp

sudo mkdir -p /hdfs/tmp
sudo chown hduser:hadoop /hdfs/tmp
sudo chmod 750 /hdfs/tmp
hadoop namenode -format

test


start-dfs.sh 
start-yarn.sh 

 hdfs dfs -mkdir /user
 hdfs dfs -mkdir /user/hduser

 hdfs dfs -put /opt/hadoop/etc/hadoop/ input
 time hadoop jar /opt/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.6.jar grep input output 'dfs[a-z.]+'

hdfs dfs -get output output
cat output/*

 stop-dfs.sh
 stop-yarn.sh

 rm -rf /hdfs/tmp/*
 rm -rf /opt/hadoop/logs

hdfs namenode -format