private void setPart(LockComponent comp, PartTrie parts) {
      LockComponent existing = parts.get(comp.getPartitionname());
      if (existing == null) {
        // No existing lock for this partition.
        parts.put(comp.getPartitionname(), comp);
      } else if (lockTypeComparator.compare(comp.getType(), existing.getType()) > 0
          || comp.getType() == existing.getType() && existing.getOperationType() == DataOperationType.INSERT) {
        // We only need to promote if comp.type is > existing.type or it's an update/delete
        parts.put(comp.getPartitionname(), comp);
      }
    }
Add a collection with lock components to the lock request
@param components to add
@return reference to this builder
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/LockRequestBuilder.java