private HTableDescriptor getTableMetaData ( List < TableInfo > tableInfos ) { HTableDescriptor tableDescriptor = new HTableDescriptor ( databaseName ) ; Properties tableProperties = null ; schemas = HBasePropertyReader . hsmd . getDataStore ( ) != null ? HBasePropertyReader . hsmd . getDataStore ( ) . getSchemas ( ) : null ; if ( schemas != null && ! schemas . isEmpty ( ) ) { for ( Schema s : schemas ) { if ( s . getName ( ) != null && s . getName ( ) . equalsIgnoreCase ( databaseName ) ) { tableProperties = s . getSchemaProperties ( ) ; tables = s . getTables ( ) ; } } } for ( TableInfo tableInfo : tableInfos ) { if ( tableInfo != null ) { HColumnDescriptor hColumnDescriptor = getColumnDescriptor ( tableInfo ) ; tableDescriptor . addFamily ( hColumnDescriptor ) ; } } if ( tableProperties != null ) { for ( Object o : tableProperties . keySet ( ) ) { tableDescriptor . setValue ( Bytes . toBytes ( o . toString ( ) ) , Bytes . toBytes ( tableProperties . get ( o ) . toString ( ) ) ) ; } } return tableDescriptor ; }
get Table metadata method returns the HTableDescriptor of table for given tableInfo