private void initParityConfigs ( ) { Set < String > acceptedCodecIds = new HashSet < String > ( ) ; for ( String s : conf . get ( "dfs.f4.accepted.codecs" , "rs,xor" ) . split ( "," ) ) { acceptedCodecIds . add ( s ) ; } for ( Codec c : Codec . getCodecs ( ) ) { if ( acceptedCodecIds . contains ( c . id ) ) { FSNamesystem . LOG . info ( "F4: Parity info." + " Id: " + c . id + " Parity Length: " + c . parityLength + " Parity Stripe Length: " + c . stripeLength + " Parity directory: " + c . parityDirectory + " Parity temp directory: " + c . tmpParityDirectory ) ; acceptedCodecs . add ( c ) ; if ( c . stripeLength > this . stripeLen ) { // Use the max stripe length this . stripeLen = c . stripeLength ; } } } FSNamesystem . LOG . info ( "F4: Initialized stripe len to: " + this . stripeLen ) ; }
This function initializes configuration for the supported parities .