You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ga...@apache.org on 2017/08/11 20:08:23 UTC
[1/4] hive git commit: HIVE-17224 Move JDO classes to standalone
metastore (Alan Gates, reviewed by Vihang Karajgaonkar)
Repository: hive
Updated Branches:
refs/heads/master 9373a6434 -> 98ec28eda
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTableColumnPrivilege.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTableColumnPrivilege.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTableColumnPrivilege.java
new file mode 100644
index 0000000..e3ce12c
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTableColumnPrivilege.java
@@ -0,0 +1,160 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+public class MTableColumnPrivilege {
+
+ private String principalName;
+
+ private String principalType;
+
+ private MTable table;
+
+ private String columnName;
+
+ private String privilege;
+
+ private int createTime;
+
+ private String grantor;
+
+ private String grantorType;
+
+ private boolean grantOption;
+
+ public MTableColumnPrivilege() {
+ }
+
+ /**
+ * @param principalName
+ * @param principalType
+ * @param table
+ * @param columnName
+ * @param privileges
+ * @param createTime
+ * @param grantor
+ * @param grantorType
+ * @param grantOption
+ */
+ public MTableColumnPrivilege(String principalName, String principalType,
+ MTable table, String columnName, String privileges, int createTime,
+ String grantor, String grantorType, boolean grantOption) {
+ super();
+ this.principalName = principalName;
+ this.principalType = principalType;
+ this.table = table;
+ this.columnName = columnName;
+ this.privilege = privileges;
+ this.createTime = createTime;
+ this.grantor = grantor;
+ this.grantorType = grantorType;
+ this.grantOption = grantOption;
+ }
+
+ /**
+ * @return column name
+ */
+ public String getColumnName() {
+ return columnName;
+ }
+
+ /**
+ * @param columnName column name
+ */
+ public void setColumnName(String columnName) {
+ this.columnName = columnName;
+ }
+
+ /**
+ * @return a set of privileges this user/role/group has
+ */
+ public String getPrivilege() {
+ return privilege;
+ }
+
+ /**
+ * @param dbPrivileges a set of privileges this user/role/group has
+ */
+ public void setPrivilege(String dbPrivileges) {
+ this.privilege = dbPrivileges;
+ }
+
+ /**
+ * @return create time
+ */
+ public int getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * @param createTime create time
+ */
+ public void setCreateTime(int createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getPrincipalName() {
+ return principalName;
+ }
+
+ public void setPrincipalName(String principalName) {
+ this.principalName = principalName;
+ }
+
+ public MTable getTable() {
+ return table;
+ }
+
+ public void setTable(MTable table) {
+ this.table = table;
+ }
+
+ public String getGrantor() {
+ return grantor;
+ }
+
+ public void setGrantor(String grantor) {
+ this.grantor = grantor;
+ }
+
+ public String getGrantorType() {
+ return grantorType;
+ }
+
+ public void setGrantorType(String grantorType) {
+ this.grantorType = grantorType;
+ }
+
+ public boolean getGrantOption() {
+ return grantOption;
+ }
+
+ public void setGrantOption(boolean grantOption) {
+ this.grantOption = grantOption;
+ }
+
+ public String getPrincipalType() {
+ return principalType;
+ }
+
+ public void setPrincipalType(String principalType) {
+ this.principalType = principalType;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTableColumnStatistics.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTableColumnStatistics.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTableColumnStatistics.java
new file mode 100644
index 0000000..6cfaca3
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTableColumnStatistics.java
@@ -0,0 +1,263 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.hadoop.hive.metastore.model;
+
+
+
+/**
+ *
+ * MTableColumnStatistics - Represents Hive's Column Statistics Description. The fields in this
+ * class with the exception of table are persisted in the metastore. In case of table, tbl_id is
+ * persisted in its place.
+ *
+ */
+public class MTableColumnStatistics {
+
+ private MTable table;
+ private String dbName;
+ private String tableName;
+ private String colName;
+ private String colType;
+
+ private Long longLowValue;
+ private Long longHighValue;
+ private Double doubleLowValue;
+ private Double doubleHighValue;
+ private String decimalLowValue;
+ private String decimalHighValue;
+ private Long numNulls;
+ private Long numDVs;
+ private byte[] bitVector;
+ private Double avgColLen;
+ private Long maxColLen;
+ private Long numTrues;
+ private Long numFalses;
+ private long lastAnalyzed;
+
+ public MTableColumnStatistics() {}
+
+ public MTable getTable() {
+ return table;
+ }
+
+ public void setTable(MTable table) {
+ this.table = table;
+ }
+
+ public String getTableName() {
+ return tableName;
+ }
+
+ public void setTableName(String tableName) {
+ this.tableName = tableName;
+ }
+
+ public String getColName() {
+ return colName;
+ }
+
+ public void setColName(String colName) {
+ this.colName = colName;
+ }
+
+ public String getColType() {
+ return colType;
+ }
+
+ public void setColType(String colType) {
+ this.colType = colType;
+ }
+
+ public Long getNumNulls() {
+ return numNulls;
+ }
+
+ public void setNumNulls(long numNulls) {
+ this.numNulls = numNulls;
+ }
+
+ public Long getNumDVs() {
+ return numDVs;
+ }
+
+ public void setNumDVs(long numDVs) {
+ this.numDVs = numDVs;
+ }
+
+ public Double getAvgColLen() {
+ return avgColLen;
+ }
+
+ public void setAvgColLen(double avgColLen) {
+ this.avgColLen = avgColLen;
+ }
+
+ public Long getMaxColLen() {
+ return maxColLen;
+ }
+
+ public void setMaxColLen(long maxColLen) {
+ this.maxColLen = maxColLen;
+ }
+
+ public Long getNumTrues() {
+ return numTrues;
+ }
+
+ public void setNumTrues(long numTrues) {
+ this.numTrues = numTrues;
+ }
+
+ public Long getNumFalses() {
+ return numFalses;
+ }
+
+ public void setNumFalses(long numFalses) {
+ this.numFalses = numFalses;
+ }
+
+ public long getLastAnalyzed() {
+ return lastAnalyzed;
+ }
+
+ public void setLastAnalyzed(long lastAnalyzed) {
+ this.lastAnalyzed = lastAnalyzed;
+ }
+
+ public String getDbName() {
+ return dbName;
+ }
+
+ public void setDbName(String dbName) {
+ this.dbName = dbName;
+ }
+
+ public void setBooleanStats(Long numTrues, Long numFalses, Long numNulls) {
+ this.numTrues = numTrues;
+ this.numFalses = numFalses;
+ this.numNulls = numNulls;
+ }
+
+ public void setLongStats(Long numNulls, Long numNDVs, byte[] bitVector, Long lowValue, Long highValue) {
+ this.numNulls = numNulls;
+ this.numDVs = numNDVs;
+ this.bitVector = bitVector;
+ this.longLowValue = lowValue;
+ this.longHighValue = highValue;
+ }
+
+ public void setDoubleStats(Long numNulls, Long numNDVs, byte[] bitVector, Double lowValue, Double highValue) {
+ this.numNulls = numNulls;
+ this.numDVs = numNDVs;
+ this.bitVector = bitVector;
+ this.doubleLowValue = lowValue;
+ this.doubleHighValue = highValue;
+ }
+
+ public void setDecimalStats(
+ Long numNulls, Long numNDVs, byte[] bitVector, String lowValue, String highValue) {
+ this.numNulls = numNulls;
+ this.numDVs = numNDVs;
+ this.bitVector = bitVector;
+ this.decimalLowValue = lowValue;
+ this.decimalHighValue = highValue;
+ }
+
+ public void setStringStats(Long numNulls, Long numNDVs, byte[] bitVector, Long maxColLen, Double avgColLen) {
+ this.numNulls = numNulls;
+ this.numDVs = numNDVs;
+ this.bitVector = bitVector;
+ this.maxColLen = maxColLen;
+ this.avgColLen = avgColLen;
+ }
+
+ public void setBinaryStats(Long numNulls, Long maxColLen, Double avgColLen) {
+ this.numNulls = numNulls;
+ this.maxColLen = maxColLen;
+ this.avgColLen = avgColLen;
+ }
+
+ public void setDateStats(Long numNulls, Long numNDVs, byte[] bitVector, Long lowValue, Long highValue) {
+ this.numNulls = numNulls;
+ this.numDVs = numNDVs;
+ this.bitVector = bitVector;
+ this.longLowValue = lowValue;
+ this.longHighValue = highValue;
+ }
+
+ public Long getLongLowValue() {
+ return longLowValue;
+ }
+
+ public void setLongLowValue(long longLowValue) {
+ this.longLowValue = longLowValue;
+ }
+
+ public Long getLongHighValue() {
+ return longHighValue;
+ }
+
+ public void setLongHighValue(long longHighValue) {
+ this.longHighValue = longHighValue;
+ }
+
+ public Double getDoubleLowValue() {
+ return doubleLowValue;
+ }
+
+ public void setDoubleLowValue(double doubleLowValue) {
+ this.doubleLowValue = doubleLowValue;
+ }
+
+ public Double getDoubleHighValue() {
+ return doubleHighValue;
+ }
+
+ public void setDoubleHighValue(double doubleHighValue) {
+ this.doubleHighValue = doubleHighValue;
+ }
+
+
+ public String getDecimalLowValue() {
+ return decimalLowValue;
+ }
+
+ public void setDecimalLowValue(String decimalLowValue) {
+ this.decimalLowValue = decimalLowValue;
+ }
+
+ public String getDecimalHighValue() {
+ return decimalHighValue;
+ }
+
+ public void setDecimalHighValue(String decimalHighValue) {
+ this.decimalHighValue = decimalHighValue;
+ }
+
+ public byte[] getBitVector() {
+ return bitVector;
+ }
+
+ public void setBitVector(byte[] bitVector) {
+ this.bitVector = bitVector;
+ }
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTablePrivilege.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTablePrivilege.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTablePrivilege.java
new file mode 100644
index 0000000..bee33ee
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTablePrivilege.java
@@ -0,0 +1,139 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+public class MTablePrivilege {
+
+ private String principalName;
+
+ private String principalType;
+
+ private MTable table;
+
+ private String privilege;
+
+ private int createTime;
+
+ private String grantor;
+
+ private String grantorType;
+
+ private boolean grantOption;
+
+ public MTablePrivilege() {
+ }
+
+ public MTablePrivilege(String principalName, String principalType,
+ MTable table, String privilege, int createTime,
+ String grantor, String grantorType, boolean grantOption) {
+ super();
+ this.principalName = principalName;
+ this.principalType = principalType;
+ this.table = table;
+ this.privilege = privilege;
+ this.createTime = createTime;
+ this.grantor = grantor;
+ this.grantorType = grantorType;
+ this.grantOption = grantOption;
+ }
+
+ public String getPrincipalName() {
+ return principalName;
+ }
+
+ public void setPrincipalName(String principalName) {
+ this.principalName = principalName;
+ }
+
+
+ /**
+ * @return a set of privileges this user/role/group has
+ */
+ public String getPrivilege() {
+ return privilege;
+ }
+
+ /**
+ * @param dbPrivilege a set of privileges this user/role/group has
+ */
+ public void setPrivilege(String dbPrivilege) {
+ this.privilege = dbPrivilege;
+ }
+
+ /**
+ * @return create time
+ */
+ public int getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * @param createTime create time
+ */
+ public void setCreateTime(int createTime) {
+ this.createTime = createTime;
+ }
+
+ /**
+ * @return the grantor
+ */
+ public String getGrantor() {
+ return grantor;
+ }
+
+ /**
+ * @param grantor
+ */
+ public void setGrantor(String grantor) {
+ this.grantor = grantor;
+ }
+
+ public String getPrincipalType() {
+ return principalType;
+ }
+
+ public void setPrincipalType(String principalType) {
+ this.principalType = principalType;
+ }
+
+ public MTable getTable() {
+ return table;
+ }
+
+ public void setTable(MTable table) {
+ this.table = table;
+ }
+
+ public boolean getGrantOption() {
+ return grantOption;
+ }
+
+ public void setGrantOption(boolean grantOption) {
+ this.grantOption = grantOption;
+ }
+
+ public String getGrantorType() {
+ return grantorType;
+ }
+
+ public void setGrantorType(String grantorType) {
+ this.grantorType = grantorType;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MType.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MType.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MType.java
new file mode 100644
index 0000000..fb8d82f
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MType.java
@@ -0,0 +1,105 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.hadoop.hive.metastore.model;
+
+import java.util.List;
+
+/**
+ * Represents a Hive type
+ *
+ */
+public class MType {
+ private String name;
+ private String type1;
+ private String type2;
+ private List<MFieldSchema> fields;
+
+ /**
+ * @param name
+ * @param type1
+ * @param type2
+ * @param fields
+ */
+ public MType(String name, String type1, String type2, List<MFieldSchema> fields) {
+ this.name = name;
+ this.type1 = type1;
+ this.type2 = type2;
+ this.fields = fields;
+ }
+
+ public MType() {}
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * @return the type1
+ */
+ public String getType1() {
+ return type1;
+ }
+
+ /**
+ * @param type1 the type1 to set
+ */
+ public void setType1(String type1) {
+ this.type1 = type1;
+ }
+
+ /**
+ * @return the type2
+ */
+ public String getType2() {
+ return type2;
+ }
+
+ /**
+ * @param type2 the type2 to set
+ */
+ public void setType2(String type2) {
+ this.type2 = type2;
+ }
+
+ /**
+ * @return the fields
+ */
+ public List<MFieldSchema> getFields() {
+ return fields;
+ }
+ /**
+ * @param fields the fields to set
+ */
+ public void setFields(List<MFieldSchema> fields) {
+ this.fields = fields;
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MVersionTable.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MVersionTable.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MVersionTable.java
new file mode 100644
index 0000000..c6c4289
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MVersionTable.java
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+public class MVersionTable {
+ private String schemaVersion;
+ private String versionComment;
+
+ public MVersionTable() {}
+
+ public MVersionTable(String schemaVersion, String versionComment) {
+ this.schemaVersion = schemaVersion;
+ this.versionComment = versionComment;
+ }
+ /**
+ * @return the versionComment
+ */
+ public String getVersionComment() {
+ return versionComment;
+ }
+ /**
+ * @param versionComment the versionComment to set
+ */
+ public void setVersionComment(String versionComment) {
+ this.versionComment = versionComment;
+ }
+
+ /**
+ * @return the schemaVersion
+ */
+ public String getSchemaVersion() {
+ return schemaVersion;
+ }
+ /**
+ * @param schemaVersion the schemaVersion to set
+ */
+ public void setSchemaVersion(String schemaVersion) {
+ this.schemaVersion = schemaVersion;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/resources/package.jdo
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/resources/package.jdo b/standalone-metastore/src/main/resources/package.jdo
new file mode 100644
index 0000000..570fd44
--- /dev/null
+++ b/standalone-metastore/src/main/resources/package.jdo
@@ -0,0 +1,1088 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 2.0//EN"
+ "http://java.sun.com/dtd/jdo_2_0.dtd">
+<!--
+ Size Limitations:
+
+ Indexed VARCHAR: 767 bytes (MySQL running on InnoDB Engine http://bugs.mysql.com/bug.php?id=13315)
+ Non-indexed VARCHAR: 4000 bytes (max length on Oracle 9i/10g/11g)
+
+-->
+<jdo>
+ <package name="org.apache.hadoop.hive.metastore.model">
+ <class name="MDatabase" identity-type="datastore" table="DBS" detachable="true">
+ <datastore-identity>
+ <column name="DB_ID"/>
+ </datastore-identity>
+ <field name="name">
+ <column name="NAME" length="128" jdbc-type="VARCHAR"/>
+ <index name="UniqueDatabase" unique="true"/>
+ </field>
+ <field name="description">
+ <column name="DESC" length="4000" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ <field name="locationUri">
+ <column name="DB_LOCATION_URI" length="4000" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="parameters" table="DATABASE_PARAMS">
+ <map key-type="java.lang.String" value-type="java.lang.String"/>
+ <join>
+ <column name="DB_ID"/>
+ </join>
+ <key>
+ <column name="PARAM_KEY" length="180" jdbc-type="VARCHAR"/>
+ </key>
+ <value>
+ <column name="PARAM_VALUE" length="4000" jdbc-type="VARCHAR"/>
+ </value>
+ </field>
+ <field name="ownerName">
+ <column name="OWNER_NAME" length="128" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ <field name="ownerType">
+ <column name="OWNER_TYPE" length="10" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ </class>
+
+ <class name="MFieldSchema" embedded-only="true" table="TYPE_FIELDS" detachable="true">
+ <field name="name">
+ <column name="FNAME" length="767" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="type" >
+ <column name="FTYPE" length="32672" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="comment" >
+ <column name="FCOMMENT" length="4000" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ </class>
+
+ <class name="MType" table="TYPES" detachable="true">
+ <field name="name" >
+ <column name="TYPE_NAME" length="128" jdbc-type="VARCHAR"/>
+ <index name="UniqueType" unique="true"/>
+ </field>
+ <field name="type1">
+ <column name="TYPE1" length="767" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="type2">
+ <column name="TYPE2" length="767" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="fields" table="TYPE_FIELDS" >
+ <collection element-type="MFieldSchema"/>
+ <join>
+ <primary-key name="TYPE_FIELDS_PK">
+ <column name="TYPE_NAME"/>
+ <column name="FIELD_NAME"/>
+ </primary-key>
+ <column name="TYPE_NAME"/>
+ </join>
+ <element>
+ <embedded>
+ <field name="name">
+ <column name="FIELD_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="type">
+ <column name="FIELD_TYPE" length="767" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="comment" >
+ <column name="COMMENT" length="256" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ </embedded>
+ </element>
+ </field>
+ </class>
+
+ <class name="MTable" table="TBLS" identity-type="datastore" detachable="true">
+ <datastore-identity>
+ <column name="TBL_ID"/>
+ </datastore-identity>
+ <index name="UniqueTable" unique="true">
+ <column name="TBL_NAME"/>
+ <column name="DB_ID"/>
+ </index>
+ <field name="tableName">
+ <column name="TBL_NAME" length="256" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="database">
+ <column name="DB_ID"/>
+ </field>
+ <field name="partitionKeys" table="PARTITION_KEYS" >
+ <collection element-type="MFieldSchema"/>
+ <join>
+ <primary-key name="PARTITION_KEY_PK">
+ <column name="TBL_ID"/>
+ <column name="PKEY_NAME"/>
+ </primary-key>
+ <column name="TBL_ID"/>
+ </join>
+ <element>
+ <embedded>
+ <field name="name">
+ <column name="PKEY_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="type">
+ <column name="PKEY_TYPE" length="767" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="comment" >
+ <column name="PKEY_COMMENT" length="4000" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ </embedded>
+ </element>
+ </field>
+ <field name="sd" dependent="true">
+ <column name="SD_ID"/>
+ </field>
+ <field name="owner">
+ <column name="OWNER" length="767" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="createTime">
+ <column name="CREATE_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="lastAccessTime">
+ <column name="LAST_ACCESS_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="retention">
+ <column name="RETENTION" jdbc-type="integer"/>
+ </field>
+ <field name="parameters" table="TABLE_PARAMS">
+ <map key-type="java.lang.String" value-type="java.lang.String"/>
+ <join>
+ <column name="TBL_ID"/>
+ </join>
+ <key>
+ <column name="PARAM_KEY" length="256" jdbc-type="VARCHAR"/>
+ </key>
+ <value>
+ <column name="PARAM_VALUE" length="32672" jdbc-type="VARCHAR"/>
+ </value>
+ </field>
+ <field name="viewOriginalText" default-fetch-group="false">
+ <column name="VIEW_ORIGINAL_TEXT" jdbc-type="LONGVARCHAR"/>
+ </field>
+ <field name="viewExpandedText" default-fetch-group="false">
+ <column name="VIEW_EXPANDED_TEXT" jdbc-type="LONGVARCHAR"/>
+ </field>
+ <field name="rewriteEnabled">
+ <column name="IS_REWRITE_ENABLED"/>
+ </field>
+ <field name="tableType">
+ <column name="TBL_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ </class>
+
+ <class name="MConstraint" identity-type="application" table="KEY_CONSTRAINTS" detachable="true" objectid-class="MConstraint$PK">
+ <field name="constraintName" primary-key="true">
+ <column name="CONSTRAINT_NAME"/>
+ </field>
+ <field name="position" primary-key="true">
+ <column name="POSITION"/>
+ </field>
+ <field name="childColumn">
+ <column name="CHILD_CD_ID"/>
+ </field>
+ <field name="childIntegerIndex">
+ <column name="CHILD_INTEGER_IDX"/>
+ </field>
+ <field name="childTable">
+ <column name="CHILD_TBL_ID"/>
+ </field>
+ <field name="parentColumn">
+ <column name="PARENT_CD_ID"/>
+ </field>
+ <field name="parentIntegerIndex">
+ <column name="PARENT_INTEGER_IDX"/>
+ </field>
+ <field name="parentTable">
+ <column name="PARENT_TBL_ID"/>
+ </field>
+ <field name="constraintType">
+ <column name="CONSTRAINT_TYPE"/>
+ </field>
+ <field name="deleteRule">
+ <column name="DELETE_RULE"/>
+ </field>
+ <field name="updateRule">
+ <column name="UPDATE_RULE"/>
+ </field>
+ <field name="enableValidateRely">
+ <column name="ENABLE_VALIDATE_RELY"/>
+ </field>
+ </class>
+
+ <class name="MSerDeInfo" identity-type="datastore" table="SERDES" detachable="true">
+ <datastore-identity>
+ <column name="SERDE_ID"/>
+ </datastore-identity>
+ <field name="name">
+ <column name="NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="serializationLib">
+ <column name="SLIB" length="4000" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ <field name="parameters" table="SERDE_PARAMS">
+ <map key-type="java.lang.String" value-type="java.lang.String"/>
+ <join>
+ <column name="SERDE_ID"/>
+ </join>
+ <key>
+ <column name="PARAM_KEY" length="256" jdbc-type="VARCHAR"/>
+ </key>
+ <value>
+ <column name="PARAM_VALUE" length="32672" jdbc-type="VARCHAR"/>
+ </value>
+ </field>
+ </class>
+
+ <class name="MOrder" embedded-only="true" table="SORT_ORDER" detachable="true">
+ <field name="col">
+ <column name="COL_NAME" length="767" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="order">
+ <column name="ORDER" jdbc-type="INTEGER" allows-null="false"/>
+ </field>
+ </class>
+
+ <class name="MColumnDescriptor" identity-type="datastore" table="CDS" detachable="true">
+ <datastore-identity>
+ <column name="CD_ID"/>
+ </datastore-identity>
+ <field name="cols" table="COLUMNS_V2" >
+ <collection element-type="MFieldSchema"/>
+ <join>
+ <primary-key name="COLUMNS_PK">
+ <column name="COLUMN_NAME"/>
+ </primary-key>
+ <column name="CD_ID"/>
+ </join>
+ <element>
+ <embedded>
+ <field name="name">
+ <column name="COLUMN_NAME" length="767" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="type">
+ <column name="TYPE_NAME" length="32672" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="comment">
+ <column name="COMMENT" length="256" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ </embedded>
+ </element>
+ </field>
+ </class>
+
+ <class name="MStringList" identity-type="datastore" table="Skewed_STRING_LIST" detachable="true">
+ <datastore-identity>
+ <column name="STRING_LIST_ID"/>
+ </datastore-identity>
+ <field name="internalList" table="Skewed_STRING_LIST_VALUES">
+ <collection element-type="java.lang.String"/>
+ <join>
+ <column name="STRING_LIST_ID"/>
+ </join>
+ <element column="STRING_LIST_VALUE"/>
+ </field>
+ </class>
+
+ <class name="MStorageDescriptor" identity-type="datastore" table="SDS" detachable="true">
+ <datastore-identity>
+ <column name="SD_ID"/>
+ </datastore-identity>
+ <field name="cd">
+ <column name="CD_ID"/>
+ </field>
+ <field name="location">
+ <column name="LOCATION" length="4000" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="inputFormat">
+ <column name="INPUT_FORMAT" length="4000" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="outputFormat">
+ <column name="OUTPUT_FORMAT" length="4000" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="isCompressed">
+ <column name="IS_COMPRESSED"/>
+ </field>
+ <field name="isStoredAsSubDirectories">
+ <column name="IS_STOREDASSUBDIRECTORIES"/>
+ </field>
+ <field name="numBuckets">
+ <column name="NUM_BUCKETS" jdbc-type="integer"/>
+ </field>
+ <field name="serDeInfo" dependent="true">
+ <column name="SERDE_ID"/>
+ </field>
+ <field name="bucketCols" table="BUCKETING_COLS">
+ <collection element-type="java.lang.String"/>
+ <join>
+ <column name="SD_ID"/>
+ </join>
+ <element column="BUCKET_COL_NAME"/>
+ </field>
+ <field name="sortCols" table="SORT_COLS">
+ <collection element-type="MOrder"/>
+ <join>
+ <column name="SD_ID"/>
+ </join>
+ <element>
+ <embedded>
+ <field name="col">
+ <column name="COLUMN_NAME" length="767" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="order">
+ <column name="ORDER" jdbc-type="INTEGER" allows-null="false"/>
+ </field>
+ </embedded>
+ </element>
+ </field>
+ <field name="parameters" table="SD_PARAMS">
+ <map key-type="java.lang.String" value-type="java.lang.String"/>
+ <join>
+ <column name="SD_ID"/>
+ </join>
+ <key>
+ <column name="PARAM_KEY" length="256" jdbc-type="VARCHAR"/>
+ </key>
+ <value>
+ <column name="PARAM_VALUE" length="32672" jdbc-type="VARCHAR"/>
+ </value>
+ </field>
+ <field name="skewedColNames" table="SKEWED_COL_NAMES">
+ <collection element-type="java.lang.String"/>
+ <join>
+ <column name="SD_ID"/>
+ </join>
+ <element column="SKEWED_COL_NAME"/>
+ </field>
+ <field name="skewedColValues" table="SKEWED_VALUES">
+ <collection element-type="MStringList"/>
+ <join/>
+ </field>
+ <field name="skewedColValueLocationMaps" table="SKEWED_COL_VALUE_LOC_MAP">
+ <map key-type="MStringList" value-type="java.lang.String"/>
+ <join>
+ <column name="SD_ID"/>
+ </join>
+ <value>
+ <column name="location" length="4000" jdbc-type="VARCHAR"/>
+ </value>
+ </field>
+ </class>
+
+ <class name="MPartition" table="PARTITIONS" identity-type="datastore" detachable="true">
+ <index name="UniquePartition" unique="true">
+ <column name="PART_NAME"/>
+ <column name="TBL_ID"/>
+ </index>
+ <datastore-identity>
+ <column name="PART_ID"/>
+ </datastore-identity>
+ <field name="partitionName">
+ <column name="PART_NAME" length="767" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="table">
+ <column name="TBL_ID"/>
+ </field>
+ <field name="createTime">
+ <column name="CREATE_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="lastAccessTime">
+ <column name="LAST_ACCESS_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="values" table="PARTITION_KEY_VALS">
+ <collection element-type="java.lang.String"/>
+ <join>
+ <column name="PART_ID"/>
+ </join>
+ <element column="PART_KEY_VAL"/>
+ </field>
+ <field name="sd" dependent="true">
+ <column name="SD_ID"/>
+ </field>
+ <field name="parameters" table="PARTITION_PARAMS">
+ <map key-type="java.lang.String" value-type="java.lang.String"/>
+ <join>
+ <column name="PART_ID"/>
+ </join>
+ <key>
+ <column name="PARAM_KEY" length="256" jdbc-type="VARCHAR"/>
+ </key>
+ <value>
+ <column name="PARAM_VALUE" length="4000" jdbc-type="VARCHAR"/>
+ </value>
+ </field>
+ </class>
+
+ <class name="MIndex" table="IDXS" identity-type="datastore" detachable="true">
+ <index name="UniqueINDEX" unique="true">
+ <column name="INDEX_NAME"/>
+ <column name="ORIG_TBL_ID"/>
+ </index>
+
+ <datastore-identity>
+ <column name="INDEX_ID"/>
+ </datastore-identity>
+ <field name="indexName">
+ <column name="INDEX_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="origTable">
+ <column name="ORIG_TBL_ID"/>
+ </field>
+ <field name="indexTable">
+ <column name="INDEX_TBL_ID"/>
+ </field>
+ <field name="indexHandlerClass">
+ <column name="INDEX_HANDLER_CLASS" length="4000" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="deferredRebuild">
+ <column name="DEFERRED_REBUILD"/>
+ </field>
+ <field name="createTime">
+ <column name="CREATE_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="lastAccessTime">
+ <column name="LAST_ACCESS_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="sd" dependent="true">
+ <column name="SD_ID"/>
+ </field>
+ <field name="parameters" table="INDEX_PARAMS">
+ <map key-type="java.lang.String" value-type="java.lang.String"/>
+ <join>
+ <column name="INDEX_ID"/>
+ </join>
+ <key>
+ <column name="PARAM_KEY" length="256" jdbc-type="VARCHAR"/>
+ </key>
+ <value>
+ <column name="PARAM_VALUE" length="4000" jdbc-type="VARCHAR"/>
+ </value>
+ </field>
+ </class>
+
+ <class name="MRole" table="ROLES" identity-type="datastore" detachable="true">
+
+ <index name="RoleEntityINDEX" unique="true">
+ <column name="ROLE_NAME"/>
+ </index>
+
+ <datastore-identity>
+ <column name="ROLE_ID"/>
+ </datastore-identity>
+
+ <field name="roleName">
+ <column name="ROLE_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="createTime">
+ <column name="CREATE_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="ownerName">
+ <column name="OWNER_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+
+ </class>
+
+ <class name="MRoleMap" table="ROLE_MAP" identity-type="datastore" detachable="true">
+ <index name="UserRoleMapINDEX" unique="true">
+ <column name="PRINCIPAL_NAME"/>
+ <column name="ROLE_ID"/>
+ <column name="GRANTOR"/>
+ <column name="GRANTOR_TYPE"/>
+ </index>
+
+ <datastore-identity>
+ <column name="ROLE_GRANT_ID"/>
+ </datastore-identity>
+
+ <field name="role">
+ <column name="ROLE_ID" />
+ </field>
+ <field name="principalName">
+ <column name="PRINCIPAL_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="principalType">
+ <column name="PRINCIPAL_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="addTime">
+ <column name="ADD_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="grantor">
+ <column name="GRANTOR" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="grantorType">
+ <column name="GRANTOR_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="grantOption">
+ <column name="GRANT_OPTION" jdbc-type="SMALLINT"/>
+ </field>
+ </class>
+
+ <class name="MGlobalPrivilege" table="GLOBAL_PRIVS" identity-type="datastore" detachable="true">
+
+ <index name="GlobalPrivilegeIndex" unique="true">
+ <column name="PRINCIPAL_NAME"/>
+ <column name="PRINCIPAL_TYPE"/>
+ <column name="USER_PRIV"/>
+ <column name="GRANTOR"/>
+ <column name="GRANTOR_TYPE"/>
+ </index>
+
+ <datastore-identity>
+ <column name="USER_GRANT_ID"/>
+ </datastore-identity>
+
+ <field name="principalName">
+ <column name="PRINCIPAL_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="principalType">
+ <column name="PRINCIPAL_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="privilege">
+ <column name="USER_PRIV" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="createTime">
+ <column name="CREATE_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="grantor">
+ <column name="GRANTOR" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="grantorType">
+ <column name="GRANTOR_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="grantOption">
+ <column name="GRANT_OPTION" jdbc-type="SMALLINT"/>
+ </field>
+ </class>
+
+ <class name="MDBPrivilege" table="DB_PRIVS" identity-type="datastore" detachable="true">
+
+ <index name="DBPrivilegeIndex" unique="true">
+ <column name="DB_ID"/>
+ <column name="PRINCIPAL_NAME"/>
+ <column name="PRINCIPAL_TYPE"/>
+ <column name="DB_PRIV"/>
+ <column name="GRANTOR"/>
+ <column name="GRANTOR_TYPE"/>
+ </index>
+
+ <datastore-identity>
+ <column name="DB_GRANT_ID"/>
+ </datastore-identity>
+
+ <field name="principalName">
+ <column name="PRINCIPAL_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="principalType">
+ <column name="PRINCIPAL_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="database">
+ <column name="DB_ID" />
+ </field>
+ <field name="privilege">
+ <column name="DB_PRIV" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="createTime">
+ <column name="CREATE_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="grantor">
+ <column name="GRANTOR" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="grantorType">
+ <column name="GRANTOR_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="grantOption">
+ <column name="GRANT_OPTION" jdbc-type="SMALLINT"/>
+ </field>
+ </class>
+
+ <class name="MTablePrivilege" table="TBL_PRIVS" identity-type="datastore" detachable="true">
+
+ <index name="TablePrivilegeIndex" unique="false">
+ <column name="TBL_ID"/>
+ <column name="PRINCIPAL_NAME"/>
+ <column name="PRINCIPAL_TYPE"/>
+ <column name="TBL_PRIV"/>
+ <column name="GRANTOR"/>
+ <column name="GRANTOR_TYPE"/>
+ </index>
+
+ <datastore-identity>
+ <column name="TBL_GRANT_ID"/>
+ </datastore-identity>
+
+ <field name="principalName">
+ <column name="PRINCIPAL_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="principalType">
+ <column name="PRINCIPAL_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="table">
+ <column name="TBL_ID"/>
+ </field>
+ <field name="privilege">
+ <column name="TBL_PRIV" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="createTime">
+ <column name="CREATE_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="grantor">
+ <column name="GRANTOR" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="grantorType">
+ <column name="GRANTOR_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="grantOption">
+ <column name="GRANT_OPTION" jdbc-type="SMALLINT"/>
+ </field>
+ </class>
+
+ <class name="MPartitionPrivilege" table="PART_PRIVS" identity-type="datastore" detachable="true">
+
+ <index name="PartPrivilegeIndex" unique="false">
+ <column name="PART_ID"/>
+ <column name="PRINCIPAL_NAME"/>
+ <column name="PRINCIPAL_TYPE"/>
+ <column name="PART_PRIV"/>
+ <column name="GRANTOR"/>
+ <column name="GRANTOR_TYPE"/>
+ </index>
+
+ <datastore-identity>
+ <column name="PART_GRANT_ID"/>
+ </datastore-identity>
+
+ <field name="principalName">
+ <column name="PRINCIPAL_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="principalType">
+ <column name="PRINCIPAL_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="partition">
+ <column name="PART_ID" />
+ </field>
+ <field name="privilege">
+ <column name="PART_PRIV" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="createTime">
+ <column name="CREATE_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="grantor">
+ <column name="GRANTOR" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="grantorType">
+ <column name="GRANTOR_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="grantOption">
+ <column name="GRANT_OPTION" jdbc-type="SMALLINT"/>
+ </field>
+ </class>
+
+ <class name="MTableColumnPrivilege" table="TBL_COL_PRIVS" identity-type="datastore" detachable="true">
+
+ <index name="TableColumnPrivilegeIndex" unique="false">
+ <column name="TBL_ID"/>
+ <column name="COLUMN_NAME"/>
+ <column name="PRINCIPAL_NAME"/>
+ <column name="PRINCIPAL_TYPE"/>
+ <column name="TBL_COL_PRIV"/>
+ <column name="GRANTOR"/>
+ <column name="GRANTOR_TYPE"/>
+ </index>
+
+ <datastore-identity>
+ <column name="TBL_COLUMN_GRANT_ID"/>
+ </datastore-identity>
+
+ <field name="principalName">
+ <column name="PRINCIPAL_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="principalType">
+ <column name="PRINCIPAL_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="table">
+ <column name="TBL_ID" />
+ </field>
+ <field name="columnName">
+ <column name="COLUMN_NAME" length="767" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="privilege">
+ <column name="TBL_COL_PRIV" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="createTime">
+ <column name="CREATE_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="grantor">
+ <column name="GRANTOR" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="grantorType">
+ <column name="GRANTOR_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="grantOption">
+ <column name="GRANT_OPTION" jdbc-type="SMALLINT"/>
+ </field>
+ </class>
+
+ <class name="MPartitionColumnPrivilege" table="PART_COL_PRIVS" identity-type="datastore" detachable="true">
+
+ <index name="PartitionColumnPrivilegeIndex" unique="false">
+ <column name="PART_ID"/>
+ <column name="COLUMN_NAME"/>
+ <column name="PRINCIPAL_NAME"/>
+ <column name="PRINCIPAL_TYPE"/>
+ <column name="PART_COL_PRIV"/>
+ <column name="GRANTOR"/>
+ <column name="GRANTOR_TYPE"/>
+ </index>
+
+ <datastore-identity>
+ <column name="PART_COLUMN_GRANT_ID"/>
+ </datastore-identity>
+
+ <field name="principalName">
+ <column name="PRINCIPAL_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="principalType">
+ <column name="PRINCIPAL_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="partition">
+ <column name="PART_ID" />
+ </field>
+ <field name="columnName">
+ <column name="COLUMN_NAME" length="767" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="privilege">
+ <column name="PART_COL_PRIV" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="createTime">
+ <column name="CREATE_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="grantor">
+ <column name="GRANTOR" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="grantorType">
+ <column name="GRANTOR_TYPE" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="grantOption">
+ <column name="GRANT_OPTION" jdbc-type="SMALLINT"/>
+ </field>
+ </class>
+
+ <class name="MPartitionEvent" table="PARTITION_EVENTS" identity-type="datastore" detachable="true">
+
+ <index name="PartitionEventIndex" unique="false">
+ <column name="PARTITION_NAME"/>
+ </index>
+
+ <datastore-identity>
+ <column name="PART_NAME_ID"/>
+ </datastore-identity>
+
+ <field name="dbName">
+ <column name="DB_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="tblName">
+ <column name="TBL_NAME" length="256" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="partName">
+ <column name="PARTITION_NAME" length="767" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="eventType">
+ <column name="EVENT_TYPE" jdbc-type="integer"/>
+ </field>
+ <field name="eventTime">
+ <column name="EVENT_TIME" jdbc-type="BIGINT"/>
+ </field>
+
+ </class>
+
+ <class name="MMasterKey" table="MASTER_KEYS" identity-type="application" detachable="true">
+
+ <field name="keyId" primary-key="true" value-strategy="native">
+ <column name="KEY_ID" jdbc-type="integer" />
+ </field>
+
+ <field name="masterKey">
+ <column name="MASTER_KEY" length="767" jdbc-type="VARCHAR" />
+ </field>
+
+ </class>
+
+ <class name="MDelegationToken" table="DELEGATION_TOKENS" identity-type="application" detachable="true">
+
+ <field name="tokenIdentifier" primary-key="true">
+ <column name="TOKEN_IDENT" length="767" jdbc-type="VARCHAR" />
+ </field>
+
+ <field name="tokenStr">
+ <column name="TOKEN" length="767" jdbc-type="VARCHAR" />
+ </field>
+
+ </class>
+
+ <class name="MTableColumnStatistics" table="TAB_COL_STATS" identity-type="datastore" detachable="true">
+ <datastore-identity>
+ <column name="CS_ID"/>
+ </datastore-identity>
+
+ <field name ="dbName">
+ <column name="DB_NAME" length="128" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="tableName">
+ <column name="TABLE_NAME" length="256" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="table">
+ <column name="TBL_ID"/>
+ </field>
+ <field name="colName">
+ <column name="COLUMN_NAME" length="767" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="colType">
+ <column name="COLUMN_TYPE" length="128" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="longLowValue">
+ <column name="LONG_LOW_VALUE" jdbc-type="BIGINT" allows-null="true"/>
+ </field>
+ <field name="longHighValue">
+ <column name="LONG_HIGH_VALUE" jdbc-type="BIGINT" allows-null="true"/>
+ </field>
+ <field name="doubleLowValue">
+ <column name="DOUBLE_LOW_VALUE" jdbc-type="DOUBLE" allows-null="true"/>
+ </field>
+ <field name="doubleHighValue">
+ <column name="DOUBLE_HIGH_VALUE" jdbc-type="DOUBLE" allows-null="true"/>
+ </field>
+ <field name="decimalLowValue">
+ <column name="BIG_DECIMAL_LOW_VALUE" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ <field name="decimalHighValue">
+ <column name="BIG_DECIMAL_HIGH_VALUE" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ <field name="numNulls">
+ <column name="NUM_NULLS" jdbc-type="BIGINT" allows-null="false"/>
+ </field>
+ <field name="numDVs">
+ <column name="NUM_DISTINCTS" jdbc-type="BIGINT" allows-null="true"/>
+ </field>
+ <field name="bitVector">
+ <column name="BIT_VECTOR" jdbc-type="BLOB" allows-null="true"/>
+ </field>
+ <field name="avgColLen">
+ <column name="AVG_COL_LEN" jdbc-type="DOUBLE" allows-null="true"/>
+ </field>
+ <field name="maxColLen">
+ <column name="MAX_COL_LEN" jdbc-type="BIGINT" allows-null="true"/>
+ </field>
+ <field name="numTrues">
+ <column name="NUM_TRUES" jdbc-type="BIGINT" allows-null="true"/>
+ </field>
+ <field name="numFalses">
+ <column name="NUM_FALSES" jdbc-type="BIGINT" allows-null="true"/>
+ </field>
+ <field name="lastAnalyzed">
+ <column name="LAST_ANALYZED" jdbc-type="BIGINT" allows-null="false"/>
+ </field>
+ </class>
+
+ <class name="MPartitionColumnStatistics" table="PART_COL_STATS" identity-type="datastore" detachable="true">
+ <datastore-identity>
+ <column name="CS_ID"/>
+ </datastore-identity>
+
+ <field name ="dbName">
+ <column name="DB_NAME" length="128" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="tableName">
+ <column name="TABLE_NAME" length="256" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="partitionName">
+ <column name="PARTITION_NAME" length="767" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="partition">
+ <column name="PART_ID"/>
+ </field>
+ <field name="colName">
+ <column name="COLUMN_NAME" length="767" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="colType">
+ <column name="COLUMN_TYPE" length="128" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="longLowValue">
+ <column name="LONG_LOW_VALUE" jdbc-type="BIGINT" allows-null="true"/>
+ </field>
+ <field name="longHighValue">
+ <column name="LONG_HIGH_VALUE" jdbc-type="BIGINT" allows-null="true"/>
+ </field>
+ <field name="doubleLowValue">
+ <column name="DOUBLE_LOW_VALUE" jdbc-type="DOUBLE" allows-null="true"/>
+ </field>
+ <field name="doubleHighValue">
+ <column name="DOUBLE_HIGH_VALUE" jdbc-type="DOUBLE" allows-null="true"/>
+ </field>
+ <field name="decimalLowValue">
+ <column name="BIG_DECIMAL_LOW_VALUE" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ <field name="decimalHighValue">
+ <column name="BIG_DECIMAL_HIGH_VALUE" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ <field name="numNulls">
+ <column name="NUM_NULLS" jdbc-type="BIGINT" allows-null="false"/>
+ </field>
+ <field name="numDVs">
+ <column name="NUM_DISTINCTS" jdbc-type="BIGINT" allows-null="true"/>
+ </field>
+ <field name="bitVector">
+ <column name="BIT_VECTOR" jdbc-type="BLOB" allows-null="true"/>
+ </field>
+ <field name="avgColLen">
+ <column name="AVG_COL_LEN" jdbc-type="DOUBLE" allows-null="true"/>
+ </field>
+ <field name="maxColLen">
+ <column name="MAX_COL_LEN" jdbc-type="BIGINT" allows-null="true"/>
+ </field>
+ <field name="numTrues">
+ <column name="NUM_TRUES" jdbc-type="BIGINT" allows-null="true"/>
+ </field>
+ <field name="numFalses">
+ <column name="NUM_FALSES" jdbc-type="BIGINT" allows-null="true"/>
+ </field>
+ <field name="lastAnalyzed">
+ <column name="LAST_ANALYZED" jdbc-type="BIGINT" allows-null="false"/>
+ </field>
+ </class>
+ <class name="MVersionTable" table="VERSION" identity-type="datastore" detachable="true">
+ <datastore-identity>
+ <column name="VER_ID"/>
+ </datastore-identity>
+ <field name ="schemaVersion">
+ <column name="SCHEMA_VERSION" length="127" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name ="versionComment">
+ <column name="VERSION_COMMENT" length="255" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ </class>
+
+ <class name="MMetastoreDBProperties" table="METASTORE_DB_PROPERTIES" identity-type="application" detachable="true">
+ <field name ="propertyKey" primary-key="true">
+ <column name="PROPERTY_KEY" length="255" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name ="propertyValue">
+ <column name="PROPERTY_VALUE" length="1000" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name ="description">
+ <column name="DESCRIPTION" length="1000" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ </class>
+
+ <class name="MResourceUri" embedded-only="true" table="RESOURCE_URI" detachable="true">
+ <field name="resourceType">
+ <column name="RESOURCE_TYPE" jdbc-type="INTEGER"/>
+ </field>
+ <field name="uri">
+ <column name="RESOURCE_URI" length="4000" jdbc-type="VARCHAR"/>
+ </field>
+ </class>
+
+ <class name="MFunction" table="FUNCS" identity-type="datastore" detachable="true">
+ <datastore-identity>
+ <column name="FUNC_ID"/>
+ </datastore-identity>
+ <index name="UniqueFunction" unique="true">
+ <column name="FUNC_NAME"/>
+ <column name="DB_ID"/>
+ </index>
+ <field name="functionName">
+ <column name="FUNC_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="database">
+ <column name="DB_ID"/>
+ </field>
+ <field name="functionType">
+ <column name="FUNC_TYPE" jdbc-type="integer"/>
+ </field>
+ <field name="className">
+ <column name="CLASS_NAME" length="4000" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="ownerName">
+ <column name="OWNER_NAME" length="128" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="ownerType">
+ <column name="OWNER_TYPE" length="10" jdbc-type="VARCHAR"/>
+ </field>
+ <field name="createTime">
+ <column name="CREATE_TIME" jdbc-type="integer"/>
+ </field>
+ <field name="resourceUris" table="FUNC_RU">
+ <collection element-type="MResourceUri"/>
+ <join>
+ <column name="FUNC_ID"/>
+ </join>
+ <element>
+ <embedded>
+ <field name="resourceType">
+ <column name="RESOURCE_TYPE" jdbc-type="INTEGER"/>
+ </field>
+ <field name="uri">
+ <column name="RESOURCE_URI" length="4000" jdbc-type="VARCHAR"/>
+ </field>
+ </embedded>
+ </element>
+ </field>
+ </class>
+
+ <class name="MNotificationLog" table="NOTIFICATION_LOG" identity-type="datastore" detachable="true">
+ <datastore-identity>
+ <column name="NL_ID"/>
+ </datastore-identity>
+ <field name="eventId">
+ <column name="EVENT_ID" jdbc-type="BIGINT" allows-null="false"/>
+ </field>
+ <field name="eventTime">
+ <column name="EVENT_TIME" jdbc-type="INTEGER" allows-null="false"/>
+ </field>
+ <field name="eventType">
+ <column name="EVENT_TYPE" length="32" jdbc-type="VARCHAR" allows-null="false"/>
+ </field>
+ <field name="dbName">
+ <column name="DB_NAME" length="128" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ <field name="tableName">
+ <column name="TBL_NAME" length="256" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ <field name="message">
+ <column name="MESSAGE" jdbc-type="LONGVARCHAR"/>
+ </field>
+ <field name="messageFormat">
+ <column name="MESSAGE_FORMAT" length="16" jdbc-type="VARCHAR" allows-null="true"/>
+ </field>
+ </class>
+
+ <!-- I tried to use a sequence here but derby didn't handle it well. -->
+ <class name="MNotificationNextId" table="NOTIFICATION_SEQUENCE" identity-type="datastore" detachable="true">
+ <datastore-identity>
+ <column name="NNI_ID"/>
+ </datastore-identity>
+ <field name="nextEventId">
+ <column name="NEXT_EVENT_ID" jdbc-type="BIGINT" allows-null="false"/>
+ </field>
+ </class>
+
+
+ </package>
+</jdo>
+
[4/4] hive git commit: HIVE-17224 Move JDO classes to standalone
metastore (Alan Gates, reviewed by Vihang Karajgaonkar)
Posted by ga...@apache.org.
HIVE-17224 Move JDO classes to standalone metastore (Alan Gates, reviewed by Vihang Karajgaonkar)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/98ec28ed
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/98ec28ed
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/98ec28ed
Branch: refs/heads/master
Commit: 98ec28edaf6d258d1074849e04450c915552bbf0
Parents: 9373a64
Author: Alan Gates <ga...@hortonworks.com>
Authored: Fri Aug 11 13:02:23 2017 -0700
Committer: Alan Gates <ga...@hortonworks.com>
Committed: Fri Aug 11 13:02:23 2017 -0700
----------------------------------------------------------------------
metastore/pom.xml | 46 -
.../hive/metastore/model/MColumnDescriptor.java | 51 -
.../hive/metastore/model/MConstraint.java | 188 ---
.../hive/metastore/model/MDBPrivilege.java | 132 ---
.../hadoop/hive/metastore/model/MDatabase.java | 128 ---
.../hive/metastore/model/MDelegationToken.java | 45 -
.../hive/metastore/model/MFieldSchema.java | 80 --
.../hadoop/hive/metastore/model/MFunction.java | 119 --
.../hive/metastore/model/MGlobalPrivilege.java | 120 --
.../hadoop/hive/metastore/model/MIndex.java | 200 ----
.../hadoop/hive/metastore/model/MMasterKey.java | 55 -
.../metastore/model/MMetastoreDBProperties.java | 56 -
.../hive/metastore/model/MNotificationLog.java | 98 --
.../metastore/model/MNotificationNextId.java | 42 -
.../hadoop/hive/metastore/model/MOrder.java | 62 -
.../hadoop/hive/metastore/model/MPartition.java | 155 ---
.../model/MPartitionColumnPrivilege.java | 161 ---
.../model/MPartitionColumnStatistics.java | 272 -----
.../hive/metastore/model/MPartitionEvent.java | 90 --
.../metastore/model/MPartitionPrivilege.java | 139 ---
.../hive/metastore/model/MPrincipalDesc.java | 59 -
.../hive/metastore/model/MResourceUri.java | 49 -
.../hadoop/hive/metastore/model/MRole.java | 80 --
.../hadoop/hive/metastore/model/MRoleMap.java | 120 --
.../hadoop/hive/metastore/model/MSerDeInfo.java | 81 --
.../metastore/model/MStorageDescriptor.java | 277 -----
.../hive/metastore/model/MStringList.java | 62 -
.../hadoop/hive/metastore/model/MTable.java | 256 -----
.../metastore/model/MTableColumnPrivilege.java | 160 ---
.../metastore/model/MTableColumnStatistics.java | 263 -----
.../hive/metastore/model/MTablePrivilege.java | 139 ---
.../hadoop/hive/metastore/model/MType.java | 105 --
.../hive/metastore/model/MVersionTable.java | 57 -
metastore/src/model/package.jdo | 1088 ------------------
standalone-metastore/pom.xml | 46 +
.../hive/metastore/model/MColumnDescriptor.java | 51 +
.../hive/metastore/model/MConstraint.java | 188 +++
.../hive/metastore/model/MDBPrivilege.java | 132 +++
.../hadoop/hive/metastore/model/MDatabase.java | 128 +++
.../hive/metastore/model/MDelegationToken.java | 45 +
.../hive/metastore/model/MFieldSchema.java | 80 ++
.../hadoop/hive/metastore/model/MFunction.java | 119 ++
.../hive/metastore/model/MGlobalPrivilege.java | 120 ++
.../hadoop/hive/metastore/model/MIndex.java | 200 ++++
.../hadoop/hive/metastore/model/MMasterKey.java | 55 +
.../metastore/model/MMetastoreDBProperties.java | 56 +
.../hive/metastore/model/MNotificationLog.java | 98 ++
.../metastore/model/MNotificationNextId.java | 42 +
.../hadoop/hive/metastore/model/MOrder.java | 62 +
.../hadoop/hive/metastore/model/MPartition.java | 155 +++
.../model/MPartitionColumnPrivilege.java | 161 +++
.../model/MPartitionColumnStatistics.java | 272 +++++
.../hive/metastore/model/MPartitionEvent.java | 90 ++
.../metastore/model/MPartitionPrivilege.java | 139 +++
.../hive/metastore/model/MPrincipalDesc.java | 59 +
.../hive/metastore/model/MResourceUri.java | 49 +
.../hadoop/hive/metastore/model/MRole.java | 80 ++
.../hadoop/hive/metastore/model/MRoleMap.java | 120 ++
.../hadoop/hive/metastore/model/MSerDeInfo.java | 81 ++
.../metastore/model/MStorageDescriptor.java | 277 +++++
.../hive/metastore/model/MStringList.java | 62 +
.../hadoop/hive/metastore/model/MTable.java | 256 +++++
.../metastore/model/MTableColumnPrivilege.java | 160 +++
.../metastore/model/MTableColumnStatistics.java | 263 +++++
.../hive/metastore/model/MTablePrivilege.java | 139 +++
.../hadoop/hive/metastore/model/MType.java | 105 ++
.../hive/metastore/model/MVersionTable.java | 57 +
.../src/main/resources/package.jdo | 1088 ++++++++++++++++++
68 files changed, 5035 insertions(+), 5035 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/pom.xml
----------------------------------------------------------------------
diff --git a/metastore/pom.xml b/metastore/pom.xml
index 1fa17a7..62bddd1 100644
--- a/metastore/pom.xml
+++ b/metastore/pom.xml
@@ -107,21 +107,6 @@
<version>${derby.version}</version>
</dependency>
<dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-api-jdo</artifactId>
- <version>${datanucleus-api-jdo.version}</version>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-core</artifactId>
- <version>${datanucleus-core.version}</version>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-rdbms</artifactId>
- <version>${datanucleus-rdbms.version}</version>
- </dependency>
- <dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>${commons-pool.version}</version>
@@ -137,11 +122,6 @@
<version>${jdo-api.version}</version>
</dependency>
<dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>javax.jdo</artifactId>
- <version>${datanucleus-jdo.version}</version>
- </dependency>
- <dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
<version>${antlr.version}</version>
@@ -323,14 +303,6 @@
<build>
<sourceDirectory>${basedir}/src/java</sourceDirectory>
<testSourceDirectory>${basedir}/src/test</testSourceDirectory>
- <resources>
- <resource>
- <directory>${basedir}/src/model</directory>
- <includes>
- <include>package.jdo</include>
- </includes>
- </resource>
- </resources>
<plugins>
<!-- plugins are always listed in sorted order by groupId, artifectId -->
<plugin>
@@ -377,24 +349,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-maven-plugin</artifactId>
- <configuration>
- <api>JDO</api>
- <verbose>true</verbose>
- <metadataIncludes>**/*.jdo</metadataIncludes>
- <fork>false</fork>
- </configuration>
- <executions>
- <execution>
- <phase>process-classes</phase>
- <goals>
- <goal>enhance</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MColumnDescriptor.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MColumnDescriptor.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MColumnDescriptor.java
deleted file mode 100644
index 6ffb9b3..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MColumnDescriptor.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- *
- */
-package org.apache.hadoop.hive.metastore.model;
-
-import java.util.List;
-
-/**
- *
- * MColumnDescriptor.
- * A wrapper around a list of columns.
- */
-public class MColumnDescriptor {
- private List<MFieldSchema> cols;
-
- public MColumnDescriptor() {}
-
- /**
- *
- * @param cols
- */
- public MColumnDescriptor(List<MFieldSchema> cols) {
- this.cols = cols;
- }
-
- public List<MFieldSchema> getCols() {
- return cols;
- }
-
- public void setCols(List<MFieldSchema> cols) {
- this.cols = cols;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MConstraint.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MConstraint.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MConstraint.java
deleted file mode 100644
index 3fcb048..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MConstraint.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hive.metastore.model;
-
-import java.io.Serializable;
-
-public class MConstraint
-{
- String constraintName;
- int constraintType;
- int position;
- Integer deleteRule;
- Integer updateRule;
- MTable parentTable;
- MTable childTable;
- MColumnDescriptor parentColumn;
- MColumnDescriptor childColumn;
- Integer childIntegerIndex;
- Integer parentIntegerIndex;
- int enableValidateRely;
-
- // 0 - Primary Key
- // 1 - PK-FK relationship
- // 2 - Unique Constraint
- // 3 - Not Null Constraint
- public final static int PRIMARY_KEY_CONSTRAINT = 0;
- public final static int FOREIGN_KEY_CONSTRAINT = 1;
- public final static int UNIQUE_CONSTRAINT = 2;
- public final static int NOT_NULL_CONSTRAINT = 3;
-
- @SuppressWarnings("serial")
- public static class PK implements Serializable {
- public String constraintName;
- public int position;
-
- public PK() {}
-
- public PK(String constraintName, int position) {
- this.constraintName = constraintName;
- this.position = position;
- }
-
- public String toString() {
- return constraintName+":"+position;
- }
-
- public int hashCode() {
- return toString().hashCode();
- }
-
- public boolean equals(Object other) {
- if (other != null && (other instanceof PK)) {
- PK otherPK = (PK) other;
- return otherPK.constraintName.equals(constraintName) && otherPK.position == position;
- }
- return false;
- }
- }
-
- public MConstraint() {}
-
- public MConstraint(String constraintName, int constraintType, int position, Integer deleteRule, Integer updateRule, int enableRelyValidate, MTable parentTable,
- MTable childTable, MColumnDescriptor parentColumn, MColumnDescriptor childColumn, Integer childIntegerIndex, Integer parentIntegerIndex) {
- this.constraintName = constraintName;
- this.constraintType = constraintType;
- this.parentTable = parentTable;
- this.childTable = childTable;
- this.parentColumn = parentColumn;
- this.childColumn = childColumn;
- this.position = position;
- this.deleteRule = deleteRule;
- this.updateRule = updateRule;
- this.enableValidateRely = enableRelyValidate;
- this.childIntegerIndex = childIntegerIndex;
- this.parentIntegerIndex = parentIntegerIndex;
- }
-
- public String getConstraintName() {
- return constraintName;
- }
-
- public void setConstraintName(String fkName) {
- this.constraintName = fkName;
- }
-
- public int getConstraintType() {
- return constraintType;
- }
-
- public void setConstraintType(int ct) {
- this.constraintType = ct;
- }
-
- public int getPosition() {
- return position;
- }
-
- public void setPosition(int po) {
- this.position = po;
- }
-
- public Integer getDeleteRule() {
- return deleteRule;
- }
-
- public void setDeleteRule(Integer de) {
- this.deleteRule = de;
- }
-
- public int getEnableValidateRely() {
- return enableValidateRely;
- }
-
- public void setEnableValidateRely(int enableValidateRely) {
- this.enableValidateRely = enableValidateRely;
- }
-
- public Integer getChildIntegerIndex() {
- return childIntegerIndex;
- }
-
- public void setChildIntegerIndex(Integer childIntegerIndex) {
- this.childIntegerIndex = childIntegerIndex;
- }
-
- public Integer getParentIntegerIndex() {
- return childIntegerIndex;
- }
-
- public void setParentIntegerIndex(Integer parentIntegerIndex) {
- this.parentIntegerIndex = parentIntegerIndex;
- }
-
- public Integer getUpdateRule() {
- return updateRule;
- }
-
- public void setUpdateRule(Integer ur) {
- this.updateRule = ur;
- }
-
- public MTable getChildTable() {
- return childTable;
- }
-
- public void setChildTable(MTable ft) {
- this.childTable = ft;
- }
-
- public MTable getParentTable() {
- return parentTable;
- }
-
- public void setParentTable(MTable pt) {
- this.parentTable = pt;
- }
-
- public MColumnDescriptor getParentColumn() {
- return parentColumn;
- }
-
- public void setParentColumn(MColumnDescriptor name) {
- this.parentColumn = name;
- }
-
- public MColumnDescriptor getChildColumn() {
- return childColumn;
- }
-
- public void setChildColumn(MColumnDescriptor name) {
- this.childColumn = name;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java
deleted file mode 100644
index 4550fb2..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-public class MDBPrivilege {
-
- private String principalName;
-
- private String principalType;
-
- private MDatabase database;
-
- private int createTime;
-
- private String privilege;
-
- private String grantor;
-
- private String grantorType;
-
- private boolean grantOption;
-
- public MDBPrivilege() {
- }
-
- public MDBPrivilege(String principalName, String principalType,
- MDatabase database, String dbPrivileges, int createTime, String grantor,
- String grantorType, boolean grantOption) {
- super();
- this.principalName = principalName;
- this.principalType = principalType;
- this.database = database;
- this.privilege = dbPrivileges;
- this.createTime = createTime;
- this.grantorType = grantorType;
- this.grantOption = grantOption;
- this.grantor = grantor;
- }
-
- /**
- * @return user name, role name, or group name
- */
- public String getPrincipalName() {
- return principalName;
- }
-
- /**
- * @param userName user/role/group name
- */
- public void setPrincipalName(String userName) {
- this.principalName = userName;
- }
-
- /**
- * @return a set of privileges this user/role/group has
- */
- public String getPrivilege() {
- return privilege;
- }
-
- /**
- * @param dbPrivilege a set of privileges this user/role/group has
- */
- public void setPrivilege(String dbPrivilege) {
- this.privilege = dbPrivilege;
- }
-
- public MDatabase getDatabase() {
- return database;
- }
-
- public void setDatabase(MDatabase database) {
- this.database = database;
- }
-
- public int getCreateTime() {
- return createTime;
- }
-
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- public String getGrantor() {
- return grantor;
- }
-
- public void setGrantor(String grantor) {
- this.grantor = grantor;
- }
-
- public String getGrantorType() {
- return grantorType;
- }
-
- public void setGrantorType(String grantorType) {
- this.grantorType = grantorType;
- }
-
- public boolean getGrantOption() {
- return grantOption;
- }
-
- public void setGrantOption(boolean grantOption) {
- this.grantOption = grantOption;
- }
-
- public String getPrincipalType() {
- return principalType;
- }
-
- public void setPrincipalType(String principalType) {
- this.principalType = principalType;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MDatabase.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MDatabase.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MDatabase.java
deleted file mode 100644
index c5169f2..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MDatabase.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- *
- */
-package org.apache.hadoop.hive.metastore.model;
-
-import java.util.Map;
-
-/**
- * Storage Class representing the Hive MDatabase in a rdbms
- *
- */
-public class MDatabase {
- private String name;
- private String locationUri;
- private String description;
- private Map<String, String> parameters;
- private String ownerName;
- private String ownerType;
-
- /**
- * Default construction to keep jpox/jdo happy
- */
- public MDatabase() {}
-
- /**
- * To create a database object
- * @param name of the database
- * @param locationUri Location of the database in the warehouse
- * @param description Comment describing the database
- */
- public MDatabase(String name, String locationUri, String description,
- Map<String, String> parameters) {
- this.name = name;
- this.locationUri = locationUri;
- this.description = description;
- this.parameters = parameters;
- }
-
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
-
- /**
- * @param name the name to set
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * @return the location_uri
- */
- public String getLocationUri() {
- return locationUri;
- }
-
- /**
- * @param locationUri the locationUri to set
- */
- public void setLocationUri(String locationUri) {
- this.locationUri = locationUri;
- }
-
- /**
- * @return the description
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @param description the description to set
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
- /**
- * @return the parameters mapping.
- */
- public Map<String, String> getParameters() {
- return parameters;
- }
-
- /**
- * @param parameters the parameters mapping.
- */
- public void setParameters(Map<String, String> parameters) {
- this.parameters = parameters;
- }
-
- public String getOwnerName() {
- return ownerName;
- }
-
- public void setOwnerName(String ownerName) {
- this.ownerName = ownerName;
- }
-
- public String getOwnerType() {
- return ownerType;
- }
-
- public void setOwnerType(String ownerType) {
- this.ownerType = ownerType;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MDelegationToken.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MDelegationToken.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MDelegationToken.java
deleted file mode 100644
index 613469c..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MDelegationToken.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-public class MDelegationToken {
-
- private String tokenStr;
- private String tokenIdentifier;
-
- public MDelegationToken(String tokenIdentifier, String tokenStr) {
- super();
- this.tokenStr = tokenStr;
- this.tokenIdentifier = tokenIdentifier;
- }
-
- public String getTokenStr() {
- return tokenStr;
- }
- public void setTokenStr(String tokenStr) {
- this.tokenStr = tokenStr;
- }
- public String getTokenIdentifier() {
- return tokenIdentifier;
- }
- public void setTokenIdentifier(String tokenIdentifier) {
- this.tokenIdentifier = tokenIdentifier;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MFieldSchema.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MFieldSchema.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MFieldSchema.java
deleted file mode 100644
index bb64dc1..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MFieldSchema.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- *
- */
-package org.apache.hadoop.hive.metastore.model;
-
-/**
- * Represent a column or a type of a table or object
- */
-public class MFieldSchema {
- private String name;
- private String type;
- private String comment;
- public MFieldSchema() {}
-
- /**
- * @param comment
- * @param name
- * @param type
- */
- public MFieldSchema(String name, String type, String comment) {
- this.comment = comment;
- this.name = name;
- this.type = type;
- }
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
- /**
- * @param name the name to set
- */
- public void setName(String name) {
- this.name = name;
- }
- /**
- * @return the comment
- */
- public String getComment() {
- return comment;
- }
- /**
- * @param comment the comment to set
- */
- public void setComment(String comment) {
- this.comment = comment;
- }
- /**
- * @return the type
- */
- public String getType() {
- return type;
- }
- /**
- * @param field the type to set
- */
- public void setType(String field) {
- this.type = field;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MFunction.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MFunction.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MFunction.java
deleted file mode 100644
index 59dbc49..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MFunction.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-import org.apache.hadoop.hive.metastore.api.PrincipalType;
-import java.util.List;
-
-public class MFunction {
-
- private String functionName;
- private MDatabase database;
- private String className;
- private String ownerName;
- private String ownerType;
- private int createTime;
- private int functionType;
- private List<MResourceUri> resourceUris;
-
- public MFunction() {
- }
-
- public MFunction(String functionName,
- MDatabase database,
- String className,
- String ownerName,
- String ownerType,
- int createTime,
- int functionType,
- List<MResourceUri> resourceUris) {
- this.setFunctionName(functionName);
- this.setDatabase(database);
- this.setFunctionType(functionType);
- this.setClassName(className);
- this.setOwnerName(ownerName);
- this.setOwnerType(ownerType);
- this.setCreateTime(createTime);
- this.setResourceUris(resourceUris);
- }
-
- public String getFunctionName() {
- return functionName;
- }
-
- public void setFunctionName(String functionName) {
- this.functionName = functionName;
- }
-
- public MDatabase getDatabase() {
- return database;
- }
-
- public void setDatabase(MDatabase database) {
- this.database = database;
- }
-
- public String getClassName() {
- return className;
- }
-
- public void setClassName(String className) {
- this.className = className;
- }
-
- public String getOwnerName() {
- return ownerName;
- }
-
- public void setOwnerName(String owner) {
- this.ownerName = owner;
- }
-
- public String getOwnerType() {
- return ownerType;
- }
-
- public void setOwnerType(String ownerType) {
- this.ownerType = ownerType;
- }
-
- public int getCreateTime() {
- return createTime;
- }
-
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- public int getFunctionType() {
- return functionType;
- }
-
- public void setFunctionType(int functionType) {
- this.functionType = functionType;
- }
-
- public List<MResourceUri> getResourceUris() {
- return resourceUris;
- }
-
- public void setResourceUris(List<MResourceUri> resourceUris) {
- this.resourceUris = resourceUris;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java
deleted file mode 100644
index 1dbe3a4..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-/**
- * User global level privileges
- */
-public class MGlobalPrivilege {
-
- //principal name, can be a user, group, or role
- private String principalName;
-
- private String principalType;
-
- private String privilege;
-
- private int createTime;
-
- private String grantor;
-
- private String grantorType;
-
- private boolean grantOption;
-
- public MGlobalPrivilege() {
- super();
- }
-
- public MGlobalPrivilege(String userName, String principalType,
- String dbPrivilege, int createTime, String grantor, String grantorType,
- boolean grantOption) {
- super();
- this.principalName = userName;
- this.principalType = principalType;
- this.privilege = dbPrivilege;
- this.createTime = createTime;
- this.grantor = grantor;
- this.grantorType = grantorType;
- this.grantOption = grantOption;
- }
-
- /**
- * @return a set of global privileges granted to this user
- */
- public String getPrivilege() {
- return privilege;
- }
-
- /**
- * @param dbPrivilege set of global privileges to user
- */
- public void setPrivilege(String dbPrivilege) {
- this.privilege = dbPrivilege;
- }
-
- public String getPrincipalName() {
- return principalName;
- }
-
- public void setPrincipalName(String principalName) {
- this.principalName = principalName;
- }
-
- public int getCreateTime() {
- return createTime;
- }
-
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- public String getGrantor() {
- return grantor;
- }
-
- public void setGrantor(String grantor) {
- this.grantor = grantor;
- }
-
- public boolean getGrantOption() {
- return grantOption;
- }
-
- public void setGrantOption(boolean grantOption) {
- this.grantOption = grantOption;
- }
-
- public String getPrincipalType() {
- return principalType;
- }
-
- public void setPrincipalType(String principalType) {
- this.principalType = principalType;
- }
-
- public String getGrantorType() {
- return grantorType;
- }
-
- public void setGrantorType(String grantorType) {
- this.grantorType = grantorType;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MIndex.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MIndex.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MIndex.java
deleted file mode 100644
index c9f1149..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MIndex.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-import java.util.Map;
-
-/**
- * Represents hive's index definition.
- */
-public class MIndex {
-
- private String indexName;
- private MTable origTable;
- private int createTime;
- private int lastAccessTime;
- private Map<String, String> parameters;
- private MTable indexTable;
- private MStorageDescriptor sd;
- private String indexHandlerClass;
- private boolean deferredRebuild;
-
- public MIndex() {}
-
-/**
- * @param indexName
- * @param baseTable
- * @param createTime
- * @param lastAccessTime
- * @param parameters
- * @param indexTable
- * @param sd
- * @param indexHandlerClass
- * @param deferredRebuild
- */
- public MIndex(String indexName, MTable baseTable, int createTime,
- int lastAccessTime, Map<String, String> parameters, MTable indexTable,
- MStorageDescriptor sd, String indexHandlerClass, boolean deferredRebuild) {
- super();
- this.indexName = indexName;
- this.origTable = baseTable;
- this.createTime = createTime;
- this.lastAccessTime = lastAccessTime;
- this.parameters = parameters;
- this.indexTable = indexTable;
- this.sd = sd;
- this.indexHandlerClass = indexHandlerClass;
- this.deferredRebuild = deferredRebuild;
- }
-
-
-
- /**
- * @return index name
- */
- public String getIndexName() {
- return indexName;
- }
-
- /**
- * @param indexName index name
- */
- public void setIndexName(String indexName) {
- this.indexName = indexName;
- }
-
- /**
- * @return create time
- */
- public int getCreateTime() {
- return createTime;
- }
-
- /**
- * @param createTime create time
- */
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- /**
- * @return last access time
- */
- public int getLastAccessTime() {
- return lastAccessTime;
- }
-
- /**
- * @param lastAccessTime last access time
- */
- public void setLastAccessTime(int lastAccessTime) {
- this.lastAccessTime = lastAccessTime;
- }
-
- /**
- * @return parameters
- */
- public Map<String, String> getParameters() {
- return parameters;
- }
-
- /**
- * @param parameters parameters
- */
- public void setParameters(Map<String, String> parameters) {
- this.parameters = parameters;
- }
-
- /**
- * @return original table
- */
- public MTable getOrigTable() {
- return origTable;
- }
-
- /**
- * @param origTable
- */
- public void setOrigTable(MTable origTable) {
- this.origTable = origTable;
- }
-
- /**
- * @return index table
- */
- public MTable getIndexTable() {
- return indexTable;
- }
-
- /**
- * @param indexTable
- */
- public void setIndexTable(MTable indexTable) {
- this.indexTable = indexTable;
- }
-
- /**
- * @return storage descriptor
- */
- public MStorageDescriptor getSd() {
- return sd;
- }
-
- /**
- * @param sd
- */
- public void setSd(MStorageDescriptor sd) {
- this.sd = sd;
- }
-
- /**
- * @return indexHandlerClass
- */
- public String getIndexHandlerClass() {
- return indexHandlerClass;
- }
-
- /**
- * @param indexHandlerClass
- */
- public void setIndexHandlerClass(String indexHandlerClass) {
- this.indexHandlerClass = indexHandlerClass;
- }
-
- /**
- * @return auto rebuild
- */
- public boolean isDeferredRebuild() {
- return deferredRebuild;
- }
-
- /**
- * @return auto rebuild
- */
- public boolean getDeferredRebuild() {
- return deferredRebuild;
- }
-
- /**
- * @param deferredRebuild
- */
- public void setDeferredRebuild(boolean deferredRebuild) {
- this.deferredRebuild = deferredRebuild;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MMasterKey.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MMasterKey.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MMasterKey.java
deleted file mode 100644
index 6b5c221..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MMasterKey.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-public class MMasterKey {
-
- public MMasterKey(int keyId, String masterKey) {
- this.keyId = keyId;
- this.masterKey = masterKey;
- }
-
- private int keyId;
- private String masterKey;
-
- public MMasterKey(String masterKey) {
- this.masterKey = masterKey;
- }
-
- public MMasterKey(int keyId) {
- this.keyId = keyId;
- }
-
- public String getMasterKey() {
- return masterKey;
- }
-
- public void setMasterKey(String masterKey) {
- this.masterKey = masterKey;
- }
-
- public int getKeyId() {
- return keyId;
- }
-
- public void setKeyId(int keyId) {
- this.keyId = keyId;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MMetastoreDBProperties.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MMetastoreDBProperties.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MMetastoreDBProperties.java
deleted file mode 100644
index c0a2485..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MMetastoreDBProperties.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hive.metastore.model;
-
-public class MMetastoreDBProperties {
- private String propertyKey;
- private String propertyValue;
- private String description;
-
- public MMetastoreDBProperties() {}
-
- public MMetastoreDBProperties(String propertykey, String propertyValue, String description) {
- this.propertyKey = propertykey;
- this.propertyValue = propertyValue;
- this.description = description;
- }
-
- public String getPropertykey() {
- return propertyKey;
- }
-
- public void setPropertykey(String propertykey) {
- this.propertyKey = propertykey;
- }
-
- public String getPropertyValue() {
- return propertyValue;
- }
-
- public void setPropertyValue(String propertyValue) {
- this.propertyValue = propertyValue;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MNotificationLog.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MNotificationLog.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MNotificationLog.java
deleted file mode 100644
index d3a166f..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MNotificationLog.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hive.metastore.model;
-
-public class MNotificationLog {
-
- private long eventId; // This is not the datanucleus id, but the id assigned by the sequence
- private int eventTime;
- private String eventType;
- private String dbName;
- private String tableName;
- private String message;
- private String messageFormat;
-
- public MNotificationLog() {
- }
-
- public MNotificationLog(int eventId, String eventType, String dbName, String tableName,
- String message) {
- this.eventId = eventId;
- this.eventType = eventType;
- this.dbName = dbName;
- this.tableName = tableName;
- this.message = message;
- }
-
- public void setEventId(long eventId) {
- this.eventId = eventId;
- }
-
- public long getEventId() {
- return eventId;
-
- }
-
- public int getEventTime() {
- return eventTime;
- }
-
- public void setEventTime(int eventTime) {
- this.eventTime = eventTime;
- }
-
- public String getEventType() {
- return eventType;
- }
-
- public void setEventType(String eventType) {
- this.eventType = eventType;
- }
-
- public String getDbName() {
- return dbName;
- }
-
- public void setDbName(String dbName) {
- this.dbName = dbName;
- }
-
- public String getTableName() {
- return tableName;
- }
-
- public void setTableName(String tableName) {
- this.tableName = tableName;
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public String getMessageFormat() {
- return messageFormat;
- }
-
- public void setMessageFormat(String messageFormat) {
- this.messageFormat = messageFormat;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MNotificationNextId.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MNotificationNextId.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MNotificationNextId.java
deleted file mode 100644
index ef15848..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MNotificationNextId.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hive.metastore.model;
-
-public class MNotificationNextId {
-
- private long nextEventId;
-
- public MNotificationNextId() {
- }
-
- public MNotificationNextId(long nextEventId) {
- this.nextEventId = nextEventId;
- }
-
- public long getNextEventId() {
- return nextEventId;
- }
-
- public void setNextEventId(long nextEventId) {
- this.nextEventId = nextEventId;
- }
-
- public void incrementEventId() {
- nextEventId++;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MOrder.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MOrder.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MOrder.java
deleted file mode 100644
index 732c278..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MOrder.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-public class MOrder {
- private String col;
- private int order;
-
- /**
- * @param col
- * @param order
- */
- public MOrder(String col, int order) {
- this.col = col;
- this.order = order;
- }
-
- /**
- * @return the col
- */
- public String getCol() {
- return col;
- }
-
- /**
- * @param col the col to set
- */
- public void setCol(String col) {
- this.col = col;
- }
-
- /**
- * @return the order
- */
- public int getOrder() {
- return order;
- }
-
- /**
- * @param order the order to set
- */
- public void setOrder(int order) {
- this.order = order;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartition.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartition.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartition.java
deleted file mode 100644
index 4aef5ac..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartition.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-import java.util.List;
-import java.util.Map;
-
-public class MPartition {
-
- private String partitionName; // partitionname ==> (key=value/)*(key=value)
- private MTable table;
- private List<String> values;
- private int createTime;
- private int lastAccessTime;
- private MStorageDescriptor sd;
- private Map<String, String> parameters;
-
-
- public MPartition() {}
-
- /**
- * @param partitionName
- * @param table
- * @param values
- * @param createTime
- * @param lastAccessTime
- * @param sd
- * @param parameters
- */
- public MPartition(String partitionName, MTable table, List<String> values, int createTime,
- int lastAccessTime, MStorageDescriptor sd, Map<String, String> parameters) {
- this.partitionName = partitionName;
- this.table = table;
- this.values = values;
- this.createTime = createTime;
- this.lastAccessTime = lastAccessTime;
- this.sd = sd;
- this.parameters = parameters;
- }
-
- /**
- * @return the lastAccessTime
- */
- public int getLastAccessTime() {
- return lastAccessTime;
- }
-
- /**
- * @param lastAccessTime the lastAccessTime to set
- */
- public void setLastAccessTime(int lastAccessTime) {
- this.lastAccessTime = lastAccessTime;
- }
-
- /**
- * @return the values
- */
- public List<String> getValues() {
- return values;
- }
-
- /**
- * @param values the values to set
- */
- public void setValues(List<String> values) {
- this.values = values;
- }
-
- /**
- * @return the table
- */
- public MTable getTable() {
- return table;
- }
-
- /**
- * @param table the table to set
- */
- public void setTable(MTable table) {
- this.table = table;
- }
-
- /**
- * @return the sd
- */
- public MStorageDescriptor getSd() {
- return sd;
- }
-
- /**
- * @param sd the sd to set
- */
- public void setSd(MStorageDescriptor sd) {
- this.sd = sd;
- }
-
- /**
- * @return the parameters
- */
- public Map<String, String> getParameters() {
- return parameters;
- }
-
- /**
- * @param parameters the parameters to set
- */
- public void setParameters(Map<String, String> parameters) {
- this.parameters = parameters;
- }
-
- /**
- * @return the partitionName
- */
- public String getPartitionName() {
- return partitionName;
- }
-
- /**
- * @param partitionName the partitionName to set
- */
- public void setPartitionName(String partitionName) {
- this.partitionName = partitionName;
- }
-
- /**
- * @return the createTime
- */
- public int getCreateTime() {
- return createTime;
- }
-
- /**
- * @param createTime the createTime to set
- */
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java
deleted file mode 100644
index 555222b..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-
-public class MPartitionColumnPrivilege {
-
- private String principalName;
-
- private String principalType;
-
- private MPartition partition;
-
- private String columnName;
-
- private String privilege;
-
- private int createTime;
-
- private String grantor;
-
- private String grantorType;
-
- private boolean grantOption;
-
- public MPartitionColumnPrivilege() {
- }
-
- /**
- * @param principalName
- * @param principalType
- * @param partition
- * @param columnName
- * @param privileges
- * @param createTime
- * @param grantor
- * @param grantorType
- * @param grantOption
- */
- public MPartitionColumnPrivilege(String principalName, String principalType,
- MPartition partition, String columnName, String privileges, int createTime,
- String grantor, String grantorType, boolean grantOption) {
- super();
- this.principalName = principalName;
- this.principalType = principalType;
- this.partition = partition;
- this.columnName = columnName;
- this.privilege = privileges;
- this.createTime = createTime;
- this.grantor = grantor;
- this.grantorType = grantorType;
- this.grantOption = grantOption;
- }
-
- /**
- * @return column name
- */
- public String getColumnName() {
- return columnName;
- }
-
- /**
- * @param columnName column name
- */
- public void setColumnName(String columnName) {
- this.columnName = columnName;
- }
-
- /**
- * @return a set of privileges this user/role/group has
- */
- public String getPrivilege() {
- return privilege;
- }
-
- /**
- * @param dbPrivileges a set of privileges this user/role/group has
- */
- public void setPrivilege(String dbPrivileges) {
- this.privilege = dbPrivileges;
- }
-
- /**
- * @return create time
- */
- public int getCreateTime() {
- return createTime;
- }
-
- /**
- * @param createTime create time
- */
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- public String getPrincipalName() {
- return principalName;
- }
-
- public void setPrincipalName(String principalName) {
- this.principalName = principalName;
- }
-
- public MPartition getPartition() {
- return partition;
- }
-
- public void setPartition(MPartition partition) {
- this.partition = partition;
- }
-
- public String getGrantor() {
- return grantor;
- }
-
- public void setGrantor(String grantor) {
- this.grantor = grantor;
- }
-
- public String getGrantorType() {
- return grantorType;
- }
-
- public void setGrantorType(String grantorType) {
- this.grantorType = grantorType;
- }
-
- public boolean getGrantOption() {
- return grantOption;
- }
-
- public void setGrantOption(boolean grantOption) {
- this.grantOption = grantOption;
- }
-
- public String getPrincipalType() {
- return principalType;
- }
-
- public void setPrincipalType(String principalType) {
- this.principalType = principalType;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnStatistics.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnStatistics.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnStatistics.java
deleted file mode 100644
index 20129bb..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionColumnStatistics.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- *
- */
-package org.apache.hadoop.hive.metastore.model;
-
-
-
-/**
- *
- * MPartitionColumnStatistics - Represents Hive's partiton level Column Statistics Description.
- * The fields in this class with the exception of partition are persisted in the metastore.
- * In case of partition, part_id is persisted in its place.
- *
- */
-public class MPartitionColumnStatistics {
-
- private MPartition partition;
-
- private String dbName;
- private String tableName;
- private String partitionName;
- private String colName;
- private String colType;
-
- private Long longLowValue;
- private Long longHighValue;
- private Double doubleLowValue;
- private Double doubleHighValue;
- private String decimalLowValue;
- private String decimalHighValue;
- private Long numNulls;
- private Long numDVs;
- private byte[] bitVector;
- private Double avgColLen;
- private Long maxColLen;
- private Long numTrues;
- private Long numFalses;
- private long lastAnalyzed;
-
- public MPartitionColumnStatistics() {}
-
- public String getTableName() {
- return tableName;
- }
-
- public void setTableName(String tableName) {
- this.tableName = tableName;
- }
-
- public String getColName() {
- return colName;
- }
-
- public void setColName(String colName) {
- this.colName = colName;
- }
-
- public Long getNumNulls() {
- return numNulls;
- }
-
- public void setNumNulls(long numNulls) {
- this.numNulls = numNulls;
- }
-
- public Long getNumDVs() {
- return numDVs;
- }
-
- public void setNumDVs(long numDVs) {
- this.numDVs = numDVs;
- }
-
- public Double getAvgColLen() {
- return avgColLen;
- }
-
- public void setAvgColLen(double avgColLen) {
- this.avgColLen = avgColLen;
- }
-
- public Long getMaxColLen() {
- return maxColLen;
- }
-
- public void setMaxColLen(long maxColLen) {
- this.maxColLen = maxColLen;
- }
-
- public Long getNumTrues() {
- return numTrues;
- }
-
- public void setNumTrues(long numTrues) {
- this.numTrues = numTrues;
- }
-
- public Long getNumFalses() {
- return numFalses;
- }
-
- public void setNumFalses(long numFalses) {
- this.numFalses = numFalses;
- }
-
- public long getLastAnalyzed() {
- return lastAnalyzed;
- }
-
- public void setLastAnalyzed(long lastAnalyzed) {
- this.lastAnalyzed = lastAnalyzed;
- }
-
- public String getDbName() {
- return dbName;
- }
-
- public void setDbName(String dbName) {
- this.dbName = dbName;
- }
-
- public MPartition getPartition() {
- return partition;
- }
-
- public void setPartition(MPartition partition) {
- this.partition = partition;
- }
-
- public String getPartitionName() {
- return partitionName;
- }
-
- public void setPartitionName(String partitionName) {
- this.partitionName = partitionName;
- }
-
- public String getColType() {
- return colType;
- }
-
- public void setColType(String colType) {
- this.colType = colType;
- }
-
- public void setBooleanStats(Long numTrues, Long numFalses, Long numNulls) {
- this.numTrues = numTrues;
- this.numFalses = numFalses;
- this.numNulls = numNulls;
- }
-
- public void setLongStats(Long numNulls, Long numNDVs, byte[] bitVector, Long lowValue, Long highValue) {
- this.numNulls = numNulls;
- this.numDVs = numNDVs;
- this.bitVector = bitVector;
- this.longLowValue = lowValue;
- this.longHighValue = highValue;
- }
-
- public void setDoubleStats(Long numNulls, Long numNDVs, byte[] bitVector, Double lowValue, Double highValue) {
- this.numNulls = numNulls;
- this.numDVs = numNDVs;
- this.bitVector = bitVector;
- this.doubleLowValue = lowValue;
- this.doubleHighValue = highValue;
- }
-
- public void setDecimalStats(
- Long numNulls, Long numNDVs, byte[] bitVector, String lowValue, String highValue) {
- this.numNulls = numNulls;
- this.numDVs = numNDVs;
- this.bitVector = bitVector;
- this.decimalLowValue = lowValue;
- this.decimalHighValue = highValue;
- }
-
- public void setStringStats(Long numNulls, Long numNDVs, byte[] bitVector, Long maxColLen, Double avgColLen) {
- this.numNulls = numNulls;
- this.numDVs = numNDVs;
- this.bitVector = bitVector;
- this.maxColLen = maxColLen;
- this.avgColLen = avgColLen;
- }
-
- public void setBinaryStats(Long numNulls, Long maxColLen, Double avgColLen) {
- this.numNulls = numNulls;
- this.maxColLen = maxColLen;
- this.avgColLen = avgColLen;
- }
-
- public void setDateStats(Long numNulls, Long numNDVs, byte[] bitVector, Long lowValue, Long highValue) {
- this.numNulls = numNulls;
- this.numDVs = numNDVs;
- this.bitVector = bitVector;
- this.longLowValue = lowValue;
- this.longHighValue = highValue;
- }
-
- public Long getLongLowValue() {
- return longLowValue;
- }
-
- public void setLongLowValue(Long longLowValue) {
- this.longLowValue = longLowValue;
- }
-
- public Long getLongHighValue() {
- return longHighValue;
- }
-
- public void setLongHighValue(Long longHighValue) {
- this.longHighValue = longHighValue;
- }
-
- public Double getDoubleLowValue() {
- return doubleLowValue;
- }
-
- public void setDoubleLowValue(Double doubleLowValue) {
- this.doubleLowValue = doubleLowValue;
- }
-
- public Double getDoubleHighValue() {
- return doubleHighValue;
- }
-
- public void setDoubleHighValue(Double doubleHighValue) {
- this.doubleHighValue = doubleHighValue;
- }
-
- public String getDecimalLowValue() {
- return decimalLowValue;
- }
-
- public void setDecimalLowValue(String decimalLowValue) {
- this.decimalLowValue = decimalLowValue;
- }
-
- public String getDecimalHighValue() {
- return decimalHighValue;
- }
-
- public void setDecimalHighValue(String decimalHighValue) {
- this.decimalHighValue = decimalHighValue;
- }
-
- public byte[] getBitVector() {
- return bitVector;
- }
-
- public void setBitVector(byte[] bitVector) {
- this.bitVector = bitVector;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionEvent.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionEvent.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionEvent.java
deleted file mode 100644
index 266acd0..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionEvent.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-
-public class MPartitionEvent {
-
- private String dbName;
-
- private String tblName;
-
- private String partName;
-
- private long eventTime;
-
- private int eventType;
-
- public MPartitionEvent(String dbName, String tblName, String partitionName, int eventType) {
- super();
- this.dbName = dbName;
- this.tblName = tblName;
- this.partName = partitionName;
- this.eventType = eventType;
- this.eventTime = System.currentTimeMillis();
- }
-
- public MPartitionEvent() {}
-
- /**
- * @param dbName the dbName to set
- */
- public void setDbName(String dbName) {
- this.dbName = dbName;
- }
-
- /**
- * @param tblName the tblName to set
- */
- public void setTblName(String tblName) {
- this.tblName = tblName;
- }
-
- /**
- * @param partName the partSpec to set
- */
- public void setPartName(String partName) {
- this.partName = partName;
- }
-
- /**
- * @param createTime the eventTime to set
- */
- public void setEventTime(long createTime) {
- this.eventTime = createTime;
- }
-
- /**
- * @param eventType the EventType to set
- */
- public void setEventType(int eventType) {
- this.eventType = eventType;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return "MPartitionEvent [dbName=" + dbName + ", tblName=" + tblName + ", partName=" + partName
- + ", eventTime=" + eventTime + ", EventType=" + eventType + "]";
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionPrivilege.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionPrivilege.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionPrivilege.java
deleted file mode 100644
index 2af0d00..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPartitionPrivilege.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-public class MPartitionPrivilege {
-
- private String principalName;
-
- private String principalType;
-
- private MPartition partition;
-
- private String privilege;
-
- private int createTime;
-
- private String grantor;
-
- private String grantorType;
-
- private boolean grantOption;
-
- public MPartitionPrivilege() {
- }
-
- public MPartitionPrivilege(String principalName, String principalType,
- MPartition partition, String privilege, int createTime,
- String grantor, String grantorType, boolean grantOption) {
- super();
- this.principalName = principalName;
- this.principalType = principalType;
- this.partition = partition;
- this.privilege = privilege;
- this.createTime = createTime;
- this.grantor = grantor;
- this.grantorType = grantorType;
- this.grantOption = grantOption;
- }
-
- public String getPrincipalName() {
- return principalName;
- }
-
- public void setPrincipalName(String principalName) {
- this.principalName = principalName;
- }
-
-
- /**
- * @return a set of privileges this user/role/group has
- */
- public String getPrivilege() {
- return privilege;
- }
-
- /**
- * @param dbPrivilege a set of privileges this user/role/group has
- */
- public void setPrivilege(String dbPrivilege) {
- this.privilege = dbPrivilege;
- }
-
- /**
- * @return create time
- */
- public int getCreateTime() {
- return createTime;
- }
-
- /**
- * @param createTime create time
- */
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- /**
- * @return the grantor
- */
- public String getGrantor() {
- return grantor;
- }
-
- /**
- * @param grantor
- */
- public void setGrantor(String grantor) {
- this.grantor = grantor;
- }
-
- public String getPrincipalType() {
- return principalType;
- }
-
- public void setPrincipalType(String principalType) {
- this.principalType = principalType;
- }
-
- public MPartition getPartition() {
- return partition;
- }
-
- public void setPartition(MPartition partition) {
- this.partition = partition;
- }
-
- public boolean getGrantOption() {
- return grantOption;
- }
-
- public void setGrantOption(boolean grantOption) {
- this.grantOption = grantOption;
- }
-
- public String getGrantorType() {
- return grantorType;
- }
-
- public void setGrantorType(String grantorType) {
- this.grantorType = grantorType;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPrincipalDesc.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPrincipalDesc.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPrincipalDesc.java
deleted file mode 100644
index 42062b1..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MPrincipalDesc.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-public class MPrincipalDesc {
-
- private String name;
- private String type;
-
- public MPrincipalDesc() {}
-
- public MPrincipalDesc(String name, String type) {
- this.name = name;
- this.type = type;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- @Override
- public int hashCode() {
- return type.hashCode() + name.hashCode();
- }
-
- @Override
- public boolean equals(Object object) {
- MPrincipalDesc another = (MPrincipalDesc) object;
- return type.equals(another.type) && name.equals(another.name);
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MResourceUri.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MResourceUri.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MResourceUri.java
deleted file mode 100644
index 0998cf7..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MResourceUri.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-public class MResourceUri {
- private int resourceType;
- private String uri;
-
- public MResourceUri() {
- }
-
- public MResourceUri(int resourceType, String uri) {
- super();
- this.resourceType = resourceType;
- this.uri = uri;
- }
-
- public int getResourceType() {
- return resourceType;
- }
-
- public void setResourceType(int resourceType) {
- this.resourceType = resourceType;
- }
-
- public String getUri() {
- return uri;
- }
-
- public void setUri(String uri) {
- this.uri = uri;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MRole.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MRole.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MRole.java
deleted file mode 100644
index ce0f472..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MRole.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-public class MRole {
-
- private String roleName;
-
- private int createTime;
-
- private String ownerName;
-
- public MRole() {
- }
-
- public MRole(String roleName, int createTime, String ownerName) {
- super();
- this.roleName = roleName;
- this.createTime = createTime;
- this.ownerName = ownerName;
- }
-
- /**
- * @return role name
- */
- public String getRoleName() {
- return roleName;
- }
-
- /**
- * @param roleName
- */
- public void setRoleName(String roleName) {
- this.roleName = roleName;
- }
-
- /**
- * @return create time
- */
- public int getCreateTime() {
- return createTime;
- }
-
- /**
- * @param createTime
- * role create time
- */
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- /**
- * @return the principal name who created this role
- */
- public String getOwnerName() {
- return ownerName;
- }
-
- public void setOwnerName(String ownerName) {
- this.ownerName = ownerName;
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MRoleMap.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MRoleMap.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MRoleMap.java
deleted file mode 100644
index ef8e17c..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MRoleMap.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-public class MRoleMap {
-
- private String principalName;
-
- private String principalType;
-
- private MRole role;
-
- private int addTime;
-
- private String grantor;
-
- private String grantorType;
-
- private boolean grantOption;
-
- public MRoleMap() {
- }
-
- public MRoleMap(String principalName, String principalType, MRole role,
- int addTime, String grantor, String grantorType, boolean grantOption) {
- super();
- this.principalName = principalName;
- this.principalType = principalType;
- this.role = role;
- this.addTime = addTime;
- this.grantor = grantor;
- this.grantorType = grantorType;
- this.grantOption = grantOption;
- }
-
- /**
- * @return principal name
- */
- public String getPrincipalName() {
- return principalName;
- }
-
- /**
- * @param userName principal name
- */
- public void setPrincipalName(String userName) {
- this.principalName = userName;
- }
-
- public String getPrincipalType() {
- return principalType;
- }
-
- public void setPrincipalType(String principalType) {
- this.principalType = principalType;
- }
-
- /**
- * @return add time
- */
- public int getAddTime() {
- return addTime;
- }
-
- /**
- * @param addTime
- */
- public void setAddTime(int addTime) {
- this.addTime = addTime;
- }
-
- public MRole getRole() {
- return role;
- }
-
- public void setRole(MRole role) {
- this.role = role;
- }
-
- public boolean getGrantOption() {
- return grantOption;
- }
-
- public void setGrantOption(boolean grantOption) {
- this.grantOption = grantOption;
- }
-
- public String getGrantor() {
- return grantor;
- }
-
- public void setGrantor(String grantor) {
- this.grantor = grantor;
- }
-
- public String getGrantorType() {
- return grantorType;
- }
-
- public void setGrantorType(String grantorType) {
- this.grantorType = grantorType;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MSerDeInfo.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MSerDeInfo.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MSerDeInfo.java
deleted file mode 100644
index 2c16e61..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MSerDeInfo.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-import java.util.Map;
-
-public class MSerDeInfo {
- private String name;
- private String serializationLib;
- private Map<String, String> parameters;
-
- /**
- * @param name
- * @param serializationLib
- * @param parameters
- */
- public MSerDeInfo(String name, String serializationLib, Map<String, String> parameters) {
- this.name = name;
- this.serializationLib = serializationLib;
- this.parameters = parameters;
- }
-
- /**
- * @return the serializationLib
- */
- public String getSerializationLib() {
- return serializationLib;
- }
-
- /**
- * @param serializationLib the serializationLib to set
- */
- public void setSerializationLib(String serializationLib) {
- this.serializationLib = serializationLib;
- }
-
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
-
- /**
- * @param name the name to set
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * @return the parameters
- */
- public Map<String, String> getParameters() {
- return parameters;
- }
-
- /**
- * @param parameters the parameters to set
- */
- public void setParameters(Map<String, String> parameters) {
- this.parameters = parameters;
- }
-
-}
[2/4] hive git commit: HIVE-17224 Move JDO classes to standalone
metastore (Alan Gates, reviewed by Vihang Karajgaonkar)
Posted by ga...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java
new file mode 100644
index 0000000..4550fb2
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MDBPrivilege.java
@@ -0,0 +1,132 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+public class MDBPrivilege {
+
+ private String principalName;
+
+ private String principalType;
+
+ private MDatabase database;
+
+ private int createTime;
+
+ private String privilege;
+
+ private String grantor;
+
+ private String grantorType;
+
+ private boolean grantOption;
+
+ public MDBPrivilege() {
+ }
+
+ public MDBPrivilege(String principalName, String principalType,
+ MDatabase database, String dbPrivileges, int createTime, String grantor,
+ String grantorType, boolean grantOption) {
+ super();
+ this.principalName = principalName;
+ this.principalType = principalType;
+ this.database = database;
+ this.privilege = dbPrivileges;
+ this.createTime = createTime;
+ this.grantorType = grantorType;
+ this.grantOption = grantOption;
+ this.grantor = grantor;
+ }
+
+ /**
+ * @return user name, role name, or group name
+ */
+ public String getPrincipalName() {
+ return principalName;
+ }
+
+ /**
+ * @param userName user/role/group name
+ */
+ public void setPrincipalName(String userName) {
+ this.principalName = userName;
+ }
+
+ /**
+ * @return a set of privileges this user/role/group has
+ */
+ public String getPrivilege() {
+ return privilege;
+ }
+
+ /**
+ * @param dbPrivilege a set of privileges this user/role/group has
+ */
+ public void setPrivilege(String dbPrivilege) {
+ this.privilege = dbPrivilege;
+ }
+
+ public MDatabase getDatabase() {
+ return database;
+ }
+
+ public void setDatabase(MDatabase database) {
+ this.database = database;
+ }
+
+ public int getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(int createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getGrantor() {
+ return grantor;
+ }
+
+ public void setGrantor(String grantor) {
+ this.grantor = grantor;
+ }
+
+ public String getGrantorType() {
+ return grantorType;
+ }
+
+ public void setGrantorType(String grantorType) {
+ this.grantorType = grantorType;
+ }
+
+ public boolean getGrantOption() {
+ return grantOption;
+ }
+
+ public void setGrantOption(boolean grantOption) {
+ this.grantOption = grantOption;
+ }
+
+ public String getPrincipalType() {
+ return principalType;
+ }
+
+ public void setPrincipalType(String principalType) {
+ this.principalType = principalType;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MDatabase.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MDatabase.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MDatabase.java
new file mode 100644
index 0000000..c5169f2
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MDatabase.java
@@ -0,0 +1,128 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.hadoop.hive.metastore.model;
+
+import java.util.Map;
+
+/**
+ * Storage Class representing the Hive MDatabase in a rdbms
+ *
+ */
+public class MDatabase {
+ private String name;
+ private String locationUri;
+ private String description;
+ private Map<String, String> parameters;
+ private String ownerName;
+ private String ownerType;
+
+ /**
+ * Default construction to keep jpox/jdo happy
+ */
+ public MDatabase() {}
+
+ /**
+ * To create a database object
+ * @param name of the database
+ * @param locationUri Location of the database in the warehouse
+ * @param description Comment describing the database
+ */
+ public MDatabase(String name, String locationUri, String description,
+ Map<String, String> parameters) {
+ this.name = name;
+ this.locationUri = locationUri;
+ this.description = description;
+ this.parameters = parameters;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return the location_uri
+ */
+ public String getLocationUri() {
+ return locationUri;
+ }
+
+ /**
+ * @param locationUri the locationUri to set
+ */
+ public void setLocationUri(String locationUri) {
+ this.locationUri = locationUri;
+ }
+
+ /**
+ * @return the description
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * @param description the description to set
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ /**
+ * @return the parameters mapping.
+ */
+ public Map<String, String> getParameters() {
+ return parameters;
+ }
+
+ /**
+ * @param parameters the parameters mapping.
+ */
+ public void setParameters(Map<String, String> parameters) {
+ this.parameters = parameters;
+ }
+
+ public String getOwnerName() {
+ return ownerName;
+ }
+
+ public void setOwnerName(String ownerName) {
+ this.ownerName = ownerName;
+ }
+
+ public String getOwnerType() {
+ return ownerType;
+ }
+
+ public void setOwnerType(String ownerType) {
+ this.ownerType = ownerType;
+ }
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MDelegationToken.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MDelegationToken.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MDelegationToken.java
new file mode 100644
index 0000000..613469c
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MDelegationToken.java
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+public class MDelegationToken {
+
+ private String tokenStr;
+ private String tokenIdentifier;
+
+ public MDelegationToken(String tokenIdentifier, String tokenStr) {
+ super();
+ this.tokenStr = tokenStr;
+ this.tokenIdentifier = tokenIdentifier;
+ }
+
+ public String getTokenStr() {
+ return tokenStr;
+ }
+ public void setTokenStr(String tokenStr) {
+ this.tokenStr = tokenStr;
+ }
+ public String getTokenIdentifier() {
+ return tokenIdentifier;
+ }
+ public void setTokenIdentifier(String tokenIdentifier) {
+ this.tokenIdentifier = tokenIdentifier;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MFieldSchema.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MFieldSchema.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MFieldSchema.java
new file mode 100644
index 0000000..bb64dc1
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MFieldSchema.java
@@ -0,0 +1,80 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.hadoop.hive.metastore.model;
+
+/**
+ * Represent a column or a type of a table or object
+ */
+public class MFieldSchema {
+ private String name;
+ private String type;
+ private String comment;
+ public MFieldSchema() {}
+
+ /**
+ * @param comment
+ * @param name
+ * @param type
+ */
+ public MFieldSchema(String name, String type, String comment) {
+ this.comment = comment;
+ this.name = name;
+ this.type = type;
+ }
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * @return the comment
+ */
+ public String getComment() {
+ return comment;
+ }
+ /**
+ * @param comment the comment to set
+ */
+ public void setComment(String comment) {
+ this.comment = comment;
+ }
+ /**
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+ /**
+ * @param field the type to set
+ */
+ public void setType(String field) {
+ this.type = field;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MFunction.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MFunction.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MFunction.java
new file mode 100644
index 0000000..59dbc49
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MFunction.java
@@ -0,0 +1,119 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+import org.apache.hadoop.hive.metastore.api.PrincipalType;
+import java.util.List;
+
+public class MFunction {
+
+ private String functionName;
+ private MDatabase database;
+ private String className;
+ private String ownerName;
+ private String ownerType;
+ private int createTime;
+ private int functionType;
+ private List<MResourceUri> resourceUris;
+
+ public MFunction() {
+ }
+
+ public MFunction(String functionName,
+ MDatabase database,
+ String className,
+ String ownerName,
+ String ownerType,
+ int createTime,
+ int functionType,
+ List<MResourceUri> resourceUris) {
+ this.setFunctionName(functionName);
+ this.setDatabase(database);
+ this.setFunctionType(functionType);
+ this.setClassName(className);
+ this.setOwnerName(ownerName);
+ this.setOwnerType(ownerType);
+ this.setCreateTime(createTime);
+ this.setResourceUris(resourceUris);
+ }
+
+ public String getFunctionName() {
+ return functionName;
+ }
+
+ public void setFunctionName(String functionName) {
+ this.functionName = functionName;
+ }
+
+ public MDatabase getDatabase() {
+ return database;
+ }
+
+ public void setDatabase(MDatabase database) {
+ this.database = database;
+ }
+
+ public String getClassName() {
+ return className;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ public String getOwnerName() {
+ return ownerName;
+ }
+
+ public void setOwnerName(String owner) {
+ this.ownerName = owner;
+ }
+
+ public String getOwnerType() {
+ return ownerType;
+ }
+
+ public void setOwnerType(String ownerType) {
+ this.ownerType = ownerType;
+ }
+
+ public int getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(int createTime) {
+ this.createTime = createTime;
+ }
+
+ public int getFunctionType() {
+ return functionType;
+ }
+
+ public void setFunctionType(int functionType) {
+ this.functionType = functionType;
+ }
+
+ public List<MResourceUri> getResourceUris() {
+ return resourceUris;
+ }
+
+ public void setResourceUris(List<MResourceUri> resourceUris) {
+ this.resourceUris = resourceUris;
+ }
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java
new file mode 100644
index 0000000..1dbe3a4
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MGlobalPrivilege.java
@@ -0,0 +1,120 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+/**
+ * User global level privileges
+ */
+public class MGlobalPrivilege {
+
+ //principal name, can be a user, group, or role
+ private String principalName;
+
+ private String principalType;
+
+ private String privilege;
+
+ private int createTime;
+
+ private String grantor;
+
+ private String grantorType;
+
+ private boolean grantOption;
+
+ public MGlobalPrivilege() {
+ super();
+ }
+
+ public MGlobalPrivilege(String userName, String principalType,
+ String dbPrivilege, int createTime, String grantor, String grantorType,
+ boolean grantOption) {
+ super();
+ this.principalName = userName;
+ this.principalType = principalType;
+ this.privilege = dbPrivilege;
+ this.createTime = createTime;
+ this.grantor = grantor;
+ this.grantorType = grantorType;
+ this.grantOption = grantOption;
+ }
+
+ /**
+ * @return a set of global privileges granted to this user
+ */
+ public String getPrivilege() {
+ return privilege;
+ }
+
+ /**
+ * @param dbPrivilege set of global privileges to user
+ */
+ public void setPrivilege(String dbPrivilege) {
+ this.privilege = dbPrivilege;
+ }
+
+ public String getPrincipalName() {
+ return principalName;
+ }
+
+ public void setPrincipalName(String principalName) {
+ this.principalName = principalName;
+ }
+
+ public int getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(int createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getGrantor() {
+ return grantor;
+ }
+
+ public void setGrantor(String grantor) {
+ this.grantor = grantor;
+ }
+
+ public boolean getGrantOption() {
+ return grantOption;
+ }
+
+ public void setGrantOption(boolean grantOption) {
+ this.grantOption = grantOption;
+ }
+
+ public String getPrincipalType() {
+ return principalType;
+ }
+
+ public void setPrincipalType(String principalType) {
+ this.principalType = principalType;
+ }
+
+ public String getGrantorType() {
+ return grantorType;
+ }
+
+ public void setGrantorType(String grantorType) {
+ this.grantorType = grantorType;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MIndex.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MIndex.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MIndex.java
new file mode 100644
index 0000000..c9f1149
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MIndex.java
@@ -0,0 +1,200 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+import java.util.Map;
+
+/**
+ * Represents hive's index definition.
+ */
+public class MIndex {
+
+ private String indexName;
+ private MTable origTable;
+ private int createTime;
+ private int lastAccessTime;
+ private Map<String, String> parameters;
+ private MTable indexTable;
+ private MStorageDescriptor sd;
+ private String indexHandlerClass;
+ private boolean deferredRebuild;
+
+ public MIndex() {}
+
+/**
+ * @param indexName
+ * @param baseTable
+ * @param createTime
+ * @param lastAccessTime
+ * @param parameters
+ * @param indexTable
+ * @param sd
+ * @param indexHandlerClass
+ * @param deferredRebuild
+ */
+ public MIndex(String indexName, MTable baseTable, int createTime,
+ int lastAccessTime, Map<String, String> parameters, MTable indexTable,
+ MStorageDescriptor sd, String indexHandlerClass, boolean deferredRebuild) {
+ super();
+ this.indexName = indexName;
+ this.origTable = baseTable;
+ this.createTime = createTime;
+ this.lastAccessTime = lastAccessTime;
+ this.parameters = parameters;
+ this.indexTable = indexTable;
+ this.sd = sd;
+ this.indexHandlerClass = indexHandlerClass;
+ this.deferredRebuild = deferredRebuild;
+ }
+
+
+
+ /**
+ * @return index name
+ */
+ public String getIndexName() {
+ return indexName;
+ }
+
+ /**
+ * @param indexName index name
+ */
+ public void setIndexName(String indexName) {
+ this.indexName = indexName;
+ }
+
+ /**
+ * @return create time
+ */
+ public int getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * @param createTime create time
+ */
+ public void setCreateTime(int createTime) {
+ this.createTime = createTime;
+ }
+
+ /**
+ * @return last access time
+ */
+ public int getLastAccessTime() {
+ return lastAccessTime;
+ }
+
+ /**
+ * @param lastAccessTime last access time
+ */
+ public void setLastAccessTime(int lastAccessTime) {
+ this.lastAccessTime = lastAccessTime;
+ }
+
+ /**
+ * @return parameters
+ */
+ public Map<String, String> getParameters() {
+ return parameters;
+ }
+
+ /**
+ * @param parameters parameters
+ */
+ public void setParameters(Map<String, String> parameters) {
+ this.parameters = parameters;
+ }
+
+ /**
+ * @return original table
+ */
+ public MTable getOrigTable() {
+ return origTable;
+ }
+
+ /**
+ * @param origTable
+ */
+ public void setOrigTable(MTable origTable) {
+ this.origTable = origTable;
+ }
+
+ /**
+ * @return index table
+ */
+ public MTable getIndexTable() {
+ return indexTable;
+ }
+
+ /**
+ * @param indexTable
+ */
+ public void setIndexTable(MTable indexTable) {
+ this.indexTable = indexTable;
+ }
+
+ /**
+ * @return storage descriptor
+ */
+ public MStorageDescriptor getSd() {
+ return sd;
+ }
+
+ /**
+ * @param sd
+ */
+ public void setSd(MStorageDescriptor sd) {
+ this.sd = sd;
+ }
+
+ /**
+ * @return indexHandlerClass
+ */
+ public String getIndexHandlerClass() {
+ return indexHandlerClass;
+ }
+
+ /**
+ * @param indexHandlerClass
+ */
+ public void setIndexHandlerClass(String indexHandlerClass) {
+ this.indexHandlerClass = indexHandlerClass;
+ }
+
+ /**
+ * @return auto rebuild
+ */
+ public boolean isDeferredRebuild() {
+ return deferredRebuild;
+ }
+
+ /**
+ * @return auto rebuild
+ */
+ public boolean getDeferredRebuild() {
+ return deferredRebuild;
+ }
+
+ /**
+ * @param deferredRebuild
+ */
+ public void setDeferredRebuild(boolean deferredRebuild) {
+ this.deferredRebuild = deferredRebuild;
+ }
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MMasterKey.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MMasterKey.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MMasterKey.java
new file mode 100644
index 0000000..6b5c221
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MMasterKey.java
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+public class MMasterKey {
+
+ public MMasterKey(int keyId, String masterKey) {
+ this.keyId = keyId;
+ this.masterKey = masterKey;
+ }
+
+ private int keyId;
+ private String masterKey;
+
+ public MMasterKey(String masterKey) {
+ this.masterKey = masterKey;
+ }
+
+ public MMasterKey(int keyId) {
+ this.keyId = keyId;
+ }
+
+ public String getMasterKey() {
+ return masterKey;
+ }
+
+ public void setMasterKey(String masterKey) {
+ this.masterKey = masterKey;
+ }
+
+ public int getKeyId() {
+ return keyId;
+ }
+
+ public void setKeyId(int keyId) {
+ this.keyId = keyId;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MMetastoreDBProperties.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MMetastoreDBProperties.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MMetastoreDBProperties.java
new file mode 100644
index 0000000..c0a2485
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MMetastoreDBProperties.java
@@ -0,0 +1,56 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.metastore.model;
+
+public class MMetastoreDBProperties {
+ private String propertyKey;
+ private String propertyValue;
+ private String description;
+
+ public MMetastoreDBProperties() {}
+
+ public MMetastoreDBProperties(String propertykey, String propertyValue, String description) {
+ this.propertyKey = propertykey;
+ this.propertyValue = propertyValue;
+ this.description = description;
+ }
+
+ public String getPropertykey() {
+ return propertyKey;
+ }
+
+ public void setPropertykey(String propertykey) {
+ this.propertyKey = propertykey;
+ }
+
+ public String getPropertyValue() {
+ return propertyValue;
+ }
+
+ public void setPropertyValue(String propertyValue) {
+ this.propertyValue = propertyValue;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationLog.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationLog.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationLog.java
new file mode 100644
index 0000000..d3a166f
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationLog.java
@@ -0,0 +1,98 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.metastore.model;
+
+public class MNotificationLog {
+
+ private long eventId; // This is not the datanucleus id, but the id assigned by the sequence
+ private int eventTime;
+ private String eventType;
+ private String dbName;
+ private String tableName;
+ private String message;
+ private String messageFormat;
+
+ public MNotificationLog() {
+ }
+
+ public MNotificationLog(int eventId, String eventType, String dbName, String tableName,
+ String message) {
+ this.eventId = eventId;
+ this.eventType = eventType;
+ this.dbName = dbName;
+ this.tableName = tableName;
+ this.message = message;
+ }
+
+ public void setEventId(long eventId) {
+ this.eventId = eventId;
+ }
+
+ public long getEventId() {
+ return eventId;
+
+ }
+
+ public int getEventTime() {
+ return eventTime;
+ }
+
+ public void setEventTime(int eventTime) {
+ this.eventTime = eventTime;
+ }
+
+ public String getEventType() {
+ return eventType;
+ }
+
+ public void setEventType(String eventType) {
+ this.eventType = eventType;
+ }
+
+ public String getDbName() {
+ return dbName;
+ }
+
+ public void setDbName(String dbName) {
+ this.dbName = dbName;
+ }
+
+ public String getTableName() {
+ return tableName;
+ }
+
+ public void setTableName(String tableName) {
+ this.tableName = tableName;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public String getMessageFormat() {
+ return messageFormat;
+ }
+
+ public void setMessageFormat(String messageFormat) {
+ this.messageFormat = messageFormat;
+ }
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationNextId.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationNextId.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationNextId.java
new file mode 100644
index 0000000..ef15848
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MNotificationNextId.java
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.metastore.model;
+
+public class MNotificationNextId {
+
+ private long nextEventId;
+
+ public MNotificationNextId() {
+ }
+
+ public MNotificationNextId(long nextEventId) {
+ this.nextEventId = nextEventId;
+ }
+
+ public long getNextEventId() {
+ return nextEventId;
+ }
+
+ public void setNextEventId(long nextEventId) {
+ this.nextEventId = nextEventId;
+ }
+
+ public void incrementEventId() {
+ nextEventId++;
+ }
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MOrder.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MOrder.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MOrder.java
new file mode 100644
index 0000000..732c278
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MOrder.java
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+public class MOrder {
+ private String col;
+ private int order;
+
+ /**
+ * @param col
+ * @param order
+ */
+ public MOrder(String col, int order) {
+ this.col = col;
+ this.order = order;
+ }
+
+ /**
+ * @return the col
+ */
+ public String getCol() {
+ return col;
+ }
+
+ /**
+ * @param col the col to set
+ */
+ public void setCol(String col) {
+ this.col = col;
+ }
+
+ /**
+ * @return the order
+ */
+ public int getOrder() {
+ return order;
+ }
+
+ /**
+ * @param order the order to set
+ */
+ public void setOrder(int order) {
+ this.order = order;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartition.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartition.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartition.java
new file mode 100644
index 0000000..4aef5ac
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartition.java
@@ -0,0 +1,155 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class MPartition {
+
+ private String partitionName; // partitionname ==> (key=value/)*(key=value)
+ private MTable table;
+ private List<String> values;
+ private int createTime;
+ private int lastAccessTime;
+ private MStorageDescriptor sd;
+ private Map<String, String> parameters;
+
+
+ public MPartition() {}
+
+ /**
+ * @param partitionName
+ * @param table
+ * @param values
+ * @param createTime
+ * @param lastAccessTime
+ * @param sd
+ * @param parameters
+ */
+ public MPartition(String partitionName, MTable table, List<String> values, int createTime,
+ int lastAccessTime, MStorageDescriptor sd, Map<String, String> parameters) {
+ this.partitionName = partitionName;
+ this.table = table;
+ this.values = values;
+ this.createTime = createTime;
+ this.lastAccessTime = lastAccessTime;
+ this.sd = sd;
+ this.parameters = parameters;
+ }
+
+ /**
+ * @return the lastAccessTime
+ */
+ public int getLastAccessTime() {
+ return lastAccessTime;
+ }
+
+ /**
+ * @param lastAccessTime the lastAccessTime to set
+ */
+ public void setLastAccessTime(int lastAccessTime) {
+ this.lastAccessTime = lastAccessTime;
+ }
+
+ /**
+ * @return the values
+ */
+ public List<String> getValues() {
+ return values;
+ }
+
+ /**
+ * @param values the values to set
+ */
+ public void setValues(List<String> values) {
+ this.values = values;
+ }
+
+ /**
+ * @return the table
+ */
+ public MTable getTable() {
+ return table;
+ }
+
+ /**
+ * @param table the table to set
+ */
+ public void setTable(MTable table) {
+ this.table = table;
+ }
+
+ /**
+ * @return the sd
+ */
+ public MStorageDescriptor getSd() {
+ return sd;
+ }
+
+ /**
+ * @param sd the sd to set
+ */
+ public void setSd(MStorageDescriptor sd) {
+ this.sd = sd;
+ }
+
+ /**
+ * @return the parameters
+ */
+ public Map<String, String> getParameters() {
+ return parameters;
+ }
+
+ /**
+ * @param parameters the parameters to set
+ */
+ public void setParameters(Map<String, String> parameters) {
+ this.parameters = parameters;
+ }
+
+ /**
+ * @return the partitionName
+ */
+ public String getPartitionName() {
+ return partitionName;
+ }
+
+ /**
+ * @param partitionName the partitionName to set
+ */
+ public void setPartitionName(String partitionName) {
+ this.partitionName = partitionName;
+ }
+
+ /**
+ * @return the createTime
+ */
+ public int getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * @param createTime the createTime to set
+ */
+ public void setCreateTime(int createTime) {
+ this.createTime = createTime;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java
new file mode 100644
index 0000000..555222b
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionColumnPrivilege.java
@@ -0,0 +1,161 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+
+public class MPartitionColumnPrivilege {
+
+ private String principalName;
+
+ private String principalType;
+
+ private MPartition partition;
+
+ private String columnName;
+
+ private String privilege;
+
+ private int createTime;
+
+ private String grantor;
+
+ private String grantorType;
+
+ private boolean grantOption;
+
+ public MPartitionColumnPrivilege() {
+ }
+
+ /**
+ * @param principalName
+ * @param principalType
+ * @param partition
+ * @param columnName
+ * @param privileges
+ * @param createTime
+ * @param grantor
+ * @param grantorType
+ * @param grantOption
+ */
+ public MPartitionColumnPrivilege(String principalName, String principalType,
+ MPartition partition, String columnName, String privileges, int createTime,
+ String grantor, String grantorType, boolean grantOption) {
+ super();
+ this.principalName = principalName;
+ this.principalType = principalType;
+ this.partition = partition;
+ this.columnName = columnName;
+ this.privilege = privileges;
+ this.createTime = createTime;
+ this.grantor = grantor;
+ this.grantorType = grantorType;
+ this.grantOption = grantOption;
+ }
+
+ /**
+ * @return column name
+ */
+ public String getColumnName() {
+ return columnName;
+ }
+
+ /**
+ * @param columnName column name
+ */
+ public void setColumnName(String columnName) {
+ this.columnName = columnName;
+ }
+
+ /**
+ * @return a set of privileges this user/role/group has
+ */
+ public String getPrivilege() {
+ return privilege;
+ }
+
+ /**
+ * @param dbPrivileges a set of privileges this user/role/group has
+ */
+ public void setPrivilege(String dbPrivileges) {
+ this.privilege = dbPrivileges;
+ }
+
+ /**
+ * @return create time
+ */
+ public int getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * @param createTime create time
+ */
+ public void setCreateTime(int createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getPrincipalName() {
+ return principalName;
+ }
+
+ public void setPrincipalName(String principalName) {
+ this.principalName = principalName;
+ }
+
+ public MPartition getPartition() {
+ return partition;
+ }
+
+ public void setPartition(MPartition partition) {
+ this.partition = partition;
+ }
+
+ public String getGrantor() {
+ return grantor;
+ }
+
+ public void setGrantor(String grantor) {
+ this.grantor = grantor;
+ }
+
+ public String getGrantorType() {
+ return grantorType;
+ }
+
+ public void setGrantorType(String grantorType) {
+ this.grantorType = grantorType;
+ }
+
+ public boolean getGrantOption() {
+ return grantOption;
+ }
+
+ public void setGrantOption(boolean grantOption) {
+ this.grantOption = grantOption;
+ }
+
+ public String getPrincipalType() {
+ return principalType;
+ }
+
+ public void setPrincipalType(String principalType) {
+ this.principalType = principalType;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionColumnStatistics.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionColumnStatistics.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionColumnStatistics.java
new file mode 100644
index 0000000..20129bb
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionColumnStatistics.java
@@ -0,0 +1,272 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.hadoop.hive.metastore.model;
+
+
+
+/**
+ *
+ * MPartitionColumnStatistics - Represents Hive's partiton level Column Statistics Description.
+ * The fields in this class with the exception of partition are persisted in the metastore.
+ * In case of partition, part_id is persisted in its place.
+ *
+ */
+public class MPartitionColumnStatistics {
+
+ private MPartition partition;
+
+ private String dbName;
+ private String tableName;
+ private String partitionName;
+ private String colName;
+ private String colType;
+
+ private Long longLowValue;
+ private Long longHighValue;
+ private Double doubleLowValue;
+ private Double doubleHighValue;
+ private String decimalLowValue;
+ private String decimalHighValue;
+ private Long numNulls;
+ private Long numDVs;
+ private byte[] bitVector;
+ private Double avgColLen;
+ private Long maxColLen;
+ private Long numTrues;
+ private Long numFalses;
+ private long lastAnalyzed;
+
+ public MPartitionColumnStatistics() {}
+
+ public String getTableName() {
+ return tableName;
+ }
+
+ public void setTableName(String tableName) {
+ this.tableName = tableName;
+ }
+
+ public String getColName() {
+ return colName;
+ }
+
+ public void setColName(String colName) {
+ this.colName = colName;
+ }
+
+ public Long getNumNulls() {
+ return numNulls;
+ }
+
+ public void setNumNulls(long numNulls) {
+ this.numNulls = numNulls;
+ }
+
+ public Long getNumDVs() {
+ return numDVs;
+ }
+
+ public void setNumDVs(long numDVs) {
+ this.numDVs = numDVs;
+ }
+
+ public Double getAvgColLen() {
+ return avgColLen;
+ }
+
+ public void setAvgColLen(double avgColLen) {
+ this.avgColLen = avgColLen;
+ }
+
+ public Long getMaxColLen() {
+ return maxColLen;
+ }
+
+ public void setMaxColLen(long maxColLen) {
+ this.maxColLen = maxColLen;
+ }
+
+ public Long getNumTrues() {
+ return numTrues;
+ }
+
+ public void setNumTrues(long numTrues) {
+ this.numTrues = numTrues;
+ }
+
+ public Long getNumFalses() {
+ return numFalses;
+ }
+
+ public void setNumFalses(long numFalses) {
+ this.numFalses = numFalses;
+ }
+
+ public long getLastAnalyzed() {
+ return lastAnalyzed;
+ }
+
+ public void setLastAnalyzed(long lastAnalyzed) {
+ this.lastAnalyzed = lastAnalyzed;
+ }
+
+ public String getDbName() {
+ return dbName;
+ }
+
+ public void setDbName(String dbName) {
+ this.dbName = dbName;
+ }
+
+ public MPartition getPartition() {
+ return partition;
+ }
+
+ public void setPartition(MPartition partition) {
+ this.partition = partition;
+ }
+
+ public String getPartitionName() {
+ return partitionName;
+ }
+
+ public void setPartitionName(String partitionName) {
+ this.partitionName = partitionName;
+ }
+
+ public String getColType() {
+ return colType;
+ }
+
+ public void setColType(String colType) {
+ this.colType = colType;
+ }
+
+ public void setBooleanStats(Long numTrues, Long numFalses, Long numNulls) {
+ this.numTrues = numTrues;
+ this.numFalses = numFalses;
+ this.numNulls = numNulls;
+ }
+
+ public void setLongStats(Long numNulls, Long numNDVs, byte[] bitVector, Long lowValue, Long highValue) {
+ this.numNulls = numNulls;
+ this.numDVs = numNDVs;
+ this.bitVector = bitVector;
+ this.longLowValue = lowValue;
+ this.longHighValue = highValue;
+ }
+
+ public void setDoubleStats(Long numNulls, Long numNDVs, byte[] bitVector, Double lowValue, Double highValue) {
+ this.numNulls = numNulls;
+ this.numDVs = numNDVs;
+ this.bitVector = bitVector;
+ this.doubleLowValue = lowValue;
+ this.doubleHighValue = highValue;
+ }
+
+ public void setDecimalStats(
+ Long numNulls, Long numNDVs, byte[] bitVector, String lowValue, String highValue) {
+ this.numNulls = numNulls;
+ this.numDVs = numNDVs;
+ this.bitVector = bitVector;
+ this.decimalLowValue = lowValue;
+ this.decimalHighValue = highValue;
+ }
+
+ public void setStringStats(Long numNulls, Long numNDVs, byte[] bitVector, Long maxColLen, Double avgColLen) {
+ this.numNulls = numNulls;
+ this.numDVs = numNDVs;
+ this.bitVector = bitVector;
+ this.maxColLen = maxColLen;
+ this.avgColLen = avgColLen;
+ }
+
+ public void setBinaryStats(Long numNulls, Long maxColLen, Double avgColLen) {
+ this.numNulls = numNulls;
+ this.maxColLen = maxColLen;
+ this.avgColLen = avgColLen;
+ }
+
+ public void setDateStats(Long numNulls, Long numNDVs, byte[] bitVector, Long lowValue, Long highValue) {
+ this.numNulls = numNulls;
+ this.numDVs = numNDVs;
+ this.bitVector = bitVector;
+ this.longLowValue = lowValue;
+ this.longHighValue = highValue;
+ }
+
+ public Long getLongLowValue() {
+ return longLowValue;
+ }
+
+ public void setLongLowValue(Long longLowValue) {
+ this.longLowValue = longLowValue;
+ }
+
+ public Long getLongHighValue() {
+ return longHighValue;
+ }
+
+ public void setLongHighValue(Long longHighValue) {
+ this.longHighValue = longHighValue;
+ }
+
+ public Double getDoubleLowValue() {
+ return doubleLowValue;
+ }
+
+ public void setDoubleLowValue(Double doubleLowValue) {
+ this.doubleLowValue = doubleLowValue;
+ }
+
+ public Double getDoubleHighValue() {
+ return doubleHighValue;
+ }
+
+ public void setDoubleHighValue(Double doubleHighValue) {
+ this.doubleHighValue = doubleHighValue;
+ }
+
+ public String getDecimalLowValue() {
+ return decimalLowValue;
+ }
+
+ public void setDecimalLowValue(String decimalLowValue) {
+ this.decimalLowValue = decimalLowValue;
+ }
+
+ public String getDecimalHighValue() {
+ return decimalHighValue;
+ }
+
+ public void setDecimalHighValue(String decimalHighValue) {
+ this.decimalHighValue = decimalHighValue;
+ }
+
+ public byte[] getBitVector() {
+ return bitVector;
+ }
+
+ public void setBitVector(byte[] bitVector) {
+ this.bitVector = bitVector;
+ }
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionEvent.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionEvent.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionEvent.java
new file mode 100644
index 0000000..266acd0
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionEvent.java
@@ -0,0 +1,90 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+
+public class MPartitionEvent {
+
+ private String dbName;
+
+ private String tblName;
+
+ private String partName;
+
+ private long eventTime;
+
+ private int eventType;
+
+ public MPartitionEvent(String dbName, String tblName, String partitionName, int eventType) {
+ super();
+ this.dbName = dbName;
+ this.tblName = tblName;
+ this.partName = partitionName;
+ this.eventType = eventType;
+ this.eventTime = System.currentTimeMillis();
+ }
+
+ public MPartitionEvent() {}
+
+ /**
+ * @param dbName the dbName to set
+ */
+ public void setDbName(String dbName) {
+ this.dbName = dbName;
+ }
+
+ /**
+ * @param tblName the tblName to set
+ */
+ public void setTblName(String tblName) {
+ this.tblName = tblName;
+ }
+
+ /**
+ * @param partName the partSpec to set
+ */
+ public void setPartName(String partName) {
+ this.partName = partName;
+ }
+
+ /**
+ * @param createTime the eventTime to set
+ */
+ public void setEventTime(long createTime) {
+ this.eventTime = createTime;
+ }
+
+ /**
+ * @param eventType the EventType to set
+ */
+ public void setEventType(int eventType) {
+ this.eventType = eventType;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "MPartitionEvent [dbName=" + dbName + ", tblName=" + tblName + ", partName=" + partName
+ + ", eventTime=" + eventTime + ", EventType=" + eventType + "]";
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionPrivilege.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionPrivilege.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionPrivilege.java
new file mode 100644
index 0000000..2af0d00
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPartitionPrivilege.java
@@ -0,0 +1,139 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+public class MPartitionPrivilege {
+
+ private String principalName;
+
+ private String principalType;
+
+ private MPartition partition;
+
+ private String privilege;
+
+ private int createTime;
+
+ private String grantor;
+
+ private String grantorType;
+
+ private boolean grantOption;
+
+ public MPartitionPrivilege() {
+ }
+
+ public MPartitionPrivilege(String principalName, String principalType,
+ MPartition partition, String privilege, int createTime,
+ String grantor, String grantorType, boolean grantOption) {
+ super();
+ this.principalName = principalName;
+ this.principalType = principalType;
+ this.partition = partition;
+ this.privilege = privilege;
+ this.createTime = createTime;
+ this.grantor = grantor;
+ this.grantorType = grantorType;
+ this.grantOption = grantOption;
+ }
+
+ public String getPrincipalName() {
+ return principalName;
+ }
+
+ public void setPrincipalName(String principalName) {
+ this.principalName = principalName;
+ }
+
+
+ /**
+ * @return a set of privileges this user/role/group has
+ */
+ public String getPrivilege() {
+ return privilege;
+ }
+
+ /**
+ * @param dbPrivilege a set of privileges this user/role/group has
+ */
+ public void setPrivilege(String dbPrivilege) {
+ this.privilege = dbPrivilege;
+ }
+
+ /**
+ * @return create time
+ */
+ public int getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * @param createTime create time
+ */
+ public void setCreateTime(int createTime) {
+ this.createTime = createTime;
+ }
+
+ /**
+ * @return the grantor
+ */
+ public String getGrantor() {
+ return grantor;
+ }
+
+ /**
+ * @param grantor
+ */
+ public void setGrantor(String grantor) {
+ this.grantor = grantor;
+ }
+
+ public String getPrincipalType() {
+ return principalType;
+ }
+
+ public void setPrincipalType(String principalType) {
+ this.principalType = principalType;
+ }
+
+ public MPartition getPartition() {
+ return partition;
+ }
+
+ public void setPartition(MPartition partition) {
+ this.partition = partition;
+ }
+
+ public boolean getGrantOption() {
+ return grantOption;
+ }
+
+ public void setGrantOption(boolean grantOption) {
+ this.grantOption = grantOption;
+ }
+
+ public String getGrantorType() {
+ return grantorType;
+ }
+
+ public void setGrantorType(String grantorType) {
+ this.grantorType = grantorType;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPrincipalDesc.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPrincipalDesc.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPrincipalDesc.java
new file mode 100644
index 0000000..42062b1
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MPrincipalDesc.java
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+public class MPrincipalDesc {
+
+ private String name;
+ private String type;
+
+ public MPrincipalDesc() {}
+
+ public MPrincipalDesc(String name, String type) {
+ this.name = name;
+ this.type = type;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ @Override
+ public int hashCode() {
+ return type.hashCode() + name.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ MPrincipalDesc another = (MPrincipalDesc) object;
+ return type.equals(another.type) && name.equals(another.name);
+ }
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MResourceUri.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MResourceUri.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MResourceUri.java
new file mode 100644
index 0000000..0998cf7
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MResourceUri.java
@@ -0,0 +1,49 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+public class MResourceUri {
+ private int resourceType;
+ private String uri;
+
+ public MResourceUri() {
+ }
+
+ public MResourceUri(int resourceType, String uri) {
+ super();
+ this.resourceType = resourceType;
+ this.uri = uri;
+ }
+
+ public int getResourceType() {
+ return resourceType;
+ }
+
+ public void setResourceType(int resourceType) {
+ this.resourceType = resourceType;
+ }
+
+ public String getUri() {
+ return uri;
+ }
+
+ public void setUri(String uri) {
+ this.uri = uri;
+ }
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MRole.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MRole.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MRole.java
new file mode 100644
index 0000000..ce0f472
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MRole.java
@@ -0,0 +1,80 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+public class MRole {
+
+ private String roleName;
+
+ private int createTime;
+
+ private String ownerName;
+
+ public MRole() {
+ }
+
+ public MRole(String roleName, int createTime, String ownerName) {
+ super();
+ this.roleName = roleName;
+ this.createTime = createTime;
+ this.ownerName = ownerName;
+ }
+
+ /**
+ * @return role name
+ */
+ public String getRoleName() {
+ return roleName;
+ }
+
+ /**
+ * @param roleName
+ */
+ public void setRoleName(String roleName) {
+ this.roleName = roleName;
+ }
+
+ /**
+ * @return create time
+ */
+ public int getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * @param createTime
+ * role create time
+ */
+ public void setCreateTime(int createTime) {
+ this.createTime = createTime;
+ }
+
+ /**
+ * @return the principal name who created this role
+ */
+ public String getOwnerName() {
+ return ownerName;
+ }
+
+ public void setOwnerName(String ownerName) {
+ this.ownerName = ownerName;
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MRoleMap.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MRoleMap.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MRoleMap.java
new file mode 100644
index 0000000..ef8e17c
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MRoleMap.java
@@ -0,0 +1,120 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+public class MRoleMap {
+
+ private String principalName;
+
+ private String principalType;
+
+ private MRole role;
+
+ private int addTime;
+
+ private String grantor;
+
+ private String grantorType;
+
+ private boolean grantOption;
+
+ public MRoleMap() {
+ }
+
+ public MRoleMap(String principalName, String principalType, MRole role,
+ int addTime, String grantor, String grantorType, boolean grantOption) {
+ super();
+ this.principalName = principalName;
+ this.principalType = principalType;
+ this.role = role;
+ this.addTime = addTime;
+ this.grantor = grantor;
+ this.grantorType = grantorType;
+ this.grantOption = grantOption;
+ }
+
+ /**
+ * @return principal name
+ */
+ public String getPrincipalName() {
+ return principalName;
+ }
+
+ /**
+ * @param userName principal name
+ */
+ public void setPrincipalName(String userName) {
+ this.principalName = userName;
+ }
+
+ public String getPrincipalType() {
+ return principalType;
+ }
+
+ public void setPrincipalType(String principalType) {
+ this.principalType = principalType;
+ }
+
+ /**
+ * @return add time
+ */
+ public int getAddTime() {
+ return addTime;
+ }
+
+ /**
+ * @param addTime
+ */
+ public void setAddTime(int addTime) {
+ this.addTime = addTime;
+ }
+
+ public MRole getRole() {
+ return role;
+ }
+
+ public void setRole(MRole role) {
+ this.role = role;
+ }
+
+ public boolean getGrantOption() {
+ return grantOption;
+ }
+
+ public void setGrantOption(boolean grantOption) {
+ this.grantOption = grantOption;
+ }
+
+ public String getGrantor() {
+ return grantor;
+ }
+
+ public void setGrantor(String grantor) {
+ this.grantor = grantor;
+ }
+
+ public String getGrantorType() {
+ return grantorType;
+ }
+
+ public void setGrantorType(String grantorType) {
+ this.grantorType = grantorType;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MSerDeInfo.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MSerDeInfo.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MSerDeInfo.java
new file mode 100644
index 0000000..2c16e61
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MSerDeInfo.java
@@ -0,0 +1,81 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+import java.util.Map;
+
+public class MSerDeInfo {
+ private String name;
+ private String serializationLib;
+ private Map<String, String> parameters;
+
+ /**
+ * @param name
+ * @param serializationLib
+ * @param parameters
+ */
+ public MSerDeInfo(String name, String serializationLib, Map<String, String> parameters) {
+ this.name = name;
+ this.serializationLib = serializationLib;
+ this.parameters = parameters;
+ }
+
+ /**
+ * @return the serializationLib
+ */
+ public String getSerializationLib() {
+ return serializationLib;
+ }
+
+ /**
+ * @param serializationLib the serializationLib to set
+ */
+ public void setSerializationLib(String serializationLib) {
+ this.serializationLib = serializationLib;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return the parameters
+ */
+ public Map<String, String> getParameters() {
+ return parameters;
+ }
+
+ /**
+ * @param parameters the parameters to set
+ */
+ public void setParameters(Map<String, String> parameters) {
+ this.parameters = parameters;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MStorageDescriptor.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MStorageDescriptor.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MStorageDescriptor.java
new file mode 100644
index 0000000..2e021af
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MStorageDescriptor.java
@@ -0,0 +1,277 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class MStorageDescriptor {
+ private MColumnDescriptor cd;
+ private String location;
+ private String inputFormat;
+ private String outputFormat;
+ private boolean isCompressed = false;
+ private int numBuckets = 1;
+ private MSerDeInfo serDeInfo;
+ private List<String> bucketCols;
+ private List<MOrder> sortCols;
+ private Map<String, String> parameters;
+ private List<String> skewedColNames;
+ private List<MStringList> skewedColValues;
+ private Map<MStringList, String> skewedColValueLocationMaps;
+ private boolean isStoredAsSubDirectories;
+
+ public MStorageDescriptor() {}
+
+
+ /**
+ * @param cd
+ * @param location
+ * @param inputFormat
+ * @param outputFormat
+ * @param isCompressed
+ * @param numBuckets
+ * @param serDeInfo
+ * @param bucketCols
+ * @param sortOrder
+ * @param parameters
+ */
+ public MStorageDescriptor(MColumnDescriptor cd, String location, String inputFormat,
+ String outputFormat, boolean isCompressed, int numBuckets, MSerDeInfo serDeInfo,
+ List<String> bucketCols, List<MOrder> sortOrder, Map<String, String> parameters,
+ List<String> skewedColNames, List<MStringList> skewedColValues,
+ Map<MStringList, String> skewedColValueLocationMaps, boolean storedAsSubDirectories) {
+ this.cd = cd;
+ this.location = location;
+ this.inputFormat = inputFormat;
+ this.outputFormat = outputFormat;
+ this.isCompressed = isCompressed;
+ this.numBuckets = numBuckets;
+ this.serDeInfo = serDeInfo;
+ this.bucketCols = bucketCols;
+ this.sortCols = sortOrder;
+ this.parameters = parameters;
+ this.skewedColNames = skewedColNames;
+ this.skewedColValues = skewedColValues;
+ this.skewedColValueLocationMaps = skewedColValueLocationMaps;
+ this.isStoredAsSubDirectories = storedAsSubDirectories;
+ }
+
+
+ /**
+ * @return the location
+ */
+ public String getLocation() {
+ return location;
+ }
+
+ /**
+ * @param location the location to set
+ */
+ public void setLocation(String location) {
+ this.location = location;
+ }
+
+ /**
+ * @return the isCompressed
+ */
+ public boolean isCompressed() {
+ return isCompressed;
+ }
+
+ /**
+ * @param isCompressed the isCompressed to set
+ */
+ public void setCompressed(boolean isCompressed) {
+ this.isCompressed = isCompressed;
+ }
+
+ /**
+ * @return the numBuckets
+ */
+ public int getNumBuckets() {
+ return numBuckets;
+ }
+
+ /**
+ * @param numBuckets the numBuckets to set
+ */
+ public void setNumBuckets(int numBuckets) {
+ this.numBuckets = numBuckets;
+ }
+
+ /**
+ * @return the bucketCols
+ */
+ public List<String> getBucketCols() {
+ return bucketCols;
+ }
+
+ /**
+ * @param bucketCols the bucketCols to set
+ */
+ public void setBucketCols(List<String> bucketCols) {
+ this.bucketCols = bucketCols;
+ }
+
+ /**
+ * @return the parameters
+ */
+ public Map<String, String> getParameters() {
+ return parameters;
+ }
+
+ /**
+ * @param parameters the parameters to set
+ */
+ public void setParameters(Map<String, String> parameters) {
+ this.parameters = parameters;
+ }
+
+ /**
+ * @return the inputFormat
+ */
+ public String getInputFormat() {
+ return inputFormat;
+ }
+
+ /**
+ * @param inputFormat the inputFormat to set
+ */
+ public void setInputFormat(String inputFormat) {
+ this.inputFormat = inputFormat;
+ }
+
+ /**
+ * @return the outputFormat
+ */
+ public String getOutputFormat() {
+ return outputFormat;
+ }
+
+ /**
+ * @param outputFormat the outputFormat to set
+ */
+ public void setOutputFormat(String outputFormat) {
+ this.outputFormat = outputFormat;
+ }
+
+ /**
+ * @return the column descriptor
+ */
+ public MColumnDescriptor getCD() {
+ return cd;
+ }
+
+ /**
+ * @param cd the Column Descriptor to set
+ */
+ public void setCD(MColumnDescriptor cd) {
+ this.cd = cd;
+ }
+
+ /**
+ * @return the serDe
+ */
+ public MSerDeInfo getSerDeInfo() {
+ return serDeInfo;
+ }
+
+ /**
+ * @param serDe the serDe to set
+ */
+ public void setSerDeInfo(MSerDeInfo serDe) {
+ this.serDeInfo = serDe;
+ }
+
+
+ /**
+ * @param sortOrder the sortOrder to set
+ */
+ public void setSortCols(List<MOrder> sortOrder) {
+ this.sortCols = sortOrder;
+ }
+
+
+ /**
+ * @return the sortOrder
+ */
+ public List<MOrder> getSortCols() {
+ return sortCols;
+ }
+
+ /**
+ * @return the skewedColNames
+ */
+ public List<String> getSkewedColNames() {
+ return skewedColNames;
+ }
+
+ /**
+ * @param skewedColNames the skewedColNames to set
+ */
+ public void setSkewedColNames(List<String> skewedColNames) {
+ this.skewedColNames = skewedColNames;
+ }
+
+ /**
+ * @return the skewedColValues
+ */
+ public List<MStringList> getSkewedColValues() {
+ return skewedColValues;
+ }
+
+ /**
+ * @param skewedColValues the skewedColValues to set
+ */
+ public void setSkewedColValues(List<MStringList> skewedColValues) {
+ this.skewedColValues = skewedColValues;
+ }
+
+ /**
+ * @return the skewedColValueLocationMaps
+ */
+ public Map<MStringList, String> getSkewedColValueLocationMaps() {
+ return skewedColValueLocationMaps;
+ }
+
+ /**
+ * @param listBucketColValuesMapping the skewedColValueLocationMaps to set
+ */
+ public void setSkewedColValueLocationMaps(Map<MStringList, String> listBucketColValuesMapping) {
+ this.skewedColValueLocationMaps = listBucketColValuesMapping;
+ }
+
+
+ /**
+ * @return the storedAsSubDirectories
+ */
+ public boolean isStoredAsSubDirectories() {
+ return isStoredAsSubDirectories;
+ }
+
+
+ /**
+ * @param storedAsSubDirectories the storedAsSubDirectories to set
+ */
+ public void setStoredAsSubDirectories(boolean storedAsSubDirectories) {
+ this.isStoredAsSubDirectories = storedAsSubDirectories;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MStringList.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MStringList.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MStringList.java
new file mode 100644
index 0000000..58b07fe
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MStringList.java
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.metastore.model;
+
+import java.util.List;
+
+/**
+ *
+ * It represents data structure of string list.
+ *
+ * workaround JDO limitation: no support for collection of collection.
+ *
+ */
+public class MStringList {
+ private List<String> internalList;
+
+ /**
+ *
+ * @param list
+ */
+ public MStringList(List<String> list) {
+ this.internalList = list;
+ }
+
+ /**
+ * @return the internalList
+ */
+ public List<String> getInternalList() {
+ return internalList;
+ }
+
+ /**
+ * @param internalList the internalList to set
+ */
+ public void setInternalList(List<String> internalList) {
+ this.internalList = internalList;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return internalList.toString();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTable.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTable.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTable.java
new file mode 100644
index 0000000..6cc7157
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MTable.java
@@ -0,0 +1,256 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.metastore.model;
+
+import java.util.List;
+import java.util.Map;
+
+public class MTable {
+
+ private String tableName;
+ private MDatabase database;
+ private MStorageDescriptor sd;
+ private String owner;
+ private int createTime;
+ private int lastAccessTime;
+ private int retention;
+ private List<MFieldSchema> partitionKeys;
+ private Map<String, String> parameters;
+ private String viewOriginalText;
+ private String viewExpandedText;
+ private boolean rewriteEnabled;
+ private String tableType;
+
+ public MTable() {}
+
+ /**
+ * @param tableName
+ * @param database
+ * @param sd
+ * @param owner
+ * @param createTime
+ * @param lastAccessTime
+ * @param retention
+ * @param partitionKeys
+ * @param parameters
+ * @param viewOriginalText
+ * @param viewExpandedText
+ * @param tableType
+ */
+ public MTable(String tableName, MDatabase database, MStorageDescriptor sd, String owner,
+ int createTime, int lastAccessTime, int retention, List<MFieldSchema> partitionKeys,
+ Map<String, String> parameters, String viewOriginalText, String viewExpandedText,
+ boolean rewriteEnabled, String tableType) {
+ this.tableName = tableName;
+ this.database = database;
+ this.sd = sd;
+ this.owner = owner;
+ this.createTime = createTime;
+ this.setLastAccessTime(lastAccessTime);
+ this.retention = retention;
+ this.partitionKeys = partitionKeys;
+ this.parameters = parameters;
+ this.viewOriginalText = viewOriginalText;
+ this.viewExpandedText = viewExpandedText;
+ this.rewriteEnabled = rewriteEnabled;
+ this.tableType = tableType;
+ }
+
+ /**
+ * @return the tableName
+ */
+ public String getTableName() {
+ return tableName;
+ }
+
+ /**
+ * @param tableName the tableName to set
+ */
+ public void setTableName(String tableName) {
+ this.tableName = tableName;
+ }
+
+ /**
+ * @return the sd
+ */
+ public MStorageDescriptor getSd() {
+ return sd;
+ }
+
+ /**
+ * @param sd the sd to set
+ */
+ public void setSd(MStorageDescriptor sd) {
+ this.sd = sd;
+ }
+
+ /**
+ * @return the partKeys
+ */
+ public List<MFieldSchema> getPartitionKeys() {
+ return partitionKeys;
+ }
+
+ /**
+ * @param partKeys the partKeys to set
+ */
+ public void setPartitionKeys(List<MFieldSchema> partKeys) {
+ this.partitionKeys = partKeys;
+ }
+
+ /**
+ * @return the parameters
+ */
+ public Map<String, String> getParameters() {
+ return parameters;
+ }
+
+ /**
+ * @param parameters the parameters to set
+ */
+ public void setParameters(Map<String, String> parameters) {
+ this.parameters = parameters;
+ }
+
+ /**
+ * @return the original view text, or null if this table is not a view
+ */
+ public String getViewOriginalText() {
+ return viewOriginalText;
+ }
+
+ /**
+ * @param viewOriginalText the original view text to set
+ */
+ public void setViewOriginalText(String viewOriginalText) {
+ this.viewOriginalText = viewOriginalText;
+ }
+
+ /**
+ * @return the expanded view text, or null if this table is not a view
+ */
+ public String getViewExpandedText() {
+ return viewExpandedText;
+ }
+
+ /**
+ * @param viewExpandedText the expanded view text to set
+ */
+ public void setViewExpandedText(String viewExpandedText) {
+ this.viewExpandedText = viewExpandedText;
+ }
+
+ /**
+ * @return whether the view can be used for rewriting queries
+ */
+ public boolean isRewriteEnabled() {
+ return rewriteEnabled;
+ }
+
+ /**
+ * @param rewriteEnabled whether the view can be used for rewriting queries
+ */
+ public void setRewriteEnabled(boolean rewriteEnabled) {
+ this.rewriteEnabled = rewriteEnabled;
+ }
+
+ /**
+ * @return the owner
+ */
+ public String getOwner() {
+ return owner;
+ }
+
+ /**
+ * @param owner the owner to set
+ */
+ public void setOwner(String owner) {
+ this.owner = owner;
+ }
+
+ /**
+ * @return the createTime
+ */
+ public int getCreateTime() {
+ return createTime;
+ }
+
+ /**
+ * @param createTime the createTime to set
+ */
+ public void setCreateTime(int createTime) {
+ this.createTime = createTime;
+ }
+
+ /**
+ * @return the database
+ */
+ public MDatabase getDatabase() {
+ return database;
+ }
+
+ /**
+ * @param database the database to set
+ */
+ public void setDatabase(MDatabase database) {
+ this.database = database;
+ }
+
+ /**
+ * @return the retention
+ */
+ public int getRetention() {
+ return retention;
+ }
+
+ /**
+ * @param retention the retention to set
+ */
+ public void setRetention(int retention) {
+ this.retention = retention;
+ }
+
+ /**
+ * @param lastAccessTime the lastAccessTime to set
+ */
+ public void setLastAccessTime(int lastAccessTime) {
+ this.lastAccessTime = lastAccessTime;
+ }
+
+ /**
+ * @return the lastAccessTime
+ */
+ public int getLastAccessTime() {
+ return lastAccessTime;
+ }
+
+ /**
+ * @param tableType the tableType to set
+ */
+ public void setTableType(String tableType) {
+ this.tableType = tableType;
+ }
+
+ /**
+ * @return the tableType
+ */
+ public String getTableType() {
+ return tableType;
+ }
+}
[3/4] hive git commit: HIVE-17224 Move JDO classes to standalone
metastore (Alan Gates, reviewed by Vihang Karajgaonkar)
Posted by ga...@apache.org.
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MStorageDescriptor.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MStorageDescriptor.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MStorageDescriptor.java
deleted file mode 100644
index 2e021af..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MStorageDescriptor.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-import java.util.List;
-import java.util.Map;
-
-public class MStorageDescriptor {
- private MColumnDescriptor cd;
- private String location;
- private String inputFormat;
- private String outputFormat;
- private boolean isCompressed = false;
- private int numBuckets = 1;
- private MSerDeInfo serDeInfo;
- private List<String> bucketCols;
- private List<MOrder> sortCols;
- private Map<String, String> parameters;
- private List<String> skewedColNames;
- private List<MStringList> skewedColValues;
- private Map<MStringList, String> skewedColValueLocationMaps;
- private boolean isStoredAsSubDirectories;
-
- public MStorageDescriptor() {}
-
-
- /**
- * @param cd
- * @param location
- * @param inputFormat
- * @param outputFormat
- * @param isCompressed
- * @param numBuckets
- * @param serDeInfo
- * @param bucketCols
- * @param sortOrder
- * @param parameters
- */
- public MStorageDescriptor(MColumnDescriptor cd, String location, String inputFormat,
- String outputFormat, boolean isCompressed, int numBuckets, MSerDeInfo serDeInfo,
- List<String> bucketCols, List<MOrder> sortOrder, Map<String, String> parameters,
- List<String> skewedColNames, List<MStringList> skewedColValues,
- Map<MStringList, String> skewedColValueLocationMaps, boolean storedAsSubDirectories) {
- this.cd = cd;
- this.location = location;
- this.inputFormat = inputFormat;
- this.outputFormat = outputFormat;
- this.isCompressed = isCompressed;
- this.numBuckets = numBuckets;
- this.serDeInfo = serDeInfo;
- this.bucketCols = bucketCols;
- this.sortCols = sortOrder;
- this.parameters = parameters;
- this.skewedColNames = skewedColNames;
- this.skewedColValues = skewedColValues;
- this.skewedColValueLocationMaps = skewedColValueLocationMaps;
- this.isStoredAsSubDirectories = storedAsSubDirectories;
- }
-
-
- /**
- * @return the location
- */
- public String getLocation() {
- return location;
- }
-
- /**
- * @param location the location to set
- */
- public void setLocation(String location) {
- this.location = location;
- }
-
- /**
- * @return the isCompressed
- */
- public boolean isCompressed() {
- return isCompressed;
- }
-
- /**
- * @param isCompressed the isCompressed to set
- */
- public void setCompressed(boolean isCompressed) {
- this.isCompressed = isCompressed;
- }
-
- /**
- * @return the numBuckets
- */
- public int getNumBuckets() {
- return numBuckets;
- }
-
- /**
- * @param numBuckets the numBuckets to set
- */
- public void setNumBuckets(int numBuckets) {
- this.numBuckets = numBuckets;
- }
-
- /**
- * @return the bucketCols
- */
- public List<String> getBucketCols() {
- return bucketCols;
- }
-
- /**
- * @param bucketCols the bucketCols to set
- */
- public void setBucketCols(List<String> bucketCols) {
- this.bucketCols = bucketCols;
- }
-
- /**
- * @return the parameters
- */
- public Map<String, String> getParameters() {
- return parameters;
- }
-
- /**
- * @param parameters the parameters to set
- */
- public void setParameters(Map<String, String> parameters) {
- this.parameters = parameters;
- }
-
- /**
- * @return the inputFormat
- */
- public String getInputFormat() {
- return inputFormat;
- }
-
- /**
- * @param inputFormat the inputFormat to set
- */
- public void setInputFormat(String inputFormat) {
- this.inputFormat = inputFormat;
- }
-
- /**
- * @return the outputFormat
- */
- public String getOutputFormat() {
- return outputFormat;
- }
-
- /**
- * @param outputFormat the outputFormat to set
- */
- public void setOutputFormat(String outputFormat) {
- this.outputFormat = outputFormat;
- }
-
- /**
- * @return the column descriptor
- */
- public MColumnDescriptor getCD() {
- return cd;
- }
-
- /**
- * @param cd the Column Descriptor to set
- */
- public void setCD(MColumnDescriptor cd) {
- this.cd = cd;
- }
-
- /**
- * @return the serDe
- */
- public MSerDeInfo getSerDeInfo() {
- return serDeInfo;
- }
-
- /**
- * @param serDe the serDe to set
- */
- public void setSerDeInfo(MSerDeInfo serDe) {
- this.serDeInfo = serDe;
- }
-
-
- /**
- * @param sortOrder the sortOrder to set
- */
- public void setSortCols(List<MOrder> sortOrder) {
- this.sortCols = sortOrder;
- }
-
-
- /**
- * @return the sortOrder
- */
- public List<MOrder> getSortCols() {
- return sortCols;
- }
-
- /**
- * @return the skewedColNames
- */
- public List<String> getSkewedColNames() {
- return skewedColNames;
- }
-
- /**
- * @param skewedColNames the skewedColNames to set
- */
- public void setSkewedColNames(List<String> skewedColNames) {
- this.skewedColNames = skewedColNames;
- }
-
- /**
- * @return the skewedColValues
- */
- public List<MStringList> getSkewedColValues() {
- return skewedColValues;
- }
-
- /**
- * @param skewedColValues the skewedColValues to set
- */
- public void setSkewedColValues(List<MStringList> skewedColValues) {
- this.skewedColValues = skewedColValues;
- }
-
- /**
- * @return the skewedColValueLocationMaps
- */
- public Map<MStringList, String> getSkewedColValueLocationMaps() {
- return skewedColValueLocationMaps;
- }
-
- /**
- * @param listBucketColValuesMapping the skewedColValueLocationMaps to set
- */
- public void setSkewedColValueLocationMaps(Map<MStringList, String> listBucketColValuesMapping) {
- this.skewedColValueLocationMaps = listBucketColValuesMapping;
- }
-
-
- /**
- * @return the storedAsSubDirectories
- */
- public boolean isStoredAsSubDirectories() {
- return isStoredAsSubDirectories;
- }
-
-
- /**
- * @param storedAsSubDirectories the storedAsSubDirectories to set
- */
- public void setStoredAsSubDirectories(boolean storedAsSubDirectories) {
- this.isStoredAsSubDirectories = storedAsSubDirectories;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MStringList.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MStringList.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MStringList.java
deleted file mode 100644
index 58b07fe..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MStringList.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hadoop.hive.metastore.model;
-
-import java.util.List;
-
-/**
- *
- * It represents data structure of string list.
- *
- * workaround JDO limitation: no support for collection of collection.
- *
- */
-public class MStringList {
- private List<String> internalList;
-
- /**
- *
- * @param list
- */
- public MStringList(List<String> list) {
- this.internalList = list;
- }
-
- /**
- * @return the internalList
- */
- public List<String> getInternalList() {
- return internalList;
- }
-
- /**
- * @param internalList the internalList to set
- */
- public void setInternalList(List<String> internalList) {
- this.internalList = internalList;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return internalList.toString();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTable.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTable.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTable.java
deleted file mode 100644
index 6cc7157..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTable.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-import java.util.List;
-import java.util.Map;
-
-public class MTable {
-
- private String tableName;
- private MDatabase database;
- private MStorageDescriptor sd;
- private String owner;
- private int createTime;
- private int lastAccessTime;
- private int retention;
- private List<MFieldSchema> partitionKeys;
- private Map<String, String> parameters;
- private String viewOriginalText;
- private String viewExpandedText;
- private boolean rewriteEnabled;
- private String tableType;
-
- public MTable() {}
-
- /**
- * @param tableName
- * @param database
- * @param sd
- * @param owner
- * @param createTime
- * @param lastAccessTime
- * @param retention
- * @param partitionKeys
- * @param parameters
- * @param viewOriginalText
- * @param viewExpandedText
- * @param tableType
- */
- public MTable(String tableName, MDatabase database, MStorageDescriptor sd, String owner,
- int createTime, int lastAccessTime, int retention, List<MFieldSchema> partitionKeys,
- Map<String, String> parameters, String viewOriginalText, String viewExpandedText,
- boolean rewriteEnabled, String tableType) {
- this.tableName = tableName;
- this.database = database;
- this.sd = sd;
- this.owner = owner;
- this.createTime = createTime;
- this.setLastAccessTime(lastAccessTime);
- this.retention = retention;
- this.partitionKeys = partitionKeys;
- this.parameters = parameters;
- this.viewOriginalText = viewOriginalText;
- this.viewExpandedText = viewExpandedText;
- this.rewriteEnabled = rewriteEnabled;
- this.tableType = tableType;
- }
-
- /**
- * @return the tableName
- */
- public String getTableName() {
- return tableName;
- }
-
- /**
- * @param tableName the tableName to set
- */
- public void setTableName(String tableName) {
- this.tableName = tableName;
- }
-
- /**
- * @return the sd
- */
- public MStorageDescriptor getSd() {
- return sd;
- }
-
- /**
- * @param sd the sd to set
- */
- public void setSd(MStorageDescriptor sd) {
- this.sd = sd;
- }
-
- /**
- * @return the partKeys
- */
- public List<MFieldSchema> getPartitionKeys() {
- return partitionKeys;
- }
-
- /**
- * @param partKeys the partKeys to set
- */
- public void setPartitionKeys(List<MFieldSchema> partKeys) {
- this.partitionKeys = partKeys;
- }
-
- /**
- * @return the parameters
- */
- public Map<String, String> getParameters() {
- return parameters;
- }
-
- /**
- * @param parameters the parameters to set
- */
- public void setParameters(Map<String, String> parameters) {
- this.parameters = parameters;
- }
-
- /**
- * @return the original view text, or null if this table is not a view
- */
- public String getViewOriginalText() {
- return viewOriginalText;
- }
-
- /**
- * @param viewOriginalText the original view text to set
- */
- public void setViewOriginalText(String viewOriginalText) {
- this.viewOriginalText = viewOriginalText;
- }
-
- /**
- * @return the expanded view text, or null if this table is not a view
- */
- public String getViewExpandedText() {
- return viewExpandedText;
- }
-
- /**
- * @param viewExpandedText the expanded view text to set
- */
- public void setViewExpandedText(String viewExpandedText) {
- this.viewExpandedText = viewExpandedText;
- }
-
- /**
- * @return whether the view can be used for rewriting queries
- */
- public boolean isRewriteEnabled() {
- return rewriteEnabled;
- }
-
- /**
- * @param rewriteEnabled whether the view can be used for rewriting queries
- */
- public void setRewriteEnabled(boolean rewriteEnabled) {
- this.rewriteEnabled = rewriteEnabled;
- }
-
- /**
- * @return the owner
- */
- public String getOwner() {
- return owner;
- }
-
- /**
- * @param owner the owner to set
- */
- public void setOwner(String owner) {
- this.owner = owner;
- }
-
- /**
- * @return the createTime
- */
- public int getCreateTime() {
- return createTime;
- }
-
- /**
- * @param createTime the createTime to set
- */
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- /**
- * @return the database
- */
- public MDatabase getDatabase() {
- return database;
- }
-
- /**
- * @param database the database to set
- */
- public void setDatabase(MDatabase database) {
- this.database = database;
- }
-
- /**
- * @return the retention
- */
- public int getRetention() {
- return retention;
- }
-
- /**
- * @param retention the retention to set
- */
- public void setRetention(int retention) {
- this.retention = retention;
- }
-
- /**
- * @param lastAccessTime the lastAccessTime to set
- */
- public void setLastAccessTime(int lastAccessTime) {
- this.lastAccessTime = lastAccessTime;
- }
-
- /**
- * @return the lastAccessTime
- */
- public int getLastAccessTime() {
- return lastAccessTime;
- }
-
- /**
- * @param tableType the tableType to set
- */
- public void setTableType(String tableType) {
- this.tableType = tableType;
- }
-
- /**
- * @return the tableType
- */
- public String getTableType() {
- return tableType;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnPrivilege.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnPrivilege.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnPrivilege.java
deleted file mode 100644
index e3ce12c..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnPrivilege.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-public class MTableColumnPrivilege {
-
- private String principalName;
-
- private String principalType;
-
- private MTable table;
-
- private String columnName;
-
- private String privilege;
-
- private int createTime;
-
- private String grantor;
-
- private String grantorType;
-
- private boolean grantOption;
-
- public MTableColumnPrivilege() {
- }
-
- /**
- * @param principalName
- * @param principalType
- * @param table
- * @param columnName
- * @param privileges
- * @param createTime
- * @param grantor
- * @param grantorType
- * @param grantOption
- */
- public MTableColumnPrivilege(String principalName, String principalType,
- MTable table, String columnName, String privileges, int createTime,
- String grantor, String grantorType, boolean grantOption) {
- super();
- this.principalName = principalName;
- this.principalType = principalType;
- this.table = table;
- this.columnName = columnName;
- this.privilege = privileges;
- this.createTime = createTime;
- this.grantor = grantor;
- this.grantorType = grantorType;
- this.grantOption = grantOption;
- }
-
- /**
- * @return column name
- */
- public String getColumnName() {
- return columnName;
- }
-
- /**
- * @param columnName column name
- */
- public void setColumnName(String columnName) {
- this.columnName = columnName;
- }
-
- /**
- * @return a set of privileges this user/role/group has
- */
- public String getPrivilege() {
- return privilege;
- }
-
- /**
- * @param dbPrivileges a set of privileges this user/role/group has
- */
- public void setPrivilege(String dbPrivileges) {
- this.privilege = dbPrivileges;
- }
-
- /**
- * @return create time
- */
- public int getCreateTime() {
- return createTime;
- }
-
- /**
- * @param createTime create time
- */
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- public String getPrincipalName() {
- return principalName;
- }
-
- public void setPrincipalName(String principalName) {
- this.principalName = principalName;
- }
-
- public MTable getTable() {
- return table;
- }
-
- public void setTable(MTable table) {
- this.table = table;
- }
-
- public String getGrantor() {
- return grantor;
- }
-
- public void setGrantor(String grantor) {
- this.grantor = grantor;
- }
-
- public String getGrantorType() {
- return grantorType;
- }
-
- public void setGrantorType(String grantorType) {
- this.grantorType = grantorType;
- }
-
- public boolean getGrantOption() {
- return grantOption;
- }
-
- public void setGrantOption(boolean grantOption) {
- this.grantOption = grantOption;
- }
-
- public String getPrincipalType() {
- return principalType;
- }
-
- public void setPrincipalType(String principalType) {
- this.principalType = principalType;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnStatistics.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnStatistics.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnStatistics.java
deleted file mode 100644
index 6cfaca3..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTableColumnStatistics.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- *
- */
-package org.apache.hadoop.hive.metastore.model;
-
-
-
-/**
- *
- * MTableColumnStatistics - Represents Hive's Column Statistics Description. The fields in this
- * class with the exception of table are persisted in the metastore. In case of table, tbl_id is
- * persisted in its place.
- *
- */
-public class MTableColumnStatistics {
-
- private MTable table;
- private String dbName;
- private String tableName;
- private String colName;
- private String colType;
-
- private Long longLowValue;
- private Long longHighValue;
- private Double doubleLowValue;
- private Double doubleHighValue;
- private String decimalLowValue;
- private String decimalHighValue;
- private Long numNulls;
- private Long numDVs;
- private byte[] bitVector;
- private Double avgColLen;
- private Long maxColLen;
- private Long numTrues;
- private Long numFalses;
- private long lastAnalyzed;
-
- public MTableColumnStatistics() {}
-
- public MTable getTable() {
- return table;
- }
-
- public void setTable(MTable table) {
- this.table = table;
- }
-
- public String getTableName() {
- return tableName;
- }
-
- public void setTableName(String tableName) {
- this.tableName = tableName;
- }
-
- public String getColName() {
- return colName;
- }
-
- public void setColName(String colName) {
- this.colName = colName;
- }
-
- public String getColType() {
- return colType;
- }
-
- public void setColType(String colType) {
- this.colType = colType;
- }
-
- public Long getNumNulls() {
- return numNulls;
- }
-
- public void setNumNulls(long numNulls) {
- this.numNulls = numNulls;
- }
-
- public Long getNumDVs() {
- return numDVs;
- }
-
- public void setNumDVs(long numDVs) {
- this.numDVs = numDVs;
- }
-
- public Double getAvgColLen() {
- return avgColLen;
- }
-
- public void setAvgColLen(double avgColLen) {
- this.avgColLen = avgColLen;
- }
-
- public Long getMaxColLen() {
- return maxColLen;
- }
-
- public void setMaxColLen(long maxColLen) {
- this.maxColLen = maxColLen;
- }
-
- public Long getNumTrues() {
- return numTrues;
- }
-
- public void setNumTrues(long numTrues) {
- this.numTrues = numTrues;
- }
-
- public Long getNumFalses() {
- return numFalses;
- }
-
- public void setNumFalses(long numFalses) {
- this.numFalses = numFalses;
- }
-
- public long getLastAnalyzed() {
- return lastAnalyzed;
- }
-
- public void setLastAnalyzed(long lastAnalyzed) {
- this.lastAnalyzed = lastAnalyzed;
- }
-
- public String getDbName() {
- return dbName;
- }
-
- public void setDbName(String dbName) {
- this.dbName = dbName;
- }
-
- public void setBooleanStats(Long numTrues, Long numFalses, Long numNulls) {
- this.numTrues = numTrues;
- this.numFalses = numFalses;
- this.numNulls = numNulls;
- }
-
- public void setLongStats(Long numNulls, Long numNDVs, byte[] bitVector, Long lowValue, Long highValue) {
- this.numNulls = numNulls;
- this.numDVs = numNDVs;
- this.bitVector = bitVector;
- this.longLowValue = lowValue;
- this.longHighValue = highValue;
- }
-
- public void setDoubleStats(Long numNulls, Long numNDVs, byte[] bitVector, Double lowValue, Double highValue) {
- this.numNulls = numNulls;
- this.numDVs = numNDVs;
- this.bitVector = bitVector;
- this.doubleLowValue = lowValue;
- this.doubleHighValue = highValue;
- }
-
- public void setDecimalStats(
- Long numNulls, Long numNDVs, byte[] bitVector, String lowValue, String highValue) {
- this.numNulls = numNulls;
- this.numDVs = numNDVs;
- this.bitVector = bitVector;
- this.decimalLowValue = lowValue;
- this.decimalHighValue = highValue;
- }
-
- public void setStringStats(Long numNulls, Long numNDVs, byte[] bitVector, Long maxColLen, Double avgColLen) {
- this.numNulls = numNulls;
- this.numDVs = numNDVs;
- this.bitVector = bitVector;
- this.maxColLen = maxColLen;
- this.avgColLen = avgColLen;
- }
-
- public void setBinaryStats(Long numNulls, Long maxColLen, Double avgColLen) {
- this.numNulls = numNulls;
- this.maxColLen = maxColLen;
- this.avgColLen = avgColLen;
- }
-
- public void setDateStats(Long numNulls, Long numNDVs, byte[] bitVector, Long lowValue, Long highValue) {
- this.numNulls = numNulls;
- this.numDVs = numNDVs;
- this.bitVector = bitVector;
- this.longLowValue = lowValue;
- this.longHighValue = highValue;
- }
-
- public Long getLongLowValue() {
- return longLowValue;
- }
-
- public void setLongLowValue(long longLowValue) {
- this.longLowValue = longLowValue;
- }
-
- public Long getLongHighValue() {
- return longHighValue;
- }
-
- public void setLongHighValue(long longHighValue) {
- this.longHighValue = longHighValue;
- }
-
- public Double getDoubleLowValue() {
- return doubleLowValue;
- }
-
- public void setDoubleLowValue(double doubleLowValue) {
- this.doubleLowValue = doubleLowValue;
- }
-
- public Double getDoubleHighValue() {
- return doubleHighValue;
- }
-
- public void setDoubleHighValue(double doubleHighValue) {
- this.doubleHighValue = doubleHighValue;
- }
-
-
- public String getDecimalLowValue() {
- return decimalLowValue;
- }
-
- public void setDecimalLowValue(String decimalLowValue) {
- this.decimalLowValue = decimalLowValue;
- }
-
- public String getDecimalHighValue() {
- return decimalHighValue;
- }
-
- public void setDecimalHighValue(String decimalHighValue) {
- this.decimalHighValue = decimalHighValue;
- }
-
- public byte[] getBitVector() {
- return bitVector;
- }
-
- public void setBitVector(byte[] bitVector) {
- this.bitVector = bitVector;
- }
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTablePrivilege.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTablePrivilege.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTablePrivilege.java
deleted file mode 100644
index bee33ee..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTablePrivilege.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-public class MTablePrivilege {
-
- private String principalName;
-
- private String principalType;
-
- private MTable table;
-
- private String privilege;
-
- private int createTime;
-
- private String grantor;
-
- private String grantorType;
-
- private boolean grantOption;
-
- public MTablePrivilege() {
- }
-
- public MTablePrivilege(String principalName, String principalType,
- MTable table, String privilege, int createTime,
- String grantor, String grantorType, boolean grantOption) {
- super();
- this.principalName = principalName;
- this.principalType = principalType;
- this.table = table;
- this.privilege = privilege;
- this.createTime = createTime;
- this.grantor = grantor;
- this.grantorType = grantorType;
- this.grantOption = grantOption;
- }
-
- public String getPrincipalName() {
- return principalName;
- }
-
- public void setPrincipalName(String principalName) {
- this.principalName = principalName;
- }
-
-
- /**
- * @return a set of privileges this user/role/group has
- */
- public String getPrivilege() {
- return privilege;
- }
-
- /**
- * @param dbPrivilege a set of privileges this user/role/group has
- */
- public void setPrivilege(String dbPrivilege) {
- this.privilege = dbPrivilege;
- }
-
- /**
- * @return create time
- */
- public int getCreateTime() {
- return createTime;
- }
-
- /**
- * @param createTime create time
- */
- public void setCreateTime(int createTime) {
- this.createTime = createTime;
- }
-
- /**
- * @return the grantor
- */
- public String getGrantor() {
- return grantor;
- }
-
- /**
- * @param grantor
- */
- public void setGrantor(String grantor) {
- this.grantor = grantor;
- }
-
- public String getPrincipalType() {
- return principalType;
- }
-
- public void setPrincipalType(String principalType) {
- this.principalType = principalType;
- }
-
- public MTable getTable() {
- return table;
- }
-
- public void setTable(MTable table) {
- this.table = table;
- }
-
- public boolean getGrantOption() {
- return grantOption;
- }
-
- public void setGrantOption(boolean grantOption) {
- this.grantOption = grantOption;
- }
-
- public String getGrantorType() {
- return grantorType;
- }
-
- public void setGrantorType(String grantorType) {
- this.grantorType = grantorType;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MType.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MType.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MType.java
deleted file mode 100644
index fb8d82f..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MType.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- *
- */
-package org.apache.hadoop.hive.metastore.model;
-
-import java.util.List;
-
-/**
- * Represents a Hive type
- *
- */
-public class MType {
- private String name;
- private String type1;
- private String type2;
- private List<MFieldSchema> fields;
-
- /**
- * @param name
- * @param type1
- * @param type2
- * @param fields
- */
- public MType(String name, String type1, String type2, List<MFieldSchema> fields) {
- this.name = name;
- this.type1 = type1;
- this.type2 = type2;
- this.fields = fields;
- }
-
- public MType() {}
-
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
- /**
- * @param name the name to set
- */
- public void setName(String name) {
- this.name = name;
- }
- /**
- * @return the type1
- */
- public String getType1() {
- return type1;
- }
-
- /**
- * @param type1 the type1 to set
- */
- public void setType1(String type1) {
- this.type1 = type1;
- }
-
- /**
- * @return the type2
- */
- public String getType2() {
- return type2;
- }
-
- /**
- * @param type2 the type2 to set
- */
- public void setType2(String type2) {
- this.type2 = type2;
- }
-
- /**
- * @return the fields
- */
- public List<MFieldSchema> getFields() {
- return fields;
- }
- /**
- * @param fields the fields to set
- */
- public void setFields(List<MFieldSchema> fields) {
- this.fields = fields;
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/org/apache/hadoop/hive/metastore/model/MVersionTable.java
----------------------------------------------------------------------
diff --git a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MVersionTable.java b/metastore/src/model/org/apache/hadoop/hive/metastore/model/MVersionTable.java
deleted file mode 100644
index c6c4289..0000000
--- a/metastore/src/model/org/apache/hadoop/hive/metastore/model/MVersionTable.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.hadoop.hive.metastore.model;
-
-public class MVersionTable {
- private String schemaVersion;
- private String versionComment;
-
- public MVersionTable() {}
-
- public MVersionTable(String schemaVersion, String versionComment) {
- this.schemaVersion = schemaVersion;
- this.versionComment = versionComment;
- }
- /**
- * @return the versionComment
- */
- public String getVersionComment() {
- return versionComment;
- }
- /**
- * @param versionComment the versionComment to set
- */
- public void setVersionComment(String versionComment) {
- this.versionComment = versionComment;
- }
-
- /**
- * @return the schemaVersion
- */
- public String getSchemaVersion() {
- return schemaVersion;
- }
- /**
- * @param schemaVersion the schemaVersion to set
- */
- public void setSchemaVersion(String schemaVersion) {
- this.schemaVersion = schemaVersion;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/metastore/src/model/package.jdo
----------------------------------------------------------------------
diff --git a/metastore/src/model/package.jdo b/metastore/src/model/package.jdo
deleted file mode 100644
index 570fd44..0000000
--- a/metastore/src/model/package.jdo
+++ /dev/null
@@ -1,1088 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 2.0//EN"
- "http://java.sun.com/dtd/jdo_2_0.dtd">
-<!--
- Size Limitations:
-
- Indexed VARCHAR: 767 bytes (MySQL running on InnoDB Engine http://bugs.mysql.com/bug.php?id=13315)
- Non-indexed VARCHAR: 4000 bytes (max length on Oracle 9i/10g/11g)
-
--->
-<jdo>
- <package name="org.apache.hadoop.hive.metastore.model">
- <class name="MDatabase" identity-type="datastore" table="DBS" detachable="true">
- <datastore-identity>
- <column name="DB_ID"/>
- </datastore-identity>
- <field name="name">
- <column name="NAME" length="128" jdbc-type="VARCHAR"/>
- <index name="UniqueDatabase" unique="true"/>
- </field>
- <field name="description">
- <column name="DESC" length="4000" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- <field name="locationUri">
- <column name="DB_LOCATION_URI" length="4000" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="parameters" table="DATABASE_PARAMS">
- <map key-type="java.lang.String" value-type="java.lang.String"/>
- <join>
- <column name="DB_ID"/>
- </join>
- <key>
- <column name="PARAM_KEY" length="180" jdbc-type="VARCHAR"/>
- </key>
- <value>
- <column name="PARAM_VALUE" length="4000" jdbc-type="VARCHAR"/>
- </value>
- </field>
- <field name="ownerName">
- <column name="OWNER_NAME" length="128" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- <field name="ownerType">
- <column name="OWNER_TYPE" length="10" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- </class>
-
- <class name="MFieldSchema" embedded-only="true" table="TYPE_FIELDS" detachable="true">
- <field name="name">
- <column name="FNAME" length="767" jdbc-type="VARCHAR"/>
- </field>
- <field name="type" >
- <column name="FTYPE" length="32672" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="comment" >
- <column name="FCOMMENT" length="4000" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- </class>
-
- <class name="MType" table="TYPES" detachable="true">
- <field name="name" >
- <column name="TYPE_NAME" length="128" jdbc-type="VARCHAR"/>
- <index name="UniqueType" unique="true"/>
- </field>
- <field name="type1">
- <column name="TYPE1" length="767" jdbc-type="VARCHAR"/>
- </field>
- <field name="type2">
- <column name="TYPE2" length="767" jdbc-type="VARCHAR"/>
- </field>
- <field name="fields" table="TYPE_FIELDS" >
- <collection element-type="MFieldSchema"/>
- <join>
- <primary-key name="TYPE_FIELDS_PK">
- <column name="TYPE_NAME"/>
- <column name="FIELD_NAME"/>
- </primary-key>
- <column name="TYPE_NAME"/>
- </join>
- <element>
- <embedded>
- <field name="name">
- <column name="FIELD_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="type">
- <column name="FIELD_TYPE" length="767" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="comment" >
- <column name="COMMENT" length="256" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- </embedded>
- </element>
- </field>
- </class>
-
- <class name="MTable" table="TBLS" identity-type="datastore" detachable="true">
- <datastore-identity>
- <column name="TBL_ID"/>
- </datastore-identity>
- <index name="UniqueTable" unique="true">
- <column name="TBL_NAME"/>
- <column name="DB_ID"/>
- </index>
- <field name="tableName">
- <column name="TBL_NAME" length="256" jdbc-type="VARCHAR"/>
- </field>
- <field name="database">
- <column name="DB_ID"/>
- </field>
- <field name="partitionKeys" table="PARTITION_KEYS" >
- <collection element-type="MFieldSchema"/>
- <join>
- <primary-key name="PARTITION_KEY_PK">
- <column name="TBL_ID"/>
- <column name="PKEY_NAME"/>
- </primary-key>
- <column name="TBL_ID"/>
- </join>
- <element>
- <embedded>
- <field name="name">
- <column name="PKEY_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="type">
- <column name="PKEY_TYPE" length="767" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="comment" >
- <column name="PKEY_COMMENT" length="4000" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- </embedded>
- </element>
- </field>
- <field name="sd" dependent="true">
- <column name="SD_ID"/>
- </field>
- <field name="owner">
- <column name="OWNER" length="767" jdbc-type="VARCHAR"/>
- </field>
- <field name="createTime">
- <column name="CREATE_TIME" jdbc-type="integer"/>
- </field>
- <field name="lastAccessTime">
- <column name="LAST_ACCESS_TIME" jdbc-type="integer"/>
- </field>
- <field name="retention">
- <column name="RETENTION" jdbc-type="integer"/>
- </field>
- <field name="parameters" table="TABLE_PARAMS">
- <map key-type="java.lang.String" value-type="java.lang.String"/>
- <join>
- <column name="TBL_ID"/>
- </join>
- <key>
- <column name="PARAM_KEY" length="256" jdbc-type="VARCHAR"/>
- </key>
- <value>
- <column name="PARAM_VALUE" length="32672" jdbc-type="VARCHAR"/>
- </value>
- </field>
- <field name="viewOriginalText" default-fetch-group="false">
- <column name="VIEW_ORIGINAL_TEXT" jdbc-type="LONGVARCHAR"/>
- </field>
- <field name="viewExpandedText" default-fetch-group="false">
- <column name="VIEW_EXPANDED_TEXT" jdbc-type="LONGVARCHAR"/>
- </field>
- <field name="rewriteEnabled">
- <column name="IS_REWRITE_ENABLED"/>
- </field>
- <field name="tableType">
- <column name="TBL_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- </class>
-
- <class name="MConstraint" identity-type="application" table="KEY_CONSTRAINTS" detachable="true" objectid-class="MConstraint$PK">
- <field name="constraintName" primary-key="true">
- <column name="CONSTRAINT_NAME"/>
- </field>
- <field name="position" primary-key="true">
- <column name="POSITION"/>
- </field>
- <field name="childColumn">
- <column name="CHILD_CD_ID"/>
- </field>
- <field name="childIntegerIndex">
- <column name="CHILD_INTEGER_IDX"/>
- </field>
- <field name="childTable">
- <column name="CHILD_TBL_ID"/>
- </field>
- <field name="parentColumn">
- <column name="PARENT_CD_ID"/>
- </field>
- <field name="parentIntegerIndex">
- <column name="PARENT_INTEGER_IDX"/>
- </field>
- <field name="parentTable">
- <column name="PARENT_TBL_ID"/>
- </field>
- <field name="constraintType">
- <column name="CONSTRAINT_TYPE"/>
- </field>
- <field name="deleteRule">
- <column name="DELETE_RULE"/>
- </field>
- <field name="updateRule">
- <column name="UPDATE_RULE"/>
- </field>
- <field name="enableValidateRely">
- <column name="ENABLE_VALIDATE_RELY"/>
- </field>
- </class>
-
- <class name="MSerDeInfo" identity-type="datastore" table="SERDES" detachable="true">
- <datastore-identity>
- <column name="SERDE_ID"/>
- </datastore-identity>
- <field name="name">
- <column name="NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="serializationLib">
- <column name="SLIB" length="4000" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- <field name="parameters" table="SERDE_PARAMS">
- <map key-type="java.lang.String" value-type="java.lang.String"/>
- <join>
- <column name="SERDE_ID"/>
- </join>
- <key>
- <column name="PARAM_KEY" length="256" jdbc-type="VARCHAR"/>
- </key>
- <value>
- <column name="PARAM_VALUE" length="32672" jdbc-type="VARCHAR"/>
- </value>
- </field>
- </class>
-
- <class name="MOrder" embedded-only="true" table="SORT_ORDER" detachable="true">
- <field name="col">
- <column name="COL_NAME" length="767" jdbc-type="VARCHAR"/>
- </field>
- <field name="order">
- <column name="ORDER" jdbc-type="INTEGER" allows-null="false"/>
- </field>
- </class>
-
- <class name="MColumnDescriptor" identity-type="datastore" table="CDS" detachable="true">
- <datastore-identity>
- <column name="CD_ID"/>
- </datastore-identity>
- <field name="cols" table="COLUMNS_V2" >
- <collection element-type="MFieldSchema"/>
- <join>
- <primary-key name="COLUMNS_PK">
- <column name="COLUMN_NAME"/>
- </primary-key>
- <column name="CD_ID"/>
- </join>
- <element>
- <embedded>
- <field name="name">
- <column name="COLUMN_NAME" length="767" jdbc-type="VARCHAR"/>
- </field>
- <field name="type">
- <column name="TYPE_NAME" length="32672" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="comment">
- <column name="COMMENT" length="256" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- </embedded>
- </element>
- </field>
- </class>
-
- <class name="MStringList" identity-type="datastore" table="Skewed_STRING_LIST" detachable="true">
- <datastore-identity>
- <column name="STRING_LIST_ID"/>
- </datastore-identity>
- <field name="internalList" table="Skewed_STRING_LIST_VALUES">
- <collection element-type="java.lang.String"/>
- <join>
- <column name="STRING_LIST_ID"/>
- </join>
- <element column="STRING_LIST_VALUE"/>
- </field>
- </class>
-
- <class name="MStorageDescriptor" identity-type="datastore" table="SDS" detachable="true">
- <datastore-identity>
- <column name="SD_ID"/>
- </datastore-identity>
- <field name="cd">
- <column name="CD_ID"/>
- </field>
- <field name="location">
- <column name="LOCATION" length="4000" jdbc-type="VARCHAR"/>
- </field>
- <field name="inputFormat">
- <column name="INPUT_FORMAT" length="4000" jdbc-type="VARCHAR"/>
- </field>
- <field name="outputFormat">
- <column name="OUTPUT_FORMAT" length="4000" jdbc-type="VARCHAR"/>
- </field>
- <field name="isCompressed">
- <column name="IS_COMPRESSED"/>
- </field>
- <field name="isStoredAsSubDirectories">
- <column name="IS_STOREDASSUBDIRECTORIES"/>
- </field>
- <field name="numBuckets">
- <column name="NUM_BUCKETS" jdbc-type="integer"/>
- </field>
- <field name="serDeInfo" dependent="true">
- <column name="SERDE_ID"/>
- </field>
- <field name="bucketCols" table="BUCKETING_COLS">
- <collection element-type="java.lang.String"/>
- <join>
- <column name="SD_ID"/>
- </join>
- <element column="BUCKET_COL_NAME"/>
- </field>
- <field name="sortCols" table="SORT_COLS">
- <collection element-type="MOrder"/>
- <join>
- <column name="SD_ID"/>
- </join>
- <element>
- <embedded>
- <field name="col">
- <column name="COLUMN_NAME" length="767" jdbc-type="VARCHAR"/>
- </field>
- <field name="order">
- <column name="ORDER" jdbc-type="INTEGER" allows-null="false"/>
- </field>
- </embedded>
- </element>
- </field>
- <field name="parameters" table="SD_PARAMS">
- <map key-type="java.lang.String" value-type="java.lang.String"/>
- <join>
- <column name="SD_ID"/>
- </join>
- <key>
- <column name="PARAM_KEY" length="256" jdbc-type="VARCHAR"/>
- </key>
- <value>
- <column name="PARAM_VALUE" length="32672" jdbc-type="VARCHAR"/>
- </value>
- </field>
- <field name="skewedColNames" table="SKEWED_COL_NAMES">
- <collection element-type="java.lang.String"/>
- <join>
- <column name="SD_ID"/>
- </join>
- <element column="SKEWED_COL_NAME"/>
- </field>
- <field name="skewedColValues" table="SKEWED_VALUES">
- <collection element-type="MStringList"/>
- <join/>
- </field>
- <field name="skewedColValueLocationMaps" table="SKEWED_COL_VALUE_LOC_MAP">
- <map key-type="MStringList" value-type="java.lang.String"/>
- <join>
- <column name="SD_ID"/>
- </join>
- <value>
- <column name="location" length="4000" jdbc-type="VARCHAR"/>
- </value>
- </field>
- </class>
-
- <class name="MPartition" table="PARTITIONS" identity-type="datastore" detachable="true">
- <index name="UniquePartition" unique="true">
- <column name="PART_NAME"/>
- <column name="TBL_ID"/>
- </index>
- <datastore-identity>
- <column name="PART_ID"/>
- </datastore-identity>
- <field name="partitionName">
- <column name="PART_NAME" length="767" jdbc-type="VARCHAR"/>
- </field>
- <field name="table">
- <column name="TBL_ID"/>
- </field>
- <field name="createTime">
- <column name="CREATE_TIME" jdbc-type="integer"/>
- </field>
- <field name="lastAccessTime">
- <column name="LAST_ACCESS_TIME" jdbc-type="integer"/>
- </field>
- <field name="values" table="PARTITION_KEY_VALS">
- <collection element-type="java.lang.String"/>
- <join>
- <column name="PART_ID"/>
- </join>
- <element column="PART_KEY_VAL"/>
- </field>
- <field name="sd" dependent="true">
- <column name="SD_ID"/>
- </field>
- <field name="parameters" table="PARTITION_PARAMS">
- <map key-type="java.lang.String" value-type="java.lang.String"/>
- <join>
- <column name="PART_ID"/>
- </join>
- <key>
- <column name="PARAM_KEY" length="256" jdbc-type="VARCHAR"/>
- </key>
- <value>
- <column name="PARAM_VALUE" length="4000" jdbc-type="VARCHAR"/>
- </value>
- </field>
- </class>
-
- <class name="MIndex" table="IDXS" identity-type="datastore" detachable="true">
- <index name="UniqueINDEX" unique="true">
- <column name="INDEX_NAME"/>
- <column name="ORIG_TBL_ID"/>
- </index>
-
- <datastore-identity>
- <column name="INDEX_ID"/>
- </datastore-identity>
- <field name="indexName">
- <column name="INDEX_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="origTable">
- <column name="ORIG_TBL_ID"/>
- </field>
- <field name="indexTable">
- <column name="INDEX_TBL_ID"/>
- </field>
- <field name="indexHandlerClass">
- <column name="INDEX_HANDLER_CLASS" length="4000" jdbc-type="VARCHAR"/>
- </field>
- <field name="deferredRebuild">
- <column name="DEFERRED_REBUILD"/>
- </field>
- <field name="createTime">
- <column name="CREATE_TIME" jdbc-type="integer"/>
- </field>
- <field name="lastAccessTime">
- <column name="LAST_ACCESS_TIME" jdbc-type="integer"/>
- </field>
- <field name="sd" dependent="true">
- <column name="SD_ID"/>
- </field>
- <field name="parameters" table="INDEX_PARAMS">
- <map key-type="java.lang.String" value-type="java.lang.String"/>
- <join>
- <column name="INDEX_ID"/>
- </join>
- <key>
- <column name="PARAM_KEY" length="256" jdbc-type="VARCHAR"/>
- </key>
- <value>
- <column name="PARAM_VALUE" length="4000" jdbc-type="VARCHAR"/>
- </value>
- </field>
- </class>
-
- <class name="MRole" table="ROLES" identity-type="datastore" detachable="true">
-
- <index name="RoleEntityINDEX" unique="true">
- <column name="ROLE_NAME"/>
- </index>
-
- <datastore-identity>
- <column name="ROLE_ID"/>
- </datastore-identity>
-
- <field name="roleName">
- <column name="ROLE_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="createTime">
- <column name="CREATE_TIME" jdbc-type="integer"/>
- </field>
- <field name="ownerName">
- <column name="OWNER_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
-
- </class>
-
- <class name="MRoleMap" table="ROLE_MAP" identity-type="datastore" detachable="true">
- <index name="UserRoleMapINDEX" unique="true">
- <column name="PRINCIPAL_NAME"/>
- <column name="ROLE_ID"/>
- <column name="GRANTOR"/>
- <column name="GRANTOR_TYPE"/>
- </index>
-
- <datastore-identity>
- <column name="ROLE_GRANT_ID"/>
- </datastore-identity>
-
- <field name="role">
- <column name="ROLE_ID" />
- </field>
- <field name="principalName">
- <column name="PRINCIPAL_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="principalType">
- <column name="PRINCIPAL_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="addTime">
- <column name="ADD_TIME" jdbc-type="integer"/>
- </field>
- <field name="grantor">
- <column name="GRANTOR" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="grantorType">
- <column name="GRANTOR_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="grantOption">
- <column name="GRANT_OPTION" jdbc-type="SMALLINT"/>
- </field>
- </class>
-
- <class name="MGlobalPrivilege" table="GLOBAL_PRIVS" identity-type="datastore" detachable="true">
-
- <index name="GlobalPrivilegeIndex" unique="true">
- <column name="PRINCIPAL_NAME"/>
- <column name="PRINCIPAL_TYPE"/>
- <column name="USER_PRIV"/>
- <column name="GRANTOR"/>
- <column name="GRANTOR_TYPE"/>
- </index>
-
- <datastore-identity>
- <column name="USER_GRANT_ID"/>
- </datastore-identity>
-
- <field name="principalName">
- <column name="PRINCIPAL_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="principalType">
- <column name="PRINCIPAL_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="privilege">
- <column name="USER_PRIV" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="createTime">
- <column name="CREATE_TIME" jdbc-type="integer"/>
- </field>
- <field name="grantor">
- <column name="GRANTOR" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="grantorType">
- <column name="GRANTOR_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="grantOption">
- <column name="GRANT_OPTION" jdbc-type="SMALLINT"/>
- </field>
- </class>
-
- <class name="MDBPrivilege" table="DB_PRIVS" identity-type="datastore" detachable="true">
-
- <index name="DBPrivilegeIndex" unique="true">
- <column name="DB_ID"/>
- <column name="PRINCIPAL_NAME"/>
- <column name="PRINCIPAL_TYPE"/>
- <column name="DB_PRIV"/>
- <column name="GRANTOR"/>
- <column name="GRANTOR_TYPE"/>
- </index>
-
- <datastore-identity>
- <column name="DB_GRANT_ID"/>
- </datastore-identity>
-
- <field name="principalName">
- <column name="PRINCIPAL_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="principalType">
- <column name="PRINCIPAL_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="database">
- <column name="DB_ID" />
- </field>
- <field name="privilege">
- <column name="DB_PRIV" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="createTime">
- <column name="CREATE_TIME" jdbc-type="integer"/>
- </field>
- <field name="grantor">
- <column name="GRANTOR" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="grantorType">
- <column name="GRANTOR_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="grantOption">
- <column name="GRANT_OPTION" jdbc-type="SMALLINT"/>
- </field>
- </class>
-
- <class name="MTablePrivilege" table="TBL_PRIVS" identity-type="datastore" detachable="true">
-
- <index name="TablePrivilegeIndex" unique="false">
- <column name="TBL_ID"/>
- <column name="PRINCIPAL_NAME"/>
- <column name="PRINCIPAL_TYPE"/>
- <column name="TBL_PRIV"/>
- <column name="GRANTOR"/>
- <column name="GRANTOR_TYPE"/>
- </index>
-
- <datastore-identity>
- <column name="TBL_GRANT_ID"/>
- </datastore-identity>
-
- <field name="principalName">
- <column name="PRINCIPAL_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="principalType">
- <column name="PRINCIPAL_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="table">
- <column name="TBL_ID"/>
- </field>
- <field name="privilege">
- <column name="TBL_PRIV" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="createTime">
- <column name="CREATE_TIME" jdbc-type="integer"/>
- </field>
- <field name="grantor">
- <column name="GRANTOR" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="grantorType">
- <column name="GRANTOR_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="grantOption">
- <column name="GRANT_OPTION" jdbc-type="SMALLINT"/>
- </field>
- </class>
-
- <class name="MPartitionPrivilege" table="PART_PRIVS" identity-type="datastore" detachable="true">
-
- <index name="PartPrivilegeIndex" unique="false">
- <column name="PART_ID"/>
- <column name="PRINCIPAL_NAME"/>
- <column name="PRINCIPAL_TYPE"/>
- <column name="PART_PRIV"/>
- <column name="GRANTOR"/>
- <column name="GRANTOR_TYPE"/>
- </index>
-
- <datastore-identity>
- <column name="PART_GRANT_ID"/>
- </datastore-identity>
-
- <field name="principalName">
- <column name="PRINCIPAL_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="principalType">
- <column name="PRINCIPAL_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="partition">
- <column name="PART_ID" />
- </field>
- <field name="privilege">
- <column name="PART_PRIV" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="createTime">
- <column name="CREATE_TIME" jdbc-type="integer"/>
- </field>
- <field name="grantor">
- <column name="GRANTOR" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="grantorType">
- <column name="GRANTOR_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="grantOption">
- <column name="GRANT_OPTION" jdbc-type="SMALLINT"/>
- </field>
- </class>
-
- <class name="MTableColumnPrivilege" table="TBL_COL_PRIVS" identity-type="datastore" detachable="true">
-
- <index name="TableColumnPrivilegeIndex" unique="false">
- <column name="TBL_ID"/>
- <column name="COLUMN_NAME"/>
- <column name="PRINCIPAL_NAME"/>
- <column name="PRINCIPAL_TYPE"/>
- <column name="TBL_COL_PRIV"/>
- <column name="GRANTOR"/>
- <column name="GRANTOR_TYPE"/>
- </index>
-
- <datastore-identity>
- <column name="TBL_COLUMN_GRANT_ID"/>
- </datastore-identity>
-
- <field name="principalName">
- <column name="PRINCIPAL_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="principalType">
- <column name="PRINCIPAL_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="table">
- <column name="TBL_ID" />
- </field>
- <field name="columnName">
- <column name="COLUMN_NAME" length="767" jdbc-type="VARCHAR"/>
- </field>
- <field name="privilege">
- <column name="TBL_COL_PRIV" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="createTime">
- <column name="CREATE_TIME" jdbc-type="integer"/>
- </field>
- <field name="grantor">
- <column name="GRANTOR" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="grantorType">
- <column name="GRANTOR_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="grantOption">
- <column name="GRANT_OPTION" jdbc-type="SMALLINT"/>
- </field>
- </class>
-
- <class name="MPartitionColumnPrivilege" table="PART_COL_PRIVS" identity-type="datastore" detachable="true">
-
- <index name="PartitionColumnPrivilegeIndex" unique="false">
- <column name="PART_ID"/>
- <column name="COLUMN_NAME"/>
- <column name="PRINCIPAL_NAME"/>
- <column name="PRINCIPAL_TYPE"/>
- <column name="PART_COL_PRIV"/>
- <column name="GRANTOR"/>
- <column name="GRANTOR_TYPE"/>
- </index>
-
- <datastore-identity>
- <column name="PART_COLUMN_GRANT_ID"/>
- </datastore-identity>
-
- <field name="principalName">
- <column name="PRINCIPAL_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="principalType">
- <column name="PRINCIPAL_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="partition">
- <column name="PART_ID" />
- </field>
- <field name="columnName">
- <column name="COLUMN_NAME" length="767" jdbc-type="VARCHAR"/>
- </field>
- <field name="privilege">
- <column name="PART_COL_PRIV" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="createTime">
- <column name="CREATE_TIME" jdbc-type="integer"/>
- </field>
- <field name="grantor">
- <column name="GRANTOR" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="grantorType">
- <column name="GRANTOR_TYPE" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="grantOption">
- <column name="GRANT_OPTION" jdbc-type="SMALLINT"/>
- </field>
- </class>
-
- <class name="MPartitionEvent" table="PARTITION_EVENTS" identity-type="datastore" detachable="true">
-
- <index name="PartitionEventIndex" unique="false">
- <column name="PARTITION_NAME"/>
- </index>
-
- <datastore-identity>
- <column name="PART_NAME_ID"/>
- </datastore-identity>
-
- <field name="dbName">
- <column name="DB_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="tblName">
- <column name="TBL_NAME" length="256" jdbc-type="VARCHAR"/>
- </field>
- <field name="partName">
- <column name="PARTITION_NAME" length="767" jdbc-type="VARCHAR"/>
- </field>
- <field name="eventType">
- <column name="EVENT_TYPE" jdbc-type="integer"/>
- </field>
- <field name="eventTime">
- <column name="EVENT_TIME" jdbc-type="BIGINT"/>
- </field>
-
- </class>
-
- <class name="MMasterKey" table="MASTER_KEYS" identity-type="application" detachable="true">
-
- <field name="keyId" primary-key="true" value-strategy="native">
- <column name="KEY_ID" jdbc-type="integer" />
- </field>
-
- <field name="masterKey">
- <column name="MASTER_KEY" length="767" jdbc-type="VARCHAR" />
- </field>
-
- </class>
-
- <class name="MDelegationToken" table="DELEGATION_TOKENS" identity-type="application" detachable="true">
-
- <field name="tokenIdentifier" primary-key="true">
- <column name="TOKEN_IDENT" length="767" jdbc-type="VARCHAR" />
- </field>
-
- <field name="tokenStr">
- <column name="TOKEN" length="767" jdbc-type="VARCHAR" />
- </field>
-
- </class>
-
- <class name="MTableColumnStatistics" table="TAB_COL_STATS" identity-type="datastore" detachable="true">
- <datastore-identity>
- <column name="CS_ID"/>
- </datastore-identity>
-
- <field name ="dbName">
- <column name="DB_NAME" length="128" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="tableName">
- <column name="TABLE_NAME" length="256" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="table">
- <column name="TBL_ID"/>
- </field>
- <field name="colName">
- <column name="COLUMN_NAME" length="767" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="colType">
- <column name="COLUMN_TYPE" length="128" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="longLowValue">
- <column name="LONG_LOW_VALUE" jdbc-type="BIGINT" allows-null="true"/>
- </field>
- <field name="longHighValue">
- <column name="LONG_HIGH_VALUE" jdbc-type="BIGINT" allows-null="true"/>
- </field>
- <field name="doubleLowValue">
- <column name="DOUBLE_LOW_VALUE" jdbc-type="DOUBLE" allows-null="true"/>
- </field>
- <field name="doubleHighValue">
- <column name="DOUBLE_HIGH_VALUE" jdbc-type="DOUBLE" allows-null="true"/>
- </field>
- <field name="decimalLowValue">
- <column name="BIG_DECIMAL_LOW_VALUE" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- <field name="decimalHighValue">
- <column name="BIG_DECIMAL_HIGH_VALUE" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- <field name="numNulls">
- <column name="NUM_NULLS" jdbc-type="BIGINT" allows-null="false"/>
- </field>
- <field name="numDVs">
- <column name="NUM_DISTINCTS" jdbc-type="BIGINT" allows-null="true"/>
- </field>
- <field name="bitVector">
- <column name="BIT_VECTOR" jdbc-type="BLOB" allows-null="true"/>
- </field>
- <field name="avgColLen">
- <column name="AVG_COL_LEN" jdbc-type="DOUBLE" allows-null="true"/>
- </field>
- <field name="maxColLen">
- <column name="MAX_COL_LEN" jdbc-type="BIGINT" allows-null="true"/>
- </field>
- <field name="numTrues">
- <column name="NUM_TRUES" jdbc-type="BIGINT" allows-null="true"/>
- </field>
- <field name="numFalses">
- <column name="NUM_FALSES" jdbc-type="BIGINT" allows-null="true"/>
- </field>
- <field name="lastAnalyzed">
- <column name="LAST_ANALYZED" jdbc-type="BIGINT" allows-null="false"/>
- </field>
- </class>
-
- <class name="MPartitionColumnStatistics" table="PART_COL_STATS" identity-type="datastore" detachable="true">
- <datastore-identity>
- <column name="CS_ID"/>
- </datastore-identity>
-
- <field name ="dbName">
- <column name="DB_NAME" length="128" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="tableName">
- <column name="TABLE_NAME" length="256" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="partitionName">
- <column name="PARTITION_NAME" length="767" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="partition">
- <column name="PART_ID"/>
- </field>
- <field name="colName">
- <column name="COLUMN_NAME" length="767" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="colType">
- <column name="COLUMN_TYPE" length="128" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="longLowValue">
- <column name="LONG_LOW_VALUE" jdbc-type="BIGINT" allows-null="true"/>
- </field>
- <field name="longHighValue">
- <column name="LONG_HIGH_VALUE" jdbc-type="BIGINT" allows-null="true"/>
- </field>
- <field name="doubleLowValue">
- <column name="DOUBLE_LOW_VALUE" jdbc-type="DOUBLE" allows-null="true"/>
- </field>
- <field name="doubleHighValue">
- <column name="DOUBLE_HIGH_VALUE" jdbc-type="DOUBLE" allows-null="true"/>
- </field>
- <field name="decimalLowValue">
- <column name="BIG_DECIMAL_LOW_VALUE" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- <field name="decimalHighValue">
- <column name="BIG_DECIMAL_HIGH_VALUE" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- <field name="numNulls">
- <column name="NUM_NULLS" jdbc-type="BIGINT" allows-null="false"/>
- </field>
- <field name="numDVs">
- <column name="NUM_DISTINCTS" jdbc-type="BIGINT" allows-null="true"/>
- </field>
- <field name="bitVector">
- <column name="BIT_VECTOR" jdbc-type="BLOB" allows-null="true"/>
- </field>
- <field name="avgColLen">
- <column name="AVG_COL_LEN" jdbc-type="DOUBLE" allows-null="true"/>
- </field>
- <field name="maxColLen">
- <column name="MAX_COL_LEN" jdbc-type="BIGINT" allows-null="true"/>
- </field>
- <field name="numTrues">
- <column name="NUM_TRUES" jdbc-type="BIGINT" allows-null="true"/>
- </field>
- <field name="numFalses">
- <column name="NUM_FALSES" jdbc-type="BIGINT" allows-null="true"/>
- </field>
- <field name="lastAnalyzed">
- <column name="LAST_ANALYZED" jdbc-type="BIGINT" allows-null="false"/>
- </field>
- </class>
- <class name="MVersionTable" table="VERSION" identity-type="datastore" detachable="true">
- <datastore-identity>
- <column name="VER_ID"/>
- </datastore-identity>
- <field name ="schemaVersion">
- <column name="SCHEMA_VERSION" length="127" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name ="versionComment">
- <column name="VERSION_COMMENT" length="255" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- </class>
-
- <class name="MMetastoreDBProperties" table="METASTORE_DB_PROPERTIES" identity-type="application" detachable="true">
- <field name ="propertyKey" primary-key="true">
- <column name="PROPERTY_KEY" length="255" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name ="propertyValue">
- <column name="PROPERTY_VALUE" length="1000" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name ="description">
- <column name="DESCRIPTION" length="1000" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- </class>
-
- <class name="MResourceUri" embedded-only="true" table="RESOURCE_URI" detachable="true">
- <field name="resourceType">
- <column name="RESOURCE_TYPE" jdbc-type="INTEGER"/>
- </field>
- <field name="uri">
- <column name="RESOURCE_URI" length="4000" jdbc-type="VARCHAR"/>
- </field>
- </class>
-
- <class name="MFunction" table="FUNCS" identity-type="datastore" detachable="true">
- <datastore-identity>
- <column name="FUNC_ID"/>
- </datastore-identity>
- <index name="UniqueFunction" unique="true">
- <column name="FUNC_NAME"/>
- <column name="DB_ID"/>
- </index>
- <field name="functionName">
- <column name="FUNC_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="database">
- <column name="DB_ID"/>
- </field>
- <field name="functionType">
- <column name="FUNC_TYPE" jdbc-type="integer"/>
- </field>
- <field name="className">
- <column name="CLASS_NAME" length="4000" jdbc-type="VARCHAR"/>
- </field>
- <field name="ownerName">
- <column name="OWNER_NAME" length="128" jdbc-type="VARCHAR"/>
- </field>
- <field name="ownerType">
- <column name="OWNER_TYPE" length="10" jdbc-type="VARCHAR"/>
- </field>
- <field name="createTime">
- <column name="CREATE_TIME" jdbc-type="integer"/>
- </field>
- <field name="resourceUris" table="FUNC_RU">
- <collection element-type="MResourceUri"/>
- <join>
- <column name="FUNC_ID"/>
- </join>
- <element>
- <embedded>
- <field name="resourceType">
- <column name="RESOURCE_TYPE" jdbc-type="INTEGER"/>
- </field>
- <field name="uri">
- <column name="RESOURCE_URI" length="4000" jdbc-type="VARCHAR"/>
- </field>
- </embedded>
- </element>
- </field>
- </class>
-
- <class name="MNotificationLog" table="NOTIFICATION_LOG" identity-type="datastore" detachable="true">
- <datastore-identity>
- <column name="NL_ID"/>
- </datastore-identity>
- <field name="eventId">
- <column name="EVENT_ID" jdbc-type="BIGINT" allows-null="false"/>
- </field>
- <field name="eventTime">
- <column name="EVENT_TIME" jdbc-type="INTEGER" allows-null="false"/>
- </field>
- <field name="eventType">
- <column name="EVENT_TYPE" length="32" jdbc-type="VARCHAR" allows-null="false"/>
- </field>
- <field name="dbName">
- <column name="DB_NAME" length="128" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- <field name="tableName">
- <column name="TBL_NAME" length="256" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- <field name="message">
- <column name="MESSAGE" jdbc-type="LONGVARCHAR"/>
- </field>
- <field name="messageFormat">
- <column name="MESSAGE_FORMAT" length="16" jdbc-type="VARCHAR" allows-null="true"/>
- </field>
- </class>
-
- <!-- I tried to use a sequence here but derby didn't handle it well. -->
- <class name="MNotificationNextId" table="NOTIFICATION_SEQUENCE" identity-type="datastore" detachable="true">
- <datastore-identity>
- <column name="NNI_ID"/>
- </datastore-identity>
- <field name="nextEventId">
- <column name="NEXT_EVENT_ID" jdbc-type="BIGINT" allows-null="false"/>
- </field>
- </class>
-
-
- </package>
-</jdo>
-
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/pom.xml
----------------------------------------------------------------------
diff --git a/standalone-metastore/pom.xml b/standalone-metastore/pom.xml
index 9ee16bd..b8826c6 100644
--- a/standalone-metastore/pom.xml
+++ b/standalone-metastore/pom.xml
@@ -69,6 +69,26 @@
<artifactId>libthrift</artifactId>
<version>${libthrift.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-api-jdo</artifactId>
+ <version>${datanucleus-api-jdo.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-core</artifactId>
+ <version>${datanucleus-core.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-rdbms</artifactId>
+ <version>${datanucleus-rdbms.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>javax.jdo</artifactId>
+ <version>${datanucleus-jdo.version}</version>
+ </dependency>
<!-- test scope dependencies -->
@@ -123,6 +143,14 @@
</profiles>
<build>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/main/resources</directory>
+ <includes>
+ <include>package.jdo</include>
+ </includes>
+ </resource>
+ </resources>
<plugins>
<!-- plugins are always listed in sorted order by groupId, artifectId -->
<plugin>
@@ -143,6 +171,24 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-maven-plugin</artifactId>
+ <configuration>
+ <api>JDO</api>
+ <verbose>true</verbose>
+ <metadataIncludes>**/*.jdo</metadataIncludes>
+ <fork>false</fork>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>enhance</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MColumnDescriptor.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MColumnDescriptor.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MColumnDescriptor.java
new file mode 100644
index 0000000..6ffb9b3
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MColumnDescriptor.java
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.hadoop.hive.metastore.model;
+
+import java.util.List;
+
+/**
+ *
+ * MColumnDescriptor.
+ * A wrapper around a list of columns.
+ */
+public class MColumnDescriptor {
+ private List<MFieldSchema> cols;
+
+ public MColumnDescriptor() {}
+
+ /**
+ *
+ * @param cols
+ */
+ public MColumnDescriptor(List<MFieldSchema> cols) {
+ this.cols = cols;
+ }
+
+ public List<MFieldSchema> getCols() {
+ return cols;
+ }
+
+ public void setCols(List<MFieldSchema> cols) {
+ this.cols = cols;
+ }
+}
http://git-wip-us.apache.org/repos/asf/hive/blob/98ec28ed/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MConstraint.java
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MConstraint.java b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MConstraint.java
new file mode 100644
index 0000000..3fcb048
--- /dev/null
+++ b/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/model/MConstraint.java
@@ -0,0 +1,188 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.metastore.model;
+
+import java.io.Serializable;
+
+public class MConstraint
+{
+ String constraintName;
+ int constraintType;
+ int position;
+ Integer deleteRule;
+ Integer updateRule;
+ MTable parentTable;
+ MTable childTable;
+ MColumnDescriptor parentColumn;
+ MColumnDescriptor childColumn;
+ Integer childIntegerIndex;
+ Integer parentIntegerIndex;
+ int enableValidateRely;
+
+ // 0 - Primary Key
+ // 1 - PK-FK relationship
+ // 2 - Unique Constraint
+ // 3 - Not Null Constraint
+ public final static int PRIMARY_KEY_CONSTRAINT = 0;
+ public final static int FOREIGN_KEY_CONSTRAINT = 1;
+ public final static int UNIQUE_CONSTRAINT = 2;
+ public final static int NOT_NULL_CONSTRAINT = 3;
+
+ @SuppressWarnings("serial")
+ public static class PK implements Serializable {
+ public String constraintName;
+ public int position;
+
+ public PK() {}
+
+ public PK(String constraintName, int position) {
+ this.constraintName = constraintName;
+ this.position = position;
+ }
+
+ public String toString() {
+ return constraintName+":"+position;
+ }
+
+ public int hashCode() {
+ return toString().hashCode();
+ }
+
+ public boolean equals(Object other) {
+ if (other != null && (other instanceof PK)) {
+ PK otherPK = (PK) other;
+ return otherPK.constraintName.equals(constraintName) && otherPK.position == position;
+ }
+ return false;
+ }
+ }
+
+ public MConstraint() {}
+
+ public MConstraint(String constraintName, int constraintType, int position, Integer deleteRule, Integer updateRule, int enableRelyValidate, MTable parentTable,
+ MTable childTable, MColumnDescriptor parentColumn, MColumnDescriptor childColumn, Integer childIntegerIndex, Integer parentIntegerIndex) {
+ this.constraintName = constraintName;
+ this.constraintType = constraintType;
+ this.parentTable = parentTable;
+ this.childTable = childTable;
+ this.parentColumn = parentColumn;
+ this.childColumn = childColumn;
+ this.position = position;
+ this.deleteRule = deleteRule;
+ this.updateRule = updateRule;
+ this.enableValidateRely = enableRelyValidate;
+ this.childIntegerIndex = childIntegerIndex;
+ this.parentIntegerIndex = parentIntegerIndex;
+ }
+
+ public String getConstraintName() {
+ return constraintName;
+ }
+
+ public void setConstraintName(String fkName) {
+ this.constraintName = fkName;
+ }
+
+ public int getConstraintType() {
+ return constraintType;
+ }
+
+ public void setConstraintType(int ct) {
+ this.constraintType = ct;
+ }
+
+ public int getPosition() {
+ return position;
+ }
+
+ public void setPosition(int po) {
+ this.position = po;
+ }
+
+ public Integer getDeleteRule() {
+ return deleteRule;
+ }
+
+ public void setDeleteRule(Integer de) {
+ this.deleteRule = de;
+ }
+
+ public int getEnableValidateRely() {
+ return enableValidateRely;
+ }
+
+ public void setEnableValidateRely(int enableValidateRely) {
+ this.enableValidateRely = enableValidateRely;
+ }
+
+ public Integer getChildIntegerIndex() {
+ return childIntegerIndex;
+ }
+
+ public void setChildIntegerIndex(Integer childIntegerIndex) {
+ this.childIntegerIndex = childIntegerIndex;
+ }
+
+ public Integer getParentIntegerIndex() {
+ return childIntegerIndex;
+ }
+
+ public void setParentIntegerIndex(Integer parentIntegerIndex) {
+ this.parentIntegerIndex = parentIntegerIndex;
+ }
+
+ public Integer getUpdateRule() {
+ return updateRule;
+ }
+
+ public void setUpdateRule(Integer ur) {
+ this.updateRule = ur;
+ }
+
+ public MTable getChildTable() {
+ return childTable;
+ }
+
+ public void setChildTable(MTable ft) {
+ this.childTable = ft;
+ }
+
+ public MTable getParentTable() {
+ return parentTable;
+ }
+
+ public void setParentTable(MTable pt) {
+ this.parentTable = pt;
+ }
+
+ public MColumnDescriptor getParentColumn() {
+ return parentColumn;
+ }
+
+ public void setParentColumn(MColumnDescriptor name) {
+ this.parentColumn = name;
+ }
+
+ public MColumnDescriptor getChildColumn() {
+ return childColumn;
+ }
+
+ public void setChildColumn(MColumnDescriptor name) {
+ this.childColumn = name;
+ }
+}