diff --git common/build.xml common/build.xml index 8268749..bb595dc 100755 --- common/build.xml +++ common/build.xml @@ -30,9 +30,15 @@ to call at top-level: ant deploy-contrib compile-core-test + + + $src_dir/gen/org/apache/hive/common/package-info.java /* * Generated by saveVersion.sh */ -@HiveVersionAnnotation(version="VERSION", revision="REV", branch="BRANCH", +@HiveVersionAnnotation(version="VERSION", shortVersion="SHORTVERSION", + revision="REV", branch="BRANCH", user="USER", date="DATE", url="URL", srcChecksum="SRCCHECKSUM") package org.apache.hive.common; diff --git metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreSchemaInfo.java metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreSchemaInfo.java index c451468..810d26d 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreSchemaInfo.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreSchemaInfo.java @@ -130,9 +130,9 @@ private String generateUpgradeFileName(String fileVersion) { return UPGRADE_FILE_PREFIX + fileVersion + "." + dbType + SQL_FILE_EXTENSION; } - // Current hive version, remove the 'SNAPSHOT' part if needed + // Current hive version, in majorVersion.minorVersion.changeVersion format public static String getHiveSchemaVersion() { - return HiveVersionInfo.getVersion().replace("-SNAPSHOT", ""); + return HiveVersionInfo.getShortVersion(); } }