Tabnine Logo
Sets
Code IndexAdd Tabnine to your IDE (free)

How to use
Sets
in
org.apache.drill.shaded.guava.com.google.common.collect

Best Java code snippets using org.apache.drill.shaded.guava.com.google.common.collect.Sets (Showing top 20 results out of 315)

origin: apache/drill

private void addTargetPathForOriginalPath(SchemaPath origPath, SchemaPath newPath) {
 if (!columnToConvert.containsKey(origPath)) {
  Set<SchemaPath> newSet = Sets.newHashSet();
  newSet.add(newPath);
  columnToConvert.put(origPath, newSet);
 }
 else {
  columnToConvert.get(origPath).add(newPath);
 }
}
origin: apache/drill

public MapRDBFunctionalIndexInfo(IndexDescriptor indexDesc) {
 this.indexDesc = indexDesc;
 columnToConvert = Maps.newHashMap();
 exprToConvert = Maps.newHashMap();
 pathsInExpr = Maps.newHashMap();
 // keep the order of new paths, it may be related to the naming policy
 newPathsForIndexedFunction = Sets.newLinkedHashSet();
 allPathsInFunction = Sets.newHashSet();
 init();
}
origin: apache/drill

@Override
protected Collection<SchemaPath> transformColumns(Collection<SchemaPath> columns) {
 Set<SchemaPath> transformed = Sets.newLinkedHashSet();
 Set<SchemaPath> encodedSchemaPathSet = Sets.newLinkedHashSet();
   Set<FieldPath> scannedFieldsSet = Sets.newTreeSet();
   Set<FieldPath> projectedFieldsSet = null;
origin: apache/drill

@Override
protected Collection<SchemaPath> transformColumns(Collection<SchemaPath> projectedColumns) {
 Set<SchemaPath> transformed = Sets.newLinkedHashSet();
 if (!isStarQuery()) {
  for (SchemaPath column : projectedColumns) {
   transformed.add(column);
  }
 } else {
  transformed.add(SchemaPath.STAR_COLUMN);
 }
 return transformed;
}
origin: org.apache.drill.exec/drill-java-exec

/**
 * Checks if the proxy user is authorized to impersonate the target user based on the policies.
 *
 * @param proxyName  proxy user name
 * @param targetName target user name
 * @param policies   impersonation policies
 * @return true iff proxy user is authorized to impersonate the target user
 */
private static boolean hasImpersonationPrivileges(final String proxyName, final String targetName,
                         final List<ImpersonationPolicy> policies) {
 final UserGroupInformation proxyUgi = ImpersonationUtil.createProxyUgi(proxyName);
 final Set<String> proxyGroups = Sets.newHashSet(proxyUgi.getGroupNames());
 final UserGroupInformation targetUgi = ImpersonationUtil.createProxyUgi(targetName);
 final Set<String> targetGroups = Sets.newHashSet(targetUgi.getGroupNames());
 for (final ImpersonationPolicy definition : policies) {
  // check if proxy user qualifies within this policy
  if (definition.proxy_principals.users.contains(proxyName) ||
    !Sets.intersection(definition.proxy_principals.groups, proxyGroups).isEmpty()) {
   // check if target qualifies within this policy
   if (definition.target_principals.users.contains(targetName) ||
     definition.target_principals.users.contains(STAR) ||
     !Sets.intersection(definition.target_principals.groups, targetGroups).isEmpty() ||
     definition.target_principals.groups.contains(STAR)) {
    return true;
   }
  }
 }
 return false;
}
origin: org.apache.drill.exec/drill-java-exec

Set<RelNode> transformedRels = Sets.newIdentityHashSet();
Set<RelTraitSet> traitSets = Sets.newHashSet();
origin: org.apache.drill/drill-shaded-guava

@Override
Set<K> createKeySet() {
 return Sets.filter(unfiltered.keySet(), keyPredicate);
}
origin: apache/drill

@Override
public void register(DrillOperatorTable operatorTable) {
 for (String name : Sets.union(methodsGenericUDF.asMap().keySet(), methodsUDF.asMap().keySet())) {
  operatorTable.addOperatorWithoutInference(name, new HiveUDFOperatorWithoutInference(name.toUpperCase()));
  operatorTable.addOperatorWithInference(name, new HiveUDFOperator(name.toUpperCase(), new HiveSqlReturnTypeInference()));
 }
}
origin: org.apache.drill.exec/drill-java-exec

public Collection<DrillbitInfo> getDrillbits() {
 return Sets.newTreeSet(drillbits);
}
origin: org.apache.drill/drill-shaded-guava

@Override
public Set<E> adjacentEdges(E edge) {
 EndpointPair<N> endpointPair = incidentNodes(edge); // Verifies that edge is in this network.
 Set<E> endpointPairIncidentEdges =
   Sets.union(incidentEdges(endpointPair.nodeU()), incidentEdges(endpointPair.nodeV()));
 return Sets.difference(endpointPairIncidentEdges, ImmutableSet.of(edge));
}
origin: org.apache.drill/drill-shaded-guava

/**
 * {@inheritDoc}
 *
 * <p>Creates an empty {@code HashSet} for a collection of values for one key.
 *
 * @return a new {@code HashSet} containing a collection of values for one key
 */
@Override
Set<V> createCollection() {
 return Sets.<V>newHashSetWithExpectedSize(expectedValuesPerKey);
}
origin: org.apache.drill/drill-shaded-guava

@Override
Set<E> createElementSet() {
 return Sets.intersection(multiset1.elementSet(), multiset2.elementSet());
}
origin: apache/drill

/**
 * Returns a sequence of field names in the order that they show up in the schema.
 */
protected Collection<String> getChildFieldNames() {
 return Sets.newLinkedHashSet(Iterables.transform(field.getChildren(), new Function<MaterializedField, String>() {
  @Nullable
  @Override
  public String apply(MaterializedField field) {
   return Preconditions.checkNotNull(field).getName();
  }
 }));
}
origin: org.apache.drill/drill-shaded-guava

@Override
protected Set<Entry<K, V>> createEntrySet() {
 return Sets.filter(unfiltered.entrySet(), predicate);
}
origin: org.apache.drill/drill-shaded-guava

@Override
public UnmodifiableIterator<E> iterator() {
 Iterable<E> incidentEdges =
   (selfLoopCount == 0)
     ? Iterables.concat(inEdgeMap.keySet(), outEdgeMap.keySet())
     : Sets.union(inEdgeMap.keySet(), outEdgeMap.keySet());
 return Iterators.unmodifiableIterator(incidentEdges.iterator());
}
origin: org.apache.drill.exec/drill-java-exec

public Collection<String> getMismatchedVersions() {
 return Sets.newTreeSet(mismatchedVersions);
}
origin: org.apache.drill/drill-shaded-guava

 @Override
 public Set<V> get() {
  return Sets.newHashSetWithExpectedSize(expectedValuesPerKey);
 }
}
origin: apache/drill

