From f60c1f2b88171102c6e77ddd5f20e63489259a4b Mon Sep 17 00:00:00 2001 From: Gang Liao Date: Tue, 1 Oct 2019 02:09:42 -0400 Subject: [PATCH] [FIX] The PRIMARY KEY on the partitioned table INODES does not include the partitioning column PARENT --- HdfsMetaInfoSchema.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/HdfsMetaInfoSchema.java b/HdfsMetaInfoSchema.java index c25c8f7179b..00802e891d6 100644 --- a/HdfsMetaInfoSchema.java +++ b/HdfsMetaInfoSchema.java @@ -92,9 +92,10 @@ private HdfsMetaInfoSchema() throws SQLException { + " maxDate bigint, sequenceNumber int primary key, masterKeyId int, expiryDate bigint" + ");" + "CREATE TABLE inodes(" - + " id bigint primary key, parent bigint NOT NULL, name varchar," + + " id bigint, parent bigint NOT NULL, name varchar," + " accessTime bigint, modificationTime bigint," - + " header bigint, permission bigint" + + " header bigint, permission bigint," + + " PRIMARY KEY (id, parent)" + ");" + "PARTITION TABLE inodes ON COLUMN parent;" + "CREATE TABLE inodexattrs("