aryangupta1998 commented on a change in pull request #1264:
URL: https://github.com/apache/hadoop-ozone/pull/1264#discussion_r462503625
##########
File path:
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/HadoopNestedDirGenerator.java
##########
@@ -109,5 +117,7 @@ private void createDir(long counter) throws Exception {
Path dir = new Path(rootPath.concat("/").concat(childDir));
fileSystem.mkdirs(dir.getParent());
}
+ System.out.println("\nSuccessfully created directories. Total " +
Review comment:
Thanks for the review Rakesh. I have updated the PR and also the logs of
HadoopTreeDirGenerator as per your suggestions.
##########
File path:
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/BaseFreonGenerator.java
##########
@@ -301,6 +301,15 @@ public void printReport() {
messages.forEach(print);
}
+ public void print(String s){
Review comment:
Added javadoc, changed 's' to 'msg'.
##########
File path:
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/HadoopDirTreeGenerator.java
##########
@@ -97,17 +97,25 @@
@Override
public Void call() throws Exception {
-
- init();
- OzoneConfiguration configuration = createOzoneConfiguration();
- fileSystem = FileSystem.get(URI.create(rootPath), configuration);
-
- contentGenerator = new ContentGenerator(fileSizeInBytes, bufferSize);
- timer = getMetrics().timer("file-create");
-
- runTests(this::createDir);
+ String s;
+ if (depth <= 0) {
+ s = "Invalid depth value, depth value should be greater than zero!";
+ print(s);
+ } else if (span <= 0) {
+ s = "Invalid span value, span value should be greater than zero!";
+ print(s);
+ } else {
+ init();
+ OzoneConfiguration configuration = createOzoneConfiguration();
+ fileSystem = FileSystem.get(URI.create(rootPath), configuration);
+
+ contentGenerator = new ContentGenerator(fileSizeInBytes, bufferSize);
+ timer = getMetrics().timer("file-create");
+
+ runTests(this::createDir);
+ return null;
Review comment:
Removed 'return null' statement inside else block.
##########
File path:
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/BaseFreonGenerator.java
##########
@@ -301,6 +301,19 @@ public void printReport() {
messages.forEach(print);
}
+ /**
+ * Print out the messages for HadoopNestedDirGenerator
Review comment:
Changed the javadoc.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]