Git Product home page Git Product logo

flowdata's Introduction

工作目录 /home/student1/ygs/week2

上传数据文件

$ hdfs dfs -mkdir /ygs/week2/input $ hdfs dfs -put ~/ygs/week2/HTTP_20130313143750.dat /ygs/week2/input

检查文件

$ hdfs dfs -ls /ygs/week2/input/ Found 1 items -rw-r----- 2 student1 hadoop 2229 2022-03-12 22:24 /ygs/week2/input/HTTP_20130313143750.dat

创建运行shell脚本

$ vim run.sh

shell脚本内容

$ hdfs dfs -rm -r /ygs/week2/output $ hadoop jar flowdata-1.0.jar FlowDataMain /ygs/week2/input/HTTP_20130313143750.dat /ygs/week2/output

shell脚本可执行

$ chmod 700 run.sh

执行脚本

$ ./run.sh

下载输出

$ hdfs dfs -get /ygs/week2/output

打印所有结果

$ cat output/*

13726238888 2481 24681 27162 13560436666 1116 954 2070 13726230503 2481 24681 27162 13926435656 132 1512 1644 18211575961 1527 2106 3633 13660577991 6960 690 7650 13760778710 120 120 240 13922314466 3008 3720 6728 18320173382 9531 2412 11943 13502468823 7335 110349 117684 13602846565 1938 2910 4848 84138413 4116 1432 5548 13560439658 2034 5892 7926 13925057413 11058 48243 59301 15013685858 3659 3538 7197 15920133257 3156 2936 6092 15989002119 1938 180 2118 13719199419 240 0 240 13826544101 264 0 264 13480253104 180 180 360 13926251106 240 0 240

flowdata's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.