@@ -0,0 +1,1470 @@
+/*%0A * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0%0A * (the %22License%22). You may not use this work except in compliance with the License, which is%0A * available at www.apache.org/licenses/LICENSE-2.0%0A *%0A * This software is distributed on an %22AS IS%22 basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,%0A * either express or implied, as more fully set forth in the License.%0A *%0A * See the NOTICE file distributed with this work for information regarding copyright ownership.%0A */%0A%0Apackage alluxio.underfs.s3a;%0A%0Aimport alluxio.util.io.PathUtils;%0Aimport com.amazonaws.services.s3.transfer.TransferManager;%0Aimport java.io.IOException;%0A%0A/**%0A * A stream for writing a file into S3. Unlike %7B@link S3AOutputStream%7D, this class directly%0A * uploads the file to the final S3 path instead of a temporary Alluxio generated S3 path.%0A */%0Apublic class S3ADirectOutputStream extends S3AOutputStream %7B%0A  /**%0A   * Constructs a new stream for writing a file.%0A   *%0A   * @param bucketName the name of the bucket%0A   * @param key the key of the file%0A   * @param manager the transfer manager to upload the file with%0A   * @throws IOException when a non-Alluxio related error occurs%0A   */%0A  public S3ADirectOutputStream(String bucketName, String key, TransferManager manager)%0A      throws IOException %7B%0A    super(bucketName, key, manager);%0A  %7D%0A%0A  @Override%0A  public String getUploadPath() %7B%0A    return PathUtils.getPermanentFileName(super.getUploadPath());%0A  %7D%0A%7D%0A

Implement direct s3a output stream.