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, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.apache.reef.examples.scheduler.client; 020 021import org.apache.commons.cli.ParseException; 022import org.apache.reef.runtime.yarn.client.YarnClientConfiguration; 023import org.apache.reef.tang.Configuration; 024import org.apache.reef.tang.exceptions.InjectionException; 025 026import java.io.IOException; 027 028import static org.apache.reef.examples.scheduler.client.SchedulerREEF.runTaskScheduler; 029 030/** 031 * REEF TaskScheduler on YARN runtime. 032 */ 033public final class SchedulerREEFYarn { 034 /** 035 * Launch the scheduler with YARN client configuration. 036 * @param args 037 * @throws InjectionException 038 * @throws java.io.IOException 039 */ 040 public static void main(final String[] args) 041 throws InjectionException, IOException, ParseException { 042 final Configuration runtimeConfiguration = 043 YarnClientConfiguration.CONF.build(); 044 runTaskScheduler(runtimeConfiguration, args); 045 } 046 047 /** 048 * Empty private constructor to prohibit instantiation of utility class. 049 */ 050 private SchedulerREEFYarn() { 051 } 052}