rtrivedi12 commented on code in PR #5319: URL: https://github.com/apache/hive/pull/5319#discussion_r1872295653
########## ql/src/java/org/apache/hadoop/hive/ql/processors/ShowProcesslistProcessor.java: ########## @@ -0,0 +1,110 @@ +/* + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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.hadoop.hive.ql.processors; + +import com.google.common.base.Joiner; +import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.Schema; +import org.apache.hadoop.hive.ql.session.ProcessListInfo; +import org.apache.hadoop.hive.ql.session.SessionState; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.List; + +import static org.apache.hadoop.hive.serde.serdeConstants.SERIALIZATION_NULL_FORMAT; +import static org.apache.hadoop.hive.serde2.MetadataTypedColumnsetSerDe.defaultNullString; + +/** + * List operations/queries being performed in sessions within hiveserver2 + */ +public class ShowProcesslistProcessor implements CommandProcessor{ + private static final Logger LOG = LoggerFactory.getLogger(ShowProcesslistProcessor.class.getName()); + private static final SessionState.LogHelper console = new SessionState.LogHelper(LOG); + private List<ProcessListInfo> liveQueries = null; + + public void setup(List<ProcessListInfo> liveQueries) { + this.liveQueries = liveQueries; + } + + /** + * Creates a Schema object with running operation details + * @return + */ + private Schema getSchema(){ + Schema sch = new Schema(); + sch.addToFieldSchemas(new FieldSchema("User Name", "string", "")); + sch.addToFieldSchemas(new FieldSchema("Ip Addr", "string", "")); + sch.addToFieldSchemas(new FieldSchema("Execution Engine", "string", "")); Review Comment: Execution engine can only be 'MR' or 'Tez', which comes from HiveConf. -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org