Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.beam.sdk.extensions.gcp.util.Transport; | 0 |
private final PaneInfoTracker paneInfo;
this.paneInfo = new PaneInfoTracker(timerManager);
ReduceFn<K, InputT, OutputT, W>.Context mergedContext = contextFactory.base(mergedWindow);
triggerRunner.clearEverything(mergedContext);
paneInfo.clear(mergedContext.state());
paneInfo.cl... | 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... | 0 |
* @see <a href="http://www.w3.org/TR/xmldsig-core/#sec-CoreValidation">Core validation section in the XML Signature Rec.</a> | 0 |
import org.testng.ITestContext;
import static org.apache.atlas.repository.impexp.ZipFileResourceTestUtils.getZipSource;
import static org.testng.Assert.assertFalse;
@DataProvider(name = "sales")
public static Object[][] getDataFromQuickStart_v1_Sales(ITestContext context) throws IOException {
return get... | 0 |
import org.apache.http.auth.AuthScheme;
import org.apache.http.conn.routing.HttpRoute;
public Object getUserToken(final HttpRoute route, final HttpContext context) {
final AuthExchange targetAuthExchnage = clientContext.getAuthExchange(route.getTargetHost());
if (targetAuthExchnage != null) {
... | 0 |
file.create();
file.create();
if (!file.doesExist()) {
file.create();
} | 0 |
public void remove(List<KerberosPrincipalEntity> entities) {
if (entities != null) {
for (KerberosPrincipalEntity entity : entities) {
remove(entity);
}
}
} | 0 |
final Map<String, Object> testMap = new HashMap<>();
final Map<String, Object> response = new HashMap<>();
final Map<String, Object> testMap = new HashMap<>();
final Map<String, Object> request = new HashMap<>(); | 0 |
import java.util.Map;
public Map<TupleTag<?>, PValue> expand() {
return Collections.emptyMap(); | 0 |
* @version $Revision$ | 1 |
* 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... | 0 |
//AvalonEnvironment avalonEnvironment = this.createAvalonEnvironment(osgiServletContext);
*/ | 0 |
import javax.annotation.Nullable;
* @param slaveHost The slave host that the resource offer is associated with, or {@code null} if
* the machine restrictions should be ignored.
public Predicate<TwitterTaskInfo> staticFilter(
Resources resourceOffer, @Nullable String slaveHost);
@Nullable String s... | 0 |
ArrayList<String> classpathItems = new ArrayList<>(); | 0 |
import org.apache.beam.model.pipeline.v1.MetricsApi.MonitoringInfo; | 0 |
@Override
public void hostRoleScheduled(Stage s, String hostname, String roleStr) {
//Update start time, last update time, host role status, number of attempts
//in the database.
} | 1 |
sqlEnv.parseQuery(pipeline, insertStatement);
sqlEnv.parseQuery(pipeline, insertStatement); | 0 |
} catch (NumberFormatException nfEx ) {
(ctx, element, nfEx, ERR_ATTRIBUTE_VALUE_MALFORMED, | 0 |
/*
* $Id$
* 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... | 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... | 0 |
conn.resetInput();
if (!canResponseHaveBody(connState.getRequest(), response)) {
response.setEntity(null);
}
HttpEntity entity = response.getEntity();
if (entity != null) {
OutputStream outstream = new ContentOutputStream(buffer);... | 0 |
// System.err.println("WARNING: Trailing garbage at end of " + file_name);
// System.err.println(bytes + " extra bytes: " + Utility.toHexString(buf));
try {
if (file != null) {
file.close();
}
... | 0 |
/** the first exception being caught to be thrown to the caller */
private IOException exceptionCaught;
this.exceptionCaught = null;
* Close the streams belonging to the given Process.
*
private void closeProcessStreams(final Process process) {
setExceptionCaught(e);
... | 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 ... | 0 |
public TabletServers getParticipatingTabletServers(@PathParam("tableId") @NotNull @Pattern(regexp = ALPHA_NUM_REGEX_TABLE_ID) String tableIdStr)
throws Exception { | 0 |
bind(Properties.class).annotatedWith(Jpa.class).toProvider(Providers.of(null)); | 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 ... | 0 |
Collection<Object> beans = new ArrayList<>();
Collection<Object> beans = new ArrayList<>();
new HashMap<>(); | 0 |
public static <K, V> SortedMap<K, V> unmodifiableSortedMap(SortedMap<K, V> map) {
return UnmodifiableEntrySet.unmodifiableEntrySet(super.entrySet());
return UnmodifiableSet.unmodifiableSet(super.keySet());
return UnmodifiableCollection.unmodifiableCollection(super.values()); | 0 |
import org.apache.beam.runners.dataflow.DataflowPipelineJob;
import org.apache.beam.runners.dataflow.DataflowPipelineRunner;
import org.apache.beam.runners.dataflow.options.DataflowPipelineOptions;
import org.apache.beam.runners.dataflow.util.MonitoringUtil;
| 0 |
if (!isPutAddSupported() || !isPutChangeSupported()) {
if (!isPutAddSupported() || !isPutChangeSupported()) {
if (!isPutAddSupported() || !isPutChangeSupported()) {
if (!isPutAddSupported() || !isPutChangeSupported()) { | 0 |
case IProblem.ImportNotFound:
case IProblem.IsClassPathCorrect:
case IProblem.UndefinedName:
// check QualifiedName for search results as well -
// happens if import package is already added but exported package has been removed | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/ListUtils.java,v 1.6 2002/08/13 01:19:00 pjack Exp $
* $Revision: 1.6 $
* $Date: 2002/08/13 01:19:00 $
final protected Factory factory;
public LazyList(List list,... | 0 |
/**
* 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
* distribu... | 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... | 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... | 0 |
private static final String DFS_SUPPORT_APPEND = "dfs.support.append"; | 0 |
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE",
justification = "Missing QUALIFIER causes redundant null-check") | 0 |
* @version CVS $Id: JdbcEsqlQuery.java,v 1.2 2003/03/11 17:44:19 vgritsenko Exp $ | 0 |
import java.lang.reflect.Method;
import org.apache.hadoop.mapred.Counters.Counter;
// work around hadoop-1/hadoop-2 runtime incompatibility
static private Method INCREMENT;
static {
try {
INCREMENT = Counter.class.getMethod("increment", Long.TYPE);
} catch (Exception ex) {
throw new RuntimeEx... | 0 |
* @throws AmbariException
protected CommandReport processIdentity(Map<String, String> identityRecord, String evaluatedPrincipal, KerberosOperationHandler operationHandler, Map<String, Object> requestSharedDataContext) throws AmbariException { | 0 |
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Overrid... | 0 |
* @version CVS $Id: AbstractComplementaryConfigurableAction.java,v 1.3 2003/10/25 18:06:19 joerg Exp $
public abstract class AbstractComplementaryConfigurableAction extends ConfigurableServiceableAction { | 0 |
assertEquals(typeAttrMap.size(), 17); | 0 |
public final Reader<T> createReader(PipelineOptions options, Coder<T> coder,
ExecutionContext executionContext) throws IOException { | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkNotNull;
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState; | 0 |
this.addParam("component_name", request.getParameter("component_name"));
this.addParam("file_name", request.getParameter("file_name"));
if (solrValue == null || solrValue.isEmpty()){
}else { | 0 |
import org.apache.bcel.classfile.Deprecated; // use _this_ one! | 0 |
* HTTP message entity APIs based on the classic (blocking) I/O model. | 0 |
final String traitName = "PII_Trait" + randomString();
final String traitName = "PII_Trait" + randomString();
final String traitName = "PII_Trait" + randomString(); | 0 |
(String t) -> {
// Use the atomic boolean to detect if multiple threads are in this
// critical section. Any thread that enters purposefully blocks by sleeping
// to increase the contention between threads artificially.
assertFalse(... | 0 |
interface Clock { | 0 |
* @version CVS $Revision$ $Date$ | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
folder.delete(); | 0 |
import org.apache.http.protocol.HTTP;
while (i1 < indexTo && HTTP.isWhitespace(buffer.charAt(i1))) {
while (i2 > i1 && HTTP.isWhitespace(buffer.charAt(i2 - 1))) { | 0 |
* <p>Example usage:
* long backOffMillis = backoff.nextBackOffMillis();
* if (backOffMillis == Backoff.STOP) {
* // do not retry operation
* } else {
* // sleep for backOffMillis milliseconds and retry operation
* }
BackOff ZERO_BACKOFF =
new BackOff() {
@Override
public voi... | 1 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists; | 0 |
* mutable (i.e. no final fields). The Java object is expected to have implemented a correct
* .equals() and .hashCode methods The equals method must be completely determined by the schema
* fields. i.e. if the object has hidden fields that are not reflected in the schema but are
* compared in equals, then r... | 0 |
protected Component[] getComponents()
return scr.getComponents();
}
return null;
}
protected Component findComponentByName( String name )
{
Component[] components = getComponents();
if ( components != null )
{
for ( Component component :... | 0 |
package cz.seznam.euphoria.beam.join;
import cz.seznam.euphoria.beam.SingleValueCollector;
import cz.seznam.euphoria.core.client.functional.BinaryFunctor;
import cz.seznam.euphoria.core.client.util.Pair;
import org.apache.beam.sdk.transforms.join.CoGbkResult;
import org.apache.beam.sdk.values.KV;
import org.apache.bea... | 0 |
tmpMap.put(_Fields.RUNNING, new org.apache.thrift.meta_data.FieldMetaData("running", org.apache.thrift.TFieldRequirementType.DEFAULT,
tmpMap.put(_Fields.QUEUED, new org.apache.thrift.meta_data.FieldMetaData("queued", org.apache.thrift.TFieldRequirementType.DEFAULT,
if (schemeField.type == org.apache.thr... | 0 |
import java.sql.Types;
import org.apache.beam.dsls.sql.TestUtils;
import org.apache.beam.dsls.sql.mock.MockedBoundedTable;
public static void prepare() {
sqlEnv.registerTable("ORDER_DETAILS1",
MockedBoundedTable.of(
Types.BIGINT, "order_id",
Types.INTEGER, "site_id",
Ty... | 0 |
throw new InvalidUsernamePasswordCombinationException(e);
throw new InvalidUsernamePasswordCombinationException();
throw new InvalidUsernamePasswordCombinationException(); | 0 |
private final String category;
* Creates new Simple Web Console Plugin with the default category
* ({@code null})
this( label, title, null, css );
}
/**
* Creates new Simple Web Console Plugin with the given category.
*
* @param label the front label. See
* ... | 0 |
setLocations(locations);
return Arrays.copyOf(locations, locations.length);
this.locations = Arrays.copyOf(locations, locations.length); | 0 |
List<Key> keys = new ArrayList<>();
List<Value> values = new ArrayList<>();
HashMap<String,String> namedOptions = new HashMap<>(); | 0 |
/** Get the {@link AppliedPTransform} that produced the provided {@link PValue}. */
* <p>The input {@link PValue} must have already been produced by a step earlier in this {@link
* Pipeline}. If the input value has not yet been produced yet (by a call to either {@link
* StepTranslationContext#addOutp... | 1 |
* 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... | 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... | 0 |
import cz.seznam.euphoria.core.client.dataset.windowing.Window;
Set<Window> windows = windowing.assignWindowsToElement(wel);
for (Window window : windows) {
private static class TypedKeySelector<WID extends Window, KEY>
implements KeySelector<WindowedElement<WID, ? extends Pair<KEY, ?>>, Com... | 0 |
if (input.getSubNode().getNodeType() == Node.TEXT_NODE) { | 0 |
*
*
*
*
*
*
| 0 |
* @version $Id$ | 0 |
List<Pair<Key,Value>> keyVals = new ArrayList<>();
keyVals.add(new Pair<>(new Key("a" + i, "b" + i, "c" + i, new ColumnVisibility(""), 1000l + i), new Value(Integer.toString(i).getBytes()))); | 1 |
setZooKeeperInstance(job, ClientConfiguration.create().withInstance(instanceName).withZkHosts(zooKeepers)); | 0 |
* @version $Revision$ | 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... | 0 |
Set<SubResourceDefinition> setChildren = new HashSet<>(); | 0 |
* Copyright 2016-2017 Seznam.cz, a.s. | 0 |
@Override
@Override
@Deprecated
@Override | 1 |
import org.junit.experimental.categories.Category;
@Category({ category.AlertTest.class}) | 0 |
import com.twitter.aurora.scheduler.storage.entities.IScheduledTask;
IScheduledTask thermosPrunedTask = makeTask(JOB_A, true, FAILED);
IScheduledTask thermosTask = makeTask(JOB_A, true, FAILED);
IScheduledTask nonThermosTask = makeTask(JOB_A, false, FAILED);
private static void assertRetainedTasks(TaskInf... | 0 |
private final QueryProcessor queryProcessor;
private Expression expression;
public GremlinTranslator(QueryProcessor queryProcessor, Expression expression) {
this.expression = expression;
this.queryProcessor = queryProcessor;
DSLVisitor qv = new DSLVisitor(queryProcesso... | 0 |
import org.apache.hc.core5.http.config.NamedElementChain;
public AsyncPushConsumer create(final HttpRequest request, final HttpContext context) throws HttpException {
final DefaultConnectingIOReactor ioReactor = new DefaultConnectingIOReactor(
ioEventHandlerFactory,
... | 0 |
Pipeline p = FlinkTestPipeline.createForBatch(); | 0 |
this.log("DispatcherServlet: initializing servlet " + servlet + " at " + mountPath); | 0 |
import org.apache.http.impl.NIOSocketFactory;
import org.apache.http.impl.OldIOSocketFactory;
protected void setUp() throws Exception {
super.setUp();
SocketFactory socketfactory = null;
if (HttpRuntime.isNIOCapable()) {
socketfactory = NIOSocketFactory.getSocketFactory();
... | 0 |
public void processElement(@Element KV<K, InputT> kv,
MultiOutputReceiver receiver) {
receiver.get(cold).output(kv);
receiver.get(hot).output(KV.of(KV.of(kv.getKey(), nonce), kv.getValue())); | 0 |
private Long reloadingRefreshDelay;
* Returns the refresh delay for reload operations. Result may be
* <b>null</b> if this value has not been set.
public Long getReloadingRefreshDelay()
Long reloadingRefreshDelay) | 0 |
* @version CVS $Id: AspectUtil.java,v 1.2 2003/05/22 12:32:47 cziegeler Exp $
String value = (desc.getDefaultValue() == null ? "0" : desc.getDefaultValue());
return constructor.newInstance(new String[] {value});
if ( desc.getDefaultValue() != null ) {
... | 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 u... | 0 |
* provides methods for writing lines of text.
* @version $Revision$
/**
* Determines if the buffer contains data.
*
* @return <code>true</code> if there is data in the buffer,
* <code>false</code> otherwise.
*/
/**
* Returns the length of this buffer.
*
* @return bu... | 0 |
@ManyToMany(cascade = { CascadeType.MERGE, CascadeType.REFRESH }) | 0 |
import com.twitter.common.testing.easymock.EasyMockTest; | 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 ... | 0 |
import org.apache.commons.cli.DefaultParser;
CommandLine cl = new DefaultParser().parse(o, args); | 0 |
package org.apache.sshd.client.subsystem.sftp.fs;
import org.apache.sshd.client.subsystem.sftp.SftpClient;
| 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 ... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.