phoenix 创建包含多列主键表

phoenix创建包含多列主键的表,需要使用constraint pkname primary key

如下实例:

create table "abc"."test_keys" ("createTime" date not null, "wara_house" integer not null constraint pk primary key("createTime", "wara_house"));

输出如下:

14/03/06 14:13:05 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=hbase-coo-test-148:2181,hbase-coo-test-147:2181,hbase-coo-test-149:2181 sessionTimeout=180000 watcher=hconnection
14/03/06 14:13:05 INFO zookeeper.ClientCnxn: Opening socket connection to server hbase-coo-test-148/192.168.193.148:2181. Will not attempt to authenticate using SASL (无法定位登录配置)
14/03/06 14:13:05 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 6988@BJXX-ZHAOYUKAI
14/03/06 14:13:05 INFO zookeeper.ClientCnxn: Socket connection established to hbase-coo-test-148/192.168.193.148:2181, initiating session
14/03/06 14:13:05 INFO zookeeper.ClientCnxn: Session establishment complete on server hbase-coo-test-148/192.168.193.148:2181, sessionid = 0x2441b5befa50021, negotiated timeout = 40000
14/03/06 14:13:06 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=hbase-coo-test-148:2181,hbase-coo-test-147:2181,hbase-coo-test-149:2181 sessionTimeout=180000 watcher=catalogtracker-on-org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation@2d5e8aa5
14/03/06 14:13:06 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 6988@BJXX-ZHAOYUKAI
14/03/06 14:13:06 INFO zookeeper.ClientCnxn: Opening socket connection to server hbase-coo-test-147/192.168.193.147:2181. Will not attempt to authenticate using SASL (无法定位登录配置)
14/03/06 14:13:06 INFO zookeeper.ClientCnxn: Socket connection established to hbase-coo-test-147/192.168.193.147:2181, initiating session
14/03/06 14:13:06 INFO zookeeper.ClientCnxn: Session establishment complete on server hbase-coo-test-147/192.168.193.147:2181, sessionid = 0x144957921440001, negotiated timeout = 40000
14/03/06 14:13:06 INFO zookeeper.ZooKeeper: Session: 0x144957921440001 closed
14/03/06 14:13:06 INFO zookeeper.ClientCnxn: EventThread shut down
14/03/06 14:13:06 INFO client.HConnectionManager$HConnectionImplementation: Closed zookeeper sessionid=0x2441b5befa50021
14/03/06 14:13:06 INFO zookeeper.ZooKeeper: Session: 0x2441b5befa50021 closed
14/03/06 14:13:06 INFO zookeeper.ClientCnxn: EventThread shut down
Query ok effect rows 0
time 1921mm
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值