Giter Club home page Giter Club logo

assignment1's Introduction

Map Reduce and gRPC

The repository contains a gradle applications project template for completing task 2 and 3 for Assignment number 1.

NOTE: After loading the project depending on which IDE (if using), you might see some file not found errors. However, they will disappear after you have successfully built the project using following command from the task folder.

Project Structure

src
└── main
    ├── java
    │   └── io
    │       └── grpc
    │               └── filesystem
    │                   ├── task2
    │                   │   ├── MapReduce.java # map and reduce on a given input file
    │                   │   └── Mapper.java # map object class
    │                   └── task3
    │                   │   ├── MrClient.java # client implementation for requesting map and reduce jobs
    │                   │   ├── MrMapServer.java # server implementation to accept and perform map request 
    │                   │   └── MrReduceServer.java # server implementation to accept and perform reduce request
    │                   └── test
    │                       └── CheckOutput.java # compare results against the expected answer using suggested word filters in MapReduce.java file  
    └── proto
        └── communicate.proto  # gRPC service and message formats

Task 2

Run the program from Tasks folder

On MacOS:

./gradlew build
./gradlew run -PchooseMain=io.grpc.filesystem.task2.MapReduce --args="input/pigs.txt output/output-task2.txt"

Check your output:

./gradlew run -PchooseMain=io.grpc.filesystem.test.CheckOutput --args="output/output-task2.txt"

On Windows:

.\gradlew build
.\gradlew run -PchooseMain="io.grpc.filesystem.task2.MapReduce" --args="input/pigs.txt output/output-task2.txt"

Check your output:

.\gradlew run -PchooseMain="io.grpc.filesystem.test.CheckOutput" --args="output/output-task2.txt"

Task 3

Run client and servers

From the Task3 directory, execute the following command to install the project.

On MacOS

./gradlew build

After a successful build, you are ready to start communication using gRPC through the following commands:

Map Server:

./gradlew run -PchooseMain=io.grpc.filesystem.task3.MrMapServer --args="50551"

Reduce Server:

./gradlew run -PchooseMain=io.grpc.filesystem.task3.MrReduceServer --args="50552"

Client:

./gradlew run -PchooseMain=io.grpc.filesystem.task3.MrClient --args="127.0.0.1 50551 50552 input/pigs.txt output/output-task3.txt"

Check your output:

./gradlew run -PchooseMain=io.grpc.filesystem.test.CheckOutput --args="output/output-task3.txt"

On Windows

.\gradlew build

Map Server:

.\gradlew run -PchooseMain="io.grpc.filesystem.task3.MrMapServer" --args="50551"

Reduce Server:

.\gradlew run -PchooseMain="io.grpc.filesystem.task3.MrReduceServer" --args="50552"

Client:

.\gradlew run -PchooseMain="io.grpc.filesystem.task3.MrClient" --args="127.0.0.1 50551 50552 input/pigs.txt output/output-task3.txt"

Check your output:

.\gradlew run -PchooseMain="io.grpc.filesystem.test.CheckOutput" --args="output/output-task3.txt"

assignment1's People

Contributors

nicolas-montani avatar jhasanjiv5 avatar sebioes 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.