You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "kerneltime (via GitHub)" <gi...@apache.org> on 2023/08/15 22:41:31 UTC
[GitHub] [ozone] kerneltime commented on a diff in pull request #5156: HDDS-9128. Ozone freon tool extension for benchmarking listKeys operation
kerneltime commented on code in PR #5156:
URL: https://github.com/apache/ozone/pull/5156#discussion_r1295214539
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/OzoneClientKeyReadWriteListOps.java:
##########
@@ -212,16 +230,22 @@ keyName, objectSizeInBytes, null, new HashMap())) {
}
}
- public TaskType decideReadOrWriteTask() {
- if (percentageRead == 100) {
- return TaskType.READ_TASK;
- } else if (percentageRead == 0) {
- return TaskType.WRITE_TASK;
+ public void processListTasks(OzoneClient ozoneClient)
+ throws RuntimeException, IOException {
+ try {
+ ozoneClient.getProxy()
+ .listKeys(volumeName, bucketName, getPrefix(), null, maxListResult);
+ } catch (Exception ex) {
+ throw ex;
}
- //mix workload
+ }
+
+ public TaskType decideReadWriteOrListTask() {
int tmp = ThreadLocalRandom.current().nextInt(1, 101);
- if (tmp <= percentageRead) {
+ if (tmp <= percentageRead) {
return TaskType.READ_TASK;
+ } else if (percentageRead < tmp && tmp <= percentageRead + percentageList) {
Review Comment:
```suggestion
} else if (tmp > percentageRead && tmp <= percentageRead + percentageList) {
```
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org