duongkame commented on code in PR #5156:
URL: https://github.com/apache/ozone/pull/5156#discussion_r1297919773
##########
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 (tmp > percentageRead && tmp <= percentageRead + percentageList)
{
Review Comment:
```suggestion
} else if (tmp <= percentageRead + percentageList) {
```
redundant condition `tmp > percentageRead` as it's true already.
--
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]