Examples of lowerBound()


Examples of org.apache.hadoop.io.file.tfile.TFile.Reader.Scanner.lowerBound()

    closeOutput();

    Reader reader = new Reader(fs.open(path), fs.getFileStatus(path).getLen(), conf);
    Scanner scanner = reader.createScanner();
    try {
      scanner.lowerBound("keyX".getBytes(), 0, -1);
      Assert.fail("Error on handling negative length.");
    } catch (Exception e) {
      // noop, expecting exceptions
    } finally {
      scanner.close();
View Full Code Here

Examples of org.apache.hadoop.zebra.tfile.TFile.Reader.Scanner.lowerBound()

    Scanner scanner = reader.createScanner();

    try {
      // can't find ceil
      try {
        scanner.lowerBound("keyN".getBytes());
        Assert.fail("Cannot search in a unsorted TFile!");
      }
      catch (Exception e) {
        // noop, expecting excetions
      }
View Full Code Here

Examples of org.apache.hadoop.zebra.tfile.TFile.Reader.Scanner.lowerBound()

    closeOutput();

    Reader reader = new Reader(fs.open(path), fs.getFileStatus(path).getLen(), conf);
    Scanner scanner = reader.createScanner();
    try {
      scanner.lowerBound("keyX".getBytes(), -1, 4);
      Assert.fail("Error on handling negative offset.");
    }
    catch (Exception e) {
      // noop, expecting exceptions
    }
View Full Code Here

Examples of org.apache.hadoop.zebra.tfile.TFile.Reader.Scanner.lowerBound()

    closeOutput();

    Reader reader = new Reader(fs.open(path), fs.getFileStatus(path).getLen(), conf);
    Scanner scanner = reader.createScanner();
    try {
      scanner.lowerBound("keyX".getBytes(), 0, -1);
      Assert.fail("Error on handling negative length.");
    }
    catch (Exception e) {
      // noop, expecting exceptions
    }
View Full Code Here

Examples of org.apache.hadoop.zebra.tfile.TFile.Reader.Scanner.lowerBound()

    BytesWritable val = new BytesWritable();
    timer.reset();
    timer.start();
    for (int i = 0; i < options.seekCount; ++i) {
      kSampler.next(key);
      scanner.lowerBound(key.get(), 0, key.getSize());
      if (!scanner.atEnd()) {
        scanner.entry().get(key, val);
        totalBytes += key.getSize();
        totalBytes += val.getSize();
      }
View Full Code Here

Examples of org.apache.hadoop.zebra.tfile.TFile.Reader.Scanner.lowerBound()

    scanner.seekTo(new byte[0]);
    byte[] val2 = readValue(scanner);
    assertTrue(Arrays.equals(val1, val2));
   
    // check for lowerBound
    scanner.lowerBound(getSomeKey(50));
    assertTrue("locaton lookup failed", scanner.currentLocation
        .compareTo(reader.end()) < 0);
    readKey = readKey(scanner);
    assertTrue("seeked key does not match", Arrays.equals(readKey,
        getSomeKey(50)));
View Full Code Here

Examples of org.jquantlib.math.matrixutilities.Array.lowerBound()

                final double tmp[] = new double[j-i +1];
                System.arraycopy(array, i, tmp, 0, j-i+1);
                final Array con = new Array(tmp, flags);
                final int offset = con.begin();

                final int pos = con.lowerBound(1);
                if (pos != 4 - i + offset) {
                    fail(MESSAGE);
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.