En utilisant Kundera, je voulais créer des tables dans Compte tenu namespaceHbase Kundera Table avec espace de noms ne fonctionne pas
exemple
foo:bar
où foo est namespace & bar est tablename
Cela ne se produit pas avec ci-dessous configuration
Voici mon unité persistante
<provider>com.impetus.kundera.KunderaPersistence</provider>
<properties>
<property name="kundera.nodes" value="ZookeeperIP" />
<property name="kundera.port" value="2181" />
<property name="kundera.client.property" value="User.xml"/>
<property name="kundera.keyspace" value="UserPROFILE" />
<property name="kundera.dialect" value="hbase" />
<property name="kundera.ddl.auto.prepare" value="update" />
<property name="kundera.client.lookup.class" value="com.impetus.client.hbase.HBaseClientFactory" />
</properties>
</persistence-unit>
Voici mon user.xml
<clientProperties>
<datastores>
<dataStore>
<name>hbase</name>
<connection>
<properties>
<property name="hbase.zookeeper.quorum" value="ZookeeperIP"/>
<property name="hbase.zookeeper.property.clientPort" value="2181"/>
</properties>
</connection>
<schemas>
<schema>
<name>UNIVERCITY</name>
<tables>
<table>
<name>STUDENT</name>
<properties>
<property name="TTL" value="12345678"/>
<property name="VERSIONS" value="6"/>
<property name="MIN_VERSIONS" value="3"/>
<property name="COMPRESSION" value="GZ"/>
<property name="COMPRESSION_COMPACT" value="GZ"/>
</properties>
</table>
<table>
<name>COURCES</name>
<properties>
<property name="TTL" value="12345678"/>
<property name="VERSIONS" value="6"/>
<property name="MIN_VERSIONS" value="3"/>
<property name="COMPRESSION" value="GZ"/>
<property name="COMPRESSION_COMPACT" value="GZ"/>
</properties>
</table>
</tables>
</schema>
</schemas>
</dataStore>
</datastores>
</clientProperties>
Classes Mon entité ressemble Ci-dessous
@Entity
@Table(name = "STUDENT", schema = "[email protected]_pu")
public class Student{
@Id
@Column(name = "StudentID")
String StudentID
@Column(name = "Name")
String Name
}
@Entity
@Table(name = "COURCES", schema = "[email protected]_pu")
public class Cource{
@Id
@Column(name = "CourceID")
String CourceID
@Column(name = "Name")
String Name
}
Quand je lance Test Cases je reçois
userProfile comme tableau & ÉTUDIANT & COURCES comme leur c OLONNE familles
Ce que j'Expect est
UserProfile: étudiant comme une table & UserProfile: Cource comme dansAutres Table
Je me sens maintenant Keyspace dans Kundera Persitence.xml prend comme TableName & entités que la famille de la colonne
Comment éviter cela ??
En fait, j'ai 'kundera-hbase-v2', d'une certaine manière je me suis figuré des exemples de git-hub.Votre réponse a aidé – Ashish