Class HadoopUtils


  • public class HadoopUtils
    extends Object
    Utility class for working with Hadoop-related classes. This should only be used if Hadoop is on the classpath.
    • Constructor Detail

      • HadoopUtils

        public HadoopUtils()
    • Method Detail

      • getHadoopConfiguration

        public static org.apache.hadoop.conf.Configuration getHadoopConfiguration​(org.apache.flink.configuration.Configuration flinkConfiguration)
      • isKerberosSecurityEnabled

        public static boolean isKerberosSecurityEnabled​(org.apache.hadoop.security.UserGroupInformation ugi)
      • areKerberosCredentialsValid

        public static boolean areKerberosCredentialsValid​(org.apache.hadoop.security.UserGroupInformation ugi,
                                                          boolean useTicketCache)
      • hasHDFSDelegationToken

        public static boolean hasHDFSDelegationToken​(org.apache.hadoop.security.UserGroupInformation ugi)
        Indicates whether the user has an HDFS delegation token.
      • isMinHadoopVersion

        public static boolean isMinHadoopVersion​(int major,
                                                 int minor)
                                          throws org.apache.flink.util.FlinkRuntimeException
        Checks if the Hadoop dependency is at least the given version.
        Throws:
        org.apache.flink.util.FlinkRuntimeException
      • isMaxHadoopVersion

        public static boolean isMaxHadoopVersion​(int major,
                                                 int minor)
                                          throws org.apache.flink.util.FlinkRuntimeException
        Checks if the Hadoop dependency is at most the given version.
        Throws:
        org.apache.flink.util.FlinkRuntimeException