pvary commented on a change in pull request #685: HIVE-21907: Add a new
LlapDaemon Management API method to set the daemon capacity
URL: https://github.com/apache/hive/pull/685#discussion_r297162456
##########
File path:
llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/TaskExecutorService.java
##########
@@ -176,6 +181,31 @@ public TaskExecutorService(int numExecutors, int
waitQueueSize,
Futures.addCallback(future, new WaitQueueWorkerCallback());
}
+ /**
+ * Sets the TaskExecutorService capacity to the new values. Both the number
of executors and the
+ * queue size should be smaller than that original values, so we do not mess
up with the other
+ * settings. Setting smaller capacity will not cancel or reject already
executing or queued tasks
+ * in itself.
+ * @param newNumExecutors The new number of executors
+ * @param newWaitQueueSize The new number of wait queue size
+ */
+ @Override
+ public synchronized void setCapacity(int newNumExecutors, int
newWaitQueueSize) {
+ if (newNumExecutors > configuredMaxExecutors) {
Review comment:
Added check and test
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]