Skip to content

Java MapReduce source code for performing matrix operations (add, subtract, multiply, etc.) as part of the Big Data course using Hadoop.

License

Notifications You must be signed in to change notification settings

ZiadGamalDev/matrix-operations-mapreduce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matrix Operations with MapReduce – Big Data Project

This repo contains raw Java source files written for our Big Data course final project.
We implemented matrix operations using Hadoop MapReduce and tested them on a Linux Hadoop cluster using IntelliJ IDEA.


🧠 What’s Inside?

🔹 Matrix Operations via MapReduce

Implemented in:

  • MatrixOperationMapper.java
  • MatrixOperationReducer.java
  • MatrixOperationDriver.java

Supported operations:

  • Matrix Addition
  • Matrix Subtraction
  • Matrix Multiplication
  • (Also experimented with Division & Mod in Notes/)

Input format: CSV files in the input/ folder.


🔹 Inverted Index (Mini Search Engine)

Files in: InvertedIndexFiles/javaClasses/

Reads from multiple text files and builds an inverted index using MapReduce.

Example:

file1.txt: hello world  
file2.txt: world is beautiful  
file3.txt: hello again

Result:

hello -> file1.txt, file3.txt  
world -> file1.txt, file2.txt

⚙️ Technologies Used

  • Java
  • Hadoop (MapReduce)
  • CSV File Input/Output
  • Linux Terminal
  • IntelliJ IDEA (Linux version - ideaIC)

Only source code files are available — this is not a complete IntelliJ project folder.


📁 Folder Structure

Folder / File Description
input/ CSV matrix files for MapReduce processing
MatrixOperations/ Main implementation of matrix operations
InvertedIndexFiles/ Inverted index logic and test files
Notes/ Extra experiments, helpers, and backup logic
*.xml.txt IntelliJ project configs saved from Linux

🚀 How To Run

These are raw .java files. You’ll need to compile and run them inside a Hadoop-compatible environment.

Steps:

  1. Copy the .java files into your IDE (e.g., IntelliJ)
  2. Compile and package them into a JAR
  3. Run the MapReduce job using:
    hadoop jar YourJarFile.jar MainDriver input/ output/

📌 Disclaimer

This repo contains source code only, not a full runnable IntelliJ project.
Originally built and executed on Linux using IntelliJ IDEA Community Edition (ideaIC).


🏁 Status

✅ Working source code
❌ Not plug-and-play without Hadoop setup


📄 License

MIT License

About

Java MapReduce source code for performing matrix operations (add, subtract, multiply, etc.) as part of the Big Data course using Hadoop.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages