Package org.apache.hadoop.hbase.security.visibility

Examples of org.apache.hadoop.hbase.security.visibility.Authorizations


    Filter filter = scan.getFilter();
    if (filter != null) {
      model.setFilter(stringifyFilter(filter));
    }
    // Add the visbility labels if found in the attributes
    Authorizations authorizations = scan.getAuthorizations();
    if (authorizations != null) {
      List<String> labels = authorizations.getLabels();
      for (String label : labels) {
        model.addLabel(label);
      }
    }
    return model;
View Full Code Here


    } catch (IOException e) {
      LOG.error("Error opening 'labels' table", e);
      return;
    }
    Scan scan = new Scan();
    scan.setAuthorizations(new Authorizations(VisibilityUtils.SYSTEM_LABEL));
    scan.addColumn(LABELS_TABLE_FAMILY, LABEL_QUALIFIER);
    ResultScanner scanner = null;
    try {
      scanner = labelsTable.getScanner(scan);
      Result next = null;
View Full Code Here

      scan = new Scan();
      scan.setCacheBlocks(false);
      scan.setRaw(true);

      String[] split = labels.split(COMMA);
      scan.setAuthorizations(new Authorizations(split[this.labelIndex * 2],
          split[(this.labelIndex * 2) + 1]));
      if (delete) {
        LOG.info("Running deletes");
      } else {
        LOG.info("Running copiers");
View Full Code Here

      scan.addColumn(FAMILY_NAME, COLUMN_PREV);
      scan.setCaching(10000);
      scan.setCacheBlocks(false);
      String[] split = labels.split(COMMA);

      scan.setAuthorizations(new Authorizations(split[this.labelIndex * 2],
          split[(this.labelIndex * 2) + 1]));

      TableMapReduceUtil.initTableMapperJob(tableName.getName(), scan, VerifyMapper.class,
          BytesWritable.class, BytesWritable.class, job);
      TableMapReduceUtil.addDependencyJars(job.getConfiguration(), AbstractHBaseTool.class);
View Full Code Here

    if (in.isSetAttributes()) {
      addAttributes(out,in.getAttributes());
    }

    if (in.isSetAuthorizations()) {
      out.setAuthorizations(new Authorizations(in.getAuthorizations().getLabels()));
    }
   
    if (!in.isSetColumns()) {
      return out;
    }
View Full Code Here

    if (in.isSetAttributes()) {
      addAttributes(out,in.getAttributes());
    }
   
    if (in.isSetAuthorizations()) {
      out.setAuthorizations(new Authorizations(in.getAuthorizations().getLabels()));
    }

    return out;
  }
View Full Code Here

   * @param proto
   * @return the converted client Authorizations
   */
  public static Authorizations toAuthorizations(ClientProtos.Authorizations proto) {
    if (proto == null) return null;
    return new Authorizations(proto.getLabelList());
  }
View Full Code Here

      scan.setCacheBlocks(false);
      if (caching > 0 ) {
        scan.setCaching(caching);
      }
      if(rowspec.hasLabels()) {
        scan.setAuthorizations(new Authorizations(rowspec.getLabels()));
      }
      scanner = table.getScanner(scan);
      cached = null;
      id = Long.toString(System.currentTimeMillis()) +
             Integer.toHexString(scanner.hashCode());
View Full Code Here

    Filter filter = scan.getFilter();
    if (filter != null) {
      model.setFilter(stringifyFilter(filter));
    }
    // Add the visbility labels if found in the attributes
    Authorizations authorizations = scan.getAuthorizations();
    if (authorizations != null) {
      List<String> labels = authorizations.getLabels();
      for (String label : labels) {
        model.addLabel(label);
      }
    }
    return model;
View Full Code Here

    ResultScanner scanner = null;
    try {
      labels = new HashMap<String, Integer>();
      visibilityLabelsTable = new HTable(conf, LABELS_TABLE_NAME.getName());
      Scan scan = new Scan();
      scan.setAuthorizations(new Authorizations(VisibilityUtils.SYSTEM_LABEL));
      scan.addColumn(LABELS_TABLE_FAMILY, LABEL_QUALIFIER);
      scanner = visibilityLabelsTable.getScanner(scan);
      while (true) {
        Result next = scanner.next();
        if (next == null) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.security.visibility.Authorizations

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.