Package org.apache.flink.runtime.util
Class HadoopUtils
- java.lang.Object
-
- org.apache.flink.runtime.util.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 Summary
Constructors Constructor Description HadoopUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanareKerberosCredentialsValid(org.apache.hadoop.security.UserGroupInformation ugi, boolean useTicketCache)static org.apache.hadoop.conf.ConfigurationgetHadoopConfiguration(org.apache.flink.configuration.Configuration flinkConfiguration)static booleanhasHDFSDelegationToken(org.apache.hadoop.security.UserGroupInformation ugi)Indicates whether the user has an HDFS delegation token.static booleanisKerberosSecurityEnabled(org.apache.hadoop.security.UserGroupInformation ugi)static booleanisMaxHadoopVersion(int major, int minor)Checks if the Hadoop dependency is at most the given version.static booleanisMinHadoopVersion(int major, int minor)Checks if the Hadoop dependency is at least the given version.
-
-
-
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.FlinkRuntimeExceptionChecks 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.FlinkRuntimeExceptionChecks if the Hadoop dependency is at most the given version.- Throws:
org.apache.flink.util.FlinkRuntimeException
-
-