diff --git a/data/files/repl_dump/_dumpmetadata b/data/files/repl_dump/_dumpmetadata new file mode 100644 index 0000000000..250741c6d9 --- /dev/null +++ b/data/files/repl_dump/_dumpmetadata @@ -0,0 +1 @@ +BOOTSTRAP 548434 548437 /warehouse/tablespace/managed/cmroot NULL diff --git a/data/files/repl_dump/test_hcube_2/_metadata b/data/files/repl_dump/test_hcube_2/_metadata new file mode 100644 index 0000000000..6d8f7f100a --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/_metadata @@ -0,0 +1 @@ +{"version":"0.2","db":"{\"1\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"hdfs://hdpcluster-0/warehouse/tablespace/managed/hive/test_hcube_2.db\"},\"4\":{\"map\":[\"str\",\"str\",1,{\"repl.last.id\":\"548434\"}]},\"6\":{\"str\":\"hive\"},\"7\":{\"i32\":1},\"8\":{\"str\":\"hive\"}}"} \ No newline at end of file diff --git a/data/files/repl_dump/test_hcube_2/tbl/_metadata b/data/files/repl_dump/test_hcube_2/tbl/_metadata new file mode 100644 index 0000000000..74b2a12ae8 --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/tbl/_metadata @@ -0,0 +1 @@ +{"version":"0.2","repl.scope":"all","repl.event.id":"replv2","repl.last.id":"548434","repl.noop":"false","repl.lazy":"true","repl.is.replace":"true","repl.valid.writeid.list":"test_hcube_2.tbl:2:9223372036854775807::","repl.valid.txnid.list":"1915:9223372036854775807::1899,1907","table":"{\"1\":{\"str\":\"tbl\"},\"2\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"hive\"},\"4\":{\"i32\":1569291482},\"5\":{\"i32\":0},\"6\":{\"i32\":0},\"7\":{\"rec\":{\"1\":{\"lst\":[\"rec\",1,{\"1\":{\"str\":\"fld\"},\"2\":{\"str\":\"int\"}}]},\"2\":{\"str\":\"hdfs://hdpcluster-0/warehouse/tablespace/managed/hive/test_hcube_2.db/tbl\"},\"3\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat\"},\"4\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat\"},\"5\":{\"tf\":0},\"6\":{\"i32\":-1},\"7\":{\"rec\":{\"2\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcSerde\"},\"3\":{\"map\":[\"str\",\"str\",1,{\"serialization.format\":\"1\"}]}}},\"8\":{\"lst\":[\"str\",0]},\"9\":{\"lst\":[\"rec\",0]},\"10\":{\"map\":[\"str\",\"str\",0,{}]},\"11\":{\"rec\":{\"1\":{\"lst\":[\"str\",0]},\"2\":{\"lst\":[\"lst\",0]},\"3\":{\"map\":[\"lst\",\"str\",0,{}]}}},\"12\":{\"tf\":0}}},\"8\":{\"lst\":[\"rec\",0]},\"9\":{\"map\":[\"str\",\"str\",10,{\"totalSize\":\"611\",\"numRows\":\"1\",\"rawDataSize\":\"0\",\"transactional_properties\":\"default\",\"COLUMN_STATS_ACCURATE\":\"{\\\"BASIC_STATS\\\":\\\"true\\\",\\\"COLUMN_STATS\\\":{\\\"fld\\\":\\\"true\\\"}}\",\"numFiles\":\"1\",\"transient_lastDdlTime\":\"1569291600\",\"bucketing_version\":\"2\",\"repl.last.id\":\"548434\",\"transactional\":\"true\"}]},\"12\":{\"str\":\"MANAGED_TABLE\"},\"15\":{\"tf\":0},\"17\":{\"str\":\"hive\"},\"18\":{\"i32\":1},\"19\":{\"i64\":2},\"21\":{\"rec\":{\"1\":{\"rec\":{\"1\":{\"tf\":1},\"2\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"tbl\"},\"5\":{\"i64\":1569291600},\"6\":{\"str\":\"hive\"}}},\"2\":{\"lst\":[\"rec\",1,{\"1\":{\"str\":\"fld\"},\"2\":{\"str\":\"int\"},\"3\":{\"rec\":{\"2\":{\"rec\":{\"1\":{\"i64\":1},\"2\":{\"i64\":1},\"3\":{\"i64\":0},\"4\":{\"i64\":1}}}}}}]}}}}","partitions":[]} \ No newline at end of file diff --git a/data/files/repl_dump/test_hcube_2/tbl/data/_files b/data/files/repl_dump/test_hcube_2/tbl/data/_files new file mode 100644 index 0000000000..2c94c7f849 --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/tbl/data/_files @@ -0,0 +1 @@ +../../data/files/test_hcube_2.db/tbl/delta_0000001_0000001_0000/bucket_00000###delta_0000001_0000001_0000 diff --git a/data/files/repl_dump/test_hcube_2/tbl1/_metadata b/data/files/repl_dump/test_hcube_2/tbl1/_metadata new file mode 100644 index 0000000000..3b0faef376 --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/tbl1/_metadata @@ -0,0 +1 @@ +{"version":"0.2","repl.scope":"all","repl.event.id":"replv2","repl.last.id":"548434","repl.noop":"false","repl.lazy":"true","repl.is.replace":"true","repl.valid.writeid.list":"test_hcube_2.tbl1:3:9223372036854775807::","repl.valid.txnid.list":"1915:9223372036854775807::1899,1907","table":"{\"1\":{\"str\":\"tbl1\"},\"2\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"hive\"},\"4\":{\"i32\":1569308563},\"5\":{\"i32\":0},\"6\":{\"i32\":0},\"7\":{\"rec\":{\"1\":{\"lst\":[\"rec\",1,{\"1\":{\"str\":\"fld\"},\"2\":{\"str\":\"int\"}}]},\"2\":{\"str\":\"hdfs://hdpcluster-0/warehouse/tablespace/managed/hive/test_hcube_2.db/tbl1\"},\"3\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat\"},\"4\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat\"},\"5\":{\"tf\":0},\"6\":{\"i32\":-1},\"7\":{\"rec\":{\"2\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcSerde\"},\"3\":{\"map\":[\"str\",\"str\",1,{\"serialization.format\":\"1\"}]}}},\"8\":{\"lst\":[\"str\",0]},\"9\":{\"lst\":[\"rec\",0]},\"10\":{\"map\":[\"str\",\"str\",0,{}]},\"11\":{\"rec\":{\"1\":{\"lst\":[\"str\",0]},\"2\":{\"lst\":[\"lst\",0]},\"3\":{\"map\":[\"lst\",\"str\",0,{}]}}},\"12\":{\"tf\":0}}},\"8\":{\"lst\":[\"rec\",0]},\"9\":{\"map\":[\"str\",\"str\",10,{\"totalSize\":\"1852\",\"numRows\":\"3\",\"rawDataSize\":\"0\",\"transactional_properties\":\"default\",\"COLUMN_STATS_ACCURATE\":\"{\\\"BASIC_STATS\\\":\\\"true\\\",\\\"COLUMN_STATS\\\":{\\\"fld\\\":\\\"true\\\"}}\",\"numFiles\":\"3\",\"transient_lastDdlTime\":\"1569308974\",\"bucketing_version\":\"2\",\"repl.last.id\":\"548434\",\"transactional\":\"true\"}]},\"12\":{\"str\":\"MANAGED_TABLE\"},\"15\":{\"tf\":0},\"17\":{\"str\":\"hive\"},\"18\":{\"i32\":1},\"19\":{\"i64\":3},\"21\":{\"rec\":{\"1\":{\"rec\":{\"1\":{\"tf\":1},\"2\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"tbl1\"},\"5\":{\"i64\":1569308974},\"6\":{\"str\":\"hive\"}}},\"2\":{\"lst\":[\"rec\",1,{\"1\":{\"str\":\"fld\"},\"2\":{\"str\":\"int\"},\"3\":{\"rec\":{\"2\":{\"rec\":{\"1\":{\"i64\":1},\"2\":{\"i64\":1},\"3\":{\"i64\":0},\"4\":{\"i64\":1}}}}}}]}}}}","partitions":[]} \ No newline at end of file diff --git a/data/files/repl_dump/test_hcube_2/tbl1/data/_files b/data/files/repl_dump/test_hcube_2/tbl1/data/_files new file mode 100644 index 0000000000..1d2d92d85c --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/tbl1/data/_files @@ -0,0 +1,3 @@ +../../data/files/test_hcube_2.db/tbl1/delta_0000001_0000001_0000/bucket_00000###delta_0000001_0000001_0000 +../../data/files/test_hcube_2.db/tbl1/delta_0000002_0000002_0000/bucket_00000###delta_0000002_0000002_0000 +../../data/files/test_hcube_2.db/tbl1/delta_0000003_0000003_0000/bucket_00000###delta_0000003_0000003_0000 diff --git a/data/files/repl_dump/test_hcube_2/tbl2/_metadata b/data/files/repl_dump/test_hcube_2/tbl2/_metadata new file mode 100644 index 0000000000..c6f0b66029 --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/tbl2/_metadata @@ -0,0 +1 @@ +{"version":"0.2","repl.scope":"all","repl.event.id":"replv2","repl.last.id":"548434","repl.noop":"false","repl.lazy":"true","repl.is.replace":"true","repl.valid.writeid.list":"test_hcube_2.tbl2:2:9223372036854775807::","repl.valid.txnid.list":"1915:9223372036854775807::1899,1907","table":"{\"1\":{\"str\":\"tbl2\"},\"2\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"hive\"},\"4\":{\"i32\":1569308637},\"5\":{\"i32\":0},\"6\":{\"i32\":0},\"7\":{\"rec\":{\"1\":{\"lst\":[\"rec\",1,{\"1\":{\"str\":\"fld\"},\"2\":{\"str\":\"int\"}}]},\"2\":{\"str\":\"hdfs://hdpcluster-0/warehouse/tablespace/managed/hive/test_hcube_2.db/tbl2\"},\"3\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat\"},\"4\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat\"},\"5\":{\"tf\":0},\"6\":{\"i32\":-1},\"7\":{\"rec\":{\"2\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcSerde\"},\"3\":{\"map\":[\"str\",\"str\",1,{\"serialization.format\":\"1\"}]}}},\"8\":{\"lst\":[\"str\",0]},\"9\":{\"lst\":[\"rec\",0]},\"10\":{\"map\":[\"str\",\"str\",0,{}]},\"11\":{\"rec\":{\"1\":{\"lst\":[\"str\",0]},\"2\":{\"lst\":[\"lst\",0]},\"3\":{\"map\":[\"lst\",\"str\",0,{}]}}},\"12\":{\"tf\":0}}},\"8\":{\"lst\":[\"rec\",0]},\"9\":{\"map\":[\"str\",\"str\",10,{\"totalSize\":\"1231\",\"numRows\":\"2\",\"rawDataSize\":\"0\",\"transactional_properties\":\"default\",\"COLUMN_STATS_ACCURATE\":\"{\\\"BASIC_STATS\\\":\\\"true\\\",\\\"COLUMN_STATS\\\":{\\\"fld\\\":\\\"true\\\"}}\",\"numFiles\":\"2\",\"transient_lastDdlTime\":\"1569308975\",\"bucketing_version\":\"2\",\"repl.last.id\":\"548434\",\"transactional\":\"true\"}]},\"12\":{\"str\":\"MANAGED_TABLE\"},\"15\":{\"tf\":0},\"17\":{\"str\":\"hive\"},\"18\":{\"i32\":1},\"19\":{\"i64\":2},\"21\":{\"rec\":{\"1\":{\"rec\":{\"1\":{\"tf\":1},\"2\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"tbl2\"},\"5\":{\"i64\":1569308975},\"6\":{\"str\":\"hive\"}}},\"2\":{\"lst\":[\"rec\",1,{\"1\":{\"str\":\"fld\"},\"2\":{\"str\":\"int\"},\"3\":{\"rec\":{\"2\":{\"rec\":{\"1\":{\"i64\":1},\"2\":{\"i64\":1},\"3\":{\"i64\":0},\"4\":{\"i64\":1}}}}}}]}}}}","partitions":[]} \ No newline at end of file diff --git a/data/files/repl_dump/test_hcube_2/tbl2/data/_files b/data/files/repl_dump/test_hcube_2/tbl2/data/_files new file mode 100644 index 0000000000..954b8fe6d2 --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/tbl2/data/_files @@ -0,0 +1,2 @@ +../../data/files/test_hcube_2.db/tbl2/delta_0000001_0000001_0000/bucket_00000###delta_0000001_0000001_0000 +../../data/files/test_hcube_2.db/tbl2/delta_0000002_0000002_0000/bucket_00000###delta_0000002_0000002_0000 diff --git a/data/files/repl_dump/test_hcube_2/tbl3/_metadata b/data/files/repl_dump/test_hcube_2/tbl3/_metadata new file mode 100644 index 0000000000..17a1baaa73 --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/tbl3/_metadata @@ -0,0 +1 @@ +{"version":"0.2","repl.scope":"all","repl.event.id":"replv2","repl.last.id":"548434","repl.noop":"false","repl.lazy":"true","repl.is.replace":"true","repl.valid.writeid.list":"test_hcube_2.tbl3:1:9223372036854775807::","repl.valid.txnid.list":"1915:9223372036854775807::1899,1907","table":"{\"1\":{\"str\":\"tbl3\"},\"2\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"hive\"},\"4\":{\"i32\":1569308637},\"5\":{\"i32\":0},\"6\":{\"i32\":0},\"7\":{\"rec\":{\"1\":{\"lst\":[\"rec\",1,{\"1\":{\"str\":\"fld\"},\"2\":{\"str\":\"int\"}}]},\"2\":{\"str\":\"hdfs://hdpcluster-0/warehouse/tablespace/managed/hive/test_hcube_2.db/tbl3\"},\"3\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat\"},\"4\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat\"},\"5\":{\"tf\":0},\"6\":{\"i32\":-1},\"7\":{\"rec\":{\"2\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcSerde\"},\"3\":{\"map\":[\"str\",\"str\",1,{\"serialization.format\":\"1\"}]}}},\"8\":{\"lst\":[\"str\",0]},\"9\":{\"lst\":[\"rec\",0]},\"10\":{\"map\":[\"str\",\"str\",0,{}]},\"11\":{\"rec\":{\"1\":{\"lst\":[\"str\",0]},\"2\":{\"lst\":[\"lst\",0]},\"3\":{\"map\":[\"lst\",\"str\",0,{}]}}},\"12\":{\"tf\":0}}},\"8\":{\"lst\":[\"rec\",0]},\"9\":{\"map\":[\"str\",\"str\",10,{\"totalSize\":\"611\",\"numRows\":\"1\",\"rawDataSize\":\"0\",\"transactional_properties\":\"default\",\"COLUMN_STATS_ACCURATE\":\"{\\\"BASIC_STATS\\\":\\\"true\\\",\\\"COLUMN_STATS\\\":{\\\"fld\\\":\\\"true\\\"}}\",\"numFiles\":\"1\",\"transient_lastDdlTime\":\"1569308976\",\"bucketing_version\":\"2\",\"repl.last.id\":\"548434\",\"transactional\":\"true\"}]},\"12\":{\"str\":\"MANAGED_TABLE\"},\"15\":{\"tf\":0},\"17\":{\"str\":\"hive\"},\"18\":{\"i32\":1},\"19\":{\"i64\":1},\"21\":{\"rec\":{\"1\":{\"rec\":{\"1\":{\"tf\":1},\"2\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"tbl3\"},\"5\":{\"i64\":1569308976},\"6\":{\"str\":\"hive\"}}},\"2\":{\"lst\":[\"rec\",1,{\"1\":{\"str\":\"fld\"},\"2\":{\"str\":\"int\"},\"3\":{\"rec\":{\"2\":{\"rec\":{\"1\":{\"i64\":1},\"2\":{\"i64\":1},\"3\":{\"i64\":0},\"4\":{\"i64\":1}}}}}}]}}}}","partitions":[]} \ No newline at end of file diff --git a/data/files/repl_dump/test_hcube_2/tbl3/data/_files b/data/files/repl_dump/test_hcube_2/tbl3/data/_files new file mode 100644 index 0000000000..662fcd8153 --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/tbl3/data/_files @@ -0,0 +1 @@ +../../data/files/test_hcube_2.db/tbl3/delta_0000001_0000001_0000/bucket_00000###delta_0000001_0000001_0000 diff --git a/data/files/repl_dump/test_hcube_2/tbl4/_metadata b/data/files/repl_dump/test_hcube_2/tbl4/_metadata new file mode 100644 index 0000000000..e5bfc94e0b --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/tbl4/_metadata @@ -0,0 +1 @@ +{"version":"0.2","repl.scope":"all","repl.event.id":"replv2","repl.last.id":"548434","repl.noop":"false","repl.lazy":"true","repl.is.replace":"true","repl.valid.writeid.list":"test_hcube_2.tbl4:1:9223372036854775807::","repl.valid.txnid.list":"1915:9223372036854775807::1899,1907","table":"{\"1\":{\"str\":\"tbl4\"},\"2\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"hive\"},\"4\":{\"i32\":1569308637},\"5\":{\"i32\":0},\"6\":{\"i32\":0},\"7\":{\"rec\":{\"1\":{\"lst\":[\"rec\",1,{\"1\":{\"str\":\"fld\"},\"2\":{\"str\":\"int\"}}]},\"2\":{\"str\":\"hdfs://hdpcluster-0/warehouse/tablespace/managed/hive/test_hcube_2.db/tbl4\"},\"3\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat\"},\"4\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat\"},\"5\":{\"tf\":0},\"6\":{\"i32\":-1},\"7\":{\"rec\":{\"2\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcSerde\"},\"3\":{\"map\":[\"str\",\"str\",1,{\"serialization.format\":\"1\"}]}}},\"8\":{\"lst\":[\"str\",0]},\"9\":{\"lst\":[\"rec\",0]},\"10\":{\"map\":[\"str\",\"str\",0,{}]},\"11\":{\"rec\":{\"1\":{\"lst\":[\"str\",0]},\"2\":{\"lst\":[\"lst\",0]},\"3\":{\"map\":[\"lst\",\"str\",0,{}]}}},\"12\":{\"tf\":0}}},\"8\":{\"lst\":[\"rec\",0]},\"9\":{\"map\":[\"str\",\"str\",10,{\"totalSize\":\"611\",\"numRows\":\"1\",\"rawDataSize\":\"0\",\"transactional_properties\":\"default\",\"COLUMN_STATS_ACCURATE\":\"{\\\"BASIC_STATS\\\":\\\"true\\\",\\\"COLUMN_STATS\\\":{\\\"fld\\\":\\\"true\\\"}}\",\"numFiles\":\"1\",\"transient_lastDdlTime\":\"1569308977\",\"bucketing_version\":\"2\",\"repl.last.id\":\"548434\",\"transactional\":\"true\"}]},\"12\":{\"str\":\"MANAGED_TABLE\"},\"15\":{\"tf\":0},\"17\":{\"str\":\"hive\"},\"18\":{\"i32\":1},\"19\":{\"i64\":1},\"21\":{\"rec\":{\"1\":{\"rec\":{\"1\":{\"tf\":1},\"2\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"tbl4\"},\"5\":{\"i64\":1569308977},\"6\":{\"str\":\"hive\"}}},\"2\":{\"lst\":[\"rec\",1,{\"1\":{\"str\":\"fld\"},\"2\":{\"str\":\"int\"},\"3\":{\"rec\":{\"2\":{\"rec\":{\"1\":{\"i64\":1},\"2\":{\"i64\":1},\"3\":{\"i64\":0},\"4\":{\"i64\":1}}}}}}]}}}}","partitions":[]} \ No newline at end of file diff --git a/data/files/repl_dump/test_hcube_2/tbl4/data/_files b/data/files/repl_dump/test_hcube_2/tbl4/data/_files new file mode 100644 index 0000000000..19e578e737 --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/tbl4/data/_files @@ -0,0 +1 @@ +../../data/files/test_hcube_2.db/tbl4/delta_0000001_0000001_0000/bucket_00000###delta_0000001_0000001_0000 diff --git a/data/files/repl_dump/test_hcube_2/tbl5/_metadata b/data/files/repl_dump/test_hcube_2/tbl5/_metadata new file mode 100644 index 0000000000..27fb4d4a71 --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/tbl5/_metadata @@ -0,0 +1 @@ +{"version":"0.2","repl.scope":"all","repl.event.id":"replv2","repl.last.id":"548434","repl.noop":"false","repl.lazy":"true","repl.is.replace":"true","repl.valid.writeid.list":"test_hcube_2.tbl5:1:9223372036854775807::","repl.valid.txnid.list":"1915:9223372036854775807::1899,1907","table":"{\"1\":{\"str\":\"tbl5\"},\"2\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"hive\"},\"4\":{\"i32\":1569308638},\"5\":{\"i32\":0},\"6\":{\"i32\":0},\"7\":{\"rec\":{\"1\":{\"lst\":[\"rec\",1,{\"1\":{\"str\":\"fld\"},\"2\":{\"str\":\"int\"}}]},\"2\":{\"str\":\"hdfs://hdpcluster-0/warehouse/tablespace/managed/hive/test_hcube_2.db/tbl5\"},\"3\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat\"},\"4\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat\"},\"5\":{\"tf\":0},\"6\":{\"i32\":-1},\"7\":{\"rec\":{\"2\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcSerde\"},\"3\":{\"map\":[\"str\",\"str\",1,{\"serialization.format\":\"1\"}]}}},\"8\":{\"lst\":[\"str\",0]},\"9\":{\"lst\":[\"rec\",0]},\"10\":{\"map\":[\"str\",\"str\",0,{}]},\"11\":{\"rec\":{\"1\":{\"lst\":[\"str\",0]},\"2\":{\"lst\":[\"lst\",0]},\"3\":{\"map\":[\"lst\",\"str\",0,{}]}}},\"12\":{\"tf\":0}}},\"8\":{\"lst\":[\"rec\",0]},\"9\":{\"map\":[\"str\",\"str\",10,{\"totalSize\":\"611\",\"numRows\":\"1\",\"rawDataSize\":\"0\",\"transactional_properties\":\"default\",\"COLUMN_STATS_ACCURATE\":\"{\\\"BASIC_STATS\\\":\\\"true\\\",\\\"COLUMN_STATS\\\":{\\\"fld\\\":\\\"true\\\"}}\",\"numFiles\":\"1\",\"transient_lastDdlTime\":\"1569308978\",\"bucketing_version\":\"2\",\"repl.last.id\":\"548434\",\"transactional\":\"true\"}]},\"12\":{\"str\":\"MANAGED_TABLE\"},\"15\":{\"tf\":0},\"17\":{\"str\":\"hive\"},\"18\":{\"i32\":1},\"19\":{\"i64\":1},\"21\":{\"rec\":{\"1\":{\"rec\":{\"1\":{\"tf\":1},\"2\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"tbl5\"},\"5\":{\"i64\":1569308978},\"6\":{\"str\":\"hive\"}}},\"2\":{\"lst\":[\"rec\",1,{\"1\":{\"str\":\"fld\"},\"2\":{\"str\":\"int\"},\"3\":{\"rec\":{\"2\":{\"rec\":{\"1\":{\"i64\":1},\"2\":{\"i64\":1},\"3\":{\"i64\":0},\"4\":{\"i64\":1}}}}}}]}}}}","partitions":[]} \ No newline at end of file diff --git a/data/files/repl_dump/test_hcube_2/tbl5/data/_files b/data/files/repl_dump/test_hcube_2/tbl5/data/_files new file mode 100644 index 0000000000..7b3b65574f --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/tbl5/data/_files @@ -0,0 +1 @@ +../../data/files/test_hcube_2.db/tbl5/delta_0000001_0000001_0000/bucket_00000###delta_0000001_0000001_0000 diff --git a/data/files/repl_dump/test_hcube_2/tbl6/_metadata b/data/files/repl_dump/test_hcube_2/tbl6/_metadata new file mode 100644 index 0000000000..75ead6a3db --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/tbl6/_metadata @@ -0,0 +1 @@ +{"version":"0.2","repl.scope":"all","repl.event.id":"replv2","repl.last.id":"548434","repl.noop":"false","repl.lazy":"true","repl.is.replace":"true","repl.valid.writeid.list":"test_hcube_2.tbl6:1:9223372036854775807::","repl.valid.txnid.list":"1915:9223372036854775807::1899,1907","table":"{\"1\":{\"str\":\"tbl6\"},\"2\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"hive\"},\"4\":{\"i32\":1569308637},\"5\":{\"i32\":0},\"6\":{\"i32\":0},\"7\":{\"rec\":{\"1\":{\"lst\":[\"rec\",1,{\"1\":{\"str\":\"fld\"},\"2\":{\"str\":\"int\"}}]},\"2\":{\"str\":\"hdfs://hdpcluster-0/warehouse/tablespace/managed/hive/test_hcube_2.db/tbl6\"},\"3\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat\"},\"4\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat\"},\"5\":{\"tf\":0},\"6\":{\"i32\":-1},\"7\":{\"rec\":{\"2\":{\"str\":\"org.apache.hadoop.hive.ql.io.orc.OrcSerde\"},\"3\":{\"map\":[\"str\",\"str\",1,{\"serialization.format\":\"1\"}]}}},\"8\":{\"lst\":[\"str\",0]},\"9\":{\"lst\":[\"rec\",0]},\"10\":{\"map\":[\"str\",\"str\",0,{}]},\"11\":{\"rec\":{\"1\":{\"lst\":[\"str\",0]},\"2\":{\"lst\":[\"lst\",0]},\"3\":{\"map\":[\"lst\",\"str\",0,{}]}}},\"12\":{\"tf\":0}}},\"8\":{\"lst\":[\"rec\",0]},\"9\":{\"map\":[\"str\",\"str\",10,{\"totalSize\":\"611\",\"numRows\":\"1\",\"rawDataSize\":\"0\",\"transactional_properties\":\"default\",\"COLUMN_STATS_ACCURATE\":\"{\\\"BASIC_STATS\\\":\\\"true\\\",\\\"COLUMN_STATS\\\":{\\\"fld\\\":\\\"true\\\"}}\",\"numFiles\":\"1\",\"transient_lastDdlTime\":\"1569308979\",\"bucketing_version\":\"2\",\"repl.last.id\":\"548434\",\"transactional\":\"true\"}]},\"12\":{\"str\":\"MANAGED_TABLE\"},\"15\":{\"tf\":0},\"17\":{\"str\":\"hive\"},\"18\":{\"i32\":1},\"19\":{\"i64\":1},\"21\":{\"rec\":{\"1\":{\"rec\":{\"1\":{\"tf\":1},\"2\":{\"str\":\"test_hcube_2\"},\"3\":{\"str\":\"tbl6\"},\"5\":{\"i64\":1569308979},\"6\":{\"str\":\"hive\"}}},\"2\":{\"lst\":[\"rec\",1,{\"1\":{\"str\":\"fld\"},\"2\":{\"str\":\"int\"},\"3\":{\"rec\":{\"2\":{\"rec\":{\"1\":{\"i64\":1},\"2\":{\"i64\":1},\"3\":{\"i64\":0},\"4\":{\"i64\":1}}}}}}]}}}}","partitions":[]} \ No newline at end of file diff --git a/data/files/repl_dump/test_hcube_2/tbl6/data/_files b/data/files/repl_dump/test_hcube_2/tbl6/data/_files new file mode 100644 index 0000000000..7101dcf4ad --- /dev/null +++ b/data/files/repl_dump/test_hcube_2/tbl6/data/_files @@ -0,0 +1 @@ +../../data/files/test_hcube_2.db/tbl6/delta_0000001_0000001_0000/bucket_00000###delta_0000001_0000001_0000 diff --git a/data/files/test_hcube_2.db/tbl/delta_0000001_0000001_0000/_orc_acid_version b/data/files/test_hcube_2.db/tbl/delta_0000001_0000001_0000/_orc_acid_version new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/data/files/test_hcube_2.db/tbl/delta_0000001_0000001_0000/_orc_acid_version @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/data/files/test_hcube_2.db/tbl/delta_0000001_0000001_0000/bucket_00000 b/data/files/test_hcube_2.db/tbl/delta_0000001_0000001_0000/bucket_00000 new file mode 100644 index 0000000000..826b8c7471 Binary files /dev/null and b/data/files/test_hcube_2.db/tbl/delta_0000001_0000001_0000/bucket_00000 differ diff --git a/data/files/test_hcube_2.db/tbl1/delta_0000001_0000001_0000/_orc_acid_version b/data/files/test_hcube_2.db/tbl1/delta_0000001_0000001_0000/_orc_acid_version new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/data/files/test_hcube_2.db/tbl1/delta_0000001_0000001_0000/_orc_acid_version @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/data/files/test_hcube_2.db/tbl1/delta_0000001_0000001_0000/bucket_00000 b/data/files/test_hcube_2.db/tbl1/delta_0000001_0000001_0000/bucket_00000 new file mode 100644 index 0000000000..826b8c7471 Binary files /dev/null and b/data/files/test_hcube_2.db/tbl1/delta_0000001_0000001_0000/bucket_00000 differ diff --git a/data/files/test_hcube_2.db/tbl1/delta_0000002_0000002_0000/_orc_acid_version b/data/files/test_hcube_2.db/tbl1/delta_0000002_0000002_0000/_orc_acid_version new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/data/files/test_hcube_2.db/tbl1/delta_0000002_0000002_0000/_orc_acid_version @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/data/files/test_hcube_2.db/tbl1/delta_0000002_0000002_0000/bucket_00000 b/data/files/test_hcube_2.db/tbl1/delta_0000002_0000002_0000/bucket_00000 new file mode 100644 index 0000000000..f1dbd1af37 Binary files /dev/null and b/data/files/test_hcube_2.db/tbl1/delta_0000002_0000002_0000/bucket_00000 differ diff --git a/data/files/test_hcube_2.db/tbl1/delta_0000003_0000003_0000/_orc_acid_version b/data/files/test_hcube_2.db/tbl1/delta_0000003_0000003_0000/_orc_acid_version new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/data/files/test_hcube_2.db/tbl1/delta_0000003_0000003_0000/_orc_acid_version @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/data/files/test_hcube_2.db/tbl1/delta_0000003_0000003_0000/bucket_00000 b/data/files/test_hcube_2.db/tbl1/delta_0000003_0000003_0000/bucket_00000 new file mode 100644 index 0000000000..87f5ed0fa4 Binary files /dev/null and b/data/files/test_hcube_2.db/tbl1/delta_0000003_0000003_0000/bucket_00000 differ diff --git a/data/files/test_hcube_2.db/tbl2/delta_0000001_0000001_0000/_orc_acid_version b/data/files/test_hcube_2.db/tbl2/delta_0000001_0000001_0000/_orc_acid_version new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/data/files/test_hcube_2.db/tbl2/delta_0000001_0000001_0000/_orc_acid_version @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/data/files/test_hcube_2.db/tbl2/delta_0000001_0000001_0000/bucket_00000 b/data/files/test_hcube_2.db/tbl2/delta_0000001_0000001_0000/bucket_00000 new file mode 100644 index 0000000000..826b8c7471 Binary files /dev/null and b/data/files/test_hcube_2.db/tbl2/delta_0000001_0000001_0000/bucket_00000 differ diff --git a/data/files/test_hcube_2.db/tbl2/delta_0000002_0000002_0000/_orc_acid_version b/data/files/test_hcube_2.db/tbl2/delta_0000002_0000002_0000/_orc_acid_version new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/data/files/test_hcube_2.db/tbl2/delta_0000002_0000002_0000/_orc_acid_version @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/data/files/test_hcube_2.db/tbl2/delta_0000002_0000002_0000/bucket_00000 b/data/files/test_hcube_2.db/tbl2/delta_0000002_0000002_0000/bucket_00000 new file mode 100644 index 0000000000..f1dbd1af37 Binary files /dev/null and b/data/files/test_hcube_2.db/tbl2/delta_0000002_0000002_0000/bucket_00000 differ diff --git a/data/files/test_hcube_2.db/tbl3/delta_0000001_0000001_0000/_orc_acid_version b/data/files/test_hcube_2.db/tbl3/delta_0000001_0000001_0000/_orc_acid_version new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/data/files/test_hcube_2.db/tbl3/delta_0000001_0000001_0000/_orc_acid_version @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/data/files/test_hcube_2.db/tbl3/delta_0000001_0000001_0000/bucket_00000 b/data/files/test_hcube_2.db/tbl3/delta_0000001_0000001_0000/bucket_00000 new file mode 100644 index 0000000000..826b8c7471 Binary files /dev/null and b/data/files/test_hcube_2.db/tbl3/delta_0000001_0000001_0000/bucket_00000 differ diff --git a/data/files/test_hcube_2.db/tbl4/delta_0000001_0000001_0000/_orc_acid_version b/data/files/test_hcube_2.db/tbl4/delta_0000001_0000001_0000/_orc_acid_version new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/data/files/test_hcube_2.db/tbl4/delta_0000001_0000001_0000/_orc_acid_version @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/data/files/test_hcube_2.db/tbl4/delta_0000001_0000001_0000/bucket_00000 b/data/files/test_hcube_2.db/tbl4/delta_0000001_0000001_0000/bucket_00000 new file mode 100644 index 0000000000..826b8c7471 Binary files /dev/null and b/data/files/test_hcube_2.db/tbl4/delta_0000001_0000001_0000/bucket_00000 differ diff --git a/data/files/test_hcube_2.db/tbl5/delta_0000001_0000001_0000/_orc_acid_version b/data/files/test_hcube_2.db/tbl5/delta_0000001_0000001_0000/_orc_acid_version new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/data/files/test_hcube_2.db/tbl5/delta_0000001_0000001_0000/_orc_acid_version @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/data/files/test_hcube_2.db/tbl5/delta_0000001_0000001_0000/bucket_00000 b/data/files/test_hcube_2.db/tbl5/delta_0000001_0000001_0000/bucket_00000 new file mode 100644 index 0000000000..826b8c7471 Binary files /dev/null and b/data/files/test_hcube_2.db/tbl5/delta_0000001_0000001_0000/bucket_00000 differ diff --git a/data/files/test_hcube_2.db/tbl6/delta_0000001_0000001_0000/_orc_acid_version b/data/files/test_hcube_2.db/tbl6/delta_0000001_0000001_0000/_orc_acid_version new file mode 100644 index 0000000000..d8263ee986 --- /dev/null +++ b/data/files/test_hcube_2.db/tbl6/delta_0000001_0000001_0000/_orc_acid_version @@ -0,0 +1 @@ +2 \ No newline at end of file diff --git a/data/files/test_hcube_2.db/tbl6/delta_0000001_0000001_0000/bucket_00000 b/data/files/test_hcube_2.db/tbl6/delta_0000001_0000001_0000/bucket_00000 new file mode 100644 index 0000000000..826b8c7471 Binary files /dev/null and b/data/files/test_hcube_2.db/tbl6/delta_0000001_0000001_0000/bucket_00000 differ diff --git a/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/creation/CreateTableDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/creation/CreateTableDesc.java index 00eff3d56e..aeb0fbfa1c 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/creation/CreateTableDesc.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/creation/CreateTableDesc.java @@ -894,7 +894,13 @@ public Table toTable(HiveConf conf) throws HiveException { colStatsDesc.setCatName(tbl.getCatName()); colStatsDesc.setDbName(tbl.getDbName()); colStatsDesc.setTableName(tbl.getTableName()); - tbl.getTTable().setColStats(new ColumnStatistics(colStatsDesc, colStats.getStatsObj(), colStats.getEngine())); + String engine = colStats.getEngine(); + if (engine == null) { + engine = org.apache.hadoop.hive.conf.Constants.HIVE_ENGINE; + } + ColumnStatistics columnStatistics = new ColumnStatistics(colStatsDesc, colStats.getStatsObj()); + columnStatistics.setEngine(engine); + tbl.getTTable().setColStats(columnStatistics); // Statistics will have an associated write Id for a transactional table. We need it to // update column statistics. if (replWriteId > 0) { diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/bootstrap/events/filesystem/FSTableEvent.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/bootstrap/events/filesystem/FSTableEvent.java index 5eb4c8b8c7..9bc8e97bac 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/bootstrap/events/filesystem/FSTableEvent.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/bootstrap/events/filesystem/FSTableEvent.java @@ -193,7 +193,8 @@ private AlterTableAddPartitionDesc addPartitionDesc(Path fromPath, ImportTableDe ColumnStatisticsDesc colStatsDesc = new ColumnStatisticsDesc(colStats.getStatsDesc()); colStatsDesc.setTableName(tblDesc.getTableName()); colStatsDesc.setDbName(tblDesc.getDatabaseName()); - columnStatistics = new ColumnStatistics(colStatsDesc, colStats.getStatsObj(), colStats.getEngine()); + columnStatistics = new ColumnStatistics(colStatsDesc, colStats.getStatsObj()); + columnStatistics.setEngine(colStats.getEngine()); writeId = replicationSpec().isMigratingToTxnTable() ? ReplUtils.REPL_BOOTSTRAP_MIGRATION_BASE_WRITE_ID : partition.getWriteId(); } diff --git a/ql/src/test/queries/clientpositive/repl_load_old_version.q b/ql/src/test/queries/clientpositive/repl_load_old_version.q new file mode 100644 index 0000000000..b01dc4a49b --- /dev/null +++ b/ql/src/test/queries/clientpositive/repl_load_old_version.q @@ -0,0 +1,10 @@ +set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; +REPL LOAD test_db from '../../data/files/repl_dump' with ('hive.exec.parallel'='false'); +use test_db; +show tables; +select * from tbl1 order by fld; +select * from tbl2 order by fld; +select * from tbl3 order by fld; +select * from tbl4 order by fld; +select * from tbl5 order by fld; +select * from tbl6 order by fld; diff --git a/ql/src/test/results/clientpositive/repl_load_old_version.q.out b/ql/src/test/results/clientpositive/repl_load_old_version.q.out new file mode 100644 index 0000000000..9ba534f199 --- /dev/null +++ b/ql/src/test/results/clientpositive/repl_load_old_version.q.out @@ -0,0 +1,80 @@ +PREHOOK: query: REPL LOAD test_db from '../../data/files/repl_dump' with ('hive.exec.parallel'='false') +PREHOOK: type: REPLLOAD +POSTHOOK: query: REPL LOAD test_db from '../../data/files/repl_dump' with ('hive.exec.parallel'='false') +POSTHOOK: type: REPLLOAD +PREHOOK: query: use test_db +PREHOOK: type: SWITCHDATABASE +PREHOOK: Input: database:test_db +POSTHOOK: query: use test_db +POSTHOOK: type: SWITCHDATABASE +POSTHOOK: Input: database:test_db +PREHOOK: query: show tables +PREHOOK: type: SHOWTABLES +PREHOOK: Input: database:test_db +POSTHOOK: query: show tables +POSTHOOK: type: SHOWTABLES +POSTHOOK: Input: database:test_db +tbl +tbl1 +tbl2 +tbl3 +tbl4 +tbl5 +tbl6 +PREHOOK: query: select * from tbl1 order by fld +PREHOOK: type: QUERY +PREHOOK: Input: test_db@tbl1 +#### A masked pattern was here #### +POSTHOOK: query: select * from tbl1 order by fld +POSTHOOK: type: QUERY +POSTHOOK: Input: test_db@tbl1 +#### A masked pattern was here #### +1 +1 +1 +PREHOOK: query: select * from tbl2 order by fld +PREHOOK: type: QUERY +PREHOOK: Input: test_db@tbl2 +#### A masked pattern was here #### +POSTHOOK: query: select * from tbl2 order by fld +POSTHOOK: type: QUERY +POSTHOOK: Input: test_db@tbl2 +#### A masked pattern was here #### +1 +1 +PREHOOK: query: select * from tbl3 order by fld +PREHOOK: type: QUERY +PREHOOK: Input: test_db@tbl3 +#### A masked pattern was here #### +POSTHOOK: query: select * from tbl3 order by fld +POSTHOOK: type: QUERY +POSTHOOK: Input: test_db@tbl3 +#### A masked pattern was here #### +1 +PREHOOK: query: select * from tbl4 order by fld +PREHOOK: type: QUERY +PREHOOK: Input: test_db@tbl4 +#### A masked pattern was here #### +POSTHOOK: query: select * from tbl4 order by fld +POSTHOOK: type: QUERY +POSTHOOK: Input: test_db@tbl4 +#### A masked pattern was here #### +1 +PREHOOK: query: select * from tbl5 order by fld +PREHOOK: type: QUERY +PREHOOK: Input: test_db@tbl5 +#### A masked pattern was here #### +POSTHOOK: query: select * from tbl5 order by fld +POSTHOOK: type: QUERY +POSTHOOK: Input: test_db@tbl5 +#### A masked pattern was here #### +1 +PREHOOK: query: select * from tbl6 order by fld +PREHOOK: type: QUERY +PREHOOK: Input: test_db@tbl6 +#### A masked pattern was here #### +POSTHOOK: query: select * from tbl6 order by fld +POSTHOOK: type: QUERY +POSTHOOK: Input: test_db@tbl6 +#### A masked pattern was here #### +1 diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java index 92b239a1e3..a2801244ba 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java @@ -52,7 +52,7 @@ private ColumnStatisticsDesc statsDesc; // required private List statsObj; // required private boolean isStatsCompliant; // optional - private String engine; // required + private String engine; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -124,7 +124,7 @@ public String getFieldName() { // isset id assignments private static final int __ISSTATSCOMPLIANT_ISSET_ID = 0; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.IS_STATS_COMPLIANT}; + private static final _Fields optionals[] = {_Fields.IS_STATS_COMPLIANT,_Fields.ENGINE}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -135,7 +135,7 @@ public String getFieldName() { new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnStatisticsObj.class)))); tmpMap.put(_Fields.IS_STATS_COMPLIANT, new org.apache.thrift.meta_data.FieldMetaData("isStatsCompliant", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); - tmpMap.put(_Fields.ENGINE, new org.apache.thrift.meta_data.FieldMetaData("engine", org.apache.thrift.TFieldRequirementType.REQUIRED, + tmpMap.put(_Fields.ENGINE, new org.apache.thrift.meta_data.FieldMetaData("engine", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnStatistics.class, metaDataMap); @@ -146,13 +146,11 @@ public ColumnStatistics() { public ColumnStatistics( ColumnStatisticsDesc statsDesc, - List statsObj, - String engine) + List statsObj) { this(); this.statsDesc = statsDesc; this.statsObj = statsObj; - this.engine = engine; } /** @@ -537,14 +535,16 @@ public String toString() { sb.append(this.isStatsCompliant); first = false; } - if (!first) sb.append(", "); - sb.append("engine:"); - if (this.engine == null) { - sb.append("null"); - } else { - sb.append(this.engine); + if (isSetEngine()) { + if (!first) sb.append(", "); + sb.append("engine:"); + if (this.engine == null) { + sb.append("null"); + } else { + sb.append(this.engine); + } + first = false; } - first = false; sb.append(")"); return sb.toString(); } @@ -559,10 +559,6 @@ public void validate() throws org.apache.thrift.TException { throw new org.apache.thrift.protocol.TProtocolException("Required field 'statsObj' is unset! Struct:" + toString()); } - if (!isSetEngine()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'engine' is unset! Struct:" + toString()); - } - // check for sub-struct validity if (statsDesc != null) { statsDesc.validate(); @@ -685,9 +681,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, ColumnStatistics s oprot.writeFieldEnd(); } if (struct.engine != null) { - oprot.writeFieldBegin(ENGINE_FIELD_DESC); - oprot.writeString(struct.engine); - oprot.writeFieldEnd(); + if (struct.isSetEngine()) { + oprot.writeFieldBegin(ENGINE_FIELD_DESC); + oprot.writeString(struct.engine); + oprot.writeFieldEnd(); + } } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -714,15 +712,20 @@ public void write(org.apache.thrift.protocol.TProtocol prot, ColumnStatistics st _iter296.write(oprot); } } - oprot.writeString(struct.engine); BitSet optionals = new BitSet(); if (struct.isSetIsStatsCompliant()) { optionals.set(0); } - oprot.writeBitSet(optionals, 1); + if (struct.isSetEngine()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); if (struct.isSetIsStatsCompliant()) { oprot.writeBool(struct.isStatsCompliant); } + if (struct.isSetEngine()) { + oprot.writeString(struct.engine); + } } @Override @@ -743,13 +746,15 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ColumnStatistics str } } struct.setStatsObjIsSet(true); - struct.engine = iprot.readString(); - struct.setEngineIsSet(true); - BitSet incoming = iprot.readBitSet(1); + BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.isStatsCompliant = iprot.readBool(); struct.setIsStatsCompliantIsSet(true); } + if (incoming.get(1)) { + struct.engine = iprot.readString(); + struct.setEngineIsSet(true); + } } } diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java index 792316189c..b5470c9385 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java @@ -38,31 +38,31 @@ @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class Table implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Table"); - private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1); - private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I32, (short)5); - private static final org.apache.thrift.protocol.TField LAST_ACCESS_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAccessTime", org.apache.thrift.protocol.TType.I32, (short)6); - private static final org.apache.thrift.protocol.TField RETENTION_FIELD_DESC = new org.apache.thrift.protocol.TField("retention", org.apache.thrift.protocol.TType.I32, (short)7); - private static final org.apache.thrift.protocol.TField SD_FIELD_DESC = new org.apache.thrift.protocol.TField("sd", org.apache.thrift.protocol.TType.STRUCT, (short)8); - private static final org.apache.thrift.protocol.TField PARTITION_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionKeys", org.apache.thrift.protocol.TType.LIST, (short)9); - private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC = new org.apache.thrift.protocol.TField("parameters", org.apache.thrift.protocol.TType.MAP, (short)10); - private static final org.apache.thrift.protocol.TField VIEW_ORIGINAL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("viewOriginalText", org.apache.thrift.protocol.TType.STRING, (short)11); - private static final org.apache.thrift.protocol.TField VIEW_EXPANDED_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("viewExpandedText", org.apache.thrift.protocol.TType.STRING, (short)12); - private static final org.apache.thrift.protocol.TField TABLE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("tableType", org.apache.thrift.protocol.TType.STRING, (short)13); - private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)14); - private static final org.apache.thrift.protocol.TField TEMPORARY_FIELD_DESC = new org.apache.thrift.protocol.TField("temporary", org.apache.thrift.protocol.TType.BOOL, (short)15); - private static final org.apache.thrift.protocol.TField REWRITE_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("rewriteEnabled", org.apache.thrift.protocol.TType.BOOL, (short)16); - private static final org.apache.thrift.protocol.TField CREATION_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("creationMetadata", org.apache.thrift.protocol.TType.STRUCT, (short)17); - private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", org.apache.thrift.protocol.TType.STRING, (short)18); - private static final org.apache.thrift.protocol.TField OWNER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerType", org.apache.thrift.protocol.TType.I32, (short)19); - private static final org.apache.thrift.protocol.TField WRITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("writeId", org.apache.thrift.protocol.TType.I64, (short)20); - private static final org.apache.thrift.protocol.TField IS_STATS_COMPLIANT_FIELD_DESC = new org.apache.thrift.protocol.TField("isStatsCompliant", org.apache.thrift.protocol.TType.BOOL, (short)21); - private static final org.apache.thrift.protocol.TField COL_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("colStats", org.apache.thrift.protocol.TType.STRUCT, (short)22); - private static final org.apache.thrift.protocol.TField ACCESS_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("accessType", org.apache.thrift.protocol.TType.BYTE, (short)23); - private static final org.apache.thrift.protocol.TField REQUIRED_READ_CAPABILITIES_FIELD_DESC = new org.apache.thrift.protocol.TField("requiredReadCapabilities", org.apache.thrift.protocol.TType.LIST, (short)24); - private static final org.apache.thrift.protocol.TField REQUIRED_WRITE_CAPABILITIES_FIELD_DESC = new org.apache.thrift.protocol.TField("requiredWriteCapabilities", org.apache.thrift.protocol.TType.LIST, (short)25); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField DB_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dbName", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField OWNER_FIELD_DESC = new org.apache.thrift.protocol.TField("owner", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("createTime", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField LAST_ACCESS_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("lastAccessTime", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField RETENTION_FIELD_DESC = new org.apache.thrift.protocol.TField("retention", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField SD_FIELD_DESC = new org.apache.thrift.protocol.TField("sd", org.apache.thrift.protocol.TType.STRUCT, (short)7); + private static final org.apache.thrift.protocol.TField PARTITION_KEYS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitionKeys", org.apache.thrift.protocol.TType.LIST, (short)8); + private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC = new org.apache.thrift.protocol.TField("parameters", org.apache.thrift.protocol.TType.MAP, (short)9); + private static final org.apache.thrift.protocol.TField VIEW_ORIGINAL_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("viewOriginalText", org.apache.thrift.protocol.TType.STRING, (short)10); + private static final org.apache.thrift.protocol.TField VIEW_EXPANDED_TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("viewExpandedText", org.apache.thrift.protocol.TType.STRING, (short)11); + private static final org.apache.thrift.protocol.TField TABLE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("tableType", org.apache.thrift.protocol.TType.STRING, (short)12); + private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)13); + private static final org.apache.thrift.protocol.TField TEMPORARY_FIELD_DESC = new org.apache.thrift.protocol.TField("temporary", org.apache.thrift.protocol.TType.BOOL, (short)14); + private static final org.apache.thrift.protocol.TField REWRITE_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("rewriteEnabled", org.apache.thrift.protocol.TType.BOOL, (short)15); + private static final org.apache.thrift.protocol.TField CREATION_METADATA_FIELD_DESC = new org.apache.thrift.protocol.TField("creationMetadata", org.apache.thrift.protocol.TType.STRUCT, (short)16); + private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", org.apache.thrift.protocol.TType.STRING, (short)17); + private static final org.apache.thrift.protocol.TField OWNER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("ownerType", org.apache.thrift.protocol.TType.I32, (short)18); + private static final org.apache.thrift.protocol.TField WRITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("writeId", org.apache.thrift.protocol.TType.I64, (short)19); + private static final org.apache.thrift.protocol.TField IS_STATS_COMPLIANT_FIELD_DESC = new org.apache.thrift.protocol.TField("isStatsCompliant", org.apache.thrift.protocol.TType.BOOL, (short)20); + private static final org.apache.thrift.protocol.TField COL_STATS_FIELD_DESC = new org.apache.thrift.protocol.TField("colStats", org.apache.thrift.protocol.TType.STRUCT, (short)21); + private static final org.apache.thrift.protocol.TField ACCESS_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("accessType", org.apache.thrift.protocol.TType.BYTE, (short)22); + private static final org.apache.thrift.protocol.TField REQUIRED_READ_CAPABILITIES_FIELD_DESC = new org.apache.thrift.protocol.TField("requiredReadCapabilities", org.apache.thrift.protocol.TType.LIST, (short)23); + private static final org.apache.thrift.protocol.TField REQUIRED_WRITE_CAPABILITIES_FIELD_DESC = new org.apache.thrift.protocol.TField("requiredWriteCapabilities", org.apache.thrift.protocol.TType.LIST, (short)24); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)25); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -70,7 +70,6 @@ schemes.put(TupleScheme.class, new TableTupleSchemeFactory()); } - private long id; // optional private String tableName; // required private String dbName; // required private String owner; // required @@ -95,38 +94,39 @@ private byte accessType; // optional private List requiredReadCapabilities; // optional private List requiredWriteCapabilities; // optional + private long id; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - ID((short)1, "id"), - TABLE_NAME((short)2, "tableName"), - DB_NAME((short)3, "dbName"), - OWNER((short)4, "owner"), - CREATE_TIME((short)5, "createTime"), - LAST_ACCESS_TIME((short)6, "lastAccessTime"), - RETENTION((short)7, "retention"), - SD((short)8, "sd"), - PARTITION_KEYS((short)9, "partitionKeys"), - PARAMETERS((short)10, "parameters"), - VIEW_ORIGINAL_TEXT((short)11, "viewOriginalText"), - VIEW_EXPANDED_TEXT((short)12, "viewExpandedText"), - TABLE_TYPE((short)13, "tableType"), - PRIVILEGES((short)14, "privileges"), - TEMPORARY((short)15, "temporary"), - REWRITE_ENABLED((short)16, "rewriteEnabled"), - CREATION_METADATA((short)17, "creationMetadata"), - CAT_NAME((short)18, "catName"), + TABLE_NAME((short)1, "tableName"), + DB_NAME((short)2, "dbName"), + OWNER((short)3, "owner"), + CREATE_TIME((short)4, "createTime"), + LAST_ACCESS_TIME((short)5, "lastAccessTime"), + RETENTION((short)6, "retention"), + SD((short)7, "sd"), + PARTITION_KEYS((short)8, "partitionKeys"), + PARAMETERS((short)9, "parameters"), + VIEW_ORIGINAL_TEXT((short)10, "viewOriginalText"), + VIEW_EXPANDED_TEXT((short)11, "viewExpandedText"), + TABLE_TYPE((short)12, "tableType"), + PRIVILEGES((short)13, "privileges"), + TEMPORARY((short)14, "temporary"), + REWRITE_ENABLED((short)15, "rewriteEnabled"), + CREATION_METADATA((short)16, "creationMetadata"), + CAT_NAME((short)17, "catName"), /** * * @see PrincipalType */ - OWNER_TYPE((short)19, "ownerType"), - WRITE_ID((short)20, "writeId"), - IS_STATS_COMPLIANT((short)21, "isStatsCompliant"), - COL_STATS((short)22, "colStats"), - ACCESS_TYPE((short)23, "accessType"), - REQUIRED_READ_CAPABILITIES((short)24, "requiredReadCapabilities"), - REQUIRED_WRITE_CAPABILITIES((short)25, "requiredWriteCapabilities"); + OWNER_TYPE((short)18, "ownerType"), + WRITE_ID((short)19, "writeId"), + IS_STATS_COMPLIANT((short)20, "isStatsCompliant"), + COL_STATS((short)21, "colStats"), + ACCESS_TYPE((short)22, "accessType"), + REQUIRED_READ_CAPABILITIES((short)23, "requiredReadCapabilities"), + REQUIRED_WRITE_CAPABILITIES((short)24, "requiredWriteCapabilities"), + ID((short)25, "id"); private static final Map byName = new HashMap(); @@ -141,56 +141,56 @@ */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // ID - return ID; - case 2: // TABLE_NAME + case 1: // TABLE_NAME return TABLE_NAME; - case 3: // DB_NAME + case 2: // DB_NAME return DB_NAME; - case 4: // OWNER + case 3: // OWNER return OWNER; - case 5: // CREATE_TIME + case 4: // CREATE_TIME return CREATE_TIME; - case 6: // LAST_ACCESS_TIME + case 5: // LAST_ACCESS_TIME return LAST_ACCESS_TIME; - case 7: // RETENTION + case 6: // RETENTION return RETENTION; - case 8: // SD + case 7: // SD return SD; - case 9: // PARTITION_KEYS + case 8: // PARTITION_KEYS return PARTITION_KEYS; - case 10: // PARAMETERS + case 9: // PARAMETERS return PARAMETERS; - case 11: // VIEW_ORIGINAL_TEXT + case 10: // VIEW_ORIGINAL_TEXT return VIEW_ORIGINAL_TEXT; - case 12: // VIEW_EXPANDED_TEXT + case 11: // VIEW_EXPANDED_TEXT return VIEW_EXPANDED_TEXT; - case 13: // TABLE_TYPE + case 12: // TABLE_TYPE return TABLE_TYPE; - case 14: // PRIVILEGES + case 13: // PRIVILEGES return PRIVILEGES; - case 15: // TEMPORARY + case 14: // TEMPORARY return TEMPORARY; - case 16: // REWRITE_ENABLED + case 15: // REWRITE_ENABLED return REWRITE_ENABLED; - case 17: // CREATION_METADATA + case 16: // CREATION_METADATA return CREATION_METADATA; - case 18: // CAT_NAME + case 17: // CAT_NAME return CAT_NAME; - case 19: // OWNER_TYPE + case 18: // OWNER_TYPE return OWNER_TYPE; - case 20: // WRITE_ID + case 19: // WRITE_ID return WRITE_ID; - case 21: // IS_STATS_COMPLIANT + case 20: // IS_STATS_COMPLIANT return IS_STATS_COMPLIANT; - case 22: // COL_STATS + case 21: // COL_STATS return COL_STATS; - case 23: // ACCESS_TYPE + case 22: // ACCESS_TYPE return ACCESS_TYPE; - case 24: // REQUIRED_READ_CAPABILITIES + case 23: // REQUIRED_READ_CAPABILITIES return REQUIRED_READ_CAPABILITIES; - case 25: // REQUIRED_WRITE_CAPABILITIES + case 24: // REQUIRED_WRITE_CAPABILITIES return REQUIRED_WRITE_CAPABILITIES; + case 25: // ID + return ID; default: return null; } @@ -231,22 +231,20 @@ public String getFieldName() { } // isset id assignments - private static final int __ID_ISSET_ID = 0; - private static final int __CREATETIME_ISSET_ID = 1; - private static final int __LASTACCESSTIME_ISSET_ID = 2; - private static final int __RETENTION_ISSET_ID = 3; - private static final int __TEMPORARY_ISSET_ID = 4; - private static final int __REWRITEENABLED_ISSET_ID = 5; - private static final int __WRITEID_ISSET_ID = 6; - private static final int __ISSTATSCOMPLIANT_ISSET_ID = 7; - private static final int __ACCESSTYPE_ISSET_ID = 8; + private static final int __CREATETIME_ISSET_ID = 0; + private static final int __LASTACCESSTIME_ISSET_ID = 1; + private static final int __RETENTION_ISSET_ID = 2; + private static final int __TEMPORARY_ISSET_ID = 3; + private static final int __REWRITEENABLED_ISSET_ID = 4; + private static final int __WRITEID_ISSET_ID = 5; + private static final int __ISSTATSCOMPLIANT_ISSET_ID = 6; + private static final int __ACCESSTYPE_ISSET_ID = 7; + private static final int __ID_ISSET_ID = 8; private short __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.ID,_Fields.PRIVILEGES,_Fields.TEMPORARY,_Fields.REWRITE_ENABLED,_Fields.CREATION_METADATA,_Fields.CAT_NAME,_Fields.OWNER_TYPE,_Fields.WRITE_ID,_Fields.IS_STATS_COMPLIANT,_Fields.COL_STATS,_Fields.ACCESS_TYPE,_Fields.REQUIRED_READ_CAPABILITIES,_Fields.REQUIRED_WRITE_CAPABILITIES}; + private static final _Fields optionals[] = {_Fields.PRIVILEGES,_Fields.TEMPORARY,_Fields.REWRITE_ENABLED,_Fields.CREATION_METADATA,_Fields.CAT_NAME,_Fields.OWNER_TYPE,_Fields.WRITE_ID,_Fields.IS_STATS_COMPLIANT,_Fields.COL_STATS,_Fields.ACCESS_TYPE,_Fields.REQUIRED_READ_CAPABILITIES,_Fields.REQUIRED_WRITE_CAPABILITIES,_Fields.ID}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.OPTIONAL, - new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("dbName", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -300,6 +298,8 @@ public String getFieldName() { tmpMap.put(_Fields.REQUIRED_WRITE_CAPABILITIES, new org.apache.thrift.meta_data.FieldMetaData("requiredWriteCapabilities", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Table.class, metaDataMap); } @@ -350,7 +350,6 @@ public Table( */ public Table(Table other) { __isset_bitfield = other.__isset_bitfield; - this.id = other.id; if (other.isSetTableName()) { this.tableName = other.tableName; } @@ -414,6 +413,7 @@ public Table(Table other) { List __this__requiredWriteCapabilities = new ArrayList(other.requiredWriteCapabilities); this.requiredWriteCapabilities = __this__requiredWriteCapabilities; } + this.id = other.id; } public Table deepCopy() { @@ -422,8 +422,6 @@ public Table deepCopy() { @Override public void clear() { - setIdIsSet(false); - this.id = 0; this.tableName = null; this.dbName = null; this.owner = null; @@ -457,28 +455,8 @@ public void clear() { this.accessType = 0; this.requiredReadCapabilities = null; this.requiredWriteCapabilities = null; - } - - public long getId() { - return this.id; - } - - public void setId(long id) { - this.id = id; - setIdIsSet(true); - } - - public void unsetId() { - __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID); - } - - /** Returns true if field id is set (has been assigned a value) and false otherwise */ - public boolean isSetId() { - return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID); - } - - public void setIdIsSet(boolean value) { - __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value); + setIdIsSet(false); + this.id = 0; } public String getTableName() { @@ -1089,16 +1067,30 @@ public void setRequiredWriteCapabilitiesIsSet(boolean value) { } } + public long getId() { + return this.id; + } + + public void setId(long id) { + this.id = id; + setIdIsSet(true); + } + + public void unsetId() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID); + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID); + } + + public void setIdIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { - case ID: - if (value == null) { - unsetId(); - } else { - setId((Long)value); - } - break; - case TABLE_NAME: if (value == null) { unsetTableName(); @@ -1291,14 +1283,19 @@ public void setFieldValue(_Fields field, Object value) { } break; + case ID: + if (value == null) { + unsetId(); + } else { + setId((Long)value); + } + break; + } } public Object getFieldValue(_Fields field) { switch (field) { - case ID: - return getId(); - case TABLE_NAME: return getTableName(); @@ -1371,6 +1368,9 @@ public Object getFieldValue(_Fields field) { case REQUIRED_WRITE_CAPABILITIES: return getRequiredWriteCapabilities(); + case ID: + return getId(); + } throw new IllegalStateException(); } @@ -1382,8 +1382,6 @@ public boolean isSet(_Fields field) { } switch (field) { - case ID: - return isSetId(); case TABLE_NAME: return isSetTableName(); case DB_NAME: @@ -1432,6 +1430,8 @@ public boolean isSet(_Fields field) { return isSetRequiredReadCapabilities(); case REQUIRED_WRITE_CAPABILITIES: return isSetRequiredWriteCapabilities(); + case ID: + return isSetId(); } throw new IllegalStateException(); } @@ -1449,15 +1449,6 @@ public boolean equals(Table that) { if (that == null) return false; - boolean this_present_id = true && this.isSetId(); - boolean that_present_id = true && that.isSetId(); - if (this_present_id || that_present_id) { - if (!(this_present_id && that_present_id)) - return false; - if (this.id != that.id) - return false; - } - boolean this_present_tableName = true && this.isSetTableName(); boolean that_present_tableName = true && that.isSetTableName(); if (this_present_tableName || that_present_tableName) { @@ -1674,6 +1665,15 @@ public boolean equals(Table that) { return false; } + boolean this_present_id = true && this.isSetId(); + boolean that_present_id = true && that.isSetId(); + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (this.id != that.id) + return false; + } + return true; } @@ -1681,11 +1681,6 @@ public boolean equals(Table that) { public int hashCode() { List list = new ArrayList(); - boolean present_id = true && (isSetId()); - list.add(present_id); - if (present_id) - list.add(id); - boolean present_tableName = true && (isSetTableName()); list.add(present_tableName); if (present_tableName) @@ -1806,6 +1801,11 @@ public int hashCode() { if (present_requiredWriteCapabilities) list.add(requiredWriteCapabilities); + boolean present_id = true && (isSetId()); + list.add(present_id); + if (present_id) + list.add(id); + return list.hashCode(); } @@ -1817,16 +1817,6 @@ public int compareTo(Table other) { int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); - if (lastComparison != 0) { - return lastComparison; - } - if (isSetId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); - if (lastComparison != 0) { - return lastComparison; - } - } lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; @@ -2067,6 +2057,16 @@ public int compareTo(Table other) { return lastComparison; } } + lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -2087,12 +2087,6 @@ public String toString() { StringBuilder sb = new StringBuilder("Table("); boolean first = true; - if (isSetId()) { - sb.append("id:"); - sb.append(this.id); - first = false; - } - if (!first) sb.append(", "); sb.append("tableName:"); if (this.tableName == null) { sb.append("null"); @@ -2276,6 +2270,12 @@ public String toString() { } first = false; } + if (isSetId()) { + if (!first) sb.append(", "); + sb.append("id:"); + sb.append(this.id); + first = false; + } sb.append(")"); return sb.toString(); } @@ -2330,15 +2330,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw break; } switch (schemeField.id) { - case 1: // ID - if (schemeField.type == org.apache.thrift.protocol.TType.I64) { - struct.id = iprot.readI64(); - struct.setIdIsSet(true); - } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); - } - break; - case 2: // TABLE_NAME + case 1: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tableName = iprot.readString(); struct.setTableNameIsSet(true); @@ -2346,7 +2338,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // DB_NAME + case 2: // DB_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dbName = iprot.readString(); struct.setDbNameIsSet(true); @@ -2354,7 +2346,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 4: // OWNER + case 3: // OWNER if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.owner = iprot.readString(); struct.setOwnerIsSet(true); @@ -2362,7 +2354,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 5: // CREATE_TIME + case 4: // CREATE_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.createTime = iprot.readI32(); struct.setCreateTimeIsSet(true); @@ -2370,7 +2362,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 6: // LAST_ACCESS_TIME + case 5: // LAST_ACCESS_TIME if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.lastAccessTime = iprot.readI32(); struct.setLastAccessTimeIsSet(true); @@ -2378,7 +2370,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 7: // RETENTION + case 6: // RETENTION if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.retention = iprot.readI32(); struct.setRetentionIsSet(true); @@ -2386,7 +2378,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 8: // SD + case 7: // SD if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.sd = new StorageDescriptor(); struct.sd.read(iprot); @@ -2395,7 +2387,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 9: // PARTITION_KEYS + case 8: // PARTITION_KEYS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list214 = iprot.readListBegin(); @@ -2414,7 +2406,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 10: // PARAMETERS + case 9: // PARAMETERS if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { org.apache.thrift.protocol.TMap _map217 = iprot.readMapBegin(); @@ -2434,7 +2426,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 11: // VIEW_ORIGINAL_TEXT + case 10: // VIEW_ORIGINAL_TEXT if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.viewOriginalText = iprot.readString(); struct.setViewOriginalTextIsSet(true); @@ -2442,7 +2434,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 12: // VIEW_EXPANDED_TEXT + case 11: // VIEW_EXPANDED_TEXT if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.viewExpandedText = iprot.readString(); struct.setViewExpandedTextIsSet(true); @@ -2450,7 +2442,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 13: // TABLE_TYPE + case 12: // TABLE_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.tableType = iprot.readString(); struct.setTableTypeIsSet(true); @@ -2458,7 +2450,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 14: // PRIVILEGES + case 13: // PRIVILEGES if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.privileges = new PrincipalPrivilegeSet(); struct.privileges.read(iprot); @@ -2467,7 +2459,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 15: // TEMPORARY + case 14: // TEMPORARY if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.temporary = iprot.readBool(); struct.setTemporaryIsSet(true); @@ -2475,7 +2467,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 16: // REWRITE_ENABLED + case 15: // REWRITE_ENABLED if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.rewriteEnabled = iprot.readBool(); struct.setRewriteEnabledIsSet(true); @@ -2483,7 +2475,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 17: // CREATION_METADATA + case 16: // CREATION_METADATA if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.creationMetadata = new CreationMetadata(); struct.creationMetadata.read(iprot); @@ -2492,7 +2484,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 18: // CAT_NAME + case 17: // CAT_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.catName = iprot.readString(); struct.setCatNameIsSet(true); @@ -2500,7 +2492,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 19: // OWNER_TYPE + case 18: // OWNER_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.ownerType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); struct.setOwnerTypeIsSet(true); @@ -2508,7 +2500,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 20: // WRITE_ID + case 19: // WRITE_ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.writeId = iprot.readI64(); struct.setWriteIdIsSet(true); @@ -2516,7 +2508,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 21: // IS_STATS_COMPLIANT + case 20: // IS_STATS_COMPLIANT if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isStatsCompliant = iprot.readBool(); struct.setIsStatsCompliantIsSet(true); @@ -2524,7 +2516,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 22: // COL_STATS + case 21: // COL_STATS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.colStats = new ColumnStatistics(); struct.colStats.read(iprot); @@ -2533,7 +2525,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 23: // ACCESS_TYPE + case 22: // ACCESS_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) { struct.accessType = iprot.readByte(); struct.setAccessTypeIsSet(true); @@ -2541,7 +2533,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 24: // REQUIRED_READ_CAPABILITIES + case 23: // REQUIRED_READ_CAPABILITIES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list221 = iprot.readListBegin(); @@ -2559,7 +2551,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 25: // REQUIRED_WRITE_CAPABILITIES + case 24: // REQUIRED_WRITE_CAPABILITIES if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list224 = iprot.readListBegin(); @@ -2577,6 +2569,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Table struct) throw org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 25: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.id = iprot.readI64(); + struct.setIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -2590,11 +2590,6 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, Table struct) thro struct.validate(); oprot.writeStructBegin(STRUCT_DESC); - if (struct.isSetId()) { - oprot.writeFieldBegin(ID_FIELD_DESC); - oprot.writeI64(struct.id); - oprot.writeFieldEnd(); - } if (struct.tableName != null) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.tableName); @@ -2752,6 +2747,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, Table struct) thro oprot.writeFieldEnd(); } } + if (struct.isSetId()) { + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeI64(struct.id); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -2770,85 +2770,82 @@ public TableTupleScheme getScheme() { public void write(org.apache.thrift.protocol.TProtocol prot, Table struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetId()) { + if (struct.isSetTableName()) { optionals.set(0); } - if (struct.isSetTableName()) { + if (struct.isSetDbName()) { optionals.set(1); } - if (struct.isSetDbName()) { + if (struct.isSetOwner()) { optionals.set(2); } - if (struct.isSetOwner()) { + if (struct.isSetCreateTime()) { optionals.set(3); } - if (struct.isSetCreateTime()) { + if (struct.isSetLastAccessTime()) { optionals.set(4); } - if (struct.isSetLastAccessTime()) { + if (struct.isSetRetention()) { optionals.set(5); } - if (struct.isSetRetention()) { + if (struct.isSetSd()) { optionals.set(6); } - if (struct.isSetSd()) { + if (struct.isSetPartitionKeys()) { optionals.set(7); } - if (struct.isSetPartitionKeys()) { + if (struct.isSetParameters()) { optionals.set(8); } - if (struct.isSetParameters()) { + if (struct.isSetViewOriginalText()) { optionals.set(9); } - if (struct.isSetViewOriginalText()) { + if (struct.isSetViewExpandedText()) { optionals.set(10); } - if (struct.isSetViewExpandedText()) { + if (struct.isSetTableType()) { optionals.set(11); } - if (struct.isSetTableType()) { + if (struct.isSetPrivileges()) { optionals.set(12); } - if (struct.isSetPrivileges()) { + if (struct.isSetTemporary()) { optionals.set(13); } - if (struct.isSetTemporary()) { + if (struct.isSetRewriteEnabled()) { optionals.set(14); } - if (struct.isSetRewriteEnabled()) { + if (struct.isSetCreationMetadata()) { optionals.set(15); } - if (struct.isSetCreationMetadata()) { + if (struct.isSetCatName()) { optionals.set(16); } - if (struct.isSetCatName()) { + if (struct.isSetOwnerType()) { optionals.set(17); } - if (struct.isSetOwnerType()) { + if (struct.isSetWriteId()) { optionals.set(18); } - if (struct.isSetWriteId()) { + if (struct.isSetIsStatsCompliant()) { optionals.set(19); } - if (struct.isSetIsStatsCompliant()) { + if (struct.isSetColStats()) { optionals.set(20); } - if (struct.isSetColStats()) { + if (struct.isSetAccessType()) { optionals.set(21); } - if (struct.isSetAccessType()) { + if (struct.isSetRequiredReadCapabilities()) { optionals.set(22); } - if (struct.isSetRequiredReadCapabilities()) { + if (struct.isSetRequiredWriteCapabilities()) { optionals.set(23); } - if (struct.isSetRequiredWriteCapabilities()) { + if (struct.isSetId()) { optionals.set(24); } oprot.writeBitSet(optionals, 25); - if (struct.isSetId()) { - oprot.writeI64(struct.id); - } if (struct.isSetTableName()) { oprot.writeString(struct.tableName); } @@ -2946,6 +2943,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, Table struct) throw } } } + if (struct.isSetId()) { + oprot.writeI64(struct.id); + } } @Override @@ -2953,39 +2953,35 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Table struct) throws TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(25); if (incoming.get(0)) { - struct.id = iprot.readI64(); - struct.setIdIsSet(true); - } - if (incoming.get(1)) { struct.tableName = iprot.readString(); struct.setTableNameIsSet(true); } - if (incoming.get(2)) { + if (incoming.get(1)) { struct.dbName = iprot.readString(); struct.setDbNameIsSet(true); } - if (incoming.get(3)) { + if (incoming.get(2)) { struct.owner = iprot.readString(); struct.setOwnerIsSet(true); } - if (incoming.get(4)) { + if (incoming.get(3)) { struct.createTime = iprot.readI32(); struct.setCreateTimeIsSet(true); } - if (incoming.get(5)) { + if (incoming.get(4)) { struct.lastAccessTime = iprot.readI32(); struct.setLastAccessTimeIsSet(true); } - if (incoming.get(6)) { + if (incoming.get(5)) { struct.retention = iprot.readI32(); struct.setRetentionIsSet(true); } - if (incoming.get(7)) { + if (incoming.get(6)) { struct.sd = new StorageDescriptor(); struct.sd.read(iprot); struct.setSdIsSet(true); } - if (incoming.get(8)) { + if (incoming.get(7)) { { org.apache.thrift.protocol.TList _list235 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.partitionKeys = new ArrayList(_list235.size); @@ -2999,7 +2995,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Table struct) throws } struct.setPartitionKeysIsSet(true); } - if (incoming.get(9)) { + if (incoming.get(8)) { { org.apache.thrift.protocol.TMap _map238 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.parameters = new HashMap(2*_map238.size); @@ -3014,62 +3010,62 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Table struct) throws } struct.setParametersIsSet(true); } - if (incoming.get(10)) { + if (incoming.get(9)) { struct.viewOriginalText = iprot.readString(); struct.setViewOriginalTextIsSet(true); } - if (incoming.get(11)) { + if (incoming.get(10)) { struct.viewExpandedText = iprot.readString(); struct.setViewExpandedTextIsSet(true); } - if (incoming.get(12)) { + if (incoming.get(11)) { struct.tableType = iprot.readString(); struct.setTableTypeIsSet(true); } - if (incoming.get(13)) { + if (incoming.get(12)) { struct.privileges = new PrincipalPrivilegeSet(); struct.privileges.read(iprot); struct.setPrivilegesIsSet(true); } - if (incoming.get(14)) { + if (incoming.get(13)) { struct.temporary = iprot.readBool(); struct.setTemporaryIsSet(true); } - if (incoming.get(15)) { + if (incoming.get(14)) { struct.rewriteEnabled = iprot.readBool(); struct.setRewriteEnabledIsSet(true); } - if (incoming.get(16)) { + if (incoming.get(15)) { struct.creationMetadata = new CreationMetadata(); struct.creationMetadata.read(iprot); struct.setCreationMetadataIsSet(true); } - if (incoming.get(17)) { + if (incoming.get(16)) { struct.catName = iprot.readString(); struct.setCatNameIsSet(true); } - if (incoming.get(18)) { + if (incoming.get(17)) { struct.ownerType = org.apache.hadoop.hive.metastore.api.PrincipalType.findByValue(iprot.readI32()); struct.setOwnerTypeIsSet(true); } - if (incoming.get(19)) { + if (incoming.get(18)) { struct.writeId = iprot.readI64(); struct.setWriteIdIsSet(true); } - if (incoming.get(20)) { + if (incoming.get(19)) { struct.isStatsCompliant = iprot.readBool(); struct.setIsStatsCompliantIsSet(true); } - if (incoming.get(21)) { + if (incoming.get(20)) { struct.colStats = new ColumnStatistics(); struct.colStats.read(iprot); struct.setColStatsIsSet(true); } - if (incoming.get(22)) { + if (incoming.get(21)) { struct.accessType = iprot.readByte(); struct.setAccessTypeIsSet(true); } - if (incoming.get(23)) { + if (incoming.get(22)) { { org.apache.thrift.protocol.TList _list242 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.requiredReadCapabilities = new ArrayList(_list242.size); @@ -3082,7 +3078,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Table struct) throws } struct.setRequiredReadCapabilitiesIsSet(true); } - if (incoming.get(24)) { + if (incoming.get(23)) { { org.apache.thrift.protocol.TList _list245 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.requiredWriteCapabilities = new ArrayList(_list245.size); @@ -3095,6 +3091,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Table struct) throws } struct.setRequiredWriteCapabilitiesIsSet(true); } + if (incoming.get(24)) { + struct.id = iprot.readI64(); + struct.setIdIsSet(true); + } } } diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php index c4add01d09..03aa9bdb93 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/Types.php @@ -6993,10 +6993,6 @@ class CreationMetadata { class Table { static $_TSPEC; - /** - * @var int - */ - public $id = null; /** * @var string */ @@ -7093,44 +7089,44 @@ class Table { * @var string[] */ public $requiredWriteCapabilities = null; + /** + * @var int + */ + public $id = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'id', - 'type' => TType::I64, - ), - 2 => array( 'var' => 'tableName', 'type' => TType::STRING, ), - 3 => array( + 2 => array( 'var' => 'dbName', 'type' => TType::STRING, ), - 4 => array( + 3 => array( 'var' => 'owner', 'type' => TType::STRING, ), - 5 => array( + 4 => array( 'var' => 'createTime', 'type' => TType::I32, ), - 6 => array( + 5 => array( 'var' => 'lastAccessTime', 'type' => TType::I32, ), - 7 => array( + 6 => array( 'var' => 'retention', 'type' => TType::I32, ), - 8 => array( + 7 => array( 'var' => 'sd', 'type' => TType::STRUCT, 'class' => '\metastore\StorageDescriptor', ), - 9 => array( + 8 => array( 'var' => 'partitionKeys', 'type' => TType::LST, 'etype' => TType::STRUCT, @@ -7139,7 +7135,7 @@ class Table { 'class' => '\metastore\FieldSchema', ), ), - 10 => array( + 9 => array( 'var' => 'parameters', 'type' => TType::MAP, 'ktype' => TType::STRING, @@ -7151,62 +7147,62 @@ class Table { 'type' => TType::STRING, ), ), - 11 => array( + 10 => array( 'var' => 'viewOriginalText', 'type' => TType::STRING, ), - 12 => array( + 11 => array( 'var' => 'viewExpandedText', 'type' => TType::STRING, ), - 13 => array( + 12 => array( 'var' => 'tableType', 'type' => TType::STRING, ), - 14 => array( + 13 => array( 'var' => 'privileges', 'type' => TType::STRUCT, 'class' => '\metastore\PrincipalPrivilegeSet', ), - 15 => array( + 14 => array( 'var' => 'temporary', 'type' => TType::BOOL, ), - 16 => array( + 15 => array( 'var' => 'rewriteEnabled', 'type' => TType::BOOL, ), - 17 => array( + 16 => array( 'var' => 'creationMetadata', 'type' => TType::STRUCT, 'class' => '\metastore\CreationMetadata', ), - 18 => array( + 17 => array( 'var' => 'catName', 'type' => TType::STRING, ), - 19 => array( + 18 => array( 'var' => 'ownerType', 'type' => TType::I32, ), - 20 => array( + 19 => array( 'var' => 'writeId', 'type' => TType::I64, ), - 21 => array( + 20 => array( 'var' => 'isStatsCompliant', 'type' => TType::BOOL, ), - 22 => array( + 21 => array( 'var' => 'colStats', 'type' => TType::STRUCT, 'class' => '\metastore\ColumnStatistics', ), - 23 => array( + 22 => array( 'var' => 'accessType', 'type' => TType::BYTE, ), - 24 => array( + 23 => array( 'var' => 'requiredReadCapabilities', 'type' => TType::LST, 'etype' => TType::STRING, @@ -7214,7 +7210,7 @@ class Table { 'type' => TType::STRING, ), ), - 25 => array( + 24 => array( 'var' => 'requiredWriteCapabilities', 'type' => TType::LST, 'etype' => TType::STRING, @@ -7222,12 +7218,13 @@ class Table { 'type' => TType::STRING, ), ), + 25 => array( + 'var' => 'id', + 'type' => TType::I64, + ), ); } if (is_array($vals)) { - if (isset($vals['id'])) { - $this->id = $vals['id']; - } if (isset($vals['tableName'])) { $this->tableName = $vals['tableName']; } @@ -7300,6 +7297,9 @@ class Table { if (isset($vals['requiredWriteCapabilities'])) { $this->requiredWriteCapabilities = $vals['requiredWriteCapabilities']; } + if (isset($vals['id'])) { + $this->id = $vals['id']; + } } } @@ -7323,55 +7323,48 @@ class Table { switch ($fid) { case 1: - if ($ftype == TType::I64) { - $xfer += $input->readI64($this->id); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: if ($ftype == TType::STRING) { $xfer += $input->readString($this->tableName); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 2: if ($ftype == TType::STRING) { $xfer += $input->readString($this->dbName); } else { $xfer += $input->skip($ftype); } break; - case 4: + case 3: if ($ftype == TType::STRING) { $xfer += $input->readString($this->owner); } else { $xfer += $input->skip($ftype); } break; - case 5: + case 4: if ($ftype == TType::I32) { $xfer += $input->readI32($this->createTime); } else { $xfer += $input->skip($ftype); } break; - case 6: + case 5: if ($ftype == TType::I32) { $xfer += $input->readI32($this->lastAccessTime); } else { $xfer += $input->skip($ftype); } break; - case 7: + case 6: if ($ftype == TType::I32) { $xfer += $input->readI32($this->retention); } else { $xfer += $input->skip($ftype); } break; - case 8: + case 7: if ($ftype == TType::STRUCT) { $this->sd = new \metastore\StorageDescriptor(); $xfer += $this->sd->read($input); @@ -7379,7 +7372,7 @@ class Table { $xfer += $input->skip($ftype); } break; - case 9: + case 8: if ($ftype == TType::LST) { $this->partitionKeys = array(); $_size190 = 0; @@ -7397,7 +7390,7 @@ class Table { $xfer += $input->skip($ftype); } break; - case 10: + case 9: if ($ftype == TType::MAP) { $this->parameters = array(); $_size196 = 0; @@ -7417,28 +7410,28 @@ class Table { $xfer += $input->skip($ftype); } break; - case 11: + case 10: if ($ftype == TType::STRING) { $xfer += $input->readString($this->viewOriginalText); } else { $xfer += $input->skip($ftype); } break; - case 12: + case 11: if ($ftype == TType::STRING) { $xfer += $input->readString($this->viewExpandedText); } else { $xfer += $input->skip($ftype); } break; - case 13: + case 12: if ($ftype == TType::STRING) { $xfer += $input->readString($this->tableType); } else { $xfer += $input->skip($ftype); } break; - case 14: + case 13: if ($ftype == TType::STRUCT) { $this->privileges = new \metastore\PrincipalPrivilegeSet(); $xfer += $this->privileges->read($input); @@ -7446,21 +7439,21 @@ class Table { $xfer += $input->skip($ftype); } break; - case 15: + case 14: if ($ftype == TType::BOOL) { $xfer += $input->readBool($this->temporary); } else { $xfer += $input->skip($ftype); } break; - case 16: + case 15: if ($ftype == TType::BOOL) { $xfer += $input->readBool($this->rewriteEnabled); } else { $xfer += $input->skip($ftype); } break; - case 17: + case 16: if ($ftype == TType::STRUCT) { $this->creationMetadata = new \metastore\CreationMetadata(); $xfer += $this->creationMetadata->read($input); @@ -7468,35 +7461,35 @@ class Table { $xfer += $input->skip($ftype); } break; - case 18: + case 17: if ($ftype == TType::STRING) { $xfer += $input->readString($this->catName); } else { $xfer += $input->skip($ftype); } break; - case 19: + case 18: if ($ftype == TType::I32) { $xfer += $input->readI32($this->ownerType); } else { $xfer += $input->skip($ftype); } break; - case 20: + case 19: if ($ftype == TType::I64) { $xfer += $input->readI64($this->writeId); } else { $xfer += $input->skip($ftype); } break; - case 21: + case 20: if ($ftype == TType::BOOL) { $xfer += $input->readBool($this->isStatsCompliant); } else { $xfer += $input->skip($ftype); } break; - case 22: + case 21: if ($ftype == TType::STRUCT) { $this->colStats = new \metastore\ColumnStatistics(); $xfer += $this->colStats->read($input); @@ -7504,14 +7497,14 @@ class Table { $xfer += $input->skip($ftype); } break; - case 23: + case 22: if ($ftype == TType::BYTE) { $xfer += $input->readByte($this->accessType); } else { $xfer += $input->skip($ftype); } break; - case 24: + case 23: if ($ftype == TType::LST) { $this->requiredReadCapabilities = array(); $_size203 = 0; @@ -7528,7 +7521,7 @@ class Table { $xfer += $input->skip($ftype); } break; - case 25: + case 24: if ($ftype == TType::LST) { $this->requiredWriteCapabilities = array(); $_size209 = 0; @@ -7545,6 +7538,13 @@ class Table { $xfer += $input->skip($ftype); } break; + case 25: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->id); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -7558,38 +7558,33 @@ class Table { public function write($output) { $xfer = 0; $xfer += $output->writeStructBegin('Table'); - if ($this->id !== null) { - $xfer += $output->writeFieldBegin('id', TType::I64, 1); - $xfer += $output->writeI64($this->id); - $xfer += $output->writeFieldEnd(); - } if ($this->tableName !== null) { - $xfer += $output->writeFieldBegin('tableName', TType::STRING, 2); + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); $xfer += $output->writeString($this->tableName); $xfer += $output->writeFieldEnd(); } if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 3); + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); $xfer += $output->writeString($this->dbName); $xfer += $output->writeFieldEnd(); } if ($this->owner !== null) { - $xfer += $output->writeFieldBegin('owner', TType::STRING, 4); + $xfer += $output->writeFieldBegin('owner', TType::STRING, 3); $xfer += $output->writeString($this->owner); $xfer += $output->writeFieldEnd(); } if ($this->createTime !== null) { - $xfer += $output->writeFieldBegin('createTime', TType::I32, 5); + $xfer += $output->writeFieldBegin('createTime', TType::I32, 4); $xfer += $output->writeI32($this->createTime); $xfer += $output->writeFieldEnd(); } if ($this->lastAccessTime !== null) { - $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 6); + $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 5); $xfer += $output->writeI32($this->lastAccessTime); $xfer += $output->writeFieldEnd(); } if ($this->retention !== null) { - $xfer += $output->writeFieldBegin('retention', TType::I32, 7); + $xfer += $output->writeFieldBegin('retention', TType::I32, 6); $xfer += $output->writeI32($this->retention); $xfer += $output->writeFieldEnd(); } @@ -7597,7 +7592,7 @@ class Table { if (!is_object($this->sd)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 8); + $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 7); $xfer += $this->sd->write($output); $xfer += $output->writeFieldEnd(); } @@ -7605,7 +7600,7 @@ class Table { if (!is_array($this->partitionKeys)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('partitionKeys', TType::LST, 9); + $xfer += $output->writeFieldBegin('partitionKeys', TType::LST, 8); { $output->writeListBegin(TType::STRUCT, count($this->partitionKeys)); { @@ -7622,7 +7617,7 @@ class Table { if (!is_array($this->parameters)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('parameters', TType::MAP, 10); + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 9); { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); { @@ -7637,17 +7632,17 @@ class Table { $xfer += $output->writeFieldEnd(); } if ($this->viewOriginalText !== null) { - $xfer += $output->writeFieldBegin('viewOriginalText', TType::STRING, 11); + $xfer += $output->writeFieldBegin('viewOriginalText', TType::STRING, 10); $xfer += $output->writeString($this->viewOriginalText); $xfer += $output->writeFieldEnd(); } if ($this->viewExpandedText !== null) { - $xfer += $output->writeFieldBegin('viewExpandedText', TType::STRING, 12); + $xfer += $output->writeFieldBegin('viewExpandedText', TType::STRING, 11); $xfer += $output->writeString($this->viewExpandedText); $xfer += $output->writeFieldEnd(); } if ($this->tableType !== null) { - $xfer += $output->writeFieldBegin('tableType', TType::STRING, 13); + $xfer += $output->writeFieldBegin('tableType', TType::STRING, 12); $xfer += $output->writeString($this->tableType); $xfer += $output->writeFieldEnd(); } @@ -7655,17 +7650,17 @@ class Table { if (!is_object($this->privileges)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 14); + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 13); $xfer += $this->privileges->write($output); $xfer += $output->writeFieldEnd(); } if ($this->temporary !== null) { - $xfer += $output->writeFieldBegin('temporary', TType::BOOL, 15); + $xfer += $output->writeFieldBegin('temporary', TType::BOOL, 14); $xfer += $output->writeBool($this->temporary); $xfer += $output->writeFieldEnd(); } if ($this->rewriteEnabled !== null) { - $xfer += $output->writeFieldBegin('rewriteEnabled', TType::BOOL, 16); + $xfer += $output->writeFieldBegin('rewriteEnabled', TType::BOOL, 15); $xfer += $output->writeBool($this->rewriteEnabled); $xfer += $output->writeFieldEnd(); } @@ -7673,27 +7668,27 @@ class Table { if (!is_object($this->creationMetadata)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('creationMetadata', TType::STRUCT, 17); + $xfer += $output->writeFieldBegin('creationMetadata', TType::STRUCT, 16); $xfer += $this->creationMetadata->write($output); $xfer += $output->writeFieldEnd(); } if ($this->catName !== null) { - $xfer += $output->writeFieldBegin('catName', TType::STRING, 18); + $xfer += $output->writeFieldBegin('catName', TType::STRING, 17); $xfer += $output->writeString($this->catName); $xfer += $output->writeFieldEnd(); } if ($this->ownerType !== null) { - $xfer += $output->writeFieldBegin('ownerType', TType::I32, 19); + $xfer += $output->writeFieldBegin('ownerType', TType::I32, 18); $xfer += $output->writeI32($this->ownerType); $xfer += $output->writeFieldEnd(); } if ($this->writeId !== null) { - $xfer += $output->writeFieldBegin('writeId', TType::I64, 20); + $xfer += $output->writeFieldBegin('writeId', TType::I64, 19); $xfer += $output->writeI64($this->writeId); $xfer += $output->writeFieldEnd(); } if ($this->isStatsCompliant !== null) { - $xfer += $output->writeFieldBegin('isStatsCompliant', TType::BOOL, 21); + $xfer += $output->writeFieldBegin('isStatsCompliant', TType::BOOL, 20); $xfer += $output->writeBool($this->isStatsCompliant); $xfer += $output->writeFieldEnd(); } @@ -7701,12 +7696,12 @@ class Table { if (!is_object($this->colStats)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('colStats', TType::STRUCT, 22); + $xfer += $output->writeFieldBegin('colStats', TType::STRUCT, 21); $xfer += $this->colStats->write($output); $xfer += $output->writeFieldEnd(); } if ($this->accessType !== null) { - $xfer += $output->writeFieldBegin('accessType', TType::BYTE, 23); + $xfer += $output->writeFieldBegin('accessType', TType::BYTE, 22); $xfer += $output->writeByte($this->accessType); $xfer += $output->writeFieldEnd(); } @@ -7714,7 +7709,7 @@ class Table { if (!is_array($this->requiredReadCapabilities)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('requiredReadCapabilities', TType::LST, 24); + $xfer += $output->writeFieldBegin('requiredReadCapabilities', TType::LST, 23); { $output->writeListBegin(TType::STRING, count($this->requiredReadCapabilities)); { @@ -7731,7 +7726,7 @@ class Table { if (!is_array($this->requiredWriteCapabilities)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('requiredWriteCapabilities', TType::LST, 25); + $xfer += $output->writeFieldBegin('requiredWriteCapabilities', TType::LST, 24); { $output->writeListBegin(TType::STRING, count($this->requiredWriteCapabilities)); { @@ -7744,6 +7739,11 @@ class Table { } $xfer += $output->writeFieldEnd(); } + if ($this->id !== null) { + $xfer += $output->writeFieldBegin('id', TType::I64, 25); + $xfer += $output->writeI64($this->id); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py index 509d5cfa52..d4fefff62d 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ttypes.py @@ -4933,7 +4933,6 @@ def __ne__(self, other): class Table: """ Attributes: - - id - tableName - dbName - owner @@ -4958,39 +4957,39 @@ class Table: - accessType - requiredReadCapabilities - requiredWriteCapabilities + - id """ thrift_spec = ( None, # 0 - (1, TType.I64, 'id', None, None, ), # 1 - (2, TType.STRING, 'tableName', None, None, ), # 2 - (3, TType.STRING, 'dbName', None, None, ), # 3 - (4, TType.STRING, 'owner', None, None, ), # 4 - (5, TType.I32, 'createTime', None, None, ), # 5 - (6, TType.I32, 'lastAccessTime', None, None, ), # 6 - (7, TType.I32, 'retention', None, None, ), # 7 - (8, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 8 - (9, TType.LIST, 'partitionKeys', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 9 - (10, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 10 - (11, TType.STRING, 'viewOriginalText', None, None, ), # 11 - (12, TType.STRING, 'viewExpandedText', None, None, ), # 12 - (13, TType.STRING, 'tableType', None, None, ), # 13 - (14, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 14 - (15, TType.BOOL, 'temporary', None, False, ), # 15 - (16, TType.BOOL, 'rewriteEnabled', None, None, ), # 16 - (17, TType.STRUCT, 'creationMetadata', (CreationMetadata, CreationMetadata.thrift_spec), None, ), # 17 - (18, TType.STRING, 'catName', None, None, ), # 18 - (19, TType.I32, 'ownerType', None, 1, ), # 19 - (20, TType.I64, 'writeId', None, -1, ), # 20 - (21, TType.BOOL, 'isStatsCompliant', None, None, ), # 21 - (22, TType.STRUCT, 'colStats', (ColumnStatistics, ColumnStatistics.thrift_spec), None, ), # 22 - (23, TType.BYTE, 'accessType', None, None, ), # 23 - (24, TType.LIST, 'requiredReadCapabilities', (TType.STRING,None), None, ), # 24 - (25, TType.LIST, 'requiredWriteCapabilities', (TType.STRING,None), None, ), # 25 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'dbName', None, None, ), # 2 + (3, TType.STRING, 'owner', None, None, ), # 3 + (4, TType.I32, 'createTime', None, None, ), # 4 + (5, TType.I32, 'lastAccessTime', None, None, ), # 5 + (6, TType.I32, 'retention', None, None, ), # 6 + (7, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 7 + (8, TType.LIST, 'partitionKeys', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 8 + (9, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 9 + (10, TType.STRING, 'viewOriginalText', None, None, ), # 10 + (11, TType.STRING, 'viewExpandedText', None, None, ), # 11 + (12, TType.STRING, 'tableType', None, None, ), # 12 + (13, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 13 + (14, TType.BOOL, 'temporary', None, False, ), # 14 + (15, TType.BOOL, 'rewriteEnabled', None, None, ), # 15 + (16, TType.STRUCT, 'creationMetadata', (CreationMetadata, CreationMetadata.thrift_spec), None, ), # 16 + (17, TType.STRING, 'catName', None, None, ), # 17 + (18, TType.I32, 'ownerType', None, 1, ), # 18 + (19, TType.I64, 'writeId', None, -1, ), # 19 + (20, TType.BOOL, 'isStatsCompliant', None, None, ), # 20 + (21, TType.STRUCT, 'colStats', (ColumnStatistics, ColumnStatistics.thrift_spec), None, ), # 21 + (22, TType.BYTE, 'accessType', None, None, ), # 22 + (23, TType.LIST, 'requiredReadCapabilities', (TType.STRING,None), None, ), # 23 + (24, TType.LIST, 'requiredWriteCapabilities', (TType.STRING,None), None, ), # 24 + (25, TType.I64, 'id', None, None, ), # 25 ) - def __init__(self, id=None, tableName=None, dbName=None, owner=None, createTime=None, lastAccessTime=None, retention=None, sd=None, partitionKeys=None, parameters=None, viewOriginalText=None, viewExpandedText=None, tableType=None, privileges=None, temporary=thrift_spec[15][4], rewriteEnabled=None, creationMetadata=None, catName=None, ownerType=thrift_spec[19][4], writeId=thrift_spec[20][4], isStatsCompliant=None, colStats=None, accessType=None, requiredReadCapabilities=None, requiredWriteCapabilities=None,): - self.id = id + def __init__(self, tableName=None, dbName=None, owner=None, createTime=None, lastAccessTime=None, retention=None, sd=None, partitionKeys=None, parameters=None, viewOriginalText=None, viewExpandedText=None, tableType=None, privileges=None, temporary=thrift_spec[14][4], rewriteEnabled=None, creationMetadata=None, catName=None, ownerType=thrift_spec[18][4], writeId=thrift_spec[19][4], isStatsCompliant=None, colStats=None, accessType=None, requiredReadCapabilities=None, requiredWriteCapabilities=None, id=None,): self.tableName = tableName self.dbName = dbName self.owner = owner @@ -5015,6 +5014,7 @@ def __init__(self, id=None, tableName=None, dbName=None, owner=None, createTime= self.accessType = accessType self.requiredReadCapabilities = requiredReadCapabilities self.requiredWriteCapabilities = requiredWriteCapabilities + self.id = id def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -5026,47 +5026,42 @@ def read(self, iprot): if ftype == TType.STOP: break if fid == 1: - if ftype == TType.I64: - self.id = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: if ftype == TType.STRING: self.tableName = iprot.readString() else: iprot.skip(ftype) - elif fid == 3: + elif fid == 2: if ftype == TType.STRING: self.dbName = iprot.readString() else: iprot.skip(ftype) - elif fid == 4: + elif fid == 3: if ftype == TType.STRING: self.owner = iprot.readString() else: iprot.skip(ftype) - elif fid == 5: + elif fid == 4: if ftype == TType.I32: self.createTime = iprot.readI32() else: iprot.skip(ftype) - elif fid == 6: + elif fid == 5: if ftype == TType.I32: self.lastAccessTime = iprot.readI32() else: iprot.skip(ftype) - elif fid == 7: + elif fid == 6: if ftype == TType.I32: self.retention = iprot.readI32() else: iprot.skip(ftype) - elif fid == 8: + elif fid == 7: if ftype == TType.STRUCT: self.sd = StorageDescriptor() self.sd.read(iprot) else: iprot.skip(ftype) - elif fid == 9: + elif fid == 8: if ftype == TType.LIST: self.partitionKeys = [] (_etype192, _size189) = iprot.readListBegin() @@ -5077,7 +5072,7 @@ def read(self, iprot): iprot.readListEnd() else: iprot.skip(ftype) - elif fid == 10: + elif fid == 9: if ftype == TType.MAP: self.parameters = {} (_ktype196, _vtype197, _size195 ) = iprot.readMapBegin() @@ -5088,75 +5083,75 @@ def read(self, iprot): iprot.readMapEnd() else: iprot.skip(ftype) - elif fid == 11: + elif fid == 10: if ftype == TType.STRING: self.viewOriginalText = iprot.readString() else: iprot.skip(ftype) - elif fid == 12: + elif fid == 11: if ftype == TType.STRING: self.viewExpandedText = iprot.readString() else: iprot.skip(ftype) - elif fid == 13: + elif fid == 12: if ftype == TType.STRING: self.tableType = iprot.readString() else: iprot.skip(ftype) - elif fid == 14: + elif fid == 13: if ftype == TType.STRUCT: self.privileges = PrincipalPrivilegeSet() self.privileges.read(iprot) else: iprot.skip(ftype) - elif fid == 15: + elif fid == 14: if ftype == TType.BOOL: self.temporary = iprot.readBool() else: iprot.skip(ftype) - elif fid == 16: + elif fid == 15: if ftype == TType.BOOL: self.rewriteEnabled = iprot.readBool() else: iprot.skip(ftype) - elif fid == 17: + elif fid == 16: if ftype == TType.STRUCT: self.creationMetadata = CreationMetadata() self.creationMetadata.read(iprot) else: iprot.skip(ftype) - elif fid == 18: + elif fid == 17: if ftype == TType.STRING: self.catName = iprot.readString() else: iprot.skip(ftype) - elif fid == 19: + elif fid == 18: if ftype == TType.I32: self.ownerType = iprot.readI32() else: iprot.skip(ftype) - elif fid == 20: + elif fid == 19: if ftype == TType.I64: self.writeId = iprot.readI64() else: iprot.skip(ftype) - elif fid == 21: + elif fid == 20: if ftype == TType.BOOL: self.isStatsCompliant = iprot.readBool() else: iprot.skip(ftype) - elif fid == 22: + elif fid == 21: if ftype == TType.STRUCT: self.colStats = ColumnStatistics() self.colStats.read(iprot) else: iprot.skip(ftype) - elif fid == 23: + elif fid == 22: if ftype == TType.BYTE: self.accessType = iprot.readByte() else: iprot.skip(ftype) - elif fid == 24: + elif fid == 23: if ftype == TType.LIST: self.requiredReadCapabilities = [] (_etype205, _size202) = iprot.readListBegin() @@ -5166,7 +5161,7 @@ def read(self, iprot): iprot.readListEnd() else: iprot.skip(ftype) - elif fid == 25: + elif fid == 24: if ftype == TType.LIST: self.requiredWriteCapabilities = [] (_etype211, _size208) = iprot.readListBegin() @@ -5176,6 +5171,11 @@ def read(self, iprot): iprot.readListEnd() else: iprot.skip(ftype) + elif fid == 25: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -5186,47 +5186,43 @@ def write(self, oprot): oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('Table') - if self.id is not None: - oprot.writeFieldBegin('id', TType.I64, 1) - oprot.writeI64(self.id) - oprot.writeFieldEnd() if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 2) + oprot.writeFieldBegin('tableName', TType.STRING, 1) oprot.writeString(self.tableName) oprot.writeFieldEnd() if self.dbName is not None: - oprot.writeFieldBegin('dbName', TType.STRING, 3) + oprot.writeFieldBegin('dbName', TType.STRING, 2) oprot.writeString(self.dbName) oprot.writeFieldEnd() if self.owner is not None: - oprot.writeFieldBegin('owner', TType.STRING, 4) + oprot.writeFieldBegin('owner', TType.STRING, 3) oprot.writeString(self.owner) oprot.writeFieldEnd() if self.createTime is not None: - oprot.writeFieldBegin('createTime', TType.I32, 5) + oprot.writeFieldBegin('createTime', TType.I32, 4) oprot.writeI32(self.createTime) oprot.writeFieldEnd() if self.lastAccessTime is not None: - oprot.writeFieldBegin('lastAccessTime', TType.I32, 6) + oprot.writeFieldBegin('lastAccessTime', TType.I32, 5) oprot.writeI32(self.lastAccessTime) oprot.writeFieldEnd() if self.retention is not None: - oprot.writeFieldBegin('retention', TType.I32, 7) + oprot.writeFieldBegin('retention', TType.I32, 6) oprot.writeI32(self.retention) oprot.writeFieldEnd() if self.sd is not None: - oprot.writeFieldBegin('sd', TType.STRUCT, 8) + oprot.writeFieldBegin('sd', TType.STRUCT, 7) self.sd.write(oprot) oprot.writeFieldEnd() if self.partitionKeys is not None: - oprot.writeFieldBegin('partitionKeys', TType.LIST, 9) + oprot.writeFieldBegin('partitionKeys', TType.LIST, 8) oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys)) for iter214 in self.partitionKeys: iter214.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.parameters is not None: - oprot.writeFieldBegin('parameters', TType.MAP, 10) + oprot.writeFieldBegin('parameters', TType.MAP, 9) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) for kiter215,viter216 in self.parameters.items(): oprot.writeString(kiter215) @@ -5234,71 +5230,75 @@ def write(self, oprot): oprot.writeMapEnd() oprot.writeFieldEnd() if self.viewOriginalText is not None: - oprot.writeFieldBegin('viewOriginalText', TType.STRING, 11) + oprot.writeFieldBegin('viewOriginalText', TType.STRING, 10) oprot.writeString(self.viewOriginalText) oprot.writeFieldEnd() if self.viewExpandedText is not None: - oprot.writeFieldBegin('viewExpandedText', TType.STRING, 12) + oprot.writeFieldBegin('viewExpandedText', TType.STRING, 11) oprot.writeString(self.viewExpandedText) oprot.writeFieldEnd() if self.tableType is not None: - oprot.writeFieldBegin('tableType', TType.STRING, 13) + oprot.writeFieldBegin('tableType', TType.STRING, 12) oprot.writeString(self.tableType) oprot.writeFieldEnd() if self.privileges is not None: - oprot.writeFieldBegin('privileges', TType.STRUCT, 14) + oprot.writeFieldBegin('privileges', TType.STRUCT, 13) self.privileges.write(oprot) oprot.writeFieldEnd() if self.temporary is not None: - oprot.writeFieldBegin('temporary', TType.BOOL, 15) + oprot.writeFieldBegin('temporary', TType.BOOL, 14) oprot.writeBool(self.temporary) oprot.writeFieldEnd() if self.rewriteEnabled is not None: - oprot.writeFieldBegin('rewriteEnabled', TType.BOOL, 16) + oprot.writeFieldBegin('rewriteEnabled', TType.BOOL, 15) oprot.writeBool(self.rewriteEnabled) oprot.writeFieldEnd() if self.creationMetadata is not None: - oprot.writeFieldBegin('creationMetadata', TType.STRUCT, 17) + oprot.writeFieldBegin('creationMetadata', TType.STRUCT, 16) self.creationMetadata.write(oprot) oprot.writeFieldEnd() if self.catName is not None: - oprot.writeFieldBegin('catName', TType.STRING, 18) + oprot.writeFieldBegin('catName', TType.STRING, 17) oprot.writeString(self.catName) oprot.writeFieldEnd() if self.ownerType is not None: - oprot.writeFieldBegin('ownerType', TType.I32, 19) + oprot.writeFieldBegin('ownerType', TType.I32, 18) oprot.writeI32(self.ownerType) oprot.writeFieldEnd() if self.writeId is not None: - oprot.writeFieldBegin('writeId', TType.I64, 20) + oprot.writeFieldBegin('writeId', TType.I64, 19) oprot.writeI64(self.writeId) oprot.writeFieldEnd() if self.isStatsCompliant is not None: - oprot.writeFieldBegin('isStatsCompliant', TType.BOOL, 21) + oprot.writeFieldBegin('isStatsCompliant', TType.BOOL, 20) oprot.writeBool(self.isStatsCompliant) oprot.writeFieldEnd() if self.colStats is not None: - oprot.writeFieldBegin('colStats', TType.STRUCT, 22) + oprot.writeFieldBegin('colStats', TType.STRUCT, 21) self.colStats.write(oprot) oprot.writeFieldEnd() if self.accessType is not None: - oprot.writeFieldBegin('accessType', TType.BYTE, 23) + oprot.writeFieldBegin('accessType', TType.BYTE, 22) oprot.writeByte(self.accessType) oprot.writeFieldEnd() if self.requiredReadCapabilities is not None: - oprot.writeFieldBegin('requiredReadCapabilities', TType.LIST, 24) + oprot.writeFieldBegin('requiredReadCapabilities', TType.LIST, 23) oprot.writeListBegin(TType.STRING, len(self.requiredReadCapabilities)) for iter217 in self.requiredReadCapabilities: oprot.writeString(iter217) oprot.writeListEnd() oprot.writeFieldEnd() if self.requiredWriteCapabilities is not None: - oprot.writeFieldBegin('requiredWriteCapabilities', TType.LIST, 25) + oprot.writeFieldBegin('requiredWriteCapabilities', TType.LIST, 24) oprot.writeListBegin(TType.STRING, len(self.requiredWriteCapabilities)) for iter218 in self.requiredWriteCapabilities: oprot.writeString(iter218) oprot.writeListEnd() oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin('id', TType.I64, 25) + oprot.writeI64(self.id) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5308,7 +5308,6 @@ def validate(self): def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.id) value = (value * 31) ^ hash(self.tableName) value = (value * 31) ^ hash(self.dbName) value = (value * 31) ^ hash(self.owner) @@ -5333,6 +5332,7 @@ def __hash__(self): value = (value * 31) ^ hash(self.accessType) value = (value * 31) ^ hash(self.requiredReadCapabilities) value = (value * 31) ^ hash(self.requiredWriteCapabilities) + value = (value * 31) ^ hash(self.id) return value def __repr__(self): @@ -7275,8 +7275,6 @@ def validate(self): raise TProtocol.TProtocolException(message='Required field statsDesc is unset!') if self.statsObj is None: raise TProtocol.TProtocolException(message='Required field statsObj is unset!') - if self.engine is None: - raise TProtocol.TProtocolException(message='Required field engine is unset!') return diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb index 2cfc19e715..4863de6de2 100644 --- a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb +++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/hive_metastore_types.rb @@ -1144,34 +1144,33 @@ end class Table include ::Thrift::Struct, ::Thrift::Struct_Union - ID = 1 - TABLENAME = 2 - DBNAME = 3 - OWNER = 4 - CREATETIME = 5 - LASTACCESSTIME = 6 - RETENTION = 7 - SD = 8 - PARTITIONKEYS = 9 - PARAMETERS = 10 - VIEWORIGINALTEXT = 11 - VIEWEXPANDEDTEXT = 12 - TABLETYPE = 13 - PRIVILEGES = 14 - TEMPORARY = 15 - REWRITEENABLED = 16 - CREATIONMETADATA = 17 - CATNAME = 18 - OWNERTYPE = 19 - WRITEID = 20 - ISSTATSCOMPLIANT = 21 - COLSTATS = 22 - ACCESSTYPE = 23 - REQUIREDREADCAPABILITIES = 24 - REQUIREDWRITECAPABILITIES = 25 - - FIELDS = { - ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true}, + TABLENAME = 1 + DBNAME = 2 + OWNER = 3 + CREATETIME = 4 + LASTACCESSTIME = 5 + RETENTION = 6 + SD = 7 + PARTITIONKEYS = 8 + PARAMETERS = 9 + VIEWORIGINALTEXT = 10 + VIEWEXPANDEDTEXT = 11 + TABLETYPE = 12 + PRIVILEGES = 13 + TEMPORARY = 14 + REWRITEENABLED = 15 + CREATIONMETADATA = 16 + CATNAME = 17 + OWNERTYPE = 18 + WRITEID = 19 + ISSTATSCOMPLIANT = 20 + COLSTATS = 21 + ACCESSTYPE = 22 + REQUIREDREADCAPABILITIES = 23 + REQUIREDWRITECAPABILITIES = 24 + ID = 25 + + FIELDS = { TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, OWNER => {:type => ::Thrift::Types::STRING, :name => 'owner'}, @@ -1195,7 +1194,8 @@ class Table COLSTATS => {:type => ::Thrift::Types::STRUCT, :name => 'colStats', :class => ::ColumnStatistics, :optional => true}, ACCESSTYPE => {:type => ::Thrift::Types::BYTE, :name => 'accessType', :optional => true}, REQUIREDREADCAPABILITIES => {:type => ::Thrift::Types::LIST, :name => 'requiredReadCapabilities', :element => {:type => ::Thrift::Types::STRING}, :optional => true}, - REQUIREDWRITECAPABILITIES => {:type => ::Thrift::Types::LIST, :name => 'requiredWriteCapabilities', :element => {:type => ::Thrift::Types::STRING}, :optional => true} + REQUIREDWRITECAPABILITIES => {:type => ::Thrift::Types::LIST, :name => 'requiredWriteCapabilities', :element => {:type => ::Thrift::Types::STRING}, :optional => true}, + ID => {:type => ::Thrift::Types::I64, :name => 'id', :optional => true} } def struct_fields; FIELDS; end @@ -1632,7 +1632,7 @@ class ColumnStatistics STATSDESC => {:type => ::Thrift::Types::STRUCT, :name => 'statsDesc', :class => ::ColumnStatisticsDesc}, STATSOBJ => {:type => ::Thrift::Types::LIST, :name => 'statsObj', :element => {:type => ::Thrift::Types::STRUCT, :class => ::ColumnStatisticsObj}}, ISSTATSCOMPLIANT => {:type => ::Thrift::Types::BOOL, :name => 'isStatsCompliant', :optional => true}, - ENGINE => {:type => ::Thrift::Types::STRING, :name => 'engine'} + ENGINE => {:type => ::Thrift::Types::STRING, :name => 'engine', :optional => true} } def struct_fields; FIELDS; end @@ -1640,7 +1640,6 @@ class ColumnStatistics def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsDesc is unset!') unless @statsDesc raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field statsObj is unset!') unless @statsObj - raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field engine is unset!') unless @engine end ::Thrift::Struct.generate_accessors self diff --git a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift index 1aa88877d4..449393c73c 100644 --- a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift +++ b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift @@ -439,32 +439,32 @@ struct CreationMetadata { // table information struct Table { - 1: optional i64 id, // id of the table. It will be ignored if set. It's only for - // read purposed - 2: string tableName, // name of the table - 3: string dbName, // database name ('default') - 4: string owner, // owner of this table - 5: i32 createTime, // creation time of the table - 6: i32 lastAccessTime, // last access time (usually this will be filled from HDFS and shouldn't be relied on) - 7: i32 retention, // retention time - 8: StorageDescriptor sd, // storage descriptor of the table - 9: list partitionKeys, // partition keys of the table. only primitive types are supported - 10: map parameters, // to store comments or any other user level parameters - 11: string viewOriginalText, // original view text, null for non-view - 12: string viewExpandedText, // expanded view text, null for non-view - 13: string tableType, // table type enum, e.g. EXTERNAL_TABLE - 14: optional PrincipalPrivilegeSet privileges, - 15: optional bool temporary=false, - 16: optional bool rewriteEnabled, // rewrite enabled or not - 17: optional CreationMetadata creationMetadata, // only for MVs, it stores table names used and txn list at MV creation - 18: optional string catName, // Name of the catalog the table is in - 19: optional PrincipalType ownerType = PrincipalType.USER, // owner type of this table (default to USER for backward compatibility) - 20: optional i64 writeId=-1, - 21: optional bool isStatsCompliant, - 22: optional ColumnStatistics colStats, // column statistics for table - 23: optional byte accessType, - 24: optional list requiredReadCapabilities, - 25: optional list requiredWriteCapabilities + 1: string tableName, // name of the table + 2: string dbName, // database name ('default') + 3: string owner, // owner of this table + 4: i32 createTime, // creation time of the table + 5: i32 lastAccessTime, // last access time (usually this will be filled from HDFS and shouldn't be relied on) + 6: i32 retention, // retention time + 7: StorageDescriptor sd, // storage descriptor of the table + 8: list partitionKeys, // partition keys of the table. only primitive types are supported + 9: map parameters, // to store comments or any other user level parameters + 10: string viewOriginalText, // original view text, null for non-view + 11: string viewExpandedText, // expanded view text, null for non-view + 12: string tableType, // table type enum, e.g. EXTERNAL_TABLE + 13: optional PrincipalPrivilegeSet privileges, + 14: optional bool temporary=false, + 15: optional bool rewriteEnabled, // rewrite enabled or not + 16: optional CreationMetadata creationMetadata, // only for MVs, it stores table names used and txn list at MV creation + 17: optional string catName, // Name of the catalog the table is in + 18: optional PrincipalType ownerType = PrincipalType.USER, // owner type of this table (default to USER for backward compatibility) + 19: optional i64 writeId=-1, + 20: optional bool isStatsCompliant, + 21: optional ColumnStatistics colStats, // column statistics for table + 22: optional byte accessType, + 23: optional list requiredReadCapabilities, + 24: optional list requiredWriteCapabilities + 25: optional i64 id, // id of the table. It will be ignored if set. It's only for + // read purposed } struct Partition { @@ -592,7 +592,7 @@ struct ColumnStatistics { 2: required list statsObj, 3: optional bool isStatsCompliant, // Are the stats isolation-level-compliant with the // the calling query? -4: required string engine +4: optional string engine } struct PartitionListComposingSpec { diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java index 1a124eca3f..862a9c8b3b 100644 --- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java +++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java @@ -8750,7 +8750,9 @@ protected ColumnStatistics getJdoResult( statObjs.add(StatObjectConverter.getTableColumnStatisticsObj(mStat, enableBitVector)); Deadline.checkTimeout(); } - return new ColumnStatistics(desc, statObjs, engine); + ColumnStatistics colStat = new ColumnStatistics(desc, statObjs); + colStat.setEngine(engine); + return colStat; } } }.run(true); @@ -8861,7 +8863,9 @@ protected ColumnStatistics getJdoResult( String partName = isLast ? null : mStatsObj.getPartitionName(); if (isLast || !partName.equals(lastPartName)) { if (i != 0) { - result.add(new ColumnStatistics(csd, curList, engine)); + ColumnStatistics colStat = new ColumnStatistics(csd, curList); + colStat.setEngine(engine); + result.add(colStat); } if (isLast) { continue; diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java index 500b5b5784..bcc01984dd 100644 --- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java +++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/SharedCache.java @@ -699,7 +699,9 @@ public ColumnStatistics getCachedTableColStats(ColumnStatisticsDesc csd, List partVal, String c return null; } } - ColumnStatistics columnStatistics = new ColumnStatistics(csd, statObject, CacheUtils.HIVE_ENGINE); + ColumnStatistics columnStatistics = new ColumnStatistics(csd, statObject); + columnStatistics.setEngine(CacheUtils.HIVE_ENGINE); if (writeIdList != null && TxnUtils.isTransactionalTable(getParameters())) { columnStatistics.setIsStatsCompliant(true); if (!txnStatSupported) { diff --git a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestStats.java b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestStats.java index 3fdb4776ee..ed04b48df8 100644 --- a/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestStats.java +++ b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestStats.java @@ -195,7 +195,9 @@ private ColumnStatistics buildStatsForOneTableOrPartition(String catName, String for (Column col : cols) objs.add(col.generate()); - return new ColumnStatistics(desc, objs, ENGINE); + ColumnStatistics columnStatistics = new ColumnStatistics(desc, objs); + columnStatistics.setEngine(ENGINE); + return columnStatistics; } private void dropStats(String catName, String dbName, String tableName, String partName,