文章目录
Phoenix应用场景:
- Phoenix适合场景
- 快速构建基于HBase得应用程序
- 需要极大规模,性能和并发性得sql应用程序
- 转换hadoop时重用已有sql技能
- BI工具
- 不适合场景:
- 涉及大型join操作或高级sql特性的复杂sql查询
- full-table scans
- ETL jobs
PhoenixSQL语法:
Java API Code | Phoenix DDL |
---|---|
HBaseAdmin hbase = new HBaseAdmin(conf); HTableDescriptor desc = new HTableDescriptor(“us_population”); HColumnDescriptor state = new HColumnDescriptor(“state”.getBytes()); HColumnDescriptor city = new HColumnDescriptor(“city”.getBytes()); HColumnDescriptor population = new HColumnDescriptor(“population”.getBytes()); desc.addFamily(state); desc.addFamily(city); desc.addFamily(population); hbase.createTable(desc); | CREATE TABLE us_population |