Skip to content

Commit

Permalink
Address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
madanadit committed May 16, 2017
1 parent bd7e97f commit 2f93018
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Expand Up @@ -124,11 +124,9 @@ public AlluxioURI resolveUri(AlluxioURI ufsBaseUri, String alluxioPath) {
}

/**
* Check whether the {@link UnderFileSystem} is mounted read-only.
*
* @return whether the Object UFS is mounted read-only
* @return whether only read operations are permitted to the {@link UnderFileSystem}
*/
protected boolean isMountReadOnly() {
protected boolean isReadOnly() {
return mUfsConf.isReadOnly();
}

Expand Down
Expand Up @@ -704,7 +704,7 @@ protected ObjectListingChunk getObjectListingChunkForPath(String path, boolean r
if (objs != null && ((objs.getObjectStatuses() != null && objs.getObjectStatuses().length > 0)
|| (objs.getCommonPrefixes() != null && objs.getCommonPrefixes().length > 0))) {
// If the breadcrumb exists, this is a no-op
if (!isMountReadOnly()) {
if (!isReadOnly()) {
mkdirsInternal(dir);
}
return objs;
Expand Down Expand Up @@ -805,7 +805,7 @@ protected UfsStatus[] listInternal(String path, ListOptions options) throws IOEx
child = childNameIndex != -1 ? child.substring(0, childNameIndex) : child;
if (!child.isEmpty() && !children.containsKey(child)) {
// This directory has not been created through Alluxio.
if (!isMountReadOnly()) {
if (!isReadOnly()) {
mkdirsInternal(commonPrefix);
}
// If both a file and a directory existed with the same name, the path will be
Expand Down

0 comments on commit 2f93018

Please sign in to comment.