[ 
https://issues.apache.org/jira/browse/HDDS-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16602805#comment-16602805
 ] 

Elek, Marton commented on HDDS-395:
-----------------------------------

{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.
{quote}

I think it's not because it's used by multiple projects. It's because the 
separation of the responsibilities in the current code.

The current Configuration class reads everything from the classpath all the 
time. I am not saying I like it, but this is the current behaviour. We can add 
additional check if the ozone-site.xml is on the classpath (it's not required 
currently AFAIK) but it would check the current classpath.

HADOOP_CONF_DIR is handled by the starter bash scripts 
[here|https://github.com/apache/hadoop/blob/6e5ffb74dd678ddc3392ae2f251c80fc5cc8c62f/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh#L1583].
 For example when you start ozone from IDE you don't need to set it. The only 
important task is to add the configuration to the classpath.

I am happy with adding more validation method but:

1. With the current setup we need to check the classpath as all the other 
things are handled by the HADOOP_CONF_DIR. We can validate the HADOOP_CONF_DIR 
from the shell scripts.

2. Or we need to modify the configuration loading to read configuration from 
directories instead of files.

> 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
>              Labels: pull-request-available
>             Fix For: 0.2.1
>
>
> 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]

Reply via email to