You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2016/05/12 22:10:16 UTC

[41/50] [abbrv] incubator-impala git commit: IMPALA-3500: GetEffectiveUser() segfault using -enable_rm

IMPALA-3500: GetEffectiveUser() segfault using -enable_rm

A previous change to improve admission control broke Llama
integration. The Coordinator's runtime_state has a partial
TQueryCtx, it doesn't have the TSessionState which is used
by RuntimeState::effective_user(), so calling that in the
SimpleScheduler caused the process to crash.

This is easily fixed by using the TSessionState from the
schedule (which is what the Admission Control code was
doing).

Llama integration is no longer supported, so this was only
tested manually.

Change-Id: Ia04b6aec35ae794d7062fd32104f3964f397f00c
Reviewed-on: http://gerrit.cloudera.org:8080/3016
Reviewed-by: Alex Behm <al...@cloudera.com>
Reviewed-by: Dan Hecht <dh...@cloudera.com>
Tested-by: Internal Jenkins


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

Branch: refs/heads/master
Commit: ca3f911f1af9f1c53b9bb589af3c99f7aeb89a6e
Parents: 18f8f46
Author: Matthew Jacobs <mj...@cloudera.com>
Authored: Tue May 10 12:32:51 2016 -0700
Committer: Tim Armstrong <ta...@cloudera.com>
Committed: Thu May 12 14:18:02 2016 -0700

----------------------------------------------------------------------
 be/src/scheduling/simple-scheduler.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/ca3f911f/be/src/scheduling/simple-scheduler.cc
----------------------------------------------------------------------
diff --git a/be/src/scheduling/simple-scheduler.cc b/be/src/scheduling/simple-scheduler.cc
index e6121ed..265ca10 100644
--- a/be/src/scheduling/simple-scheduler.cc
+++ b/be/src/scheduling/simple-scheduler.cc
@@ -872,7 +872,7 @@ Status SimpleScheduler::Schedule(Coordinator* coord, QuerySchedule* schedule) {
     RETURN_IF_ERROR(admission_controller_->AdmitQuery(schedule));
   }
   if (!FLAGS_enable_rm) return Status::OK();
-  string user = coord->runtime_state()->effective_user();
+  string user = GetEffectiveUser(schedule->request().query_ctx.session);
   if (user.empty()) user = "default";
   schedule->PrepareReservationRequest(resolved_pool, user);
   const TResourceBrokerReservationRequest& reservation_request =