Package org.apache.flink.runtime.util
Class HadoopUtils
java.lang.Object
org.apache.flink.runtime.util.HadoopUtils
Utility class for working with Hadoop-related classes. This should only be used if Hadoop is on
the classpath.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Constructor Details
-
HadoopUtils
public HadoopUtils()
-
-
Method Details
-
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
-