accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] ctubbsii commented on a change in pull request #15: Added random pausing to continuous ingest
Date Wed, 27 Jun 2018 20:33:00 GMT
ctubbsii commented on a change in pull request #15: Added random pausing to continuous ingest
URL: https://github.com/apache/accumulo-testing/pull/15#discussion_r198630139
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/testing/core/continuous/ContinuousIngest.java
 ##########
 @@ -45,11 +45,43 @@
   private static final byte[] EMPTY_BYTES = new byte[0];
 
   private static List<ColumnVisibility> visibilities;
+  private static long lastPause;
+  private static long pauseWaitMs;
 
   private static ColumnVisibility getVisibility(Random rand) {
     return visibilities.get(rand.nextInt(visibilities.size()));
   }
 
+  private static boolean pauseEnabled(Properties props) {
+    String value = props.getProperty(TestProps.CI_INGEST_PAUSE_ENABLED);
+    return value != null && value.equals("true");
+  }
+
+  private static int getPauseWaitMs(Properties props, Random rand) {
+    int waitMin = Integer.parseInt(props.getProperty(TestProps.CI_INGEST_PAUSE_WAIT_MIN));
+    int waitMax = Integer.parseInt(props.getProperty(TestProps.CI_INGEST_PAUSE_WAIT_MAX));
 
 Review comment:
   Should probably check args to make sure `waitMax >= waitMin` and that both are `>=0`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message