Package alluxio.util

Class EnvironmentUtils


  • @ThreadSafe
    public final class EnvironmentUtils
    extends java.lang.Object
    Utilities to detect environment Alluxio is running in.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getEC2ProductCode()
      Gets the EC2 product code if any.
      static boolean isCFT​(java.lang.String userData)
      Checks whether the given user data belongs to an instance launched through CFT.
      static boolean isDocker()
      Utility to detect the docker deployment environment.
      static boolean isEC2()
      Utility to detect the EC2 deployment environment.
      static boolean isEMR​(java.lang.String userData)
      Checks whether the given user data belongs to an instance launched through EMR.
      static boolean isGoogleComputeEngine()
      Utility to detect the Google compute engine deployment environment.
      static boolean isKubernetes()
      Utility to detect the k8s deployment environment.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isDocker

        public static boolean isDocker()
        Utility to detect the docker deployment environment.
        Returns:
        true, if running on docker
      • isKubernetes

        public static boolean isKubernetes()
        Utility to detect the k8s deployment environment.
        Returns:
        true, if running on k8s
      • isEC2

        public static boolean isEC2()
        Utility to detect the EC2 deployment environment.
        Returns:
        true, if running on EC2
      • isGoogleComputeEngine

        public static boolean isGoogleComputeEngine()
        Utility to detect the Google compute engine deployment environment.
        Returns:
        true, if running on gce
      • getEC2ProductCode

        public static java.lang.String getEC2ProductCode()
        Gets the EC2 product code if any.
        Returns:
        the first product code if any, an empty string otherwise
      • isCFT

        public static boolean isCFT​(java.lang.String userData)
        Checks whether the given user data belongs to an instance launched through CFT.
        Parameters:
        userData - the ec2 instance user data
        Returns:
        true if this instance is launched from CFT, false otherwise
      • isEMR

        public static boolean isEMR​(java.lang.String userData)
        Checks whether the given user data belongs to an instance launched through EMR.
        Parameters:
        userData - the ec2 instance user data
        Returns:
        true if this instance is launched from EMR, false otherwise