You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by tsuna <ts...@gmail.com> on 2013/02/17 01:48:56 UTC

Re: HBase and Data Integrity

bcc: asynchbase@

On Sat, Feb 16, 2013 at 12:28 PM, Steve Berg <sb...@googlemail.com> wrote:
> I have some questions for HBase DB:

Hi Steve,
I'm moving this thread to the HBase user mailing list.

> How to ensure data integrity?

Data stored by HBase in HDFS has 3 replicas of the data and checksums.

> Are there methods ensure the integrity?

It's all built-in, I'm not sure what you meant by "methods" here.

> Does HBase primary key? or alternatives

HBase has only one primary key per table.
You may wanna look at the HBase Book, Chapter 5. "Data Model":
http://hbase.apache.org/book.html#datamodel

> Foreign key?

No.

> Referential Integrity?

No.

> How are the ACID properties to be implemented?

http://hbase.apache.org/acid-semantics.html

-- 
Benoit "tsuna" Sigoure

Re: HBase and Data Integrity

Posted by lars hofhansl <la...@apache.org>.
Also check out this blog post for a detailed explanation of ACID in HBase: http://hadoop-hbase.blogspot.com/2012/03/acid-in-hbase.html



________________________________
 From: tsuna <ts...@gmail.com>
To: Steve Berg <sb...@googlemail.com> 
Cc: HBase users <us...@hbase.apache.org> 
Sent: Saturday, February 16, 2013 4:48 PM
Subject: Re: HBase and Data Integrity
 
bcc: asynchbase@

On Sat, Feb 16, 2013 at 12:28 PM, Steve Berg <sb...@googlemail.com> wrote:
> I have some questions for HBase DB:

Hi Steve,
I'm moving this thread to the HBase user mailing list.

> How to ensure data integrity?

Data stored by HBase in HDFS has 3 replicas of the data and checksums.

> Are there methods ensure the integrity?

It's all built-in, I'm not sure what you meant by "methods" here.

> Does HBase primary key? or alternatives

HBase has only one primary key per table.
You may wanna look at the HBase Book, Chapter 5. "Data Model":
http://hbase.apache.org/book.html#datamodel

> Foreign key?

No.

> Referential Integrity?

No.

> How are the ACID properties to be implemented?

http://hbase.apache.org/acid-semantics.html

-- 
Benoit "tsuna" Sigoure

Re: HBase and Data Integrity

Posted by Steve Berg - GMail <sb...@gmail.com>.
Hi,

I'm looking for an example of the constraints in HBase with |void check 
(put p)|, this is indeed possible, but how? Does anyone possible 
examples (code) to?

Ever advance thank you!

best regards!





Am 18.02.2013 01:15, schrieb Andrew Purtell:
> Yes, but implementing a constraint requires implementing a 
> coprocessor, which is not something I'd recommend to users as a 
> general practice. HBase doesn't offer referential integrity as 
> commonly understood in the RDBMS world (foreign keys, etc.) out of the 
> box.
>
>
> On Sat, Feb 16, 2013 at 6:52 PM, Ted Yu <yuzhihong@gmail.com 
> <ma...@gmail.com>> wrote:
>
>     Some addendum to Benoit's answers.
>     In HBase you can setup Constraint for your table. From javadoc:
>
>      * Apply a {@link Constraint} (in traditional database
>     terminology) to a
>     HTable.
>
>      * Any number of {@link Constraint Constraints} can be added to
>     the table,
>     in
>
>      * any order.
>     See
>     hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/Constraint.java
>
>     Cheers
>
>     On Sat, Feb 16, 2013 at 4:48 PM, tsuna <tsunanet@gmail.com
>     <ma...@gmail.com>> wrote:
>
>     > bcc: asynchbase@
>     >
>     > On Sat, Feb 16, 2013 at 12:28 PM, Steve Berg
>     <sb.hkn9@googlemail.com <ma...@googlemail.com>>
>     > wrote:
>     > > I have some questions for HBase DB:
>     >
>     > Hi Steve,
>     > I'm moving this thread to the HBase user mailing list.
>     >
>     > > How to ensure data integrity?
>     >
>     > Data stored by HBase in HDFS has 3 replicas of the data and
>     checksums.
>     >
>     > > Are there methods ensure the integrity?
>     >
>     > It's all built-in, I'm not sure what you meant by "methods" here.
>     >
>     > > Does HBase primary key? or alternatives
>     >
>     > HBase has only one primary key per table.
>     > You may wanna look at the HBase Book, Chapter 5. "Data Model":
>     > http://hbase.apache.org/book.html#datamodel
>     >
>     > > Foreign key?
>     >
>     > No.
>     >
>     > > Referential Integrity?
>     >
>     > No.
>     >
>     > > How are the ACID properties to be implemented?
>     >
>     > http://hbase.apache.org/acid-semantics.html
>     >
>     > --
>     > Benoit "tsuna" Sigoure
>     >
>
>
>
>
> -- 
> Best regards,
>
>    - Andy
>
> Problems worthy of attack prove their worth by hitting back. - Piet 
> Hein (via Tom White)


