Package com.cloudera.util

Examples of com.cloudera.util.RetryHarness


  class ZKRetryHarness {
    final protected RetryHarness harness;

    public ZKRetryHarness(Retryable retry, BackoffPolicy policy) {
      harness = new RetryHarness(retry, policy, true);
    }
View Full Code Here


          initCallback.success(ZKClient.this);
        }
        return true;
      };
    };
    RetryHarness harness = new RetryHarness(retry, new FixedRetryPolicy(3),
        true);

    try {
      return harness.attempt();
    } catch (IOException i) {
      throw i;
    } catch (Exception e) {
      throw new IOException("Unexpected exception connecting to ZK", e);
    }
View Full Code Here

      public FlumeConfigData doRPC() throws IOException {
        return masterRPC.getConfig(n);
      }
    };

    RetryHarness harness = new RetryHarness(retry, new FixedPeriodBackoff(
        RETRY_PAUSE_MS, MAX_RETRIES), true);
    try {
      harness.attempt();
      return retry.getResult();
    } catch (Exception e) {
      throw new IOException(e);
    }
  }
View Full Code Here

      public Boolean doRPC() throws IOException {
        return masterRPC.checkAck(ackid);
      }
    };

    RetryHarness harness = new RetryHarness(retry, new FixedPeriodBackoff(
        RETRY_PAUSE_MS, MAX_RETRIES), true);
    try {
      harness.attempt();
      return retry.getResult();
    } catch (Exception e) {
      throw new IOException(e);
    }
  }
View Full Code Here

            "No active master RPC connection");
        return masterRPC.getLogicalNodes(physicalNode);
      }
    };

    RetryHarness harness = new RetryHarness(retry, new FixedPeriodBackoff(
        RETRY_PAUSE_MS, MAX_RETRIES), true);
    try {
      harness.attempt();
      return retry.getResult();
    } catch (Exception e) {
      throw new IOException(e);
    }
  }
View Full Code Here

      public Map<String, Integer> doRPC() throws IOException {
        return masterRPC.getChokeMap(physicalNode);
      }
    };

    RetryHarness harness = new RetryHarness(retry, new FixedPeriodBackoff(
        RETRY_PAUSE_MS, MAX_RETRIES), true);
    try {
      harness.attempt();
      return retry.getResult();
    } catch (Exception e) {
      throw new IOException(e);
    }
View Full Code Here

      public Boolean doRPC() throws IOException {
        return masterRPC.heartbeat(n);
      }
    };

    RetryHarness harness = new RetryHarness(retry, new FixedPeriodBackoff(
        RETRY_PAUSE_MS, MAX_RETRIES), true);
    try {
      harness.attempt();
      return retry.getResult();
    } catch (Exception e) {
      throw new IOException(e);
    }
  }
View Full Code Here

        return result; // Have to return something, but no-one will ever check
        // it
      }
    };

    RetryHarness harness = new RetryHarness(retry, new FixedPeriodBackoff(
        RETRY_PAUSE_MS, MAX_RETRIES), true);
    try {
      harness.attempt();
    } catch (Exception e) {
      throw new IOException(e);
    }
  }
View Full Code Here

        masterRPC.putReports(reports);
        return result;
      }
    };

    RetryHarness harness = new RetryHarness(retry, new FixedPeriodBackoff(
        RETRY_PAUSE_MS, MAX_RETRIES), true);
    try {
      harness.attempt();
    } catch (Exception e) {
      throw new IOException(e);
    }
  }
View Full Code Here

      public FlumeConfigData doRPC() throws IOException {
        return masterRPC.getConfig(n);
      }
    };

    RetryHarness harness = new RetryHarness(retry, new FixedPeriodBackoff(
        RETRY_PAUSE_MS, MAX_RETRIES), true);
    try {
      harness.attempt();
      return retry.getResult();
    } catch (Exception e) {
      throw new IOException(e);
    }
  }
View Full Code Here

TOP

Related Classes of com.cloudera.util.RetryHarness

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.