Hadoop 之 注解
来源:互联网 发布:网络英语哪家好 编辑:程序博客网 时间:2024/05/21 09:38
InterfaceAudience 类主要包括三类注解用来强调使用范围:
@InterfaceAudience.Public : 任何工程均可使用
@InterfaceAudience.LimitedPrivate :只有在特定的工程中可以使用,如 Common HDFS MapReduce ZooKeeper HBase
@InterfaceAudience.Private: 只有在Hadoop中可以使用
具体代码如下:
@InterfaceAudience.Public@InterfaceStability.Evolvingpublic class InterfaceAudience { /** * Intended for use by any project or application. */ @Documented @Retention(RetentionPolicy.RUNTIME) public @interface Public {}; /** * Intended only for the project(s) specified in the annotation. * For example, "Common", "HDFS", "MapReduce", "ZooKeeper", "HBase". */ @Documented @Retention(RetentionPolicy.RUNTIME) public @interface LimitedPrivate { String[] value(); }; /** * Intended for use only within Hadoop itself. */ @Documented @Retention(RetentionPolicy.RUNTIME) public @interface Private {}; private InterfaceAudience() {} // Audience can't exist on its own}
InterfaceStability类中定义了三种注解,主要用来说明代码的稳定性(即其内容是否会随版本的变化而变化):
@InterfaceStability.Stable : 代码具有较强的稳定性,但随着工程主版本号的变化可能会发生改变
@InterfaceStability.Evolving:随着工程次版本号的变化可能会发生改变
@InterfaceStability.Unstable :代码在任何发布版本中均有可能会发生变化
@InterfaceAudience.Public@InterfaceStability.Evolvingpublic class InterfaceStability { /** * Can evolve while retaining compatibility for minor release boundaries.; * can break compatibility only at major release (ie. at m.0). */ @Documented @Retention(RetentionPolicy.RUNTIME) public @interface Stable {}; /** * Evolving, but can break compatibility at minor release (i.e. m.x) */ @Documented @Retention(RetentionPolicy.RUNTIME) public @interface Evolving {}; /** * No guarantee is provided as to reliability or stability across any * level of release granularity. */ @Documented @Retention(RetentionPolicy.RUNTIME) public @interface Unstable {};}
0 0
- Hadoop 之 注解
- hadoop 注解之 interfaceAudience interfaceStability
- 关于hadoop配置文件的注解
- hadoop安装之-hadoop
- hadoop 之Hadoop生态系统
- hadoop之hadoop配置
- java之注解 自定义注解
- Java注解之常用注解
- 注解三之注解处理器
- java注解之初识注解
- 注解之注解的基本概念
- springmvc注解之@RequestMapping注解
- springmvc注解之@component注解
- hadoop 学习之hadoop基础
- hadoop学习之hadoop安装
- 《Hadoop基础教程》之初识Hadoop
- 《Hadoop基础教程》之初识Hadoop
- 《Hadoop基础教程》之初识Hadoop
- 算法研究之插入排序、冒泡排序
- 杂七杂八学习网址
- Bundle install error
- 算法研究之快速排序
- Winform 动态添加RadioButton、CheckBox 且任意分组
- Hadoop 之 注解
- 算法研究之左旋字符串
- [leetcode] Sort Colors
- White Rectangles(hdu 1510)
- poj1634
- 表达式生成满足条件的随机数据
- OC语言-----NSArray , NSMutableArray, NSNumber 基本用法
- 编程思想
- mysql的安装、C++访问mysql数据库、编码设置问题