Package org.apache.accumulo.core.file.rfile.RFile

Examples of org.apache.accumulo.core.file.rfile.RFile.Reader.seek()


      iter.printInfo();
      System.out.println();
      org.apache.accumulo.core.file.rfile.bcfile.PrintInfo.main(new String[] {arg});
     
      if (opts.histogram || opts.dump) {
        iter.seek(new Range((Key) null, (Key) null), new ArrayList<ByteSequence>(), false);
        while (iter.hasTop()) {
          Key key = iter.getTopKey();
          Value value = iter.getTopValue();
          if (opts.dump)
            System.out.println(key + " -> " + value);
View Full Code Here


   
    CachableBlockFile.Reader _cbr = new CachableBlockFile.Reader(fs, path, conf, dataCache, indexCache, acuconf);
    Reader iter = new RFile.Reader(_cbr);
   
    if (seekToBeginning) {
      iter.seek(new Range((Key) null, null), EMPTY_CF_SET, false);
    }
   
    return iter;
  }
 
View Full Code Here

      Writer small = new RFile.Writer(new CachableBlockFile.Writer(fs, new Path(smallName), "gz", conf, aconf), blockSize);
      small.startDefaultLocalityGroup();
      Writer large = new RFile.Writer(new CachableBlockFile.Writer(fs, new Path(largeName), "gz", conf, aconf), blockSize);
      large.startDefaultLocalityGroup();

      iter.seek(new Range(), new ArrayList<ByteSequence>(), false);
      while (iter.hasTop()) {
        Key key = iter.getTopKey();
        Value value = iter.getTopValue();
        if (key.getSize() + value.getSize() < maxSize) {
          small.append(key, value);
View Full Code Here

    checkIndex(reader);
   
    for (int start : new int[] {0, 10, 100, 998}) {
      for (int cf = 1; cf <= 4; cf++) {
        if (start == 0)
          reader.seek(new Range(), ncfs(nf("cf_", cf)), true);
        else
          reader.seek(new Range(nf("r_", start), null), ncfs(nf("cf_", cf)), true);
       
        for (int i = start; i < 1000; i++) {
          assertTrue(reader.hasTop());
View Full Code Here

    for (int start : new int[] {0, 10, 100, 998}) {
      for (int cf = 1; cf <= 4; cf++) {
        if (start == 0)
          reader.seek(new Range(), ncfs(nf("cf_", cf)), true);
        else
          reader.seek(new Range(nf("r_", start), null), ncfs(nf("cf_", cf)), true);
       
        for (int i = start; i < 1000; i++) {
          assertTrue(reader.hasTop());
          assertEquals(nk(nf("r_", i), nf("cf_", cf), nf("cq_", 0), "", 1000 - i), reader.getTopKey());
          assertEquals(nv(i + ""), reader.getTopValue());
View Full Code Here

       
        assertFalse(reader.hasTop());
      }
     
      if (start == 0)
        reader.seek(new Range(), ncfs(), false);
      else
        reader.seek(new Range(nf("r_", start), null), ncfs(), false);
     
      for (int i = start; i < 1000; i++) {
        for (int cf = 1; cf <= 4; cf++) {
View Full Code Here

      }
     
      if (start == 0)
        reader.seek(new Range(), ncfs(), false);
      else
        reader.seek(new Range(nf("r_", start), null), ncfs(), false);
     
      for (int i = start; i < 1000; i++) {
        for (int cf = 1; cf <= 4; cf++) {
          assertTrue(reader.hasTop());
          assertEquals(nk(nf("r_", i), nf("cf_", cf), nf("cq_", 0), "", 1000 - i), reader.getTopKey());
View Full Code Here

      Reader iter = new RFile.Reader(_rdr);
     
      iter.printInfo();
     
      if (doHistogram || dump) {
        iter.seek(new Range((Key) null, (Key) null), new ArrayList<ByteSequence>(), false);
        while (iter.hasTop()) {
          Key key = iter.getTopKey();
          Value value = iter.getTopValue();
          if (dump)
            System.out.println(key + " -> " + value);
View Full Code Here

   
    CachableBlockFile.Reader _cbr = new CachableBlockFile.Reader(fs, path, conf, dataCache, indexCache);
    Reader iter = new RFile.Reader(_cbr);
   
    if (seekToBeginning) {
      iter.seek(new Range((Key) null, null), EMPTY_CF_SET, false);
    }
   
    return iter;
  }
 
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.