private void addPathInExpr(LogicalExpression expr, SchemaPath path) {
 if (!pathsInExpr.containsKey(expr)) {
  Set<SchemaPath> newSet = Sets.newHashSet();
  newSet.add(path);
  pathsInExpr.put(expr, newSet);
 }
 else {
  pathsInExpr.get(expr).add(path);
 }
}
origin: apache/drill

Set<SchemaPath> transformed = Sets.newLinkedHashSet();
completeFamilies = Sets.newHashSet();
origin: apache/drill

Set<Entry<TabletFragmentInfo, String>> regionsToAssignSet = Sets.newLinkedHashSet(regionsToScan.entrySet());
org.apache.drill.shaded.guava.com.google.common.collectSets

Javadoc

Static utility methods pertaining to Set instances. Also see this class's counterparts Lists, Maps and Queues.

See the Guava User Guide article on Sets.

Most used methods

  • newHashSet
    Creates a mutable HashSet instance initially containing the given elements.Note: if elements are non
  • newLinkedHashSet
    Creates a mutable LinkedHashSet instance containing the given elements in order. Note: if mutability
  • newTreeSet
    Creates a mutable, empty TreeSet instance with the given comparator.Note: if mutability is not requi
  • union
    Returns an unmodifiable view of the union of two sets. The returned set contains all elements that a
  • filter
    Returns the elements of a SortedSet, unfiltered, that satisfy a predicate. The returned set is a liv
  • intersection
    Returns an unmodifiable view of the intersection of two sets. The returned set contains all elements
  • newHashSetWithExpectedSize
    Returns a new hash set using the smallest initial table size that can hold expectedSizeelements with
  • newIdentityHashSet
    Creates an empty Set that uses identity to determine equality. It compares object references, instea
  • cartesianProduct
    Returns every possible list that can be formed by choosing one element from each of the given sets i
  • difference
    Returns an unmodifiable view of the difference of two sets. The returned set contains all elements t
  • equalsImpl
    An implementation for Set#equals(Object).
  • hashCodeImpl
    An implementation for Set#hashCode().
  • equalsImpl,
  • hashCodeImpl,
  • immutableEnumSet,
  • makeComplementByHand,
  • newConcurrentHashSet,
  • newLinkedHashSetWithExpectedSize,
  • removeAllImpl,
  • unmodifiableNavigableSet

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • BoxLayout (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now