[ 
https://issues.apache.org/jira/browse/HIVE-22329?focusedWorklogId=330910&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-330910
 ]

ASF GitHub Bot logged work on HIVE-22329:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Oct/19 09:10
            Start Date: 19/Oct/19 09:10
    Worklog Time Spent: 10m 
      Work Description: miklosgergely commented on pull request #810: 
HIVE-22329 Create DriverContext
URL: https://github.com/apache/hive/pull/810#discussion_r336729080
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/DriverQueue.java
 ##########
 @@ -0,0 +1,230 @@
+/*
+ * 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;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+import org.apache.hadoop.hive.ql.exec.FileSinkOperator;
+import org.apache.hadoop.hive.ql.exec.NodeUtils;
+import org.apache.hadoop.hive.ql.exec.NodeUtils.Function;
+import org.apache.hadoop.hive.ql.exec.Operator;
+import org.apache.hadoop.hive.ql.exec.StatsTask;
+import org.apache.hadoop.hive.ql.exec.Task;
+import org.apache.hadoop.hive.ql.exec.TaskRunner;
+import org.apache.hadoop.hive.ql.exec.mr.MapRedTask;
+import org.apache.hadoop.hive.ql.metadata.HiveException;
+import org.apache.hadoop.hive.ql.plan.MapWork;
+import org.apache.hadoop.hive.ql.plan.ReduceWork;
+import org.apache.hadoop.hive.ql.session.SessionState;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Handles the queue of tasks that should be executed by the driver.
+ */
+public class DriverQueue {
+
+  private static final Logger LOG = 
LoggerFactory.getLogger(Driver.class.getName());
+  private static final SessionState.LogHelper CONSOLE = new 
SessionState.LogHelper(LOG);
+
+  private static final int SLEEP_TIME = 2000;
+
+  private final Queue<Task<?>> runnable = new 
ConcurrentLinkedQueue<Task<?>>();;
+  private final Queue<TaskRunner> running = new 
LinkedBlockingQueue<TaskRunner>();
 
 Review comment:
   fixed, you are right, it is not a queue
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 330910)
    Time Spent: 1h  (was: 50m)

> Create DriverContext
> --------------------
>
>                 Key: HIVE-22329
>                 URL: https://issues.apache.org/jira/browse/HIVE-22329
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Miklos Gergely
>            Assignee: Miklos Gergely
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>         Attachments: HIVE-22329.01.patch, HIVE-22329.02.patch, 
> HIVE-22329.03.patch, HIVE-22329.04.patch
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The current DriverContext class is not really a context, rather a queue, thus 
> it should be renamed to DriverQueue. At the same time Driver has a a lot of 
> fields, they should be in a real context class called DriverContext, which 
> would also facilitate the extraction of independent parts of the Driver class.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to