Impetus / kundera

A JPA 2.1 compliant Polyglot Object-Datastore Mapping Library for NoSQL Datastores.Please subscribe to:

Home Page:http://groups.google.com/group/kundera-discuss/subscribe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HBASE @GeneratedValue(strategy = GenerationType.TABLE) AND kundera.ddl.auto.prepare=validate

venoty00 opened this issue · comments

Hi!!

Thanks so much for your work!!

I think something is wrong:

Entity:

@entity
@table(name = "test")
public class DocumentEntity{

@Id
@GeneratedValue(strategy = GenerationType.TABLE)
private Integer id;

@Column(nullable = false)
private String test;

   .......
   ......

First I set ...auto.prepare in persistence.xml file as "create" to create the structure of table:

   ....
   kundera.ddl.auto.prepare=create
   ....

Up here all ok

After I change ...auto.prepare as "validate"_
....
kundera.ddl.auto.prepare=validate
....

throw this message:

at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
... 20 common frames omitted
Caused by: org.apache.hadoop.hbase**.TableNotFoundException: testNS:kundera_sequences**
at org.apache.hadoop.hbase.client.HBaseAdmin.getTableDescriptor(HBaseAdmin.java:575) ~[hbase-client-1.2.2.jar:1.2.2]
at org.apache.hadoop.hbase.client.HBaseAdmin.getTableDescriptor(HBaseAdmin.java:547) ~[hbase-client-1.2.2.jar:1.2.2]
at org.apache.hadoop.hbase.client.HBaseAdmin.getTableDescriptor(HBaseAdmin.java:580) ~[hbase-client-1.2.2.jar:1.2.2]
at com.impetus.client.hbase.schemamanager.HBaseSchemaManager.validate(HBaseSchemaManager.java:151) ~[kundera-hbase-v2-3.13.jar:na]
... 50 common frames omitted

I'm sorry if the question is very obvious.

I saw that field in hbase is named sequence_value instead of kundera_sequences.... maybe??

kundera version --> 3.13
hbase v2

Thanks!!
venoty!!

EDIT:

I think I solved it. I created another entity:

import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@entity
@table(name = "kundera_sequences")
@DaTa
public class KunderaEntity {

@Id
private String sequence_name;

}

And worked!!

Thanks!!