Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing HelixManager ExecutorService #2849

Open
9aman opened this issue Jul 25, 2024 · 6 comments
Open

Accessing HelixManager ExecutorService #2849

9aman opened this issue Jul 25, 2024 · 6 comments

Comments

@9aman
Copy link

9aman commented Jul 25, 2024

Context
This is about the use of Helix in Apache Pinot. I want to infer the queue size of the executor service that handles state transitions.

2024/05/09 03:46:55.385 INFO [HelixTaskExecutor] [ZkClient-EventThread-137-pinot-zookeeper-headless:2181] Submit task: 755de162-49a1-4092-8e11-945c8e5e7674 to pool: java.util.concurrent.ThreadPoolExecutor@18623363[Running, pool size = 40, active threads = 40, queued tasks = 160, completed tasks = 33065]

Above are the logs emitted by Helix. These logs contain the details of the executor service used for the state transition messages.

On analysis of the code, I found that the following line in the HelixTaskExecutor class provides the above details:
LOG.info("Submit task: " + taskId + " to pool: " + exeSvc);

Is your feature request related to a problem? Please describe.

  1. I wanted to access the helix task executor queue size.
  2. The _executorMap inside HelixTaskExecutor cannot be accessed.
  3. This limits our access to the executor service.

Is there a way to get the queue size?

Describe the solution you'd like
Ability to fetch the queue size of the executor service that handles state transition requests inside HelixTaskExecutor.

@junkaixue
Copy link
Contributor

@9aman is this for programming purpose? The log already contains the info.

@9aman
Copy link
Author

9aman commented Jul 26, 2024

@9aman is this for programming purpose? The log already contains the info.

Yes, I want to access the queue size. I couldn't find a way to see the queue size to gauge the current load or state transition requests waiting to be processed.

@9aman
Copy link
Author

9aman commented Jul 29, 2024

@junkaixue is there a way to access this information?

@junkaixue
Copy link
Contributor

junkaixue commented Aug 9, 2024

Yeah. Unfortunately, we did not expose these info. We can have this ticket to track the work to expose the stats. But not feel comfortable to give user accessing of the map.

@9aman

@9aman
Copy link
Author

9aman commented Aug 16, 2024

@junkaixue what other ways are there for accessing such information if we don't want to expose this field to the user?
The queue size information can help us decipher whether we are running into any deadlocks (during state transition) or too many messages being generated and blocked.

Is there a better way of achieving this?

@junkaixue
Copy link
Contributor

Yeah. There is another way that Helix accept user passed in executor service. If you would like to have the fully control, you can define your own executor service as set the corresponding state transition for the executor service registered in Helix. Then you can get the stats or anything at any time. @9aman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants