[
https://issues.apache.org/jira/browse/HDFS-16174?focusedWorklogId=638336&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-638336
]
ASF GitHub Bot logged work on HDFS-16174:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Aug/21 18:07
Start Date: 16/Aug/21 18:07
Worklog Time Spent: 10m
Work Description: GauthamBanasandra commented on a change in pull request
#3303:
URL: https://github.com/apache/hadoop/pull/3303#discussion_r689750146
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/configuration_test.h
##########
@@ -114,105 +111,6 @@ void writeDamagedConfig(const std::string& filename,
Args... args) {
out.open(filename);
out << stream.rdbuf();
}
-
-// TempDir: is deleted on destruction
-class TempFile {
Review comment:
As I've mentioned in the corresponding JIRA -
https://issues.apache.org/jira/browse/HDFS-16174, header files should contain
only the declaration of the class and method signatures. The implementation
must be done in the cc files. Otherwise, these classes get recompiled everytime
they're **#include**d, leading to longer compilation times. Also, it's not a
good C++ practice to combine declaration and implementation in the header file,
unless it's a template class or method.
Another thing that I've done in this PR is to make this into a _test utility
library_, so that it's more modular and can be imported anywhere in libhdfs++.
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 638336)
Time Spent: 1h 10m (was: 1h)
> Implement temp file and dir in cc files
> ---------------------------------------
>
> Key: HDFS-16174
> URL: https://issues.apache.org/jira/browse/HDFS-16174
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: libhdfs++
> Affects Versions: 3.4.0
> Reporter: Gautham Banasandra
> Assignee: Gautham Banasandra
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> In C++, we generally do the declaration in the header files and the
> corresponding implementation in the .cc files. Here we see that the
> implementation of TempFile and TempDir are done in configuration_test.h
> itself. This offers no benefit and the compilation of TempFile and TempDir
> classes are duplicated for every #include of the configuration_test.h header.
> Thus, we need to implement it in separate cc files to avoid this.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]