abstractdog commented on code in PR #4758:
URL: https://github.com/apache/hive/pull/4758#discussion_r1360283228
##########
common/src/test/org/apache/hadoop/hive/conf/TestHiveConf.java:
##########
@@ -95,6 +97,142 @@ public void testConfProperties() throws Exception {
// Test HiveConf property variable substitution in hive-site.xml
checkHiveConf("test.var.hiveconf.property",
ConfVars.DEFAULTPARTITIONNAME.getDefaultValue());
+
+ // Test if all the LLAP conf vars are defined in LLAP daemon conf vars
+ Set<String> llapConfSet = getLLAPConfVars();
+ for (String varName : llapConfSet) {
+ Assert.assertTrue(HiveConf.getLlapDaemonConfVars().contains(varName));
+ }
+ }
+
+ private Set<String> getLLAPConfVars() {
+ Set<String> llapVarsExclusionSet = getLLAPVarsExclusionSet();
+ Set<String> llapConfSet = new HashSet<>();
+ for(ConfVars var: ConfVars.values()) {
+ if (var.name().startsWith("LLAP_") &&
!llapVarsExclusionSet.contains(var.varname)) {
+ llapConfSet.add(var.varname);
+ }
+ }
+ return llapConfSet;
+ }
+
+ /**
+ * Add those conf vars to this exclusion set which are not part of LLAP
Daemon Conf vars
+ */
+ private Set<String> getLLAPVarsExclusionSet() {
Review Comment:
by looking at the exclusion set, I'm a bit confused
so this patch is about to fix a NoSuchFieldError when a property is missing
from llapDaemonVarsSetLocal
what is this llapDaemonVarsSetLocal exactly for? it's pretty confusing that
configs like "LLAP_IO_*" is not part of this one, which are obviously used in
the LLAP daemon
##########
common/src/test/org/apache/hadoop/hive/conf/TestHiveConf.java:
##########
@@ -95,6 +97,142 @@ public void testConfProperties() throws Exception {
// Test HiveConf property variable substitution in hive-site.xml
checkHiveConf("test.var.hiveconf.property",
ConfVars.DEFAULTPARTITIONNAME.getDefaultValue());
+
+ // Test if all the LLAP conf vars are defined in LLAP daemon conf vars
+ Set<String> llapConfSet = getLLAPConfVars();
+ for (String varName : llapConfSet) {
+ Assert.assertTrue(HiveConf.getLlapDaemonConfVars().contains(varName));
+ }
+ }
+
+ private Set<String> getLLAPConfVars() {
+ Set<String> llapVarsExclusionSet = getLLAPVarsExclusionSet();
+ Set<String> llapConfSet = new HashSet<>();
+ for(ConfVars var: ConfVars.values()) {
+ if (var.name().startsWith("LLAP_") &&
!llapVarsExclusionSet.contains(var.varname)) {
+ llapConfSet.add(var.varname);
+ }
+ }
+ return llapConfSet;
+ }
+
+ /**
+ * Add those conf vars to this exclusion set which are not part of LLAP
Daemon Conf vars
+ */
+ private Set<String> getLLAPVarsExclusionSet() {
Review Comment:
by looking at the exclusion set, I'm a bit confused
so this patch is about to fix a NoSuchFieldError when a property is missing
from llapDaemonVarsSetLocal
what is this llapDaemonVarsSetLocal exactly for? it's pretty confusing that
configs like "LLAP_IO_*" is not part of this one, which are obviously used in
the LLAP daemon
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]