public static boolean isServiceSpecified ( String command , Configuration conf , String [ ] argv ) { if ( conf . get ( FSConstants . DFS_FEDERATION_NAMESERVICES ) != null ) { for ( int i = 0 ; i < argv . length ; i ++ ) { if ( argv [ i ] . equals ( "-service" ) ) { // found service specs return true ; } } // no service specs printServiceErrorMessage ( command , conf ) ; return false ; } return true ; }
Checks if the service argument is specified in the command arguments .