[ https://issues.apache.org/jira/browse/HDDS-1474?focusedWorklogId=236894&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-236894 ]
ASF GitHub Bot logged work on HDDS-1474: ---------------------------------------- Author: ASF GitHub Bot Created on: 03/May/19 15:12 Start Date: 03/May/19 15:12 Worklog Time Spent: 10m Work Description: hanishakoneru commented on pull request #792: HDDS-1474. ozone.scm.datanode.id config should take path for a dir URL: https://github.com/apache/hadoop/pull/792#discussion_r280814733 ########## File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/hdds/scm/HddsServerUtil.java ########## @@ -380,18 +380,19 @@ public static String getDefaultRatisDirectory(Configuration conf) { * @return the path of datanode id as string */ public static String getDatanodeIdFilePath(Configuration conf) { - String dataNodeIDPath = conf.get(ScmConfigKeys.OZONE_SCM_DATANODE_ID); - if (dataNodeIDPath == null) { + String dataNodeIDDirPath = conf.get(ScmConfigKeys.OZONE_SCM_DATANODE_ID); + if (dataNodeIDDirPath == null) { File metaDirPath = ServerUtils.getOzoneMetaDirPath(conf); if (metaDirPath == null) { // this means meta data is not found, in theory should not happen at // this point because should've failed earlier. throw new IllegalArgumentException("Unable to locate meta data" + "directory when getting datanode id path"); } - dataNodeIDPath = new File(metaDirPath, - ScmConfigKeys.OZONE_SCM_DATANODE_ID_PATH_DEFAULT).toString(); + dataNodeIDDirPath = metaDirPath.toString(); } - return dataNodeIDPath; + // Use default datanode id file name for file path + return new File(dataNodeIDDirPath, + ScmConfigKeys.OZONE_SCM_DATANODE_ID_PATH_DEFAULT).toString(); Review comment: OZONE_SCM_DATANODE_ID_PATH_DEFAULT is now a constant as it is not configurable. We should move it to OzoneConsts. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 236894) Time Spent: 1h 20m (was: 1h 10m) > "ozone.scm.datanode.id" config should take path for a dir and not a file > ------------------------------------------------------------------------ > > Key: HDDS-1474 > URL: https://issues.apache.org/jira/browse/HDDS-1474 > Project: Hadoop Distributed Data Store > Issue Type: Task > Components: Ozone Datanode > Affects Versions: 0.4.0 > Reporter: Vivek Ratnavel Subramanian > Assignee: Vivek Ratnavel Subramanian > Priority: Minor > Labels: newbie, pull-request-available > Time Spent: 1h 20m > Remaining Estimate: 0h > > Currently, the ozone config "ozone.scm.datanode.id" takes file path as its > value. It should instead take dir path as its value and assume a standard > filename "datanode.id" -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org