Examples of fetchColumn()


Examples of org.apache.accumulo.core.client.Scanner.fetchColumn()

         
          Scanner scanner = connector.createScanner("test_ingest", labelAuths);
          scanner.setBatchSize(scanOpts.scanBatchSize);
          scanner.setRange(new Range(startKey, endKey));
          for (int j = 0; j < opts.cols; j++) {
            scanner.fetchColumn(new Text(opts.columnFamily), new Text("col_" + String.format("%07d", j)));
          }
         
          int recsReadBefore = recsRead;
         
          for (Entry<Key,Value> entry : scanner) {
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.fetchColumn()

     
      // setup a scanner within the bounds of this split
      for (Pair<Text,Text> c : getFetchedColumns(job)) {
        if (c.getSecond() != null) {
          log.debug("Fetching column " + c.getFirst() + ":" + c.getSecond());
          scanner.fetchColumn(c.getFirst(), c.getSecond());
        } else {
          log.debug("Fetching column family " + c.getFirst());
          scanner.fetchColumnFamily(c.getFirst());
        }
      }
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.fetchColumn()

    }
  }
 
  public void test() throws Exception {
    Scanner scanner = new MockInstance("counttest").getConnector("root", new PasswordToken("")).createScanner("dirlisttable", new Authorizations());
    scanner.fetchColumn(new Text("dir"), new Text("counts"));
    assertFalse(scanner.iterator().hasNext());
   
    Opts opts = new Opts();
    ScannerOpts scanOpts = new ScannerOpts();
    BatchWriterOpts bwOpts = new BatchWriterOpts();
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.fetchColumn()

     
      // setup a scanner within the bounds of this split
      for (Pair<Text,Text> c : getFetchedColumns(attempt)) {
        if (c.getSecond() != null) {
          log.debug("Fetching column " + c.getFirst() + ":" + c.getSecond());
          scanner.fetchColumn(c.getFirst(), c.getSecond());
        } else {
          log.debug("Fetching column family " + c.getFirst());
          scanner.fetchColumnFamily(c.getFirst());
        }
      }
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.fetchColumn()

    Connector conn = state.getConnector();
   
    Scanner imageScanner = conn.createScanner(imageTableName, new Authorizations());
   
    imageScanner.setRange(new Range(new Text(uuid), null));
    imageScanner.fetchColumn(Write.META_COLUMN_FAMILY, Write.SHA1_COLUMN_QUALIFIER);
   
    int minScan = Integer.parseInt(props.getProperty("minScan"));
    int maxScan = Integer.parseInt(props.getProperty("maxScan"));
   
    Random rand = new Random();
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.fetchColumn()

    Process hash = cluster.exec(RowHash.class, Collections.singletonList(hadoopTmpDirArg), "-i", c.getInstance().getInstanceName(), "-z", c.getInstance()
        .getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD, "-t", tablename, "--column", input_cfcq);
    assertEquals(0, hash.waitFor());

    Scanner s = c.createScanner(tablename, Authorizations.EMPTY);
    s.fetchColumn(new Text(input_cf), new Text(output_cq));
    int i = 0;
    for (Entry<Key,Value> entry : s) {
      MessageDigest md = MessageDigest.getInstance("MD5");
      byte[] check = Base64.encodeBase64(md.digest(("row" + i).getBytes()));
      assertEquals(entry.getValue().toString(), new String(check));
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.fetchColumn()

    conn.tableOperations().attachIterator("table1", is);
   
    Scanner scanner = conn.createScanner("table1", Authorizations.EMPTY);
    assertEquals(new HashSet<String>(Arrays.asList("2", "3")), getRows(scanner));

    scanner.fetchColumn(new Text("cf1"), new Text("cq2"));
    assertEquals(new HashSet<String>(Arrays.asList("1", "3")), getRows(scanner));

    scanner.clearColumns();
    scanner.fetchColumn(new Text("cf1"), new Text("cq1"));
    assertEquals(new HashSet<String>(), getRows(scanner));
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.fetchColumn()

    scanner.fetchColumn(new Text("cf1"), new Text("cq2"));
    assertEquals(new HashSet<String>(Arrays.asList("1", "3")), getRows(scanner));

    scanner.clearColumns();
    scanner.fetchColumn(new Text("cf1"), new Text("cq1"));
    assertEquals(new HashSet<String>(), getRows(scanner));

    scanner.setRange(new Range("0", "4"));
    scanner.clearColumns();
    assertEquals(new HashSet<String>(Arrays.asList("2", "3")), getRows(scanner));
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.fetchColumn()

    scanner.clearColumns();
    assertEquals(new HashSet<String>(), getRows(scanner));

    scanner.setRange(new Range("4"));
    scanner.clearColumns();
    scanner.fetchColumn(new Text("cf1"), new Text("cq2"));
    scanner.fetchColumn(new Text("cf1"), new Text("cq4"));
    assertEquals(new HashSet<String>(Arrays.asList("4")), getRows(scanner));
   
  }
View Full Code Here

Examples of org.apache.accumulo.core.client.Scanner.fetchColumn()

    assertEquals(new HashSet<String>(), getRows(scanner));

    scanner.setRange(new Range("4"));
    scanner.clearColumns();
    scanner.fetchColumn(new Text("cf1"), new Text("cq2"));
    scanner.fetchColumn(new Text("cf1"), new Text("cq4"));
    assertEquals(new HashSet<String>(Arrays.asList("4")), getRows(scanner));
   
  }

  @Test
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.