public static boolean isMinHadoopVersion ( int major , int minor ) throws FlinkRuntimeException { String versionString = VersionInfo . getVersion ( ) ; String [ ] versionParts = versionString . split ( "\\." ) ; if ( versionParts . length < 2 ) { throw new FlinkRuntimeException ( "Cannot determine version of Hadoop, unexpected version string: " + versionString ) ; } int maj = Integer . parseInt ( versionParts [ 0 ] ) ; int min = Integer . parseInt ( versionParts [ 1 ] ) ; return maj > major || ( maj == major && min >= minor ) ; }
Checks if the Hadoop dependency is at least of the given version .