메뉴 건너뛰기

Bigdata, Semantic IoT, Hadoop, NoSQL

Bigdata, Hadoop ecosystem, Semantic IoT등의 프로젝트를 진행중에 습득한 내용을 정리하는 곳입니다.
필요한 분을 위해서 공개하고 있습니다. 문의사항은 gooper@gooper.com로 메일을 보내주세요.


아래는 "./put.sh list1"과 같이 console에서 실행하면 list1이라는 파일(HDFS에 등록하려는 파일명일 들어있음)을 한줄씩 읽어 hdfs dfs -put 명령을 실행하는 shell script를 보여준다.


----------put.sh-------------

while read file_name
do
    #echo "Putting /home/gooper/lubm/lubm20000/${file_name} to hdfs://mycluster/user/gooper/lubm20000/$1/${file_name} ...."
    echo "$HOME/hadoop/bin/hdfs dfs -put /home/gooper/lubm/lubm20000/${file_name} hdfs://mycluster/user/gooper/lubm20000/$1/${file_name}"
    $HOME/hadoop/bin/hdfs dfs -put /home/gooper/lubm/lubm20000/${file_name} hdfs://mycluster/user/gooper/lubm20000/$1/${file_name}
done  < $1

A personal place to organize information learned during the development of such Hadoop, Hive, Hbase, Semantic IoT, etc.
We are open to the required minutes. Please send inquiries to gooper@gooper.com.

위로