/** * Creates a {@link FileOutStream} for test. * * @param path the file path * @param options the set of options specific to this operation * @return a {@link FileOutStream} */ private FileOutStream createTestStream(AlluxioURI path, OutStreamOptions options) throws IOException { return new FileOutStream(path, options, mFileSystemContext); } }
outStreamOptions.setAcl(status.getAcl()); try { return new FileOutStream(path, outStreamOptions, mFsContext); } catch (Exception e) { delete(path);
@Override public FileOutStream createFile(AlluxioURI path, CreateFileOptions options) throws FileAlreadyExistsException, InvalidPathException, IOException, AlluxioException { FileSystemMasterClient masterClient = mContext.acquireMasterClient(); try { masterClient.createFile(path, options); } finally { mContext.releaseMasterClient(masterClient); } return new FileOutStream(path, options.toOutStreamOptions()); }