private void addJoinTable ( List < Relation > relations ) { for ( Relation relation : relations ) { if ( relation . getType ( ) . equals ( ForeignKey . MANY_TO_MANY ) && relation . isRelatedViaJoinTable ( ) ) { String joinTableName = relation . getJoinTableMetadata ( ) . getJoinTableName ( ) ; String hTableName = HBaseUtils . getHTableName ( databaseName , joinTableName ) ; HTableDescriptor tableDescriptor = new HTableDescriptor ( TableName . valueOf ( hTableName ) ) ; tableDescriptor . addFamily ( new HColumnDescriptor ( joinTableName ) ) ; createOrUpdateTable ( hTableName , tableDescriptor ) ; } } }
Adds the join table .