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

你可能感兴趣的:(phoenix 创建包含多列主键表)