Package org.apache.accumulo.core.client

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


      // setup a scanner within the bounds of this split
      for (Pair<Text,Text> c : columns) {
        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


    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

        if(log.isInfoEnabled())
            log.info("Running edge notification job using Accumulo input");
        assertTrue(job.run(true));
        Scanner scanner = c.createScanner(TABLE_NAME, new Authorizations());
        scanner.setRange(new Range("0002", "0002"));
        scanner.fetchColumn(FAMILY, OUTPUT_FIELD);
        boolean foundColumn = false;

        if(log.isInfoEnabled())
            log.info("Verify job output persisted correctly.");
        //make sure we found the qualifier.
View Full Code Here

     
      // setup a scanner within the bounds of this split
      for (Pair<Text,Text> c : getFetchedColumns(attempt.getConfiguration())) {
        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

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

        scanner.addScanIterator(setting);
      }
    }
    final String columnFamily = getAccumuloColumnFamily();
    final String columnQualifier = getAccumuloColumnQualifier(adapterId);
    scanner.fetchColumn(
        new Text(
            columnFamily),
        new Text(
            columnQualifier));
View Full Code Here

     
      // setup a scanner within the bounds of this split
      for (Pair<Text,Text> c : getFetchedColumns(conf)) {
        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

         
          Scanner scanner = connector.createScanner("test_ingest", labelAuths);
          scanner.setBatchSize(batchSize);
          scanner.setRange(new Range(startKey, endKey));
          for (int j = 0; j < ingestArgs.cols; j++) {
            scanner.fetchColumn(new Text(ingestArgs.columnFamily), new Text("col_" + String.format("%05d", j)));
          }
         
          int recsReadBefore = recsRead;
         
          for (Entry<Key,Value> entry : scanner) {
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.