imply-cheddar commented on code in PR #14239:
URL: https://github.com/apache/druid/pull/14239#discussion_r1192093915
##########
server/src/main/java/org/apache/druid/indexing/worker/config/WorkerConfig.java:
##########
@@ -80,11 +83,35 @@ public int getCapacity()
return capacity;
}
+ public WorkerConfig setCapacity(int capacity)
+ {
+ this.capacity = capacity;
+ return this;
+ }
+
+ public long getBaseTaskDirSize()
+ {
+ return baseTaskDirSize;
+ }
+
+ public WorkerConfig setBaseTaskDirSize(long baseTaskDirSize)
+ {
+ this.baseTaskDirSize = baseTaskDirSize;
+ return this;
+ }
+
public List<String> getBaseTaskDirs()
{
return baseTaskDirs;
}
+ public WorkerConfig setBaseTaskDirs(List<String> baseTaskDirs)
Review Comment:
There are a number of different patterns for configs. For this one, the
options were:
1. make the fields public
2. add setters
3. Add "with" methods that build new objects
I didn't want to do (1) and took the lazy route of (2). It probably is
better to do the less-lazy route of (3) though, just to protect against some
production code actually mutating the object at some point and causing
unexpected side-effects.
--
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]