Giter Site home page Giter Site logo

Comments (4)

codefollower avatar codefollower commented on May 5, 2024

会增加TRANSACTION_META列,
通过select肯定查不到。

from lealone.

freemanhjr avatar freemanhjr commented on May 5, 2024

我是说在hbase里面是否能看到;
我现在导入一批数据后发现没有这个列,在删除时会增加这个列;
不知道正常情况下在hbase里是否能看到这个列?

ROW COLUMN+CELL

1970-01-01 00:00:01 column=CF:DATE_TIME, timestamp=1377232069510, value=\xFF\xFF\xFF\xFF\xFEH\x8F\xE8

1970-01-01 00:00:01 column=CF:DIRECT, timestamp=1377232069510, value=@p\xB8\xC5\x04\x81o\x00

1970-01-01 00:00:01 column=CF:HOST_ID, timestamp=1377232069510, value=;

1970-01-01 00:00:01 column=CF:MICRO_SEC, timestamp=1377232069510, value=\x005\xD4\xC2

1970-01-01 00:00:01 column=CF:SAVE_TIME, timestamp=1377232069510, value=\x00\x00\x00\x002\xEE-I

1970-01-01 00:00:01 column=CF:STATION_ID, timestamp=1377232069510, value=\x15
1970-01-01 00:00:01 column=CF:STRENGTH, timestamp=1377232069510, value=\xC08\xE3\x94\xFA\xCEg\xD7

1970-01-01 00:00:01 column=CF:STROKE, timestamp=1377232069510, value=\x01

1970-01-01 00:00:01 column=CF:LEALONE_TRANSACTION_META, timestamp=200011, value=SER193:36020,200009,0

这样的数据时正常的吗?

我是用bulk load 导入的;不是lealone client;

from lealone.

codefollower avatar codefollower commented on May 5, 2024

用hbase client导入当然看不到了,这就是lealone client与hbase client的差别,
这就是为什么lealone能区分hbase client和lealone client写入数据的差异,
没有_LEALONE_TRANSACTION_META_列时,说明是原有的hbase client写入的,_LEALONE_TRANSACTION_META_列里有事务id等元数据,
如果把事务id当成cell的timestamp,显然不能实现事务的功能。

你只要记住一点:
当你用hbase client写入任何数据时,lealone都不会插手任何事,lealone无权控制hbase client任何事。
用lealone client写数据时(不管是insert、update还是delete)都会新增一行记录,并且都有_LEALONE_TRANSACTION_META_列。

from lealone.

codefollower avatar codefollower commented on May 5, 2024

另外,增加_LEALONE_TRANSACTION_META_列只是目前实现事务的一种方式,这算是内部实现细节,应用并不需要知道,因为将来如果想到更好的方式可能会变,并且用lealone client使用select查询记录时是不会有这个字段了,表的定义里也不会有这个字段。

所以,只有lealone的开发者才需要关心这些实现细节。

from lealone.

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.