[GitHub] [hadoop] steveloughran commented on a change in pull request #3341: HADOOP-17873. ABFS: Fix transient failures in ITestAbfsStreamStatistics and ITestAbfsRestOperationException

2021-09-09 Thread GitBox


steveloughran commented on a change in pull request #3341:
URL: https://github.com/apache/hadoop/pull/3341#discussion_r705695532



##
File path: 
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/oauth2/RetryTestTokenProvider.java
##
@@ -30,30 +30,34 @@
  */
 public class RetryTestTokenProvider implements CustomTokenProviderAdaptee {
 
-  // Need to track first token fetch otherwise will get counted as a retry too.
-  private static boolean isThisFirstTokenFetch = true;
-  public static int reTryCount = 0;
+  private static final Logger LOG = LoggerFactory.getLogger(
+  RetryTestTokenProvider.class);
 
-  private static final Logger LOG = LoggerFactory
-  .getLogger(RetryTestTokenProvider.class);
+  // Need to track first token fetch otherwise will get counted as a retry too.
+  private boolean isThisFirstTokenFetch = true;
+  private int retryCount = 0;
 
   @Override
   public void initialize(Configuration configuration, String accountName)
   throws IOException {
 
   }
 
-  public static void ResetStatusToFirstTokenFetch() {
+  /**
+   * Clear earlier retry details and reset RetryTestTokenProvider instance to
+   * state of first access token fetch call

Review comment:
   nit: add a .




-- 
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-unsubscr...@hadoop.apache.org

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



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



[GitHub] [hadoop] steveloughran commented on a change in pull request #3341: HADOOP-17873. ABFS: Fix transient failures in ITestAbfsStreamStatistics and ITestAbfsRestOperationException

2021-09-09 Thread GitBox


steveloughran commented on a change in pull request #3341:
URL: https://github.com/apache/hadoop/pull/3341#discussion_r705695212



##
File path: hadoop-tools/hadoop-azure/pom.xml
##
@@ -506,6 +506,9 @@
 **/azurebfs/Test*.java
 **/azurebfs/**/Test*.java
   
+  

Review comment:
   I am mistaken; as this runs methods in the same process in parallel, you 
will need to move it




-- 
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-unsubscr...@hadoop.apache.org

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



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



[GitHub] [hadoop] steveloughran commented on a change in pull request #3341: HADOOP-17873. ABFS: Fix transient failures in ITestAbfsStreamStatistics and ITestAbfsRestOperationException

2021-08-26 Thread GitBox


steveloughran commented on a change in pull request #3341:
URL: https://github.com/apache/hadoop/pull/3341#discussion_r696867103



##
File path: hadoop-tools/hadoop-azure/pom.xml
##
@@ -506,6 +506,9 @@
 **/azurebfs/Test*.java
 **/azurebfs/**/Test*.java
   
+  

Review comment:
   even in parallel runs, > only one test case is run in a process at the 
same time. 
   
   if there's a problem here, it is that the stats need resetting before the run

##
File path: 
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsRestOperationException.java
##
@@ -120,9 +123,9 @@ public void testWithDifferentCustomTokenFetchRetry(int 
numOfRetries) throws Exce
 
 // Number of retries done should be as configured
 Assert.assertTrue(
-"Number of token fetch retries (" + RetryTestTokenProvider.reTryCount
+"Number of token fetch retries (" + 
retryTestTokenProvider.getReTryCount()

Review comment:
   make and assertJ assert .isEqual to help generate the message

##
File path: 
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/oauth2/RetryTestTokenProvider.java
##
@@ -30,20 +30,20 @@
  */
 public class RetryTestTokenProvider implements CustomTokenProviderAdaptee {
 
-  // Need to track first token fetch otherwise will get counted as a retry too.
-  private static boolean isThisFirstTokenFetch = true;
-  public static int reTryCount = 0;
+  private static final Logger LOG = LoggerFactory.getLogger(
+  RetryTestTokenProvider.class);
 
-  private static final Logger LOG = LoggerFactory
-  .getLogger(RetryTestTokenProvider.class);
+  // Need to track first token fetch otherwise will get counted as a retry too.
+  private boolean isThisFirstTokenFetch = true;
+  private int reTryCount = 0;

Review comment:
   `retryCount`

##
File path: 
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/oauth2/RetryTestTokenProvider.java
##
@@ -30,20 +30,20 @@
  */
 public class RetryTestTokenProvider implements CustomTokenProviderAdaptee {
 
-  // Need to track first token fetch otherwise will get counted as a retry too.
-  private static boolean isThisFirstTokenFetch = true;
-  public static int reTryCount = 0;
+  private static final Logger LOG = LoggerFactory.getLogger(
+  RetryTestTokenProvider.class);
 
-  private static final Logger LOG = LoggerFactory
-  .getLogger(RetryTestTokenProvider.class);
+  // Need to track first token fetch otherwise will get counted as a retry too.
+  private boolean isThisFirstTokenFetch = true;
+  private int reTryCount = 0;
 
   @Override
   public void initialize(Configuration configuration, String accountName)
   throws IOException {
 
   }
 
-  public static void ResetStatusToFirstTokenFetch() {
+  public void resetStatusToFirstTokenFetch() {

Review comment:
   add a javadoc of what and why




-- 
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-unsubscr...@hadoop.apache.org

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



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