Package com.facebook.LinkBench

Examples of com.facebook.LinkBench.LinkBenchConfigError


      ProbabilityDistribution pDist = ClassLoadUtil.newInstance(className,
                                                ProbabilityDistribution.class);
      pDist.init(minid1, maxid1, props, Config.NLINKS_PREFIX);
      return new ProbLinkDistribution(pDist);
    } catch (ClassNotFoundException e) {
      throw new LinkBenchConfigError("Link distribution class " + className
          + " not successfully loaded: " + e.getMessage());
    }
  }
View Full Code Here


      pDist.init(minid, maxid, props, keyPrefix);
      InvertibleShuffler shuffler = RealDistribution.getShuffler(kind,
                                                       maxid - minid);
      return new ProbAccessDistribution(pDist, shuffler);
    } catch (ClassNotFoundException e) {
      throw new LinkBenchConfigError("Access distribution class " + className
          + " not successfully loaded: " + e.getMessage());
    }
  }
View Full Code Here

   * @param start
   * @param end
   */
  public void init(int start, int end) {
    if (start < 0 || start >= 256) {
      throw new LinkBenchConfigError("start " + start +
                                     " out of range [0,255]");
    }
    if (end < 0 || end >= 256) {
      throw new LinkBenchConfigError("endbyte " + end +
                                     " out of range [0,255]");
    }

    if (start >= end) {
      throw new LinkBenchConfigError("startByte " + start
                                   + " >= endByte " + end);
    }
    this.start = (byte)start;
    this.range = end - start + 1;
  }
View Full Code Here

    init(start, end, uniqueness, DEFAULT_MOTIF_BUFFER_SIZE);
  }

  public void init(int start, int end, double uniqueness, int motifBytes) {
    if (start < 0 || start >= 256) {
      throw new LinkBenchConfigError("start " + start +
                                     " out of range [0,255]");
    }
    if (end < 0 || end >= 256) {
      throw new LinkBenchConfigError("endbyte " + end +
                                     " out of range [0,255]");
    }

    if (start >= end) {
      throw new LinkBenchConfigError("startByte " + start
                                   + " >= endByte " + end);
    }
    this.start = (byte)start;
    this.range = end - start + 1;
    this.uniqueness = uniqueness;
View Full Code Here

TOP

Related Classes of com.facebook.LinkBench.LinkBenchConfigError

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.