[jira] [Commented] (YARN-6000) Make AllocationFileLoaderService.Listener public

2017-01-09 Thread Sergey Shelukhin (JIRA)

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

Sergey Shelukhin commented on YARN-6000:


Thanks! As for Hive requirements, see the code snippet above. We are using the 
listener because that seems to be the only way to get the updated value out. We 
just need to get the allocConf/queue

> Make AllocationFileLoaderService.Listener public
> 
>
> Key: YARN-6000
> URL: https://issues.apache.org/jira/browse/YARN-6000
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: fairscheduler, yarn
>Affects Versions: 3.0.0-alpha1
>Reporter: Tao Jie
>Assignee: Tao Jie
> Fix For: 3.0.0-alpha2
>
> Attachments: YARN-6000.001.patch
>
>
> We removed public modifier of {{AllocationFileLoaderService.Listener}} in 
> YARN-4997 since it trigger a findbugs warning. However it breaks Hive code in 
> {{FairSchedulerShim}}. 
> {code}
> AllocationFileLoaderService allocsLoader = new AllocationFileLoaderService();
> allocsLoader.init(conf);
> allocsLoader.setReloadListener(new AllocationFileLoaderService.Listener() 
> {
>   @Override
>   public void onReload(AllocationConfiguration allocs) {
> allocConf.set(allocs);
>   }
> });
> try {
>   allocsLoader.reloadAllocations();
> } catch (Exception ex) {
>   throw new IOException("Failed to load queue allocations", ex);
> }
> if (allocConf.get() == null) {
>   allocConf.set(new AllocationConfiguration(conf));
> }
> QueuePlacementPolicy queuePolicy = allocConf.get().getPlacementPolicy();
> if (queuePolicy != null) {
>   requestedQueue = queuePolicy.assignAppToQueue(requestedQueue, userName);
> {code}
> As a result we should set the modifier back to public.



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

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



[jira] [Commented] (YARN-6000) Make AllocationFileLoaderService.Listener public

2016-12-23 Thread Hudson (JIRA)

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

Hudson commented on YARN-6000:
--

FAILURE: Integrated in Jenkins build Hadoop-trunk-Commit #11034 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/11034/])
YARN-6000. Make AllocationFileLoaderService.Listener public. (Tao Jie (kasha: 
rev 4d3f73acc0a5cabc748132889dbe670bea178a3f)
* (edit) 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/AllocationFileLoaderService.java


> Make AllocationFileLoaderService.Listener public
> 
>
> Key: YARN-6000
> URL: https://issues.apache.org/jira/browse/YARN-6000
> Project: Hadoop YARN
>  Issue Type: Bug
>  Components: fairscheduler, yarn
>Affects Versions: 3.0.0-alpha1
>Reporter: Tao Jie
>Assignee: Tao Jie
> Fix For: 3.0.0-alpha2
>
> Attachments: YARN-6000.001.patch
>
>
> We removed public modifier of {{AllocationFileLoaderService.Listener}} in 
> YARN-4997 since it trigger a findbugs warning. However it breaks Hive code in 
> {{FairSchedulerShim}}. 
> {code}
> AllocationFileLoaderService allocsLoader = new AllocationFileLoaderService();
> allocsLoader.init(conf);
> allocsLoader.setReloadListener(new AllocationFileLoaderService.Listener() 
> {
>   @Override
>   public void onReload(AllocationConfiguration allocs) {
> allocConf.set(allocs);
>   }
> });
> try {
>   allocsLoader.reloadAllocations();
> } catch (Exception ex) {
>   throw new IOException("Failed to load queue allocations", ex);
> }
> if (allocConf.get() == null) {
>   allocConf.set(new AllocationConfiguration(conf));
> }
> QueuePlacementPolicy queuePolicy = allocConf.get().getPlacementPolicy();
> if (queuePolicy != null) {
>   requestedQueue = queuePolicy.assignAppToQueue(requestedQueue, userName);
> {code}
> As a result we should set the modifier back to public.



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

-
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org