[hadoop] Prevent Yarn API caching to tie the user to the first user calling it

Review Request #6769 — Created Jan. 25, 2016 and submitted

romain
hue
master
hue
enricoberti, jennykim, johan, krish

commit 16a3920e03dbee1517a6714fa98d959d3050de0a
Author: Romain Rigaux <romain@cloudera.com>
Date: Mon Jan 25 10:59:42 2016 -0800

[HTML_REMOVED] [hadoop] Prevent Yarn API caching to tie the user to the first user calling it
[HTML_REMOVED]
[HTML_REMOVED] Double checked that two users gets their own doAs parameter:
[HTML_REMOVED]
[HTML_REMOVED] &user.name=hue&doAs=test
[HTML_REMOVED] &user.name=hue&doAs=romain

:100644 100644 2b9c4f3... c5af42b... M desktop/libs/hadoop/src/hadoop/cluster.py
:100644 100644 0ff0253... abbe7c5... M desktop/libs/hadoop/src/hadoop/yarn/resource_manager_api.py

tests +

Double checked that two users gets their own doAs parameter:

&user.name=hue&doAs=test
&user.name=hue&doAs=romain
  • 2
  • 0
  • 0
  • 0
  • 2
Description From Last Updated
Are there no circular dependecies here? B/c this setuser method calls self.user property, which calls self.username property, which expects self._thread_local.user ... jennykim jennykim
the first time: curr = self.user triggers the AttributeError which return the DEFAULT_USER then on the next line, self._thread_local.user sets ... romain romain
jennykim
  1. 
      
  2. Are there no circular dependecies here? B/c this setuser method calls self.user property, which calls self.username property, which expects self._thread_local.user to be set already, but that only happens on setuser.

    1. the first time:

      curr = self.user

      triggers the AttributeError

      which return the DEFAULT_USER

      then on the next line,
      self._thread_local.user sets it for real

      ?

  3. 
      
romain
  1. 
      
  2. the first time:

    curr = self.user

    triggers the AttributeError

    which return the DEFAULT_USER

    then on the next line,
    self._thread_local.user sets it for real

    ?

  3. 
      
romain
Review request changed

Status: Closed (submitted)

Loading...