public static FileBasedJobLockFactory create ( Config factoryConfig , Configuration hadoopConf , Optional < Logger > log ) throws IOException { FileSystem fs = factoryConfig . hasPath ( FS_URI_CONFIG ) ? FileSystem . get ( URI . create ( factoryConfig . getString ( FS_URI_CONFIG ) ) , hadoopConf ) : getDefaultFileSystem ( hadoopConf ) ; String lockFilesDir = factoryConfig . hasPath ( LOCK_DIR_CONFIG ) ? factoryConfig . getString ( LOCK_DIR_CONFIG ) : getDefaultLockDir ( fs , log ) ; return new FileBasedJobLockFactory ( fs , lockFilesDir , log ) ; }
Create a new instance using the specified factory and hadoop configurations .