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
019package org.apache.hadoop.yarn.api.records;
020
021import org.apache.hadoop.classification.InterfaceAudience.Public;
022import org.apache.hadoop.classification.InterfaceStability.Stable;
023import org.apache.hadoop.yarn.api.ContainerManagementProtocol;
024
025/**
026 * {@code LocalResourceVisibility} specifies the <em>visibility</em>
027 * of a resource localized by the {@code NodeManager}.
028 * <p>
029 * 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 * 
042 * @see LocalResource
043 * @see ContainerLaunchContext
044 * @see ApplicationSubmissionContext
045 * @see ContainerManagementProtocol#startContainers(org.apache.hadoop.yarn.api.protocolrecords.StartContainersRequest)
046 */
047@Public
048@Stable
049public enum LocalResourceVisibility {
050  /** 
051   * Shared by all users on the node.
052   */
053  PUBLIC, 
054  
055  /** 
056   * Shared among all applications of the <em>same user</em> on the node.
057   */
058  PRIVATE, 
059  
060  /** 
061   * Shared only among containers of the <em>same application</em> on the node.
062   */
063  APPLICATION
064}