Giter Site home page Giter Site logo

akshayxml / multithreaded-external-merge-sort Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 3.53 MB

External merge sort algorithm used to sort large number of records - with options to use multiple threads.

Python 100.00%
external-merge-sort two-phase-merge-sort multithreading thread

multithreaded-external-merge-sort's Introduction

Implementation Specs

  1. The metadata file should contain information about the size of the different columns (in bytes).
  2. The data type for all columns should be a string.
  3. The number of columns can range from 1 to 20.
  4. Both ascending and descending sorts are possible.
  5. The program can run for different values of main memory usage allowed and the different size of files (MBs-GBs).

Usage

Basic Version

python3 externalMergeSort.py input.txt output.txt 50 asc C1 C2

With Threads

python3 externalMergeSort.py input.txt output.txt 100 5 desc C3 C1

Input File

It should contain the records with the column values. All the values should be string only and might contain space or โ€œ,โ€.

Command-line inputs:

  1. Input file name (containing the raw records)
  2. Output filename (containing sorted records)
  3. Main memory size (in MB)
  4. Number of threads (optional)
  5. Order code (asc / desc) asc : ascending, desc : descending
  6. ColumnName K1
  7. ColumnName K2
  8. .....

multithreaded-external-merge-sort's People

Contributors

akshayxml avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.