Skip to content

Commit

Permalink
Minor cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsimsa committed Nov 23, 2016
1 parent 43596bd commit 6abb706
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -277,22 +277,21 @@ public URIStatus call() throws Exception {
/** /**
* @summary get the file descriptors for a path * @summary get the file descriptors for a path
* @param path the file path * @param path the file path
* @param loadMetadataType the {@link LoadMetadataType}. It overrides loadDirectChildren if it * @param loadMetadataType the load metadata type
* is set.
* @return the response object * @return the response object
*/ */
@GET @GET
@Path(LIST_STATUS) @Path(LIST_STATUS)
@ReturnType("java.util.List<alluxio.client.file.URIStatus>") @ReturnType("java.util.List<alluxio.client.file.URIStatus>")
public Response listStatus(@QueryParam("path") final String path, public Response listStatus(@QueryParam("path") final String path,
@QueryParam("loadMetadataType") final String loadMetadataType) { @QueryParam("loadMetadataType") final LoadMetadataType loadMetadataType) {
return RestUtils.call(new RestUtils.RestCallable<List<URIStatus>>() { return RestUtils.call(new RestUtils.RestCallable<List<URIStatus>>() {
@Override @Override
public List<URIStatus> call() throws Exception { public List<URIStatus> call() throws Exception {
Preconditions.checkNotNull(path, "required 'path' parameter is missing"); Preconditions.checkNotNull(path, "required 'path' parameter is missing");
ListStatusOptions listStatusOptions = ListStatusOptions.defaults(); ListStatusOptions listStatusOptions = ListStatusOptions.defaults();
if (!loadMetadataType.isEmpty()) { if (loadMetadataType != null) {
listStatusOptions.setLoadMetadataType(LoadMetadataType.valueOf(loadMetadataType)); listStatusOptions.setLoadMetadataType(loadMetadataType);
} }
return mFileSystem.listStatus(new AlluxioURI(path), listStatusOptions); return mFileSystem.listStatus(new AlluxioURI(path), listStatusOptions);
} }
Expand Down

0 comments on commit 6abb706

Please sign in to comment.