anuragp010 commented on code in PR #12022:
URL: https://github.com/apache/ozone/pull/12022#discussion_r4598636337
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/protocol/ClientProtocol.java:
##########
@@ -1279,6 +1279,32 @@ OzoneOutputStream createFile(String volumeName, String
bucketName,
String keyName, long size, ReplicationConfig replicationConfig,
boolean overWrite, boolean recursive) throws IOException;
+ /**
+ * Creates an output stream for writing to a file.
+ *
+ * @param volumeName Volume name
+ * @param bucketName Bucket name
+ * @param keyName Absolute path of the file to be written
+ * @param size Size of data to be written
+ * @param replicationConfig Replication config
+ * @param overWrite if true existing file at the location will be
overwritten
+ * @param recursive if true file would be created even if parent directories
+ * do not exist
+ * @param storagePolicy storage policy for the file, or null to let the OM
+ * use the bucket's policy
+ * @return Output stream for writing to the file
+ * @throws OMException if given key is a directory
+ * if file exists and isOverwrite flag is false
+ * if an ancestor exists as a file
+ * if bucket does not exist
+ * @throws IOException if there is error in the db
+ * invalid arguments
+ */
+ @SuppressWarnings("checkstyle:parameternumber")
+ OzoneOutputStream createFile(String volumeName, String bucketName,
+ String keyName, long size, ReplicationConfig replicationConfig,
+ boolean overWrite, boolean recursive, @Nullable StoragePolicy
storagePolicy) throws IOException;
+
@SuppressWarnings("checkstyle:parameternumber")
OzoneDataStreamOutput createStreamFile(String volumeName, String bucketName,
Review Comment:
Sure, thanks for pointing this out ! Will take it up as part of
[HDDS-16679](https://issues.apache.org/jira/browse/HDDS-16679) .
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/protocol/ClientProtocol.java:
##########
@@ -1279,6 +1279,32 @@ OzoneOutputStream createFile(String volumeName, String
bucketName,
String keyName, long size, ReplicationConfig replicationConfig,
boolean overWrite, boolean recursive) throws IOException;
+ /**
+ * Creates an output stream for writing to a file.
+ *
+ * @param volumeName Volume name
+ * @param bucketName Bucket name
+ * @param keyName Absolute path of the file to be written
+ * @param size Size of data to be written
+ * @param replicationConfig Replication config
+ * @param overWrite if true existing file at the location will be
overwritten
+ * @param recursive if true file would be created even if parent directories
+ * do not exist
+ * @param storagePolicy storage policy for the file, or null to let the OM
+ * use the bucket's policy
+ * @return Output stream for writing to the file
+ * @throws OMException if given key is a directory
+ * if file exists and isOverwrite flag is false
+ * if an ancestor exists as a file
+ * if bucket does not exist
+ * @throws IOException if there is error in the db
+ * invalid arguments
+ */
+ @SuppressWarnings("checkstyle:parameternumber")
+ OzoneOutputStream createFile(String volumeName, String bucketName,
+ String keyName, long size, ReplicationConfig replicationConfig,
+ boolean overWrite, boolean recursive, @Nullable StoragePolicy
storagePolicy) throws IOException;
Review Comment:
Thanks @rakeshadr for the review . Have added `CreateFileOptions` and used
the same.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]