源码-hadoop1.1.0-core-org.apache.hadoop.classification
里面放着两个注解类:InterfaceAudience和InterfaceStability。
InterfaceAudience 类包含三个注解类型,用来被说明被他们注解的类型的潜在的使用范围(audience)。
@InterfaceAudience.Public: 对所有工程和应用可用
@InterfaceAudience.LimitedPrivate: 仅限于某些特定工程,如Comomn,HDFS等
@InterfaceAudience.Private: 仅限于Hadoop
InterfaceStability 类包含三个注解,用于说明被他们注解的类型的稳定性。
@InterfaceStability.Stable: 主版本是稳定的,不同主版本间可能不兼容
@InterfaceStability.Evolving: 不断变化,不同次版本间可能不兼容
@InterfaceStability.Unstable: 没有任何可靠性和健壮性保证
/**
*注释省略...
**/
package org.apache.hadoop.classification; import java.lang.annotation.Documented;
//只引入了JDK的注释包中的Documented接口,即没有其他hadoop类级联
/**
* Annotation to inform users of a package, class or method's intended audience.
*/
//这里面也是注解类,用来向用户表明一个包、类或者方法的潜在的使用范围
@InterfaceAudience.Public
@InterfaceStability.Evolving
//自注解(自己起的名字)。第一个注解就用到了这个类中的第一个内部注解。第二个是同包下的第二个类(不解释)。
public class InterfaceAudience {
/**
* Intended for use by any project or application.
*/
@Documented public @interface Public {};
//@Doccumented 是元注解(就是注解注解的注解),作用是指示某一类型的注释将通过 javadoc 和类似的默认工具进行文档化。
//这个注解是标识适用任何工程或者应用
/**
* Intended only for the project(s) specified in the annotation.
* For example, "Common", "HDFS", "MapReduce", "ZooKeeper", "HBase".
*/
@Documented public @interface LimitedPrivate {
String[] value();
};
//标识适用于某些特殊的工程。比如HDFS、Mapreduce等
//它的值是个字符串数组,表示可以是多个工程 /**
* Intended for use only within Hadoop itself.
*/
@Documented public @interface Private {};
//只适用于hadoop自己
private InterfaceAudience() {} // Audience can't exist on its own
//构造方法,私有的。已有注释
}
关于元注解和自定义注解 http://www.cnblogs.com/peida/archive/2013/04/24/3036689.html
package org.apache.hadoop.classification; import java.lang.annotation.Documented; /**
* Annotation to inform users of how much to rely on a particular package,
* class or method not changing over time.
*/
//说明被他们注解的类型的稳定性
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class InterfaceStability {
/**
* Can evolve while retaining compatibility for minor release boundaries.;
* can break compatibility only at major release (ie. at m.0).
*/
@Documented
public @interface Stable {};
//主版本是稳定的,不同主版本间可能不兼容
/**
* Evolving, but can break compatibility at minor release (i.e. m.x)
*/
@Documented
public @interface Evolving {};
//不断变化,不同次版本间可能不兼容
/**
* No guarantee is provided as to reliability or stability across any
* level of release granularity.
*/
@Documented
public @interface Unstable {};
//没有任何可靠性和健壮性保证
}
源码-hadoop1.1.0-core-org.apache.hadoop.classification的更多相关文章
- 【转】Win 7 下源码运行OpenERP7.0
原文地址:Win 7 下源码运行OpenERP7.0 安装Python2.7 下载地址:http://www.python.org/getit/注:OpenERP7.0支持的Python版本最高为2. ...
- CentOS7源码安装Redis5.0.4非关系型数据库
源码安装redis-5.0.4 一. 下载redis 1. 需要连接网络 二. 案例(另一种安装方法) [root@localhost ~]# wget http://download.redis.i ...
- 源码安装 qemu-2.0.0 及其依赖 glib-2.12.12
源码安装qemu-2.0.0 下载源代码并解压 http://wiki.qemu-project.org/download/qemu-2.0.0.tar.bz2 .tar.gz 编译及安装: cd q ...
- 源码-hadoop1.1.0-core-org.apache.hadoop
按包的顺序类的顺序来吧,因为我不懂hadoop类的具体体系和类之间的联系,如果有一定知识积累的可以看下别人写的hadoop源码解读类的书,类似的有 http://pan.baidu.com/s/1i3 ...
- CentOS下源码安装vsftpd-3.0.0,并设置指定用户访问指定目录(附带完整配置文件)
1.卸载系统已经存在的ftp服务器 因为是源码安装,所以不能通过rpm -qa的方式查看是否已经安装ftp服务器,可以通过find / | grep vsftp*方式查看系统中存在哪些与vsftpd相 ...
- ubuntu16.04下源码安装onos1.0.2
由于工作需要,下载安装onos1.0.2的版本,大家看需求可以下载安装更高级的版本 参考链接:http://www.sdnlab.com/14650.html 1.系统环境 Ubuntu16.04 L ...
- 源码搭建Zabbix4.0.23LTS监控系统
实验环境 centos 7.5 主机名 IP地址 配置 应用 controlnode 172.16.1.120/24 4核/8G/60G java-1.8.0-openjdk zabbix serve ...
- 烂泥:Linux源码包制作RPM包之Apache
本文由秀依林枫提供友情赞助,首发于烂泥行天下 公司服务器比较多,需要把apache源码包制作成rpm包,然后放到公司内网yum源上进行下载安装.apache的rpm包安装方式比源码安装方式比较快,这能 ...
- 解决从源码编译ncurses6.0编译lib_gen.c报错的问题
直接从官网的源码编译时,会提示报错: gcc -DHAVE_CONFIG_H -I. -I../include -D_GNU_SOURCE -DNDEBUG -O2 --param max-inlin ...
随机推荐
- 轻松学习Linux之VI编辑器的使用
本文出自 "李晨光原创技术博客" 博客,谢绝转载!
- Terrain & Light & Camera
[Terrain Engine] 1.When you press F, wherever your mouse is positioned will be moved to the center o ...
- Ubuntu下Android编译环境的配置
从安装操作系统到编译程序结束,过程大致如下. 1. Ubuntu Linux操作系统安装软件包.使用 Ubuntu 14.04 Desktop系统.安装Linux系统到VMWare虚拟机上. 2. 完 ...
- ARP防火墙绑定网关MAC地址预防ARP攻击和P2P终结者
[故障原理] 要了解故障原理,我们先来了解一下ARP协议. 在局域网中,通过ARP协议来完成IP地址转换为第二层物理地址(即MAC地址)的.ARP协议对网络安全具有重要的意义.通过伪造IP地址和M ...
- POJ 2342 Anniversary party (树dp)
题目链接:http://poj.org/problem?id=2342 有n个人,每个人有活跃值.下面n-1行u和v表示u的上司是v,有直接上司和下属的关系不能同时参加party,问你party最大的 ...
- How to check “hasRole” in Java Code with Spring Security?
From:http://stackoverflow.com/questions/3021200/how-to-check-hasrole-in-java-code-with-spring-securi ...
- Objc基础学习记录2
1.[类 方法名]; //类方法,-静态成员函数, + (void)fun; 2.[对象名 方法名]; //实例方法, -非静态成员函数, - (void) fun; 3.带有冒号必须要有参数; 4. ...
- 如何设置Grunt
原文地址: Step 1: Install Node.js Download a Node installer and run it. Installation packages are availa ...
- canvas加载gif
http://ernestdelgado.com/public-tests/gifoncanvas/ <!DOCTYPE html><html><head> < ...
- 在ASP.NET MVC中使用MySQL【并使用membership】
大多数情况下我们使用.NET或ASP.NET(包括MVC)程序时,我们会同时选择SQL Server 或者SQL Express (其他微软产品)做数据库.但是今天使用MVC已经完全没 ...