hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/ObjectStore.java
public Iterator<OzoneVolume> listVolumes(String user, String volumePrefix)
      throws IOException {
    if(Strings.isNullOrEmpty(user)) {
      user = UserGroupInformation.getCurrentUser().getShortUserName();
    }
    return new VolumeIterator(user, volumePrefix);
  }
/**
   * Returns Iterator to iterate over the List of volumes owned by a specific
   * user. The result can be restricted using volume prefix, will return all
   * volumes if volume prefix is null. If user is null, returns the volume of
   * current user.
   *
   * @param user User Name
   * @param volumePrefix Volume prefix to match
   * @return {@code Iterator<OzoneVolume>}
   */
Returns Iterator to iterate over the List of volumes owned by a specific
user. The result can be restricted using volume prefix, will return all
volumes if volume prefix is null. If user is null, returns the volume of
current user.

@param user User Name
@param volumePrefix Volume prefix to match
@return  Iterator
Returns Iterator to iterate over the List of volumes owned by a specific user . The result can be restricted using volume prefix will return all volumes if volume prefix is null . If user is null returns the volume of current user . @param user User Name @param volumePrefix Volume prefix to match @return Iterator
public Iterator<OzoneVolume> listVolumes(String user, String volumePrefix)
      throws IOException {
    if(Strings.isNullOrEmpty(user)) {
      user = UserGroupInformation.getCurrentUser().getShortUserName();
    }
    return new VolumeIterator(user, volumePrefix);
  }
public Iterator < OzoneVolume > listVolumes ( String user , String volumePrefix ) throws IOException { if ( Strings . isNullOrEmpty ( user ) ) { user = UserGroupInformation . getCurrentUser ( ) . getShortUserName ( ) ; } return new VolumeIterator ( user , volumePrefix ) ; }
Returns Iterator to iterate over the List of volumes owned by a specific
 user.
Returns Iterator to iterate over the List of volumes owned by a specific user .