Code Monkey home page Code Monkey logo

Comments (1)

thhermansen avatar thhermansen commented on July 4, 2024

This kinda sucks. I have not figured out a way in Thrift to store int values in a cell, as it's mutation object seems to only support string values. As far as I understand it, hbase itself supports int values.

The plan was to to.. well, be able to increment integers in an atomic matter as such that we could guarantee that the number we got back was only used once. As long as we are only able to put strings into cells then we'll not be able to generate nice sequenze with natural numbers by this atomicIncrement (please correct me if I'm wrong :-) ). Next step was to build a little id-factory-for-tables which keept track of sequences per table which in turn could be used to auto-generate the next id / key for a given table. For instance by the User table where we need some simple way if internally identify and reference a user by a small number.

I have implemented at least an increment method (found here: 99d271e), but it is not atomic (Read the comment of the method). I'll go on for now and make the id-factory-for-tables, but it's returned IDs will not be guaranteed to be unique if calls are made to it on the exactly same time..

from massive_record.

Related Issues (20)

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.