Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
/** Tests for {@link PTransformMatcher}. */
AppliedPTransform<?, ?, ?> application = getAppliedTransform(subclass);
private final StateSpec<ValueState<Integer>> intState = StateSpecs.value(VarIntCoder.of());
/** Demonstrates that a {@link ParDo.SingleOutput} does not match any ParDo matcher. */
Applie... | 1 |
package org.apache.batik.bridge;
* @see org.apache.batik.bridge.TextPainter | 0 |
public static final Event KeyNameToken = new Event("KeyNameToken"); | 0 |
// the following if null check is to appease findbugs... grumble grumble spent a good part of my morning looking into this
if (input == null)
public static final Function<TabletId,org.apache.accumulo.core.data.KeyExtent> TID_2_KE_OLD = new Function<TabletId,org.apache.accumulo.core.data.KeyExtent>() {
... | 0 |
assertThat(commitResponse.getRetrievalToken(), Matchers.not(Matchers.nullValue())); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/bag/TestTypedBag.java,v 1.3 2003/11/18 22:37:15 scolebourne Exp $
* @version $Revision: 1.3 $ $Date: 2003/11/18 22:37:15 $
public Bag makeBag() { | 0 |
* or more contributor license agreements. See the NOTICE file
* regarding copyright ownership. The ASF licenses this file
* with the License. You may obtain a copy of the License at
* KIND, either express or implied. See the License for the | 0 |
import org.apache.beam.dsls.sql.utils.CalciteUtils;
beamRecordType = CalciteUtils.toBeamRecordType(relDataType); | 0 |
import org.apache.batik.gvt.GraphicsNode;
GraphicsNode gn = e.getGVTRoot();
Dimension2D dim = bridgeContext.getDocumentSize();
if (gn == null || dim == null) {
image = null;
repaint();
} else {
setGraphicsNode(gn, false);
... | 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 |
XMLSignature.ALGO_ID_SIGNATURE_ECDSA_RIPEMD160, SignatureECDSA.SignatureECDSARIPEMD160.class
);
algorithmHash.put( | 0 |
LOG.info("Dropping host attributes with no agent ID: " + attributes); | 0 |
import java.util.HashMap;
import java.util.Map;
* FELIX-3757: if an AD has only its 'required' property set, but no
* min/max or option values defined, the validation still should detect
* empty values.
/**
* FELIX-3884 : if an AD has options, default values must be in the option
* values... | 0 |
Set<String> upgradePacks, boolean valid, Collection<String> errorSet, String minJdk, String maxJdk) {
addErrors(errorSet);
public void addError(String error) {
public Collection<String> getErrors() {
public void addErrors(Collection<String> errors) {
this.errorSet.addAll(erro... | 0 |
final Timestamp tsValue = (Timestamp) value;
final int nanos = tsValue.getNanos(); | 0 |
import org.apache.beam.runners.samza.SamzaPipelineOptions;
final SamzaPipelineOptions options = ctx.getPipelineOptions();
if (options.getStateDurable()) {
config.put(
"stores." + storeId + ".changelog",
ConfigBuilder.getChangelogTopic(options, storeId));
} | 0 |
import java.nio.charset.Charset;
import java.nio.charset.UnsupportedCharsetException;
* @param contentType content type to be used. May be {@code null}, in which case
* {@link ContentType#TEXT_PLAIN} is assumed.
public NStringEntity(final String s, final ContentType contentType) {
Charset charset... | 0 |
users.createUser("admin", "admin", true, true, false);
users.createUser("user", "user", true, false, false); | 0 |
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotSame;... | 0 |
import org.apache.accumulo.core.client.security.tokens.PasswordToken; | 0 |
return new TestSuite(Jira369TestCase.class); | 0 |
* work together to implement a service.
* <p>
* Note that currently, there is no default for the factory, so please use
* <code>setFactory(factory, createMethod)</code> instead. | 0 |
prerequisiteCheck.setFailReason("YARN doesn't have work preserving restart. Verify that yarn.resourcemanager.work-preserving-recovery.enabled property"
+ " is present in yarn-site.xml and is set to true"); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/validate/src/java/org/apache/commons/jelly/tags/validate/ValidateTag.java,v 1.3 2003/10/09 21:21:26 rdonkin Exp $
* $Revision: 1.3 $
* $Date: 2003/10/09 21:21:26 $
* any, must include the following acknowledge... | 0 |
import org.apache.batik.gvt.filter.GraphicsNodeRable8Bit;
import org.apache.batik.ext.awt.image.renderable.Filter;
public BackgroundRable8Bit(GraphicsNode node){
GraphicsNode child) {
r2d = getViewportBounds(gn.getParent(), gn);
return addBounds(cgn, ... | 0 |
import com.google.cloud.dataflow.sdk.util.state.MergingStateContext;
import com.google.cloud.dataflow.sdk.util.state.StateContext;
final StateTag<Object, BagState<T>> bufferTag =
public void prefetchOnMerge(MergingStateContext<K, W> state) throws Exception {
final StateTag<Object, CombiningValueSt... | 0 |
import org.apache.beam.sdk.extensions.euphoria.core.client.operator.base.Operator; | 0 |
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import org.apache.bcel.classfile.Attribute;
import org.apache.bcel.classfile.ClassParser;
import org.apache.bcel.classfile.ConstantPool;
import org.apache.bcel.classfile.JavaClass;
import org.apache.bcel.class... | 0 |
@Override | 0 |
.append(task.getJob().getRole())
.append(instanceId)
.append(UUID.randomUUID()) | 0 |
transform = SVGUtilities.toObjectBBox(transform, paintedNode); | 0 |
/** Object on which the command should be applied. */
private T object;
* Returns the object associated with this command.
*
* @return the object on which the command is applied
*/
protected T getObject() {
return object;
}
/** | 0 |
public static <K, V> PredicatedMap<K, V> predicatedMap(Map<K, V> map,
Predicate<? super K> keyPredicate,
Predicate<? super V> valuePredicate) { | 0 |
mockCache.flushCacheEntriesInvalidatedByExchange( | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Splitter; | 0 |
import org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder;
public static class VarLenEncoder extends AbstractLexicoder<Long> implements Encoder<Long> {
protected Long decodeUnchecked(byte[] b, int offset, int len) {
DataInputStream dis = new DataInputStream(new ByteArrayInputStream(b, offset, ... | 0 |
private Map<String, Long> hostResponseIds = new ConcurrentHashMap<>();
private Map<String, HeartBeatResponse> hostResponses = new ConcurrentHashMap<>();
Map<String, Map<String, String>> result = new HashMap<>();
Map<String, String> components = new HashMap<>();
List<AlertDefinitionCommand> commands = ... | 1 |
import org.apache.ambari.server.state.stack.upgrade.UpgradeType;
@UpgradeCheck(
group = UpgradeCheckGroup.DEFAULT,
order = 20.0f,
required = { UpgradeType.ROLLING, UpgradeType.NON_ROLLING }) | 0 |
log.warn("Failed to load table balancer class " + clazzName + " for table " + table, e);
log.info("Loaded class " + clazzName + " for table " + table);
log.warn("Failed to load table balancer class " + clazzName + " for table " + table, e);
tops = configuration.getInstance().getConnect... | 0 |
* Copyright 2002-2005 The Apache Software Foundation. | 0 |
* @version $Id$ | 0 |
public Object clone() throws CloneNotSupportedException {
/**
* fill the given array a with values from my internal <code>rects</code>.
* when a is not large enough, a new array is allocated, filled and returned.
* the method works only, when a is a Object[] or a Rectange[].
* When this is n... | 0 |
* the relevant tableInfo for the security violation
* the relevant tableInfo for the security violation
@Override
if (!StringUtils.isEmpty(tableInfo)) { | 0 |
import org.apache.accumulo.core.client.sample.RowSampler;
import org.apache.accumulo.core.client.sample.SamplerConfiguration; | 0 |
log.debug("completing bulk import transaction " + tid);
ZooArbitrator.cleanup(Constants.BULK_ARBITRATOR_TYPE, tid); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestCharCollectionCollection.java,v 1.4 2003/11/16 22:15:08 scolebourne Exp $
import org.apache.commons.collections.primitives.RandomAccessCharList;
* @v... | 0 |
try {
requestStages.persist();
} catch (AmbariException e) {
throw new SystemException(e.getMessage(), e);
}
try {
requestStages.persist();
} catch (AmbariException e) {
throw new SystemException(e.getMessage(), e);
} | 1 |
import org.apache.felix.dependencymanager.test2.components.Ensure;
public class AspectAnnotationTest extends TestBase {
public AspectAnnotationTest() {
super(true /* start test components bundle */);
}
| 0 |
public interface HttpMessage extends MessageHeaders { | 0 |
private final String clusterName;
public Stage(long requestId, String logDir, String clusterName) {
this.clusterName = clusterName;
public String getClusterName() {
return clusterName;
} | 0 |
@Override | 0 |
rs = ProxyFactory.instance().createResultSet(rs2); // Override superclass field | 0 |
private final ConnectionPoolDataSource cpds;
private final String validationQuery;
private final int validationQueryTimeout;
private final boolean rollbackAfterValidation;
private ObjectPool<PooledConnectionAndInfo> pool;
private final String userName;
private String password = null;
... | 0 |
Controller,
ClientConfig;
public static final Type ClientConfig = InternalType.ClientConfig.getType(); | 0 |
@Internal
public interface TransformTranslator<TransformT extends PTransform> { | 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 |
import org.apache.hc.client5.http.config.Configurable; | 0 |
import java.util.List;
List<EntityDetail> processRetrievedEntities(String sourceName,
String metadataCollectionId,
List<EntityDetail> entities);
List<Relationship> process... | 0 |
import cz.seznam.euphoria.core.client.io.BoundedDataSource;
private final BoundedDataSource<T> source;
public PartitionWrapper(int splitNumber, BoundedDataSource<T> source) {
super(splitNumber, source.getLocations().toArray(
new String[source.getLocations().size()]));
this.source = source;
pub... | 0 |
*
* @deprecated since 2.0.0
@Deprecated | 0 |
createAggregator("matchedWords", Sum.ofLongs());
createAggregator("umatchedWords", Sum.ofLongs()); | 0 |
public class Query6Model extends NexmarkQueryModel<SellerPrice> implements Serializable {
public AbstractSimulator<?, SellerPrice> simulator() {
protected Iterable<TimestampedValue<SellerPrice>> relevantResults(
Iterable<TimestampedValue<SellerPrice>> results) {
Map<Long, TimestampedValue<SellerPrice>> fi... | 0 |
package org.apache.xml.security.stax.impl.algorithms; | 0 |
* Map job to ingest n-gram files from
* http://storage.googleapis.com/books/ngrams/books/datasetsv2.html
protected void map(LongWritable location, Text value, Context context)
throws IOException, InterruptedException {
m.put(parts[1], String.format("%010d", Long.parseLong(parts[2])),
n... | 0 |
protected OpenFuture internalOpen() throws IOException {
protected void doOpen() throws IOException {
public OpenFuture open() throws IOException { | 0 |
import java.util.List;
import org.junit.Assume;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class) // see https://github.com/junit-team/junit/wiki/Parameterized... | 0 |
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import javax.inject.Inject;
@Component
@Order(3)
@Inject | 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 |
import org.apache.commons.cli2.Argument;
import org.apache.commons.cli2.option.SourceDestArgument;
public void testLoopingOptionLookAlike2() {
final ArgumentBuilder abuilder = new ArgumentBuilder();
final GroupBuilder gbuilder = new GroupBuilder();
final Argument inputfile_opt = abuilde... | 0 |
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.HBaseTimelineMetricStore;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.availability.MetricCollectorHAController;
@PrepareForTest({ PhoenixHBaseAccessor.class, HBaseTimelineMetricStore.class, UserGroupInfor... | 0 |
public void testScriptContext() throws Exception {
JexlEngine jexl = new Engine();
JexlScript s = jexl.createScript("function(x) { x + x }");
JexlScript fs = (JexlScript) s.execute(null);
String fsstr = fs.getExpression();
assertEquals("function(x) { x + x; };", fsstr);
... | 0 |
import org.apache.commons.net.util.TrustManagerUtils;
"\t-T all|valid - use one of the built-in TrustManager implementations\n" +
String trustmgr = null;
else if (args[base].equals("-T")) {
trustmgr = args[++base];
}
FTPSClient ftps;
... | 0 |
/*
* Copyright 2003-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 applica... | 0 |
import java.util.List;
private static final int SESSION_TIMEOUT = 10000;
List<String> liveInstances = null;
client.start();
liveInstances = RetryLoop.callWithRetry(client, new Callable<List<String>>() {
public List<String> call() throws Exception {
return zookeeper.getChildren(ZK_PAT... | 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 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/Validator.java,v 1.29 2003/08/22 02:30:59 rleland Exp $
* $Revision: 1.29 $
* $Date: 2003/08/22 02:30:59 $
* @version $Revision: 1.29 $ $Date: 2003/08/22 02:30:59 $
* @depreca... | 0 |
private static final long serialVersionUID = 0;
private static final long serialVersionUID = 0;
| 0 |
pipeline.getCoderRegistry().registerCoderForClass(URI.class, StringDelegateCoder.of(URI.class)); | 0 |
return importNode(importedNode, deep, false);
}
/**
* Imports the given node 'importNode' to this document.
* It does so deeply if 'deep' is set to true.
* It will not mark id attributes as id's if 'trimId' is set false.
* this is used primarily for the clone trees of the 'use' eleme... | 0 |
windowsCoder.encode(windowedElem.getWindows(), outStream);
PaneInfoCoder.INSTANCE.encode(windowedElem.getPane(), outStream);
Instant timestamp = InstantCoder.of().decode(inStream);
windowsCoder.decode(inStream);
PaneInfo pane = PaneInfoCoder.INSTANCE.decode(inStream); | 0 |
ClientConfiguration clientConf = ClientConfiguration.create().withInstance(args[3]).withZkHosts(args[4]);
if (clientConf.hasSasl()) { | 0 |
import org.apache.http.StatusLine;
import org.apache.http.util.Args;
this.statusline = Args.notNull(statusline, "Status line");
this.locale = (locale != null) ? locale : Locale.getDefault();
this.statusline = Args.notNull(statusline, "Status line");
Args.check(reason == null || (reason.i... | 0 |
return this.cacheEntry.getResource().length(); | 0 |
import static org.junit.Assert.assertEquals;
import org.junit.Assert;
import org.junit.Test; | 0 |
import com.google.common.base.Objects;
@Override
public boolean equals(Object o) {
if (!(o instanceof SanitizedCronJob)) {
return false;
}
SanitizedCronJob other = (SanitizedCronJob) o;
return Objects.equal(config, other.config) && Objects.equal(crontabEntry, other.crontabEntry);
}
@Ov... | 0 |
public abstract class AtomicCoder<T> extends StandardCoder<T> {
public void verifyDeterministic() throws NonDeterministicException { }
@Override | 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 |
import org.apache.beam.sdk.extensions.euphoria.core.client.operator.Join.BuilderParams;
* from streams into {@link Window}s. The join operation is performed within same windows produced
* on left and right side of input {@link Dataset}s.
final BuilderParams<LeftT, RightT, ?, ?, ?> params =
new Builder... | 0 |
* @version CVS $Id: JXTemplateGenerator.java,v 1.23 2003/12/12 05:39:37 antonio Exp $ | 0 |
private static final long ZOOKEEPER_STARTUP_WAIT = 20 * 1000;
for (URL u : ((URLClassLoader) classLoader).getURLs()) {
argList.addAll(Arrays.asList("-XX:+UseConcMarkSweepGC", "-XX:CMSInitiatingOccupancyFraction=75", "-Dapple.awt.UIElement=true", Main.class.getName(),
className));
t... | 0 |
/**
* Returns the object which might provide resources. The class of this
* object is used to find the <code>getResource</code> method.
* <p>
* This method may be overwritten by extensions. This base class
* implementation returns this instance.
*
* @return The resource provider ... | 0 |
private final String clusterHostInfo;
public String getClusterHostInfo() {
return clusterHostInfo;
}
@Assisted("requestContext") @Nullable String requestContext, @Assisted("clusterHostInfo") String clusterHostInfo) {
this.clusterHostInfo = clusterHostInfo;
clusterHostInfo = stageEntity... | 0 |
if (response.getStatus() != 200 && response.getStatus() != 204) {
String tab = " ";
while (bpInfo.getParentName() != null) {
System.out.println(tab+":-> Name:["+bpInfo.getParentName()+"], Revision:["+bpInfo.getParentRevision()+"]");
tab = tab+"... | 0 |
boolean mutationsRejected = false;
try {
bw1.addMutation(m2);
bw2.addMutation(m2);
} catch (MutationsRejectedException e) {
// Pass - Mutations might flush immediately
mutationsRejected = true;
}
// Mutations might have flushed before the table offlin... | 0 |
addIdentity(Objects.requireNonNull(file, "No file").toPath());
addIdentity(Objects.requireNonNull(path, "No path").toAbsolutePath().normalize().toString());
writeHostConfigEntries(Objects.requireNonNull(file, "No file").toPath(), entries, IoUtils.EMPTY_OPEN_OPTIONS);
... | 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 |
* @version $Id$ | 0 |
if (startRow == null && endRow == null && size < 0 && !force) { | 0 |
import org.easymock.EasyMock;
Capture<ResultStatus> resultStatusCapture = EasyMock.newCapture(); | 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 ap... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.