Re: HBase and Data Integrity

Posted by Andrew Purtell <ap...@apache.org>.
Yes, but implementing a constraint requires implementing a coprocessor,
which is not something I'd recommend to users as a general practice. HBase
doesn't offer referential integrity as commonly understood in the RDBMS
world (foreign keys, etc.) out of the box.


On Sat, Feb 16, 2013 at 6:52 PM, Ted Yu <yu...@gmail.com> wrote:

> Some addendum to Benoit's answers.
> In HBase you can setup Constraint for your table. From javadoc:
>
>  * Apply a {@link Constraint} (in traditional database terminology) to a
> HTable.
>
>  * Any number of {@link Constraint Constraints} can be added to the table,
> in
>
>  * any order.
> See
> hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/Constraint.java
>
> Cheers
>
> On Sat, Feb 16, 2013 at 4:48 PM, tsuna <ts...@gmail.com> wrote:
>
> > bcc: asynchbase@
> >
> > On Sat, Feb 16, 2013 at 12:28 PM, Steve Berg <sb...@googlemail.com>
> > wrote:
> > > I have some questions for HBase DB:
> >
> > Hi Steve,
> > I'm moving this thread to the HBase user mailing list.
> >
> > > How to ensure data integrity?
> >
> > Data stored by HBase in HDFS has 3 replicas of the data and checksums.
> >
> > > Are there methods ensure the integrity?
> >
> > It's all built-in, I'm not sure what you meant by "methods" here.
> >
> > > Does HBase primary key? or alternatives
> >
> > HBase has only one primary key per table.
> > You may wanna look at the HBase Book, Chapter 5. "Data Model":
> > http://hbase.apache.org/book.html#datamodel
> >
> > > Foreign key?
> >
> > No.
> >
> > > Referential Integrity?
> >
> > No.
> >
> > > How are the ACID properties to be implemented?
> >
> > http://hbase.apache.org/acid-semantics.html
> >
> > --
> > Benoit "tsuna" Sigoure
> >
>



-- 
Best regards,

   - Andy

Problems worthy of attack prove their worth by hitting back. - Piet Hein
(via Tom White)

Re: HBase and Data Integrity

Posted by Ted Yu <yu...@gmail.com>.
Some addendum to Benoit's answers.
In HBase you can setup Constraint for your table. From javadoc:

 * Apply a {@link Constraint} (in traditional database terminology) to a
HTable.

 * Any number of {@link Constraint Constraints} can be added to the table,
in

 * any order.
See hbase-server/src/main/java/org/apache/hadoop/hbase/constraint/Constraint.java

Cheers

On Sat, Feb 16, 2013 at 4:48 PM, tsuna <ts...@gmail.com> wrote:

> bcc: asynchbase@
>
> On Sat, Feb 16, 2013 at 12:28 PM, Steve Berg <sb...@googlemail.com>
> wrote:
> > I have some questions for HBase DB:
>
> Hi Steve,
> I'm moving this thread to the HBase user mailing list.
>
> > How to ensure data integrity?
>
> Data stored by HBase in HDFS has 3 replicas of the data and checksums.
>
> > Are there methods ensure the integrity?
>
> It's all built-in, I'm not sure what you meant by "methods" here.
>
> > Does HBase primary key? or alternatives
>
> HBase has only one primary key per table.
> You may wanna look at the HBase Book, Chapter 5. "Data Model":
> http://hbase.apache.org/book.html#datamodel
>
> > Foreign key?
>
> No.
>
> > Referential Integrity?
>
> No.
>
> > How are the ACID properties to be implemented?
>
> http://hbase.apache.org/acid-semantics.html
>
> --
> Benoit "tsuna" Sigoure
>