001    /**
002     * Licensed to the Apache Software Foundation (ASF) under one
003     * or more contributor license agreements.  See the NOTICE file
004     * distributed with this work for additional information
005     * regarding copyright ownership.  The ASF licenses this file
006     * to you under the Apache License, Version 2.0 (the
007     * "License"); you may not use this file except in compliance
008     * with the License.  You may obtain a copy of the License at
009     *
010     *     http://www.apache.org/licenses/LICENSE-2.0
011     *
012     * Unless required by applicable law or agreed to in writing, software
013     * distributed under the License is distributed on an "AS IS" BASIS,
014     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015     * See the License for the specific language governing permissions and
016     * limitations under the License.
017     */
018    
019    package org.apache.hadoop.yarn.api.records;
020    
021    import org.apache.hadoop.classification.InterfaceAudience.Public;
022    import org.apache.hadoop.classification.InterfaceStability.Stable;
023    import org.apache.hadoop.yarn.api.ContainerManagementProtocol;
024    
025    /**
026     * <p><code>LocalResourceVisibility</code> specifies the <em>visibility</em>
027     * of a resource localized by the <code>NodeManager</code>.</p>
028     * 
029     * <p>The <em>visibility</em> can be one of:
030     *   <ul>
031     *     <li>{@link #PUBLIC} - Shared by all users on the node.</li>
032     *     <li>
033     *       {@link #PRIVATE} - Shared among all applications of the 
034     *       <em>same user</em> on the node.
035     *     </li>
036     *     <li>
037     *       {@link #APPLICATION} - Shared only among containers of the 
038     *       <em>same application</em> on the node.
039     *     </li>
040     *   </ul>
041     * </p>
042     * 
043     * @see LocalResource
044     * @see ContainerLaunchContext
045     * @see ApplicationSubmissionContext
046     * @see ContainerManagementProtocol#startContainers(org.apache.hadoop.yarn.api.protocolrecords.StartContainersRequest)
047     */
048    @Public
049    @Stable
050    public enum LocalResourceVisibility {
051      /** 
052       * Shared by all users on the node.
053       */
054      PUBLIC, 
055      
056      /** 
057       * Shared among all applications of the <em>same user</em> on the node.
058       */
059      PRIVATE, 
060      
061      /** 
062       * Shared only among containers of the <em>same application</em> on the node.
063       */
064      APPLICATION
065    }