Skip to content

Commit

Permalink
[ALLUXIO-3222] Change LOAD TtlAction default value to FREE (#7425)
Browse files Browse the repository at this point in the history
* ALLUXIO-3222 Change TtlAction default value to FREE

* Fix some of the failed UTs

* Fix failed UTs

* Fix FileSystemMasterTest#setSmallerTtlForDirectoryWithTtl

* Fix checkstyle import group error

* Set TtlAction default value to FREE in SetTtlCommand.class

* Make client side CreateDirectory(File)Options and OutStreamOptions TtlAction.DELETE by default

* Fix LineageFileSystemTest failure

* Revert all default FREE back to default DELETE

* Remove unused import

* Fix test
  • Loading branch information
Reidddddd authored and aaudiber committed Jun 28, 2018
1 parent c06c042 commit 69f705f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -40,7 +40,6 @@
import alluxio.exception.status.InvalidArgumentException;
import alluxio.exception.status.NotFoundException;
import alluxio.exception.status.UnavailableException;
import alluxio.wire.CommonOptions;
import alluxio.wire.LoadMetadataType;
import alluxio.wire.MountPointInfo;

Expand Down Expand Up @@ -122,9 +121,10 @@ public FileOutStream createFile(AlluxioURI path, CreateFileOptions options)
try {
masterClient.createFile(path, options);
// Do not sync before this getStatus, since the UFS file is expected to not exist.
status = masterClient.getStatus(path,
GetStatusOptions.defaults().setLoadMetadataType(LoadMetadataType.Never)
.setCommonOptions(CommonOptions.defaults().setSyncIntervalMs(-1)));
GetStatusOptions opts = GetStatusOptions.defaults();
opts.setLoadMetadataType(LoadMetadataType.Never);
opts.getCommonOptions().setSyncIntervalMs(-1);
status = masterClient.getStatus(path, opts);
LOG.debug("Created file {}, options: {}", path.getPath(), options);
} catch (AlreadyExistsException e) {
throw new FileAlreadyExistsException(e.getMessage());
Expand Down
4 changes: 2 additions & 2 deletions core/common/src/main/java/alluxio/PropertyKey.java
Expand Up @@ -2391,9 +2391,9 @@ public String toString() {
.build();
public static final PropertyKey USER_FILE_LOAD_TTL_ACTION =
new Builder(Name.USER_FILE_LOAD_TTL_ACTION)
.setDefaultValue("DELETE")
.setDefaultValue("FREE")
.setDescription("When file's ttl is expired, the action performs on it. "
+ "DELETE by default")
+ "FREE by default")
.build();
public static final PropertyKey USER_FILE_READ_TYPE_DEFAULT =
new Builder(Name.USER_FILE_READ_TYPE_DEFAULT)
Expand Down

0 comments on commit 69f705f

Please sign in to comment.