[ https://issues.apache.org/jira/browse/DRILL-4258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15241869#comment-15241869 ]
ASF GitHub Bot commented on DRILL-4258: --------------------------------------- Github user sudheeshkatkam commented on a diff in the pull request: https://github.com/apache/drill/pull/479#discussion_r59787703 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/ops/ThreadStatCollector.java --- @@ -0,0 +1,124 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * <p/> + * http://www.apache.org/licenses/LICENSE-2.0 + * <p/> + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.drill.exec.ops; + +import com.carrotsearch.hppc.LongObjectHashMap; +import com.carrotsearch.hppc.procedures.LongObjectProcedure; + +import java.lang.management.ManagementFactory; +import java.lang.management.ThreadMXBean; +import java.util.AbstractMap.SimpleEntry; +import java.util.Deque; +import java.util.Iterator; +import java.util.Map.Entry; +import java.util.concurrent.ConcurrentLinkedDeque; + +public class ThreadStatCollector implements Runnable { --- End diff -- There is a thread (`WorkManager.StatusThread`) that does periodic tasks (currently updates fragment statuses), how about we add this as another task? > Create New SYS tables: cpu, queries, fragments, threads, threadtraces, > connections > ---------------------------------------------------------------------------------- > > Key: DRILL-4258 > URL: https://issues.apache.org/jira/browse/DRILL-4258 > Project: Apache Drill > Issue Type: New Feature > Components: Execution - Monitoring > Reporter: Jacques Nadeau > Assignee: Jacques Nadeau > > cpu: Drillbit, # Cores, CPU consumption (with different windows?) > queries: Foreman, QueryId, User, SQL, Start Time, rows processed, query plan, > # nodes involved, number of running fragments, memory consumed > fragments: Drillbit, queryid, major fragmentid, minorfragmentid, coordinate, > memory usage, rows processed, start time > threads: name, priority, state, id, thread-level cpu stats > threadtraces: threads, stack trace > connections: client, server, type, establishedDate, messagesSent, bytesSent -- This message was sent by Atlassian JIRA (v6.3.4#6332)