Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
venoty00 opened this issue Apr 23, 2019 · 0 comments

Comments

@venoty00
Copy link

venoty00 commented Apr 23, 2019

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!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant