Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
wrappedBundle(mavenBundle().groupId("org.apache.httpcomponents.core5") .artifactId("httpcore5")
0
import java.net.URI; import java.net.URISyntaxException; private final Integer connectTimeoutMsec; private final URI targetURI; * Returns URI where to post events. * @return URI URI getTargetURI() { return targetURI; Integer getConnectonTimeoutMsec() { return connectTimeoutMsec; @JsonProperty("timeoutMsec") Integer timeout) throws URISyntaxException { this.targetURI = new URI(requireNonNull(targetURL)); this.connectTimeoutMsec = requireNonNull(timeout); .add("targetURI", targetURI.toString()) .add("connectTimeoutMsec", connectTimeoutMsec)
0
import org.w3c.dom.Document; public Interpreter getInterpreter(Document document, String language);
0
* {@link LayeredSocketFactory} mockup implementation.
0
import static org.apache.ambari.server.controller.internal.RequestResourceProvider.HAS_RESOURCE_FILTERS; if (resourceFilters != null && resourceFilters.isEmpty() && actionRequest.getParameters().containsKey(HAS_RESOURCE_FILTERS) && actionRequest.getParameters().get(HAS_RESOURCE_FILTERS).equalsIgnoreCase("true")) { LOG.warn("Couldn't find any resource that satisfies given resource filters"); return; }
0
private XMLSignatureInputDebugger() { * @param xmlSignatureInput the signatur to pretty print public XMLSignatureInputDebugger( * @param xmlSignatureInput the signatur to pretty print public XMLSignatureInputDebugger( this(xmlSignatureInput);
0
last = iterator.next();
0
return new TextSource(ValueProvider.StaticValueProvider.of(path.toString()));
0
Job job = Job.getInstance(getConf()); job.setJobName(TokenFileWordCount.class.getName());
0
* @version $Revision$
0
public List<Stage> getFirstStageInProgressPerRequest() { List<StageEntity> stageEntities = stageDAO.findFirstStageByStatus( List<Stage> stages = new ArrayList<>(stageEntities.size()); for (StageEntity stageEntity : stageEntities) { stages.add(stageFactory.createExisting(stageEntity)); } return stages;
0
import org.apache.beam.sdk.transforms.DoFn; import org.apache.beam.sdk.util.Timer; import org.apache.beam.sdk.util.TimerSpec; import org.apache.beam.sdk.util.TimerSpecs; import org.apache.beam.sdk.util.state.StateSpec; import org.apache.beam.sdk.util.state.StateSpecs; new DoFn<String, KV<String, Integer>>() { @ProcessElement new DoFn<String, KV<String, Integer>>() { @ProcessElement new DoFn<String, KV<String, Integer>>() { private static final String STATE_ID = "my-state-id"; @StateId(STATE_ID) private final StateSpec<Object, BagState<String>> bagSpec = StateSpecs.bag(StringUtf8Coder.of()); @ProcessElement public void processElement( ProcessContext c, @StateId(STATE_ID) BagState<String> bagState) { bagState.add(c.element()); new DoFn<String, KV<String, Integer>>() { private static final String EVENT_TIME_TIMER = "event-time-timer"; private static final String SYNC_PROC_TIME_TIMER = "sync-proc-time-timer"; @TimerId(EVENT_TIME_TIMER) TimerSpec myTimerSpec = TimerSpecs.timer(TimeDomain.EVENT_TIME); @TimerId(SYNC_PROC_TIME_TIMER) TimerSpec syncProcTimerSpec = TimerSpecs.timer(TimeDomain.SYNCHRONIZED_PROCESSING_TIME); @ProcessElement public void processElement( ProcessContext c, @TimerId(EVENT_TIME_TIMER) Timer eventTimeTimer, @TimerId(SYNC_PROC_TIME_TIMER) Timer syncProcTimeTimer) { eventTimeTimer.setForNowPlus(Duration.standardMinutes(5)); syncProcTimeTimer.cancel();
0
throw new IllegalArgumentException(error);
0
import org.apache.felix.scr.impl.logger.ComponentLogger; public ComponentLogger getLogger()
0
import org.apache.atlas.type.AtlasTypeRegistry; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.Iterator; import javax.inject.Inject; searchIndexer = new GraphBackedSearchIndexer(new AtlasGraphProvider(), ApplicationProperties.get(), new AtlasTypeRegistry());
0
* @version CVS $Id: StatusGenerator.java,v 1.6 2004/05/19 08:44:27 cziegeler Exp $ this.store_persistent = (Store)this.manager.lookup(Store.ROLE);
0
/* $Id: LoaderFromStream.java,v 1.4 2004/05/10 06:30:08 skitching Exp $ *
0
import com.google.cloud.dataflow.sdk.testing.RunnableOnService; @Category(RunnableOnService.class) @Category(RunnableOnService.class) @Category(RunnableOnService.class) @Category(RunnableOnService.class) @Category(RunnableOnService.class) @Category(RunnableOnService.class) @Category(RunnableOnService.class) @Category(RunnableOnService.class) @Category(RunnableOnService.class)
0
(Set<Class<? extends Operator<?, ?>>>) new HashSet<>( (List) Arrays.asList(MyInputOperator.class, MySingleInputOperator.class)));
0
public static final String REQUEST = "tcpip-forward"; if (REQUEST.equals(request)) {
0
import org.apache.accumulo.core.data.impl.KeyExtent;
1
pr.saveToZooKeeper(context); pr.removeFromZooKeeper(context); pri.next().removeFromZooKeeper(context); return ProblemReport.decodeZooKeeperEntry(context, getIter1().next());
0
long curTime = System.currentTimeMillis(); long endTime = Long.MAX_VALUE - timeoutMillis < curTime ? Long.MAX_VALUE : curTime + timeoutMillis;
0
"hostname", "hardwareProfile", "installedRoleStates", "installScriptHash", "actionResults", "idle"})
0
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Predicate; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Predicates; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Throwables;
0
/* * $Header: /cvshome/build/ee.foundation/src/java/security/InvalidAlgorithmParameterException.java,v 1.6 2006/03/14 01:20:27 hargrave Exp $ * * (C) Copyright 2001 Sun Microsystems, Inc. * Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package java.security; public class InvalidAlgorithmParameterException extends java.security.GeneralSecurityException { public InvalidAlgorithmParameterException() { } public InvalidAlgorithmParameterException(java.lang.String var0) { } }
0
* @deprecated Use the OSGi annotations from org.osgi.service.component.annotations.* @Deprecated
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting;
0
package org.apache.felix.ipojo.test.scenarios.component; import org.apache.felix.ipojo.annotations.Bind; import org.apache.felix.ipojo.annotations.Component; import org.apache.felix.ipojo.annotations.Requires; import org.apache.felix.ipojo.annotations.Unbind; import org.apache.felix.ipojo.test.scenarios.annotations.service.FooService; @Component public class Dependency { @Requires public FooService fs; @Unbind public void unbindBar() { } @Bind public void bindBar() { } @Unbind public void unbindBaz() { } @Bind public void bindBaz() { } @Requires public FooService fs2; @Bind(id="fs2") public void bindFS2() { } @Unbind(id="fs2") public void unbindFS2() { } @Requires(id="inv") public FooService fs2inv; @Bind(id="inv") public void bindFS2Inv() { } @Unbind(id="inv") public void unbindFS2Inv() { } }
0
case RoleAuthorization: resourceDefinition = new SimpleResourceDefinition(Resource.Type.RoleAuthorization, "authorization", "authorizations"); break; case UserAuthorization: resourceDefinition = new SimpleResourceDefinition(Resource.Type.UserAuthorization, "authorization", "authorizations"); break;
0
package org.apache.aurora.scheduler.mesos; import org.apache.aurora.scheduler.ResourceSlot; import org.apache.aurora.scheduler.mesos.MesosTaskFactory.ExecutorConfig; import org.apache.aurora.scheduler.mesos.MesosTaskFactory.MesosTaskFactoryImpl;
0
* Use <code>instantiateFactory</code> if you want that. * Use <code>instantiateFactory</code> if you want that.
0
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.sshd.client.keyverifier; import org.apache.sshd.client.ServerKeyVerifier;
0
* @since 1.6
0
package org.apache.felix.framework.ext;
1
* <p> * A file replicator may also implement {@link VfsComponent}.
0
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
0
private static final int SESSION_TIMEOUT = 60000;
0
* Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at
0
Copyright 2002-2003 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */
0
sch -> true);
0
import cz.seznam.euphoria.core.executor.TriggerScheduler; import java.io.Serializable; * A windowing policy of a dataset. * You can either override method `assignWindowsToElement` if you want * to operate on the {@code WindowedElement}, or override * `assignWindows` if you want to operate on raw data. There is no * need to override both methods. extends Serializable { /** * Assign window IDs to given input element. * The element will always have assigned old window ID, which can be reused * by this windowing. * @returns set of windows to be assign this element into, never null. */ default Set<WindowID<GROUP, LABEL>> assignWindowsToElement( * Assign window IDs to given input data. * @returns set of windows to be assign this element into, never null. default Set<WindowID<GROUP, LABEL>> assignWindows(T data) { throw new UnsupportedOperationException( "You have to override either `assignWindowsToElement` or `assignWindowsToData`"); } /** * Create the window context for given window ID. * The context is created when processing elements belonging to the * same group (i.e. after grouping the elements). */ W createWindowContext(WindowID<GROUP, LABEL> id); /** * Update triggering by given input. This is needed to enable the windowing * to move triggering in watermarking processing schemes based on event time. */ default void updateTriggering(TriggerScheduler triggering, T input) { triggering.updateProcessed(System.currentTimeMillis()); }
0
import org.apache.log4j.PropertyConfigurator; import java.net.URL; private static final String VIEW_LOG_FILE = "view.log4j.properties"; configureViewLogging(viewDefinition,cl); private void configureViewLogging(ViewEntity viewDefinition,ClassLoader cl) { URL resourceURL = cl.getResource(VIEW_LOG_FILE); if( null != resourceURL ){ LOG.debug("setting up logging for view {} as per property file {}",viewDefinition.getName(), resourceURL); PropertyConfigurator.configure(resourceURL); } }
0
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.felix.converter.impl; public class MyDTO5 { public MyDTO6 subsub1; public MyDTO6 subsub2; }
0
public static final String LIMIT = "limit"; public static final String OFFSET = "offset"; * Search using dsl/full text * @param limit number of rows to be returned in the result, used for pagination. maxlimit > limit > 0. -1 maps to atlas.search.defaultlimit property value * @param offset offset to the results returned, used for pagination. offset >= 0. -1 maps to offset 0 * @return Query results public JSONArray search(final String searchQuery, final int limit, final int offset) throws AtlasServiceException { resource = resource.queryParam(LIMIT, String.valueOf(limit)); resource = resource.queryParam(OFFSET, String.valueOf(offset)); * @param limit number of rows to be returned in the result, used for pagination. maxlimit > limit > 0. -1 maps to atlas.search.defaultlimit property value * @param offset offset to the results returned, used for pagination. offset >= 0. -1 maps to offset 0 public JSONArray searchByDSL(final String query, final int limit, final int offset) throws AtlasServiceException { resource = resource.queryParam(LIMIT, String.valueOf(limit)); resource = resource.queryParam(OFFSET, String.valueOf(offset)); * @param limit number of rows to be returned in the result, used for pagination. maxlimit > limit > 0. -1 maps to atlas.search.defaultlimit property value * @param offset offset to the results returned, used for pagination. offset >= 0. -1 maps to offset 0 * NOTE: Pagination is not implemented currently for full text search, so limit and offset are not used public JSONObject searchByFullText(final String query, final int limit, final int offset) throws AtlasServiceException { resource = resource.queryParam(LIMIT, String.valueOf(limit)); resource = resource.queryParam(OFFSET, String.valueOf(offset));
0
values.stream()
0
import org.apache.beam.sdk.transforms.splittabledofn.RestrictionTracker; InputT, OutputT, RestrictionT, TrackerT extends RestrictionTracker<RestrictionT, ?>> InputT, OutputT, RestrictionT, TrackerT>> { SplittableParDoViaKeyedWorkItems.ProcessElements<InputT, OutputT, RestrictionT, TrackerT>
0
requestConns.await();
0
import com.google.common.base.MoreObjects; import java.util.Collection; import java.util.Collections; import java.util.Objects; import java.util.UUID; * Returns the {@link Aggregator Aggregators} created by this {@code DoFn}. */ Collection<Aggregator<?, ?>> getAggregators() { return Collections.<Aggregator<?, ?>>unmodifiableCollection(aggregators.values()); } /** private final UUID id; this.id = UUID.randomUUID(); this.name = checkNotNull(name, "name cannot be null"); (CombineFn<AggInputT, ?, AggOutputT>) checkNotNull(combiner, "combineFn cannot be null"); @Override public String toString() { return MoreObjects.toStringHelper(getClass()) .add("name", name) .add("combineFn", combineFn) .toString(); } @Override public int hashCode() { return Objects.hash(id, name, combineFn.getClass()); } /** * Indicates whether some other object is "equal to" this one. * * <p>{@code DelegatingAggregator} instances are equal if they have the same name, their * CombineFns are the same class, and they have identical IDs. */ @Override public boolean equals(Object o) { if (o == this) { return true; } if (o == null) { return false; } if (o instanceof DelegatingAggregator) { DelegatingAggregator<?, ?> that = (DelegatingAggregator<?, ?>) o; return Objects.equals(this.id, that.id) && Objects.equals(this.name, that.name) && Objects.equals(this.combineFn.getClass(), that.combineFn.getClass()); } return false; }
0
import java.util.ArrayList; import java.util.List; /** List of imports for spring configurations. */ private final List imports = new ArrayList(); public void addImport(String uri) { this.imports.add(uri); } public List getImports() { return this.imports; }
0
private AccumuloClient client; client = createMock(AccumuloClient.class); assigner = new UnorderedWorkAssigner(conf, client); expect(client.getInstanceID()).andReturn("id"); replay(cache, client); verify(cache, client);
0
private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(NameSpaceSymbTable.class); try { symb = (SymbMap) initialMap.clone(); } catch (CloneNotSupportedException e) { LOG.error("Error cloning the initial map"); } try { symb = (SymbMap) symb.clone(); } catch (CloneNotSupportedException e) { LOG.error("Error cloning the symbol map"); } @Override protected Object clone() throws CloneNotSupportedException { SymbMap copy = (SymbMap) super.clone(); copy.entries = new NameSpaceSymbEntry[entries.length]; System.arraycopy(entries, 0, copy.entries, 0, entries.length); copy.keys = new String[keys.length]; System.arraycopy(keys, 0, copy.keys, 0, keys.length); return copy;
0
import java.io.IOException; import javax.ws.rs.DELETE; import org.apache.ambari.view.slider.SliderAppsViewController; import org.apache.hadoop.yarn.exceptions.YarnException; @Inject SliderAppsViewController sliderAppsViewController; @DELETE @Path("{appId}") public void deleteApp(@Context HttpHeaders headers, @Context UriInfo uri, @PathParam("appId") String appId) throws YarnException, IOException { sliderAppsViewController.deleteSliderApp(appId); }
0
import java.util.concurrent.TimeUnit; public interface ConnPoolControl<T> extends ConnPoolStats<T> { void closeIdle(long idletime, TimeUnit tunit); void closeExpired();
0
protected TreeMap<Text,TabletLocation> metaCache = new TreeMap<>(endRowComparator); private TreeSet<KeyExtent> badExtents = new TreeSet<>(); private HashSet<Pair<String,String>> okLocks = new HashSet<>(); private HashSet<Pair<String,String>> invalidLocks = new HashSet<>(); Pair<String,String> lock = new Pair<>(tl.tablet_location, tl.tablet_session); ArrayList<T> notInCache = new ArrayList<>(); tsm = new TabletServerMutations<>(tl.tablet_session); List<Range> failures = new ArrayList<>(); List<TabletLocation> tabletLocations = new ArrayList<>(); List<Range> lookups = new ArrayList<>(badExtents.size()); Map<String,Map<KeyExtent,List<Range>>> binnedRanges = new HashMap<>(); ArrayList<String> tabletServers = new ArrayList<>(binnedRanges.keySet()); tablets = new HashMap<>(); tabletsRanges = new ArrayList<>();
1
public void test_optional_single_dynamic() throws Exception public void test_required_single_dynamic() throws Exception public void test_optional_multiple_dynamic() throws Exception public void test_required_multiple_dynamic() throws Exception public void test_required_multiple_dynamic_factory() throws Exception public void test_optional_single_static() throws Exception public void test_required_single_static() throws Exception public void test_optional_multiple_static() throws Exception public void test_required_multiple_static() throws Exception public void test_multi_service_bind_unbind_order() throws Exception
0
throw new XAException("Connection is closed");
0
public interface ClassCacheEntryFactory<T> extends CacheEntryFactory<Class<?>, T>
0
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.accumulo.monitor.rest.api; import org.apache.accumulo.tracer.thrift.RemoteSpan; public class TracesForTypeInformation { public String id, source; public Long start, ms; public TracesForTypeInformation() {} public TracesForTypeInformation(RemoteSpan span) { this.id = getIDFromSpan(span); this.start = getDateFromSpan(span); this.ms = getSpanTime(span); this.source = getLocation(span); } protected String getIDFromSpan(RemoteSpan span) { if (span == null) return null; return String.format("%s", Long.toHexString(span.traceId)); } protected Long getDateFromSpan(RemoteSpan span) { if (span == null) return null; return span.start; } protected Long getSpanTime(RemoteSpan span) { if (span == null) return null; return span.stop - span.start; } protected String getLocation(RemoteSpan span) { if (span == null) return null; return span.svc + ":" + span.sender; } }
0
* Copyright 2002,2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
1
public class TestSingletonIterator2<E> extends AbstractTestIterator<E> { @SuppressWarnings("unchecked") public SingletonIterator<E> makeEmptyIterator() { SingletonIterator<E> iter = new SingletonIterator<E>((E) testValue); @SuppressWarnings("unchecked") public SingletonIterator<E> makeObject() { return new SingletonIterator<E>((E) testValue, false); Iterator<E> iter = makeObject(); E iterValue = iter.next(); ResettableIterator<E> it = makeObject();
0
@Override
0
return k.getColumnQualifier().toString(); public static Mutation add(Mutation m, String tableId, Value v) { m.put(NAME, new Text(tableId), v); public static Mutation add(Mutation m, String tableId, Value v) { m.put(NAME, new Text(tableId), v);
0
user.setHomeDirectory(getTestDirectory());
0
* Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ * @version CVS $Id: RawRequestParameterModule.java,v 1.2 2004/03/05 13:02:48 bdelacretaz Exp $
1
* Copyright 2001-2005 The Apache Software Foundation
0
* <p> * Originally taken from the Velocity tree so we can be self-sufficient. * </p>
0
import cz.seznam.euphoria.core.client.io.DataSink; import cz.seznam.euphoria.flink.translation.io.DataSinkWrapper; import java.util.ArrayList; import java.util.List; * @return List of {@link DataSink} processed in given flow (leaf nodes) public List<DataSink<?>> translateInto(Flow flow, StreamExecutionEnvironment streamExecutionEnvironment) // transform flow to acyclic graph of supported operators + optimize DAG<ParallelOperator<?, ?>> dag = new FlowOptimizer().optimize( FlowUnfolder.unfold(flow, TRANSLATORS.keySet())); Operator<?, ?> originalOp = op.getOriginalOperator(); OperatorTranslator translator = TRANSLATORS.get(originalOp.getClass()); DataStream<?> out = translator.translate( originalOp, executorContext, op.getParallelism()); final List<DataSink<?>> sinks = new ArrayList<>(); dag.getLeafs() .stream() .map(Node::get) .filter(op -> op.output().getOutputSink() != null) .forEach(op -> { final DataSink<?> sink = op.output().getOutputSink(); sinks.add(sink); DataStream<?> flinkOutput = Objects.requireNonNull(executorContext.getOutputStream(op)); flinkOutput.addSink(new DataSinkWrapper<>((DataSink) sink)) .setParallelism(op.getParallelism()); }); return sinks;
0
* @version CVS $Id$
0
return (CallableStatement) (_pstmtPool.borrowObject(createKey(sql, StatementType.CALLABLE_STATEMENT))); resultSetConcurrency, StatementType.CALLABLE_STATEMENT))); * @param stmtType statement type protected PStmtKey createKey(String sql, int resultSetType, int resultSetConcurrency, StatementType stmtType) { * @param sql the SQL string used to define the statement * @param stmtType statement type protected PStmtKey createKey(String sql, StatementType stmtType) { return new PStmtKey(normalizeSQL(sql), catalog, stmtType, null); * @see #createKey(String, int, int, StatementType) if (key.getStmtType() == StatementType.PREPARED_STATEMENT ) { if(key.getStmtType() == StatementType.PREPARED_STATEMENT) { protected static enum StatementType { CALLABLE_STATEMENT, PREPARED_STATEMENT }
0
import cz.seznam.euphoria.core.client.dataset.windowing.Window; import org.apache.flink.runtime.state.KvState; public class FlinkValueStorage<T, W extends Window> implements ValueStorage<T> { private final W window; public FlinkValueStorage(ValueState<T> state, W window) { this.window = window; setNamespace(); setNamespace(); setNamespace(); /** * Make sure that namespace window is set correctly in the underlying * keyed state backend. */ @SuppressWarnings("unchecked") private void setNamespace() { ((KvState) state).setCurrentNamespace(window); }
0
import java.util.concurrent.ThreadFactory; executor = Executors.newSingleThreadExecutor(new ThreadFactory() { @Override public Thread newThread(Runnable runnable) { return new Thread(runnable, "Gogo shell"); } });
0
import org.apache.commons.configuration.event.EventListener; import org.apache.commons.configuration.reloading.ReloadingEvent; @SuppressWarnings("unchecked") controller.addEventListener(EasyMock.eq(ReloadingEvent.ANY), EasyMock.anyObject(EventListener.class)); assertNotNull("No listener returned", listener);
0
* Each {@code Configuration} object derived from * {@link org.apache.commons.configuration2.AbstractConfiguration AbstractConfiguration}
0
@Override public int hashCode() { return initialized.hashCode(); } @Override public boolean equals(Object o){
0
import org.apache.felix.framework.wiring.BundleRequirementImpl; import org.osgi.framework.wiring.BundleCapability; import org.osgi.framework.wiring.BundleRevision; Map<BundleRevision, List<ResolverWire>> resolve( ResolverState state, BundleRevision revision, Set<BundleRevision> optional); Map<BundleRevision, List<ResolverWire>> resolve( ResolverState state, BundleRevision revision, String pkgName, Set<BundleRevision> fragments); SortedSet<BundleCapability> getCandidates( BundleRequirementImpl req, boolean obeyMandatory); void checkExecutionEnvironment(BundleRevision revision) throws ResolveException; void checkNativeLibraries(BundleRevision revision) throws ResolveException;
1
package org.apache.ambari.funtest.server.api.service; import org.apache.ambari.funtest.server.AmbariHttpWebRequest; import org.apache.ambari.funtest.server.ConnectionParams;
0
import org.apache.hc.core5.http.impl.bootstrap.HttpServer; import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
0
* @return the name of the property * * @return the property type * * @return <code>true</code> if the property is indexed (i.e. is a List or * array), otherwise <code>false</code> * * @return <code>true</code> if the property is a Map * otherwise <code>false</code>
0
Copyright 2002-2003 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */
0
static org.slf4j.Logger LOG = LOG.error("Verification crashed for " + filename); LOG.error("Verification crashed for " + filename); LOG.error("Verification failed for " + filename); LOG.error("Core validation crashed for " + filename); LOG.error("Core validation failed for " + filename); LOG.error("Verification crashed for " + filename); LOG.error("Following the ds:Manifest failed for " + filename); LOG.error("Verification crashed for " + filename); LOG.error("Verification failed for " + filename); LOG.error("Verification crashed for " + filename); LOG.error("Verification failed for " + filename); LOG.error("Verification crashed for " + filename); LOG.error("Verification failed for " + filename); LOG.error("Verification crashed for " + filename); LOG.error("Verification failed for " + filename); LOG.error("Verification crashed for " + filename); LOG.error("Verification failed for " + filename); LOG.error("Verification crashed for " + filename); LOG.error("Verification failed for " + filename); LOG.error("Verification crashed for " + filename); LOG.error("Verification failed for " + filename); LOG.error("Verification crashed for " + filename); LOG.error("Verification failed for " + filename);
0
ArrayList<ThriftTransportKey> servers = new ArrayList<>();
0
.setOwner(new Identity().setRole(role))
0
ShellPluginConfigurationCommand(final String typeName, final Property tableProp, final String classOpt) { public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception { final String tableName = OptUtil.getTableOpt(cl, shellState); final Iterator<Entry<String,String>> iter = shellState.getConnector().tableOperations().getProperties(tableName).iterator(); protected void setPlugin(final CommandLine cl, final Shell shellState, final String tableName, final String className) throws AccumuloException, AccumuloSecurityException { protected void removePlugin(final CommandLine cl, final Shell shellState, final String tableName) throws AccumuloException, AccumuloSecurityException { public static <T> Class<? extends T> getPluginClass(final String tableName, final Shell shellState, final Class<T> clazz, final Property pluginProp) { final Entry<String,String> ent = props.next(); final Options o = new Options(); final OptionGroup actionGroup = new OptionGroup();
0
String ROLE = ObjectModel.class.getName(); String CONTEXTBEAN = "contextBean"; String NAMESPACE = "namespace"; String PARAMETERS_PATH = "cocoon/parameters"; MultiMap getAll(); Object put(Object key, Object value); void putAll(Map mapToCopy); void markLocalContext(); void cleanupLocalContext(); * void putAt(String path, Object value); * void fillContext(); * void setParent(ObjectModel parentObjectModel);
0
import java.nio.channels.FileChannel; import org.apache.http.nio.FileContentEncoder; public class LengthDelimitedEncoder extends AbstractContentEncoder implements FileContentEncoder { public long write(final FileChannel fileChannel, long position, long count) throws IOException { if (fileChannel == null) { return 0; } assertNotCompleted(); int lenRemaining = (int) (this.contentLength - this.len); long bytesWritten; if (count > lenRemaining) { bytesWritten = fileChannel.transferTo(position, lenRemaining, this.channel); } else { bytesWritten = fileChannel.transferTo(position, count, this.channel); } this.len += bytesWritten; if (this.len >= this.contentLength) { this.completed = true; } return bytesWritten; }
0
private String state; * @return the state */ public String getState() { return state; } /** * @param state the State to set */ public void setState(String state) { this.state = state; } /** .append(", state=").append(state)
0
List<KeyExtent> candidates = findTablets(context, !opts.selectFarTablets, opts.getTableName(), tabletLocations); boolean isLocal = HostAndPort.fromString(entry.getValue()).getHost().equals(localaddress.getHostName()); SortedKeyValueIterator<Key,Value> visFilter = VisibilityFilter.wrap(colFilter, authorizations, defaultLabels);
0
/* * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.http.impl.nio; import org.apache.http.nio.reactor.IOSession; import org.apache.http.protocol.HttpContext; class SessionHttpContext implements HttpContext { private final IOSession iosession; public SessionHttpContext(final IOSession iosession) { super(); this.iosession = iosession; } public Object getAttribute(final String id) { return this.iosession.getAttribute(id); } public Object removeAttribute(final String id) { return this.iosession.removeAttribute(id); } public void setAttribute(final String id, final Object obj) { this.iosession.setAttribute(id, obj); } }
0
// FIXME - we should ensure that the context is never null! if ( this.context != null ) { try { this.core = (Core)this.context.get(Core.ROLE); } catch (ContextException ignore) { // this can never happen } final Settings settings = (this.core == null ? null : this.core.getSettings());
0
import org.apache.accumulo.core.security.NamespacePermission; * Verify the user has a particular namespace permission * @param namespace * the name of the namespace to query about * the namespace permission to check for public boolean hasNamespacePermission(String principal, String namespace, NamespacePermission perm) throws AccumuloException, AccumuloSecurityException; * Grant a user a specific permission for a specific namespace * @param namespace * the name of the namespace to modify for the user * the namespace permission to grant to the user public void grantNamespacePermission(String principal, String namespace, NamespacePermission permission) throws AccumuloException, AccumuloSecurityException; * Revoke a namespace permission for a specific user on a specific namespace * @param namespace * the name of the namespace to modify for the user * the namespace permission to revoke for the user public void revokeNamespacePermission(String principal, String namespace, NamespacePermission permission) throws AccumuloException, AccumuloSecurityException;
0
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.beam.dsls.sql.interpreter.operator; import java.util.List; import org.apache.beam.dsls.sql.exception.BeamInvalidOperatorException; /** * {@code BeamSqlExpression} for {@code <} operation. */ public class BeamSqlLessThanExpression extends BeamSqlCompareExpression { public BeamSqlLessThanExpression(List<BeamSqlExpression> operands) { super(operands); } @Override public Boolean compare(CharSequence leftValue, CharSequence rightValue) { return String.valueOf(leftValue).compareTo(String.valueOf(rightValue)) < 0; } @Override public Boolean compare(Boolean leftValue, Boolean rightValue) { throw new BeamInvalidOperatorException("< is not supported for Boolean."); } @Override public Boolean compare(Number leftValue, Number rightValue) { return (leftValue == null && rightValue == null) || (leftValue != null && rightValue != null && leftValue.floatValue() < (rightValue).floatValue()); } }
0
* Copyright 2006-2009 The Apache Software Foundation.
0
// Initialize component handlers. This is done in no particular order, but initializing a // handler may indirectly initialize another handler through a call to lookup(). // This isn't a problem as a handler's initialize() method can be called several times. // We copy the list of handlers as the componentHandler Map may change if implicitely declared // components are looked up. ComponentHandler[] handlers = (ComponentHandler[])this.componentHandlers.values().toArray( new ComponentHandler[this.componentHandlers.size()]); for( int i = 0; i < handlers.length; i++ ) { handlers[i].initialize(); if( this.getLogger().isErrorEnabled() ) {
0
import org.apache.cocoon.core.container.util.ClassLoaderUtils;
0
boolean debugEnabled = log.isDebugEnabled(); if (debugEnabled) { if (debugEnabled) { boolean debugEnabled = log.isDebugEnabled(); if (debugEnabled) {
0
* @throws SAXException * @throws SAXException * @throws SAXException
0
public synchronized void assign(final Collection<TopicPartition> assigned) { public synchronized Map<TopicPartition, OffsetAndTimestamp> offsetsForTimes( Duration.ZERO, .withCreateTime(Duration.ZERO) public synchronized void flush() { @Override @SuppressWarnings("FutureReturnValueIgnored")
0
* {@link SerializableOptions#bufferSize}. * {@link SerializableOptions#references}. * {@link SerializableOptions#registrationRequired}. * {@link KryoCoder#instanceId}. * {@link KryoCoder#options}. * {@link KryoCoder#registrars}.
0