1 /** 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 package org.apache.hadoop.yarn.sls.conf; 20 21 import org.apache.hadoop.classification.InterfaceAudience.Private; 22 import org.apache.hadoop.classification.InterfaceStability.Unstable; 23 24 @Private 25 @Unstable 26 public class SLSConfiguration { 27 // sls 28 public static final String PREFIX = "yarn.sls."; 29 // runner 30 public static final String RUNNER_PREFIX = PREFIX + "runner."; 31 public static final String RUNNER_POOL_SIZE = RUNNER_PREFIX + "pool.size"; 32 public static final int RUNNER_POOL_SIZE_DEFAULT = 10; 33 // scheduler 34 public static final String SCHEDULER_PREFIX = PREFIX + "scheduler."; 35 public static final String RM_SCHEDULER = SCHEDULER_PREFIX + "class"; 36 // metrics 37 public static final String METRICS_PREFIX = PREFIX + "metrics."; 38 public static final String METRICS_SWITCH = METRICS_PREFIX + "switch"; 39 public static final String METRICS_WEB_ADDRESS_PORT = METRICS_PREFIX 40 + "web.address.port"; 41 public static final String METRICS_OUTPUT_DIR = METRICS_PREFIX + "output"; 42 public static final int METRICS_WEB_ADDRESS_PORT_DEFAULT = 10001; 43 public static final String METRICS_TIMER_WINDOW_SIZE = METRICS_PREFIX 44 + "timer.window.size"; 45 public static final int METRICS_TIMER_WINDOW_SIZE_DEFAULT = 100; 46 public static final String METRICS_RECORD_INTERVAL_MS = METRICS_PREFIX 47 + "record.interval.ms"; 48 public static final int METRICS_RECORD_INTERVAL_MS_DEFAULT = 1000; 49 // nm 50 public static final String NM_PREFIX = PREFIX + "nm."; 51 public static final String NM_MEMORY_MB = NM_PREFIX + "memory.mb"; 52 public static final int NM_MEMORY_MB_DEFAULT = 10240; 53 public static final String NM_VCORES = NM_PREFIX + "vcores"; 54 public static final int NM_VCORES_DEFAULT = 10; 55 public static final String NM_HEARTBEAT_INTERVAL_MS = NM_PREFIX 56 + "heartbeat.interval.ms"; 57 public static final int NM_HEARTBEAT_INTERVAL_MS_DEFAULT = 1000; 58 // am 59 public static final String AM_PREFIX = PREFIX + "am."; 60 public static final String AM_HEARTBEAT_INTERVAL_MS = AM_PREFIX 61 + "heartbeat.interval.ms"; 62 public static final int AM_HEARTBEAT_INTERVAL_MS_DEFAULT = 1000; 63 public static final String AM_TYPE = AM_PREFIX + "type."; 64 65 // container 66 public static final String CONTAINER_PREFIX = PREFIX + "container."; 67 public static final String CONTAINER_MEMORY_MB = CONTAINER_PREFIX 68 + "memory.mb"; 69 public static final int CONTAINER_MEMORY_MB_DEFAULT = 1024; 70 public static final String CONTAINER_VCORES = CONTAINER_PREFIX + "vcores"; 71 public static final int CONTAINER_VCORES_DEFAULT = 1; 72 73 } 74