private void tryInit ( ) { try { Configuration conf = getSnapshotConfiguration ( ) ; if ( conf != null ) { // Since this is only used for background loading of transaction snapshots, we use the no-op metrics collector, // as there are no relevant metrics to report this . storage = new HDFSTransactionStateStorage ( conf , new SnapshotCodecProvider ( conf ) , new TxMetricsCollector ( ) ) ; this . storage . startAndWait ( ) ; this . snapshotRefreshFrequency = conf . getLong ( TxConstants . Manager . CFG_TX_SNAPSHOT_INTERVAL , TxConstants . Manager . DEFAULT_TX_SNAPSHOT_INTERVAL ) * 1000 ; this . initialized = true ; } else { LOG . info ( "Could not load configuration" ) ; } } catch ( Exception e ) { LOG . info ( "Failed to initialize TransactionStateCache due to: " + e . getMessage ( ) ) ; } }
Try to initialize the Configuration and TransactionStateStorage instances . Obtaining the Configuration may fail until ReactorServiceMain has been started .