[ 
https://issues.apache.org/jira/browse/YARN-2446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14134715#comment-14134715
 ] 

Li Lu commented on YARN-2446:
-----------------------------

Hi [~zjshen], I applied the patch on top of a YARN-2102 branch, and ran all 
system tests changed in your patch. They all passed. On the code side, in 
generally it looks good to me. Here are some comments:

{code}
// create a default namespace, which allows everybody to access and
// modify the entities in it.
namespace = new TimelineNamespace();
namespace.setId(DEFAULT_NAMESPACE_ID);
namespace.setDescription("System Default Namespace");
namespace.setOwner(
    UserGroupInformation.getCurrentUser().getShortUserName());
namespace.setReaders("*");
namespace.setWriters("*");
{code}

I would like to confirm that it is fine to set the owner of default namespace 
to current user. Since this is a lazy initialization, the owner of the default 
namespace is not deterministic. Will this cause any troubles in future?

{code}
throw new YarnException("The namespace of the timeline entity "
            + entityID + " is not allowed to be changed.");
{code}

Could you please verify if this exception only represent the case when the user 
tries to "change the namespace of the entity"? Is it possible to have a 
scenario where the user is not changing the namespace, but just set it wrong? 
If this scenario is possible, maybe we want to change the exception message 
since it may be a little bit confusing. 

{code}
public void invalidate(TimelineNamespace namespace) {
  if (aclExts.containsKey(namespace.getId())) {
    putNamespaceIntoCache(namespace);
  }
}
{code}

When this function is called, it would be reasonable for the user to expect the 
cached item is invalidated in the cache. However, here we're actually updating 
it. Maybe we want to change the name of this function? 

Thanks! 

> Using TimelineNamespace to shield the entities of a user
> --------------------------------------------------------
>
>                 Key: YARN-2446
>                 URL: https://issues.apache.org/jira/browse/YARN-2446
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>            Reporter: Zhijie Shen
>            Assignee: Zhijie Shen
>         Attachments: YARN-2446.1.patch
>
>
> Given YARN-2102 adds TimelineNamespace, we can make use of it to shield the 
> entities, preventing them from being accessed or affected by other users' 
> operations.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to