[
https://issues.apache.org/jira/browse/HDDS-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16602412#comment-16602412
]
Anu Engineer edited comment on HDDS-395 at 9/3/18 7:23 PM:
-----------------------------------------------------------
{quote}{quote}And until now the HADOOP_CONF_DIR was not required for java code.
It's an environment variable which is handled only by the starter scripts
{quote}{quote}
I might be misunderstanding this. If this variable is not set, we will not be
able to find any config values, and since we have a set of user configured, yet
required values that the cluster will fail to start. From that point of view,
if you have an HDFS/Ozone cluster without this value being configured shouldn't
we fail?
{quote}{quote} For example the Configuration class doesn't require it. (Hadoop
itself could be started without setting HADOOP_CONF_DIR if the configuration
files are added to the classpath.)
{quote}{quote}
I agree the that Configuration class does not require it. That is *probably*
because it is a common class and used by many other applications in the Hadoop
family. For Ozone this would pretty much translate to a fatal failure. Yes, we
would fail with a indirect error message until now.
{quote}{color:#000000}Just I am more permissive about the optional
configuration.{color}
{quote}
{color:#000000}I do agree with this. I see that you are saying that we should
not be asserting this *required* but not *asserted* in code assertion in some
other location and not in this class. That I agree with, there are probably
much better places to assert this. Some more generic place like
OzoneConfiguration class should make this assertion, than DBConfig from file.
The only case for this case is that this is also a Config read operation – very
similar to OzoneConfig, but this can survive without those values (optional
config) but the fact remains that we (Ozone) has a hard coded dependency on
HADOOP_CONF_PATH and if it is not configured, we will fail.{color}
was (Author: anu):
{quote}bq.And until now the HADOOP_CONF_DIR was not required for java code.
It's an environment variable which is handled only by the starter scripts
{quote}
I might be misunderstanding this. If this variable is not set, we will not be
able to find any config values, and since we have a set of user configured, yet
required values that the cluster will fail to start. From that point of view,
if you have an HDFS/Ozone cluster without this value being configured shouldn't
we fail?
{quote}bq. For example the Configuration class doesn't require it. (Hadoop
itself could be started without setting HADOOP_CONF_DIR if the configuration
files are added to the classpath.)
{quote}
I agree the that Configuration class does not require it. That is *probably*
because it is a common class and used by many other applications in the Hadoop
family. For Ozone this would pretty much translate to a fatal failure. Yes, we
would fail with a indirect error message until now.
> TestOzoneRestWithMiniCluster fails with "Unable to read ROCKDB config"
> ----------------------------------------------------------------------
>
> Key: HDDS-395
> URL: https://issues.apache.org/jira/browse/HDDS-395
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Components: Ozone Manager
> Reporter: Mukul Kumar Singh
> Assignee: Sree Vaddi
> Priority: Major
>
> Ozone datanode initialization is failing with the following exception.
> This was noted in the following precommit build result.
> https://builds.apache.org/job/PreCommit-HDDS-Build/935/testReport/org.apache.hadoop.ozone.web/TestOzoneRestWithMiniCluster/org_apache_hadoop_ozone_web_TestOzoneRestWithMiniCluster_2/
> {code}
> 2018-09-02 20:56:33,501 INFO db.DBStoreBuilder
> (DBStoreBuilder.java:getDbProfile(176)) - Unable to read ROCKDB config
> java.io.IOException: Unable to find the configuration directory. Please make
> sure that HADOOP_CONF_DIR is setup correctly
> at
> org.apache.hadoop.utils.db.DBConfigFromFile.getConfigLocation(DBConfigFromFile.java:62)
> at
> org.apache.hadoop.utils.db.DBConfigFromFile.readFromFile(DBConfigFromFile.java:118)
> at
> org.apache.hadoop.utils.db.DBStoreBuilder.getDbProfile(DBStoreBuilder.java:170)
> at
> org.apache.hadoop.utils.db.DBStoreBuilder.build(DBStoreBuilder.java:122)
> at
> org.apache.hadoop.ozone.om.OmMetadataManagerImpl.<init>(OmMetadataManagerImpl.java:133)
> at org.apache.hadoop.ozone.om.OzoneManager.<init>(OzoneManager.java:146)
> at
> org.apache.hadoop.ozone.om.OzoneManager.createOm(OzoneManager.java:295)
> at
> org.apache.hadoop.ozone.MiniOzoneClusterImpl$Builder.createOM(MiniOzoneClusterImpl.java:357)
> at
> org.apache.hadoop.ozone.MiniOzoneClusterImpl$Builder.build(MiniOzoneClusterImpl.java:304)
> at
> org.apache.hadoop.ozone.web.TestOzoneRestWithMiniCluster.init(TestOzoneRestWithMiniCluster.java:73)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
> at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
> at
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
> at
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
> at
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
> at
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]