You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2018/12/20 23:28:50 UTC

[1/2] impala git commit: [DOCS] Removed impala_resource_management.xml from the ditamap

Repository: impala
Updated Branches:
  refs/heads/master 5bf81cdc2 -> 9a52dd67b


[DOCS] Removed impala_resource_management.xml from the ditamap

impala_resource_management.xml includes a minimum info on
admission control which is coverd in impala_admission.xml.
The rest of the content offers nothing useful.

Change-Id: I77370da731160539ac7d9a780d60c6c6c0453280
Reviewed-on: http://gerrit.cloudera.org:8080/12117
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Bikramjeet Vig <bi...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/9396009d
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/9396009d
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/9396009d

Branch: refs/heads/master
Commit: 9396009d44080ba481c4a76f5259d7ae49557ac8
Parents: 5bf81cd
Author: Alex Rodoni <ar...@cloudera.com>
Authored: Thu Dec 20 13:40:01 2018 -0800
Committer: Alex Rodoni <ar...@cloudera.com>
Committed: Thu Dec 20 22:08:51 2018 +0000

----------------------------------------------------------------------
 docs/impala.ditamap | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/9396009d/docs/impala.ditamap
----------------------------------------------------------------------
diff --git a/docs/impala.ditamap b/docs/impala.ditamap
index 9b58786..06bcda5 100644
--- a/docs/impala.ditamap
+++ b/docs/impala.ditamap
@@ -66,7 +66,8 @@ under the License.
   <topicref href="topics/impala_tutorial.xml"/>
   <topicref href="topics/impala_admin.xml">
     <topicref audience="standalone" href="topics/impala_admission.xml"/>
-    <topicref audience="standalone" href="topics/impala_resource_management.xml"/>
+<!-- Removing below as it does not have useful content. AR 12/20/2018 -->
+    <!-- <topicref audience="standalone" href="topics/impala_resource_management.xml"/> -->
 
 <!--<topicref href="topics/impala_howto_rm.xml"/>-->
 


[2/2] impala git commit: IMPALA-7946: Use original timeout in THREAD_POOL_TASK_TIMED_OUT message

Posted by jo...@apache.org.
IMPALA-7946: Use original timeout in THREAD_POOL_TASK_TIMED_OUT message

When SynchronousThreadPool::SynchronousOffer() times out, it can
sometimes print the wrong time out in the error message. This happens
because it is enforcing a total timeout across multiple operations.
For example, if there is a total timeout of 5 seconds and the first
step takes 1 second, the remaining step is given a 4 second timeout
to enforce the total timeout. However, this 4 second timeout should
not be expressed in the THREAD_POOL_TASK_TIMED_OUT error message
if the task times out. Instead, SynchronousOffer() should always use
the original timeout as the internal time out is unimportant to users.

This changes the code to make the error message always use the
original timeout.

Change-Id: Ib7bc31f58a8d29abfdc24959dc2730a0ae24ec56
Reviewed-on: http://gerrit.cloudera.org:8080/12062
Reviewed-by: Joe McDonnell <jo...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/impala/commit/9a52dd67
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/9a52dd67
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/9a52dd67

Branch: refs/heads/master
Commit: 9a52dd67bad7b8eb84fdeb6fb193505af7af931e
Parents: 9396009
Author: Joe McDonnell <jo...@cloudera.com>
Authored: Mon Dec 10 13:04:03 2018 -0800
Committer: Joe McDonnell <jo...@cloudera.com>
Committed: Thu Dec 20 23:28:27 2018 +0000

----------------------------------------------------------------------
 be/src/util/thread-pool.h | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/9a52dd67/be/src/util/thread-pool.h
----------------------------------------------------------------------
diff --git a/be/src/util/thread-pool.h b/be/src/util/thread-pool.h
index c64285c..9d5d8c9 100644
--- a/be/src/util/thread-pool.h
+++ b/be/src/util/thread-pool.h
@@ -267,13 +267,22 @@ class SynchronousWorkItem {
     discard_result(done_promise_.Set(status));
   }
 
-  /// Wait for the operation to complete or time out with the specified limit.
+  /// Wait for the operation to complete or time out with the specified limit
+  /// 'timeout_millis' given that the caller has already waited 'time_used_millis'.
   /// If the operation times out, it returns TErrorCode::THREAD_POOL_TASK_TIMED_OUT.
   /// Otherwise, it returns the status returned by Execute().
-  Status Wait(int64_t timeout_millis) {
-    bool timed_out;
-    Status status = done_promise_.Get(timeout_millis, &timed_out);
+  Status Wait(int64_t timeout_millis, int64_t time_used_millis) {
+    // If the time used has already exceeded the timeout, go directly to returning
+    // THREAD_POOL_TASK_TIMED_OUT.
+    bool timed_out = (time_used_millis >= timeout_millis);
+    Status status;
+    if (!timed_out) {
+      int64_t timeout_left_millis = timeout_millis - time_used_millis;
+      status = done_promise_.Get(timeout_left_millis, &timed_out);
+    }
     if (timed_out) {
+      // IMPALA-7946: Always throw an error using the original timeout, not the
+      // timeout remaining.
       Status timeout_status = Status(TErrorCode::THREAD_POOL_TASK_TIMED_OUT,
           GetDescription(), timeout_millis / MILLIS_PER_SEC);
       LOG(WARNING) << timeout_status.GetDetail();
@@ -328,16 +337,9 @@ class SynchronousThreadPool : public ThreadPool<std::shared_ptr<SynchronousWorkI
       return failed_to_submit_status;
     }
 
-    int64_t offer_time_millis =
+    int64_t time_used_millis =
         offer_timer.ElapsedTime() / (NANOS_PER_MICRO * MICROS_PER_MILLI);
-    int64_t timeout_left = timeout_milliseconds - offer_time_millis;
-    if (timeout_left <= 0) {
-      Status timeout_status = Status(TErrorCode::THREAD_POOL_TASK_TIMED_OUT,
-          work->GetDescription(), timeout_milliseconds / MILLIS_PER_SEC);
-      LOG(WARNING) << timeout_status.GetDetail();
-      return timeout_status;
-    }
-    return work->Wait(timeout_left);
+    return work->Wait(timeout_milliseconds, time_used_millis);
   }
 
  private: