code: public static void setTtl(FileSystem fs, AlluxioURI path, long ttlMs,
        TtlAction ttlAction) throws AlluxioException, IOException {
      SetAttributePOptions options = SetAttributePOptions.newBuilder().setRecursive(true)
          .setCommonOptions(FileSystemMasterCommonPOptions.newBuilder()
              .setTtl(ttlMs).setTtlAction(ttlAction).build())
          .build();
      fs.setAttribute(path, options);
    }
docs: Sets a new TTL value or unsets an existing TTL value for file at path.
  
  @param fs the file system for Alluxio
  @param path the file path
  @param ttlMs the TTL (time to live) value to use; it identifies duration (in milliseconds) the
  created file should be kept around before it is automatically deleted, irrespective of
  whether the file is pinned; {@link Constants#NO_TTL} means to unset the TTL value
  @param ttlAction Action to perform on Ttl expiry