Package org.apache.accumulo.core.util

Examples of org.apache.accumulo.core.util.ColumnFQ


     
      if (expectedColumnFamilies.contains(key.getColumnFamily())) {
        continue;
      }
     
      if (expectedColumns.remove(new ColumnFQ(key))) {
        continue;
      }
     
      throw new Exception("Tablet " + extent + " contained unexpected " + Constants.METADATA_TABLE_NAME + " entry " + key);
    }
View Full Code Here


  private static boolean isValidColumn(ColumnUpdate cu) {
   
    if (validColumnFams.contains(new Text(cu.getColumnFamily())))
      return true;
   
    if (validColumnQuals.contains(new ColumnFQ(cu)))
      return true;
   
    return false;
  }
View Full Code Here

          String tidString = new String(columnUpdate.getValue(), Constants.UTF8);
          int otherTidCount = 0;

          for (ColumnUpdate update : mutation.getUpdates()) {
            if (new ColumnFQ(update).equals(Constants.METADATA_DIRECTORY_COLUMN)) {
              isSplitMutation = true;
            } else if (new Text(update.getColumnFamily()).equals(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY)) {
              isLocationMutation = true;
            } else if (new Text(update.getColumnFamily()).equals(Constants.METADATA_DATAFILE_COLUMN_FAMILY)) {
              dataFiles.add(new Text(update.getColumnQualifier()));
            } else if (new Text(update.getColumnFamily()).equals(Constants.METADATA_BULKFILE_COLUMN_FAMILY)) {
              loadedFiles.add(new Text(update.getColumnQualifier()));
             
              if (!new String(update.getValue(), Constants.UTF8).equals(tidString)) {
                otherTidCount++;
              }
            }
          }
         
          if (!isSplitMutation && !isLocationMutation) {
            long tid = Long.parseLong(tidString);
           
            try {
              if (otherTidCount > 0 || !dataFiles.equals(loadedFiles) || !getArbitrator().transactionAlive(Constants.BULK_ARBITRATOR_TYPE, tid)) {
                violations = addViolation(violations, 8);
              }
            } catch (Exception ex) {
              violations = addViolation(violations, 8);
            }
          }
         
          checkedBulk = true;
        }
      } else {
        if (!isValidColumn(columnUpdate)) {
          violations = addViolation(violations, 2);
        } else if (new ColumnFQ(columnUpdate).equals(Constants.METADATA_PREV_ROW_COLUMN) && columnUpdate.getValue().length > 0
            && (violations == null || !violations.contains((short) 4))) {
          KeyExtent ke = new KeyExtent(new Text(mutation.getRow()), (Text) null);
         
          Text per = KeyExtent.decodePrevEndRow(new Value(columnUpdate.getValue()));
         
          boolean prevEndRowLessThanEndRow = per == null || ke.getEndRow() == null || per.compareTo(ke.getEndRow()) < 0;
         
          if (!prevEndRowLessThanEndRow) {
            violations = addViolation(violations, 3);
          }
        } else if (new ColumnFQ(columnUpdate).equals(Constants.METADATA_LOCK_COLUMN)) {
          if (zooCache == null) {
            zooCache = new ZooCache();
          }
         
          if (zooRoot == null) {
View Full Code Here

     
      if (expectedColumnFamilies.contains(key.getColumnFamily())) {
        continue;
      }
     
      if (expectedColumns.remove(new ColumnFQ(key))) {
        continue;
      }
     
      throw new Exception("Tablet " + extent + " contained unexpected " + Constants.METADATA_TABLE_NAME + " entry " + key);
    }
View Full Code Here

     
      if (expectedColumnFamilies.contains(key.getColumnFamily())) {
        continue;
      }
     
      if (expectedColumns.remove(new ColumnFQ(key))) {
        continue;
      }
     
      throw new Exception("Tablet " + extent + " contained unexpected " + MetadataTable.NAME + " entry " + key);
    }
View Full Code Here

      colSet = new HashSet<ColumnFQ>(columns);
    }

    for (Entry<Key,Value> entry : tabletKeyValues.entrySet()) {

      if (columns != null && !colSet.contains(new ColumnFQ(entry.getKey()))) {
        continue;
      }

      Text row = entry.getKey().getRow();

      SortedMap<ColumnFQ,Value> colVals = tabletEntries.get(row);
      if (colVals == null) {
        colVals = new TreeMap<ColumnFQ,Value>();
        tabletEntries.put(row, colVals);
      }

      colVals.put(new ColumnFQ(entry.getKey()), entry.getValue());
    }

    return tabletEntries;
  }
View Full Code Here

  private static boolean isValidColumn(ColumnUpdate cu) {
   
    if (validColumnFams.contains(new Text(cu.getColumnFamily())))
      return true;
   
    if (validColumnQuals.contains(new ColumnFQ(cu)))
      return true;
   
    return false;
  }
View Full Code Here

      } else {
        if (!isValidColumn(columnUpdate)) {
          if (violations == null)
            violations = new ArrayList<Short>();
          violations.add((short) 2);
        } else if (new ColumnFQ(columnUpdate).equals(Constants.METADATA_PREV_ROW_COLUMN) && columnUpdate.getValue().length > 0
            && (violations == null || !violations.contains((short) 4))) {
          KeyExtent ke = new KeyExtent(new Text(mutation.getRow()), (Text) null);
         
          Text per = KeyExtent.decodePrevEndRow(new Value(columnUpdate.getValue()));
         
          boolean prevEndRowLessThanEndRow = per == null || ke.getEndRow() == null || per.compareTo(ke.getEndRow()) < 0;
         
          if (!prevEndRowLessThanEndRow) {
            if (violations == null)
              violations = new ArrayList<Short>();
            violations.add((short) 3);
          }
        } else if (new ColumnFQ(columnUpdate).equals(Constants.METADATA_LOCK_COLUMN)) {
          if (zooCache == null) {
            zooCache = new ZooCache();
          }
         
          if (zooRoot == null) {
View Full Code Here

     
      if (expectedColumnFamilies.contains(key.getColumnFamily())) {
        continue;
      }
     
      if (expectedColumns.remove(new ColumnFQ(key))) {
        continue;
      }
     
      throw new Exception("Tablet " + extent + " contained unexpected " + Constants.METADATA_TABLE_NAME + " entry " + key);
    }
View Full Code Here

  private static boolean isValidColumn(ColumnUpdate cu) {
   
    if (validColumnFams.contains(new Text(cu.getColumnFamily())))
      return true;
   
    if (validColumnQuals.contains(new ColumnFQ(cu)))
      return true;
   
    return false;
  }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.util.ColumnFQ

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.