/*
 * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
 * (the "License"). You may not use this work except in compliance with the License, which is
 * available at www.apache.org/licenses/LICENSE-2.0
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied, as more fully set forth in the License.
 *
 * See the NOTICE file distributed with this work for information regarding copyright ownership.
 */

package alluxio;

/**
 * System constants that are determined during runtime.
 */
public final class RuntimeConstants {
  static {
    VERSION = Configuration.get(PropertyKey.VERSION);
    if (Configuration.get(PropertyKey.VERSION).endsWith("SNAPSHOT")) {
      ALLUXIO_DOCS_URL = "http://www.alluxio.org/docs/master/";
    } else {
      String[] numbers = Configuration.get(PropertyKey.VERSION).split("\\.");
      ALLUXIO_DOCS_URL = String.format("http://www.alluxio.org/docs/%s.%s", numbers[0], numbers[1]);
    }
  }

  /** The version of this Alluxio instance. */
  public static final String VERSION;

  /** The relative path to the Alluxio target jar. */
  public static final String ALLUXIO_JAR =
      "target/alluxio-" + VERSION + "-jar-with-dependencies.jar";

  /** The URL to Alluxio documentation for this version on project web site. */
  public static final String ALLUXIO_DOCS_URL;

  private RuntimeConstants() {} // prevent instantiation
}

@@ -855,23 +855,26 @@
 tring%5B%5D 
-numbers
+majorMinor
  = Confi
@@ -960,16 +960,27 @@
 .format(
+%0A          
 %22http://
@@ -1012,27 +1012,33 @@
 s%22, 
-numbers%5B0%5D, numbers
+majorMinor%5B0%5D, majorMinor
 %5B1%5D)

Update RuntimeConstants.java