saihemanth-cloudera commented on code in PR #5319:
URL: https://github.com/apache/hive/pull/5319#discussion_r1737273094


##########
ql/src/java/org/apache/hadoop/hive/ql/session/ProcessListInfo.java:
##########
@@ -0,0 +1,142 @@
+/*
+ * 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.session;
+
+/**
+ * The class to store query and associated session level info to be used for 
ProcessListProcessor.
+ */
+public class ProcessListInfo {
+  private final String sessionId;
+  private final String userName;
+  private final String ipAddr;
+  private final long sessionActiveTime;
+  private final long sessionIdleTime;
+  private final String executionEngine;
+  private final String queryId;
+  private final long beginTime;
+  private final String runtime;  // tracks only running portion of the query.
+  private final long elapsedTime;
+  private final String state;
+
+  private ProcessListInfo( String userName, String ipAddr, String sessionId,  
long sessionActiveTime,
+      long sessionIdleTime,String queryId, String executionEngine, long 
beginTime,
+      String runtime, long elapsedTime, String state ) {
+    this.userName = userName;
+    this.ipAddr = ipAddr;
+    this.sessionId = sessionId;
+    this.sessionActiveTime = sessionActiveTime;
+    this.sessionIdleTime = sessionIdleTime;
+    this.queryId = queryId;
+    this.executionEngine = executionEngine;
+    this.beginTime = beginTime;
+    this.runtime= runtime;
+    this.elapsedTime = elapsedTime;
+    this.state = state;
+  }
+
+  public String getSessionId() { return sessionId; }
+  public String getUserName() {
+    return userName;
+  }
+  public String getIpAddr() {
+    return ipAddr;
+  }
+  public long getSessionActiveTime() { return sessionActiveTime; }
+  public long getSessionIdleTime() { return sessionIdleTime; }
+  public String getExecutionEngine() { return executionEngine; }
+  public long getBeginTime() { return beginTime; }
+  public String getQueryId() { return queryId; }
+  public String getRuntime() { return runtime; }
+  public long getElapsedTime() { return elapsedTime; }
+  public String getState() { return state; }
+  public static class Builder {
+    private String userName ;
+    private String ipAddr;
+    private String sessionId;
+    private long sessionActiveTime;
+    private long sessionIdleTime;
+    private String executionEngine;
+    private long beginTime;
+    private String queryId;
+    private String runtime;
+    private long elapsedTime;
+    private String state;
+
+    public Builder setSessionId(String sessionId){
+      this.sessionId = sessionId;
+      return this;
+    }
+
+    public Builder setUserName(String userName) {
+      this.userName = userName;
+      return this;
+    }
+
+    public Builder setIpAddr(String ipAddr) {
+      this.ipAddr = ipAddr;
+      return this;
+    }
+
+    public Builder setSessionActiveTime(long sessionActiveTime) {
+      this.sessionActiveTime = sessionActiveTime;
+      return this;
+    }
+
+    public Builder setSessionIdleTime(long sessionIdleTime) {
+      this.sessionIdleTime = sessionIdleTime;
+      return this;
+    }
+
+    public Builder setExecutionEngine(String executionEngine) {
+      this.executionEngine = executionEngine;
+      return this;
+    }
+
+    public Builder setBeginTime(long beginTime) {
+      this.beginTime = beginTime;
+      return this;
+    }
+
+    public Builder setQueryId(String queryId) {
+      this.queryId = queryId;
+      return this;
+    }
+
+    public Builder setRuntime(String runtime) {
+      this.runtime = runtime;
+      return this;
+    }
+
+    public Builder setElapsedTime(long elapsedTime) {
+      this.elapsedTime = elapsedTime;
+      return this;
+    }
+
+    public Builder setState(String state) {
+      this.state = state;
+      return this;
+    }
+
+    public ProcessListInfo build() {
+      ProcessListInfo processListInfo = new ProcessListInfo(userName, ipAddr, 
sessionId, sessionActiveTime,
+          sessionIdleTime, queryId, executionEngine, beginTime, runtime,
+          elapsedTime, state);
+      return processListInfo;
+    }
+  }
+}

Review Comment:
   Nit: blank end of the line.



-- 
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

Reply via email to