Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8520409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:31:40+00:00 2026-06-11T06:31:40+00:00

Possible Duplicate: Are they any decent on-disk implementations of Java’s Map? I have a

  • 0

Possible Duplicate:
Are they any decent on-disk implementations of Java’s Map?

I have a piece of code (that I didn’t write) that reads millions of CSV rows to a Map, then processes it.

I got to the point where I simply ran out of RAM

My options are

  1. Rewrite the code, trying to stream the data, however since some calculations might need the entire data set (e.g. calculation that might need both the very first and very last row in the data set)

  2. Write a Class that implements java.util.Map but will persist the data into a database

  3. Simply rewrite the code and insert / select from a database directly, but I’d rather try #2 first

So the thought of a DB backed Map all of a sudden made sense to me, so before starting to write it, I wanted to ask if there is a well known pattern / implementation for this problem (perhaps not even a Map)

Now as much as I like writing code, I don’t like reinventing things, and I prefer reusing open source code.

I don’t mind much about the storage implementation, SQL or NoSQL, but it needs to allow a Map to be automatically persistent, and avoid keeping it entirely in memory.

Is there such a known library / implementation? is this problem familiar? am I attacking it in the right way?


Update:

based on comments, I’ll look into these (older, but pretty much duplicate) questions:

  • Are they any decent on-disk implementations of Java's Map?

  • Disk based HashMap

and vote to close this one if they answer my question and still up to date

Update2:

  1. This is not an exact duplicate, I’m looking for a database backed persistence, the other questions are wider (any disk based implementation)
  2. Duplicates are not always a bad thing, please read this post by Jeff Atwood before voting to close
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:31:42+00:00Added an answer on June 11, 2026 at 6:31 am

    Many key-value stores provide Map interface. For example, https://github.com/jankotek/JDBM3

    See also SO questions:

    key-value store suggestion

    Java disk-based key-value storage

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Java socket sends some data during connection to server I have two
Possible Duplicate: String's Maximum length in Java - calling length() method I have a
Possible Duplicate: Any way to simplify this code? What is the best way to
Possible Duplicate: where can i learn php internals, how they work? Are there any
Possible Duplicate: How do emulators work and how are they written? I'd like to
Possible Duplicate: Dispatch queues: How to tell if they're running and how to stop
Possible Duplicate: && operator in Javascript In the sample code of the ExtJS web
Possible Duplicate: Objective C for Windows iPhone development on Windows Is there any way
Possible Duplicate: Any ideas on how I could implement a grid-view in CSS? -
Possible Duplicate: Best Way to Sprite Images? Hi i have been using this http://spritegen.website-performance.org

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.