public void initialize ( URI path , Configuration config , boolean initSuperclass ) throws IOException { long startTime = System . nanoTime ( ) ; Preconditions . checkArgument ( path != null , "path must not be null" ) ; Preconditions . checkArgument ( config != null , "config must not be null" ) ; Preconditions . checkArgument ( path . getScheme ( ) != null , "scheme of path must not be null" ) ; if ( ! path . getScheme ( ) . equals ( getScheme ( ) ) ) { throw new IllegalArgumentException ( "URI scheme not supported: " + path ) ; } initUri = path ; logger . atFine ( ) . log ( "GHFS.initialize: %s" , path ) ; if ( initSuperclass ) { super . initialize ( path , config ) ; } else { logger . atFine ( ) . log ( "Initializing 'statistics' as an instance not attached to the static FileSystem map" ) ; // Provide an ephemeral Statistics object to avoid NPE, but still avoid registering a global // statistics object. statistics = new Statistics ( getScheme ( ) ) ; } // Set this configuration as the default config for this instance; configure() // will perform some file-system-specific adjustments, but the original should // be sufficient (and is required) for the delegation token binding initialization. setConf ( config ) ; // Initialize the delegation token support, if it is configured initializeDelegationTokenSupport ( config , path ) ; configure ( config ) ; long duration = System . nanoTime ( ) - startTime ; increment ( Counter . INIT ) ; increment ( Counter . INIT_TIME , duration ) ; }
Initializes this file system instance .