You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/03/17 16:29:53 UTC

[GitHub] [hive] pvary opened a new pull request #3115: HIVE-26044: Remove hardcoded version references from the tests

pvary opened a new pull request #3115:
URL: https://github.com/apache/hive/pull/3115


   ### What changes were proposed in this pull request?
   Remove hardcoded version references from the tests
   
   ### Why are the changes needed?
   For easier version changes
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   Running the unit tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] zabetak commented on a change in pull request #3115: HIVE-26044: Remove hardcoded version references from the tests

Posted by GitBox <gi...@apache.org>.
zabetak commented on a change in pull request #3115:
URL: https://github.com/apache/hive/pull/3115#discussion_r831028381



##########
File path: itests/hive-unit/src/test/java/org/apache/hive/service/server/InformationSchemaWithPrivilegeTestBase.java
##########
@@ -287,7 +291,7 @@ public void test() throws Exception {
 
     List<String> args = new ArrayList<String>(baseArgs);
     args.add("-f");
-    args.add("../../metastore/scripts/upgrade/hive/hive-schema-4.0.0-alpha-1.hive.sql");
+    args.add("../../metastore/scripts/upgrade/hive/hive-schema-" + hiveSchemaVer + ".hive.sql");

Review comment:
       So far we have:
   - `HiveVersionInfo`
   - `MetastoreVersionInfo`
   - `MetaStoreSchemaInfo`
   
   I understand there is a concern between HS2 and HMS version being different but what about `MetastoreVersionInfo`
   vs `MetaStoreSchemaInfo`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] marton-bod commented on a change in pull request #3115: HIVE-26044: Remove hardcoded version references from the tests

Posted by GitBox <gi...@apache.org>.
marton-bod commented on a change in pull request #3115:
URL: https://github.com/apache/hive/pull/3115#discussion_r830935136



##########
File path: itests/hive-unit/src/test/java/org/apache/hive/service/server/InformationSchemaWithPrivilegeTestBase.java
##########
@@ -287,7 +291,7 @@ public void test() throws Exception {
 
     List<String> args = new ArrayList<String>(baseArgs);
     args.add("-f");
-    args.add("../../metastore/scripts/upgrade/hive/hive-schema-4.0.0-alpha-1.hive.sql");
+    args.add("../../metastore/scripts/upgrade/hive/hive-schema-" + hiveSchemaVer + ".hive.sql");

Review comment:
       Oh I see. Then I think you did it correctly




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] marton-bod commented on a change in pull request #3115: HIVE-26044: Remove hardcoded version references from the tests

Posted by GitBox <gi...@apache.org>.
marton-bod commented on a change in pull request #3115:
URL: https://github.com/apache/hive/pull/3115#discussion_r831178770



##########
File path: itests/hive-unit/src/test/java/org/apache/hive/service/server/InformationSchemaWithPrivilegeTestBase.java
##########
@@ -287,7 +291,7 @@ public void test() throws Exception {
 
     List<String> args = new ArrayList<String>(baseArgs);
     args.add("-f");
-    args.add("../../metastore/scripts/upgrade/hive/hive-schema-4.0.0-alpha-1.hive.sql");
+    args.add("../../metastore/scripts/upgrade/hive/hive-schema-" + hiveSchemaVer + ".hive.sql");

Review comment:
       So HS2 version could be like `3.1.3000.2022.0.7.0`, HMS be like `3.1.3000.7.2.11.0`, and  and HMS DB version like `3.1.3000`? And the above 3 classes encode these 3 versions, respectively




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pvary merged pull request #3115: HIVE-26044: Remove hardcoded version references from the tests

Posted by GitBox <gi...@apache.org>.
pvary merged pull request #3115:
URL: https://github.com/apache/hive/pull/3115


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] marton-bod commented on a change in pull request #3115: HIVE-26044: Remove hardcoded version references from the tests

Posted by GitBox <gi...@apache.org>.
marton-bod commented on a change in pull request #3115:
URL: https://github.com/apache/hive/pull/3115#discussion_r830867915



##########
File path: itests/hive-unit/src/test/java/org/apache/hive/service/server/InformationSchemaWithPrivilegeTestBase.java
##########
@@ -287,7 +291,7 @@ public void test() throws Exception {
 
     List<String> args = new ArrayList<String>(baseArgs);
     args.add("-f");
-    args.add("../../metastore/scripts/upgrade/hive/hive-schema-4.0.0-alpha-1.hive.sql");
+    args.add("../../metastore/scripts/upgrade/hive/hive-schema-" + hiveSchemaVer + ".hive.sql");

Review comment:
       Can we use `HiveVersionInfo.getShortVersion()` in these places too?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] marton-bod commented on a change in pull request #3115: HIVE-26044: Remove hardcoded version references from the tests

Posted by GitBox <gi...@apache.org>.
marton-bod commented on a change in pull request #3115:
URL: https://github.com/apache/hive/pull/3115#discussion_r831178770



