All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.springframework.yarn.config.annotation.builders.YarnContainerConfigurer Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2013 the original author or authors.
 *
 * Licensed 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.springframework.yarn.config.annotation.builders;

import org.springframework.yarn.config.annotation.SpringYarnConfigurerAdapter;
import org.springframework.yarn.container.YarnContainer;

/**
 * {@code YarnContainerConfigure} is an interface for {@code YarnContainerBuilder} which is
 * exposed to user via {@link SpringYarnConfigurerAdapter}.
 * 

* Typically configuration is shown below. *
*

 * @Configuration
 * @EnableYarn(enable=Enable.CONTAINER)
 * static class Config extends SpringYarnConfigurerAdapter {
 *
 *   @Override
 *   public void configure(YarnContainerConfigure container) throws Exception {
 *     container
 *       .containerClass(MyYarnContainer.class);
 *   }
 *
 * }
 * 
* * @author Janne Valkealahti * */ public interface YarnContainerConfigurer { /** * Specify a {@code YarnContainer} class. * *
*
JavaConfig: *
*
	 * public void configure(YarnContainerConfigure container) throws Exception {
	 *   container
	 *     .containerClass(MyYarnContainer.class);
	 * }
	 * 
* *
XML: *
*
	 * <yarn:container container-class="com.example.MyYarnContainer"/>
	 * 
* * @param clazz The Yarn container class * @return {@link YarnContainerConfigurer} for chaining */ YarnContainerConfigurer containerClass(Class clazz); /** * Specify a {@code YarnContainer} as a fully qualified class name. * *
*
JavaConfig: *
*
	 * public void configure(YarnContainerConfigure container) throws Exception {
	 *   container
	 *     .containerClass("foo.example.MyYarnContainer");
	 * }
	 * 
* *
XML: *
* No equivalent * * @param clazz The Yarn container class * @return {@link YarnContainerConfigurer} for chaining */ YarnContainerConfigurer containerClass(String clazz); /** * Specify a {@code YarnContainer} reference. * *
*
JavaConfig: *
*
	 * @Autowired
	 * private YarnContainer yarnContainer;
	 *
	 * public void configure(YarnContainerConfigure container) throws Exception {
	 *   container
	 *     .containerRef(MyYarnContainer.class);
	 * }
	 * 
* *
XML: *
*
	 * <bean id="myYarnContainer" class="com.example.MyYarnContainer"/>
	 * <yarn:container container-ref="myYarnContainer"/>
	 * 
* * @param ref The Yarn container reference * @return {@link YarnContainerConfigurer} for chaining */ YarnContainerConfigurer containerRef(YarnContainer ref); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy