protected void runWildCardCmd ( AlluxioURI wildCardPath , CommandLine cl ) throws IOException { List < AlluxioURI > paths = FileSystemShellUtils . getAlluxioURIs ( mFileSystem , wildCardPath ) ; if ( paths . size ( ) == 0 ) { // A unified sanity check on the paths throw new IOException ( wildCardPath + " does not exist." ) ; } paths . sort ( Comparator . comparing ( AlluxioURI :: getPath ) ) ; // TODO(lu) if errors occur in runPlainPath, we may not want to print header processHeader ( cl ) ; List < String > errorMessages = new ArrayList <> ( ) ; for ( AlluxioURI path : paths ) { try { runPlainPath ( path , cl ) ; } catch ( AlluxioException | IOException e ) { errorMessages . add ( e . getMessage ( ) != null ? e . getMessage ( ) : e . toString ( ) ) ; } } if ( errorMessages . size ( ) != 0 ) { throw new IOException ( Joiner . on ( ' ' ) . join ( errorMessages ) ) ; } }
Runs the command for a particular URI that may contain wildcard in its path .