##########
File path: itests/hive-unit/src/test/java/org/apache/hive/service/server/InformationSchemaWithPrivilegeTestBase.java
##########
@@ -287,7 +291,7 @@ public void test() throws Exception {
 
     List<String> args = new ArrayList<String>(baseArgs);
     args.add("-f");
-    args.add("../../metastore/scripts/upgrade/hive/hive-schema-4.0.0-alpha-1.hive.sql");
+    args.add("../../metastore/scripts/upgrade/hive/hive-schema-" + hiveSchemaVer + ".hive.sql");

Review comment:
       So HS2 version could be like `3.1.3000.2022.0.7.0`, HMS be like `3.1.3000.7.2.11.0`, and  and HMS DB version like `3.1.3000`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] zabetak commented on a change in pull request #3115: HIVE-26044: Remove hardcoded version references from the tests

Posted by GitBox <gi...@apache.org>.
zabetak commented on a change in pull request #3115:
URL: https://github.com/apache/hive/pull/3115#discussion_r831028381



##########
File path: itests/hive-unit/src/test/java/org/apache/hive/service/server/InformationSchemaWithPrivilegeTestBase.java
##########
@@ -287,7 +291,7 @@ public void test() throws Exception {
 
     List<String> args = new ArrayList<String>(baseArgs);
     args.add("-f");
-    args.add("../../metastore/scripts/upgrade/hive/hive-schema-4.0.0-alpha-1.hive.sql");
+    args.add("../../metastore/scripts/upgrade/hive/hive-schema-" + hiveSchemaVer + ".hive.sql");

Review comment:
       So far we have:
   - `HiveVersionInfo`
   - `MetastoreVersionInfo`
   - `MetaStoreSchemaInfo`
   I understand there is a concern between HS2 and HMS version being different but what about `MetastoreVersionInfo`
   vs `MetaStoreSchemaInfo`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pvary commented on a change in pull request #3115: HIVE-26044: Remove hardcoded version references from the tests

Posted by GitBox <gi...@apache.org>.
pvary commented on a change in pull request #3115:
URL: https://github.com/apache/hive/pull/3115#discussion_r831141105



##########
File path: itests/hive-unit/src/test/java/org/apache/hive/service/server/InformationSchemaWithPrivilegeTestBase.java
##########
@@ -287,7 +291,7 @@ public void test() throws Exception {
 
     List<String> args = new ArrayList<String>(baseArgs);
     args.add("-f");
-    args.add("../../metastore/scripts/upgrade/hive/hive-schema-4.0.0-alpha-1.hive.sql");
+    args.add("../../metastore/scripts/upgrade/hive/hive-schema-" + hiveSchemaVer + ".hive.sql");

Review comment:
       * `HiveVersionInfo` is the code version of the HS2
   * `MetastoreVersionInfo` is the code version of the HMS
   * `MetaStoreSchemaInfo` is the db schema version under the HMS - some HMS changes do not require schema changes




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pvary commented on a change in pull request #3115: HIVE-26044: Remove hardcoded version references from the tests

Posted by GitBox <gi...@apache.org>.
pvary commented on a change in pull request #3115:
URL: https://github.com/apache/hive/pull/3115#discussion_r830932705



##########
File path: itests/hive-unit/src/test/java/org/apache/hive/service/server/InformationSchemaWithPrivilegeTestBase.java
##########
@@ -287,7 +291,7 @@ public void test() throws Exception {
 
     List<String> args = new ArrayList<String>(baseArgs);
     args.add("-f");
-    args.add("../../metastore/scripts/upgrade/hive/hive-schema-4.0.0-alpha-1.hive.sql");
+    args.add("../../metastore/scripts/upgrade/hive/hive-schema-" + hiveSchemaVer + ".hive.sql");

Review comment:
       I think that the  `HiveVersionInfo.getShortVersion()` and the `MetaStoreSchemaInfoFactory.get(miniHS2.getServerConf()).getHiveSchemaVersion()` might and should be different in several deployments. Some random vendor (😄) might release different code version (hotfixes, maintenance releases) for the same HMS DB version.
   
   I think this is why `MetaStoreSchemaInfoFactory` has been created, and I tried to use the appropriate version in the appropriate place.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] zabetak commented on a change in pull request #3115: HIVE-26044: Remove hardcoded version references from the tests

Posted by GitBox <gi...@apache.org>.
zabetak commented on a change in pull request #3115:
URL: https://github.com/apache/hive/pull/3115#discussion_r831953781



##########
File path: itests/hive-unit/src/test/java/org/apache/hive/service/server/InformationSchemaWithPrivilegeTestBase.java
##########
@@ -287,7 +291,7 @@ public void test() throws Exception {
 
     List<String> args = new ArrayList<String>(baseArgs);
     args.add("-f");
-    args.add("../../metastore/scripts/upgrade/hive/hive-schema-4.0.0-alpha-1.hive.sql");
+    args.add("../../metastore/scripts/upgrade/hive/hive-schema-" + hiveSchemaVer + ".hive.sql");

Review comment:
       Thanks both for the clarifications!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org