anujmodi2021 commented on code in PR #6409:
URL: https://github.com/apache/hadoop/pull/6409#discussion_r1546222398
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/constants/AbfsHttpConstants.java:
##########
@@ -121,8 +121,34 @@ public final class AbfsHttpConstants {
public static final char CHAR_EQUALS = '=';
public static final char CHAR_STAR = '*';
public static final char CHAR_PLUS = '+';
- public static final String DECEMBER_2019_API_VERSION = "2019-12-12";
- public static final String APRIL_2021_API_VERSION = "2021-04-10";
+
+ /**
+ * Specifies the version of the REST protocol used for processing the
request.
+ * Versions should be added in enum list in ascending chronological order.
+ * Latest one should be added last in the list.
+ * When upgrading the version for whole driver, update the getCurrentVersion;
+ */
+ public enum ApiVersion {
+
+ DEC_12_2019("2019-12-12"),
+ APR_10_2021("2021-04-10"),
+ AUG_03_2023("2023-08-03");
+
+ private final String xMsApiVersion;
+
+ ApiVersion(String xMsApiVersion) {
+ this.xMsApiVersion = xMsApiVersion;
+ }
+
+ @Override
+ public String toString() {
+ return xMsApiVersion;
+ }
+
+ public static ApiVersion getCurrentVersion() {
+ return DEC_12_2019;
Review Comment:
Yes, this is the default current version used in driver. This PR does not
have scope to change the default version for all the Rest operations.
Here using the required version for paginated delete and retaining the
version for all other APIs.
Upgrading the API version throughout the driver can be taken up in a
separate PR as it can affect all the APIs and will require proper testing.
--
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]