public HivePartitionLocation(final List<String> partitionValues, final String partitionLocation) { this.partitionValues = ImmutableList.copyOf(partitionValues); this.partitionLocation = partitionLocation; } @Override
public List<T> entries() { return ImmutableList.copyOf(entries); }
public FunctionCall(String name, List<LogicalExpression> args, ExpressionPosition pos) { super(pos); this.name = name; if (args == null) { args = Lists.newArrayList(); } if (!(args instanceof ImmutableList)) { args = ImmutableList.copyOf(args); } this.args = (ImmutableList<LogicalExpression>) args; this.pos = pos; }
public FunctionHolderExpression(String nameUsed, ExpressionPosition pos, List<LogicalExpression> args) { super(pos); if (args == null) { args = Lists.newArrayList(); } if (!(args instanceof ImmutableList)) { args = ImmutableList.copyOf(args); } this.args = (ImmutableList<LogicalExpression>) args; this.nameUsed = nameUsed; }
/** * Checks if column list has been added before and returns position of column list. * If list is unique, adds list to the fields list and returns it position. * Returns -1, if {@param columns} equals null. * * @param columns list of columns * @return index of {@param columns} or -1, if {@param columns} equals null */ public int addOrGet(List<FieldSchema> columns) { if (columns == null) { return -1; } Integer index = keys.get(columns); if (index != null) { return index; } else { index = fields.size(); final List<FieldSchema> immutableList = ImmutableList.copyOf(columns); fields.add(immutableList); keys.put(immutableList, index); return index; } }
@VisibleForTesting public DrillConfig(Config config) { super(config); logger.debug("Setting up DrillConfig object."); // we need to exclude sun.java.command config node while logging, because // it contains user password along with other parameters logger.trace("Given Config object is:\n{}", config.withoutPath("password").withoutPath("sun.java.command") .root().render(ConfigRenderOptions.defaults())); RuntimeMXBean bean = ManagementFactory.getRuntimeMXBean(); this.startupArguments = ImmutableList.copyOf(bean.getInputArguments()); logger.debug("DrillConfig object initialized."); }
offset++; columns = ImmutableList.copyOf(newColumns);
/** * @param oppositeMajorFragmentId MajorFragmentId of fragments that are sending data to this receiver. * @param senders List of sender MinorFragmentEndpoints each containing sender MinorFragmentId and Drillbit endpoint * where it is running. */ public AbstractReceiver(int oppositeMajorFragmentId, List<MinorFragmentEndpoint> senders, boolean spooling) { this.oppositeMajorFragmentId = oppositeMajorFragmentId; this.senders = ImmutableList.copyOf(senders); this.spooling = spooling; }
public BasicFormatMatcher(FormatPlugin plugin, List<Pattern> patterns, List<MagicString> magicStrings) { super(); this.patterns = ImmutableList.copyOf(patterns); this.matcher = new MagicStringMatcher(magicStrings); this.plugin = plugin; this.compressible = false; this.codecFactory = null; }
/** * Creates a {@link FutureCombiner} that processes the completed futures whether or not they're * successful. * * @since 20.0 */ @SafeVarargs public static <V> FutureCombiner<V> whenAllComplete(ListenableFuture<? extends V>... futures) { return new FutureCombiner<V>(false, ImmutableList.copyOf(futures)); }
/** * Creates a {@link FutureCombiner} that processes the completed futures whether or not they're * successful. * * @since 20.0 */ public static <V> FutureCombiner<V> whenAllComplete( Iterable<? extends ListenableFuture<? extends V>> futures) { return new FutureCombiner<V>(false, ImmutableList.copyOf(futures)); }
/** * Creates a {@link FutureCombiner} requiring that all passed in futures are successful. * * <p>If any input fails, the returned future fails immediately. * * @since 20.0 */ @SafeVarargs public static <V> FutureCombiner<V> whenAllSucceed(ListenableFuture<? extends V>... futures) { return new FutureCombiner<V>(true, ImmutableList.copyOf(futures)); }
public List<DrillbitEndpoint> getAssignedEndpoints() { Preconditions.checkState(endpointsAssigned); return ImmutableList.copyOf(endpoints); }
@Override public final void setup(FragmentContext context, RecordBatch incoming, RecordBatch outgoing, List<TransferPair> transfers) throws SchemaChangeException { this.svMode = incoming.getSchema().getSelectionVectorMode(); this.outgoing = outgoing; if (svMode == NONE) { this.transfers = ImmutableList.copyOf(transfers); } else { throw new UnsupportedOperationException("Unnest does not support selection vector inputs."); } }
@Override protected List<E> computeNext() { if (j <= 0) { return endOfData(); } ImmutableList<E> next = ImmutableList.copyOf(list); calculateNextPermutation(); return next; }
@Override protected List<E> computeNext() { if (nextPermutation == null) { return endOfData(); } ImmutableList<E> next = ImmutableList.copyOf(nextPermutation); calculateNextPermutation(); return next; }
TypeVariableImpl(D genericDeclaration, String name, Type[] bounds) { disallowPrimitiveType(bounds, "bound for type variable"); this.genericDeclaration = checkNotNull(genericDeclaration); this.name = checkNotNull(name); this.bounds = ImmutableList.copyOf(bounds); }
private List<RexNode> visitChildren(RexCall call) { List<RexNode> children = Lists.newArrayList(); for (RexNode child : call.getOperands()) { children.add(child.accept(this)); } return ImmutableList.copyOf(children); }
private DrillDistributionTrait getDistribution(List<Integer> keys) { List<DistributionField> fields = Lists.newArrayList(); for (int key : keys) { fields.add(new DistributionField(key)); } return new DrillDistributionTrait(DistributionType.HASH_DISTRIBUTED, ImmutableList.copyOf(fields)); }
@VisibleForTesting public DrillConfig(Config config) { super(config); logger.debug("Setting up DrillConfig object."); // we need to exclude sun.java.command config node while logging, because // it contains user password along with other parameters logger.trace("Given Config object is:\n{}", config.withoutPath("password").withoutPath("sun.java.command") .root().render(ConfigRenderOptions.defaults())); RuntimeMXBean bean = ManagementFactory.getRuntimeMXBean(); this.startupArguments = ImmutableList.copyOf(bean.getInputArguments()); logger.debug("DrillConfig object initialized."); }