Hi,
You can do that by using @SecondaryTables annotation over your entity. And then you can mention it in @Column annotation in the 'table' property over your attribute. For illustration-
@Table(name = "HBASE_TABLE", schema = "HBaseNew@secTableTest")
@SecondaryTables({ @SecondaryTable(name = "HBASE_SECONDARY_TABLE"), @SecondaryTable(name = "t_country") })
@Entity
public class HbaseSecondaryTableEntity
{
/** The object id. */
@Id
@Column(name = "OBJECT_ID")
private String objectId;
/** The name. */
@Column(name = "NAME")
private String name;
/** The age. */
@Column(name = "AGE", table = "HBASE_SECONDARY_TABLE")
private int age;
/** The country. */
@Column(name = "Country", table = "t_country")
private String country;
//setters and getters
}
This will create 2 more column families apart from the default column family namely 'HBASE_SECONDARY_TABLE' and 't_country'.
The column 'country' will be stored in the column family 't_country'.
For further knowledge, please refer this test case.
https://github.com/impetus-opensource/Kundera/blob/d37a85fa6334ed1e81091c27c6a84df2cbaf568c/src/kundera-hbase/kundera-hbase-v2/src/test/java/com/impetus/client/hbase/secondarytable/HbaseSecondaryTableTest.javaHope that helps!
Team Kundera