You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2021/09/28 20:29:08 UTC

[GitHub] [hadoop] joshelser commented on a change in pull request #3477: HADOOP-17934 ABFS: Make sure the AbfsHttpOperation is non-null before using it

joshelser commented on a change in pull request #3477:
URL: https://github.com/apache/hadoop/pull/3477#discussion_r717923853



##########
File path: hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClient.java
##########
@@ -822,10 +839,11 @@ public AbfsRestOperation deletePath(final String path, final boolean recursive,
    * delete issued from this filesystem instance.
    * These are few corner cases and usually returning a success at this stage
    * should help the job to continue.
-   * @param op Delete request REST operation response
+   * @param op Delete request REST operation response with non-null HTTP response
    * @return REST operation response post idempotency check
    */
   public AbfsRestOperation deleteIdempotencyCheckOp(final AbfsRestOperation op) {
+    assert op.hasResult();

Review comment:
       My thinking was that the callers of this method (and others) would just be internal to hadoop-azure. Just realized that I forgot to add a corresponding assert to `renameIdempotencyCheckOp(AbfsRestOperation)` like I wanted to.
   
   I don't feel strongly that this is `assert` vs. `Preconditions.checkArgument()`. I am happy to make this `checkArgument()` if you think that's more appropriate.




-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org