知识点
相关文章
更多最近更新
更多Hadoop中InterfaceAudience 注解
2019-03-28 13:25|来源: 网络
InterfaceAudience 类包含三个注解类型,用来被说明被他们注解的类型的潜在的使用范围(audience)。
@InterfaceAudience.Public: 对所有工程和应用可用
@InterfaceAudience.LimitedPrivate: 仅限于某些特定工程,如Comomn,HDFS等
@InterfaceAudience.Private: 仅限于Hadoop
- /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- package org.apache.hadoop.classification;
- import java.lang.annotation.Documented;
- /**
- * 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 {};
- /**
- * Intended only for the project(s) specified in the annotation.
- * For example, "Common", "HDFS", "MapReduce", "ZooKeeper", "HBase".
- */
- @Documented public @interface LimitedPrivate {
- String[] value();
- };
- /**
- * Intended for use only within Hadoop itself.
- */
- @Documented public @interface Private {};
- private InterfaceAudience() {} // Audience can't exist on its own
- }
相关问答
更多-
spring mvc 注解 怎么理解[2021-06-20]
当创建一个 Controller 时,需要直接或间接地实现org.springframework.web.servlet.mvc.Controller 接口。 一般情况下,通过继承 SimpleFormController 或 MultiActionController 来定义 Controller 的。 在定义 Controller 后,一个重要的事件是在 Spring MVC 的配置文件中通过 HandlerMapping 定义请求和控制器的映射关系,以便将两者关联起来。 -
在Spring中怎么拦截自定义的注解[2022-03-18]
@Aspect @Component//加上这个 public class MyInterceptor { @Pointcut("execution(public * com.newer.service.imp.PersonServiecBean.save*(..))") private void anyMethod(){} @After(value="anyMethod()") public void doAccess(){ System.out.println("前置通知!!"); } } 配置里面把m ... -
spring注解问题。。。[2019-03-05]
这里的Bean我觉得应该是类似于SSH使用xml配置对象 public class ProjectServiceImpl implements ProjectService { private BaseDAO baseDao; public BaseDAO getBaseDao() { return baseDao; } public void setBaseDao(BaseDAO baseDao) { this.baseDao = baseDao; } 应该指的就是这种依赖注入的对象,将SSH通过xml的 ... -
hibernate 4 扫描注解类[2022-04-19]
hibernate 用的注解都是基于JPA规范的,就是注解都在javax.persistence 这个包下,好像不用配置自动扫描 直接加注解就可以用 -
java注解如何自动触发?[2021-11-05]
没有自动触发一说, 总有那么一段程序都 把这些注解信息给提出来,然后跑它的功能。 只是说有些框架提供了这些功能,你不用自己去写了,只需要 配置就好了。 不同的框架是不一样的不能给我讲 -
java中spring框架用了哪些注解?[2021-10-02]
很多 IOC的很多来自包扫描 -
Spring注解为什么有的时候是类有的时候是接口[2021-08-14]
spring是面对接口的编程,依赖注入自动装配的,