Github user ChinmaySKulkarni commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/313#discussion_r204968823
  
    --- Diff: phoenix-core/src/it/java/org/apache/phoenix/end2end/ViewIT.java 
---
    @@ -123,6 +148,48 @@ public static void doSetup() throws Exception {
             }
         }
         
    +   public static class TestMetaDataRegionObserver extends 
BaseRegionObserver {
    +           @Override
    +           public void 
preBatchMutate(ObserverContext<RegionCoprocessorEnvironment> c,
    +                           MiniBatchOperationInProgress<Mutation> 
miniBatchOp) throws IOException {
    +                   if (shouldFail(c, miniBatchOp.getOperation(0))) {
    +                           // throwing anything other than instances of 
IOException result
    +                           // in this coprocessor being unloaded
    +                           // DoNotRetryIOException tells HBase not to 
retry this mutation
    +                           // multiple times
    +                           throw new DoNotRetryIOException();
    +                   } else if (shouldSlowDown(c, 
miniBatchOp.getOperation(0))) {
    +                           // simulate a slow write to SYSTEM.CATALOG
    --- End diff --
    
    Nice!


---

Reply via email to