sky76093016 commented on a change in pull request #2481:
URL: https://github.com/apache/ozone/pull/2481#discussion_r680329295
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/stream/DirectoryServerSource.java
##########
@@ -41,18 +42,19 @@ public DirectoryServerSource(Path root) {
* @param id name of the subdirectory to replitace relative to root.
*/
public Map<String, Path> getFilesToStream(String id)
- throws InterruptedException {
+ throws InterruptedException {
Map<String, Path> files = new HashMap<>();
final Path streamingDir = root.resolve(id);
try {
- Files.walk(streamingDir)
- .filter(Files::isRegularFile)
- .forEach(path -> {
- files.put(root.relativize(path).toString(), path);
- });
+ try (Stream<Path> list = Files.walk(streamingDir)
Review comment:
Thanks @adoroszlai for reviewing, I have fixed it.
--
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]