Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.beam.sdk.coders.CustomCoder;
/** A {@link Coder} for {@link TimestampedValue}. */
public static class TimestampedValueCoder<T> extends CustomCoder<TimestampedValue<T>> { | 0 |
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
protected final String name;
protected final String id;
Constructor c;
try {
c = this.getClass().getConstructor(new Class[] {String.class, String.class});
final Layout clone... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/observed/Attic/TestObservableSet.java,v 1.2 2003/10/02 22:48:40 scolebourne Exp $
import org.apache.commons.collections.AbstractTestSet;
* @version $Revision: 1.2 $ $Date: 2003/10... | 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 |
* Copyright (c) 2003-2004 The Apache Software Foundation. All rights | 0 |
INSTANCE_CRUD_INVALID_PARAMS(404, "ATLAS4049E", "Invalid instance creation/updation parameters passed : {0}"),
INDEX_ROLLBACK_FAILED(500, "ATLAS5003E", "Index rollback failed for {0}"),
INSTANCE_BY_UNIQUE_ATTRIBUTE_NOT_FOUND(400, "ATLAS40018E", "Instance {0} with unique attribute {1} does not exist"),
... | 0 |
cluster.recalculateClusterVersionState(repoVersionEnt); | 0 |
void prepare() throws StorageException; | 0 |
import com.twitter.common.quantity.Amount;
import com.twitter.common.quantity.Time;
new TaskGroupsSettings(
Amount.of(1L, Time.MILLISECONDS),
bindMock(BackoffStrategy.class),
RateLimiter.create(1000))); | 1 |
public void testSplit() throws Exception {
initialSource.split(desiredBundleSizeBytes, options); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/buffer/Attic/BinaryBuffer.java,v 1.3 2004/01/02 01:36:51 psteitz Exp $
* @version $Revision: 1.3 $ $Date: 2004/01/02 01:36:51 $
* @param index the index of the element to be ... | 0 |
* The map of property maps keyed by property category.
private final Map<String, Map<String, Object>> propertiesMap = new HashMap<String, Map<String, Object>>();
return propertiesMap;
Map<String, Object> properties = propertiesMap.get(category);
if (properties == null) {
properties = new HashMap... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/RulesBase.java,v 1.7 2002/01/09 20:22:49 sanders Exp $
* $Revision: 1.7 $
* $Date: 2002/01/09 20:22:49 $
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* @vers... | 0 |
return m_name.equals(capability.getName()) && m_filter.matchCase(capability.getProperties())
&& (m_filter.toString().indexOf("(mandatory:<*") >= 0 || capability.getProperties().get("mandatory:") == null); | 0 |
import org.apache.accumulo.core.client.impl.Namespace;
final NamespaceConfiguration defaultConf = new NamespaceConfiguration(Namespace.ID.DEFAULT, inst, DefaultConfiguration.getInstance()); | 0 |
import com.twitter.common_internal.zookeeper.ZooKeeperModule;
install(new ZooKeeperModule(
ZooKeeperClient.digestCredentials("mesos", "mesos"),
ZooKeeperUtils.EVERYONE_READ_CREATOR_ALL)); | 0 |
import org.apache.accumulo.server.ServerContext;
protected ServerContext context;
public NamespaceConfiguration(Namespace.ID namespaceId, ServerContext context,
this.context = context;
this.path = context.getZooKeeperRoot() + Constants.ZNAMESPACES + "/" + namespaceId
PropCacheKey key = new PropCache... | 0 |
public static <T> Collector<T, ?, SortedSet<T>> toSortedSet(Comparator<T> comparator) {
} else if (values instanceof Collection<?>) { | 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... | 0 |
return status.getBegin() == Long.MAX_VALUE;
return status.getBegin() != Long.MAX_VALUE; | 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 |
* @version $Id$ | 0 |
/*
* Find a principal type entity with the given name.
*
* @param name principal type name
*
* @return a matching principal type entity or null
*/
@RequiresSession
public PrincipalTypeEntity findByName(String name) {
TypedQuery<PrincipalTypeEntity> query = entityManagerProvider.get().createN... | 0 |
* Copyright 2002-2006 The Apache Software Foundation.
*
*
*
* Simple identifier - $foo or $foo.bar (both parts are identifiers).
*
* @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
* @version $Id$
public class ASTIdentifier extends SimpleNode {
public ASTIdentifier(int id) {
public AST... | 0 |
import java.util.Arrays;
import java.util.List; | 0 |
public static final String SKIP_COUNTER_TRANSFROMATION = "skipCounterDerivative";
HttpURLConnection connection = (HttpURLConnection) new URL(connectUrl).openConnection(); | 0 |
import org.apache.sshd.util.test.NoIoTestCase;
import org.junit.experimental.categories.Category;
@Category({ NoIoTestCase.class }) | 0 |
import static org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef.DEFAULT_SEARCHWEIGHT;
private int searchWeight = DEFAULT_SEARCHWEIGHT;
this(name, dataTypeName, multiplicity, false, false, true, null, null, DEFAULT_SEARCHWEIGHT);
this(name, dataTypeName, multiplicity, isComposite, rever... | 0 |
import org.apache.beam.vendor.grpc.v1_13_1.com.google.protobuf.ByteString; | 0 |
super.init(source, options, env);
| 0 |
processor.process(request, request.getEntity(), context);
processor.process(response, response.getEntity(), context); | 0 |
* <p>
* TODO - Handle nested junctions. | 0 |
package org.w3c.dom.svg;
public interface SVGFESpotLightElement extends
SVGElement {
public SVGAnimatedNumber getX( );
public SVGAnimatedNumber getY( );
public SVGAnimatedNumber getZ( );
public SVGAnimatedNumber getPointsAtX( );
public SVGAnimatedNumber getPointsAtY( );
public SVGAnimatedN... | 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/Attic/ResettableIterator.java,v 1.1 2003/11/14 22:58:27 scolebourne Exp $
* @version $Revision: 1.1 $ $Date: 2003/11/14 22:58:27 $
public interface ResettableIterator ex... | 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 |
"help", "install", "lb", "log", "refresh",
// Register "inspect" command for R4.3 or R4.2 depending
// on the underlying framework.
props.put("osgi.command.function", new String[] { "inspect" });
try
{
getClass().getClassLoader().loadClass("org.osgi.framew... | 0 |
Copyright 2002-2003, 2006 The Apache Software Foundation
final Object lock = new Object();
private volatile boolean wasNotified;
(new ActionEvent(e.getWindow(),
/**
userID = null; | 0 |
* ProxyClient can be used to establish a tunnel via an HTTP/1.1 proxy.
if (this.authenticator.updateAuthState(proxy, ChallengeType.PROXY, response, | 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 |
total++; | 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 net.jcip.annotations.Immutable;
@Immutable | 0 |
// Make sure that the other thread calling getException will see the assignment by the thread
// calling run()
public ActiveAssignmentRunnable(ConcurrentHashMap<KeyExtent,RunnableStartedAt> activeAssignments,
KeyExtent extent, Runnable delegate) {
RunnableStartedAt runnableWithStartTime = new Runnable... | 0 |
import com.google.inject.Singleton;
* Gets the next version that will be created for a given
* {@link ClusterConfigEntity}.
*
* @param clusterId
* the cluster that the service is a part of.
* @param configType
* the name of the configuration type (not {@code null}).
* @return t... | 0 |
} while (!domain.isEmpty()); | 0 |
import org.apache.hadoop.metadata.bridge.AEntityBean;
public class HiveLineage extends AEntityBean implements Serializable { | 0 |
import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.security.crypto.CryptoServiceFactory;
AccumuloConfiguration aconf = SiteConfiguration.getInstance();
bcfr = new BCFile.Reader(fsin, fs.getFileStatus(path).getLen(), conf, aconf,
CryptoServiceFactory.getConfig... | 0 |
@Deprecated
@Override
public void verifyDeterministic() { }
| 0 |
import java.util.Set;
import org.apache.beam.sdk.coders.KvCoder;
import org.apache.beam.sdk.values.PCollectionView;
private final Set<String> sideInputCollections = new HashSet<>();
void registerSideInput(PCollectionView<?> view) {
sideInputCollections.add(view.getTagInternal().getId());
}
boolean si... | 0 |
attribmap.put(param.getName().toLowerCase(Locale.ROOT), param);
final String s = attrib.getName().toLowerCase(Locale.ROOT); | 0 |
package org.apache.beam.sdk.coders;
import static org.apache.beam.sdk.util.Structs.addString;
import static org.apache.beam.sdk.util.Structs.addStringList;
import org.apache.beam.sdk.util.CloudObject;
import org.apache.beam.sdk.util.PropertyNames;
import org.apache.beam.sdk.util.SerializableUtils;
import org.apache.be... | 0 |
help = "The name service name for the mesos scheduler thrift server.")
help = "Map of machine hosts to job keys."
private static final Arg<Map<String, String>> MACHINE_RESTRICTIONS =
help = "Mesos address for the master, can be a mesos address or zookeeper path.")
@CmdLine(name = "executor_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 |
public Shape getPaintedOutline(Shape shape){
return stroke.createStrokedShape(shape);
}
| 0 |
import org.apache.beam.runners.flink.translation.wrappers.ImpulseInputFormat;
TRANSLATORS.put(PTransformTranslation.IMPULSE_TRANSFORM_URN, new ImpulseTranslatorBatch());
private static class ImpulseTranslatorBatch implements
FlinkBatchPipelineTranslator.BatchTransformTranslator<
PTransform<PBegin... | 0 |
* @param opcode Instruction opcode | 0 |
* @author <a href="mailto:vhardy@apache.org">Vincent Hardy</a> | 1 |
@Override
throw new RuntimeException(e);
@Override | 0 |
HashSet<Column> columns = new HashSet<>();
HashSet<Column> columns = new HashSet<>();
HashSet<Column> columns = new HashSet<>(); | 1 |
* Defines the interface of a <code>Test</code> case. It is
* <code>AbstractTest</code> class or follow the same implementation
* <code>run</code> method, which is critical for the operation
* Returns this <code>Test</code>'s name.
* Returns the <code>Test</code>'s qualified id, that is,
* Returns the ... | 0 |
import org.apache.hadoop.fs.Path;
public void unassign(Collection<TabletLocationState> tablets, Map<TServerInstance, List<Path>> logsForDeadServers) throws DistributedStoreException {
List<Path> logs = logsForDeadServers.get(tls.futureOrCurrent());
for (Path entry : logs) {
LogEntry logEntry =... | 0 |
package org.apache.ambari.infra.solr; | 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 |
assertEquals(Long.valueOf(cfg.getMaxLatency(TimeUnit.MILLISECONDS)), bwOpts.batchLatency);
assertEquals(Long.valueOf(cfg.getTimeout(TimeUnit.MILLISECONDS)), bwOpts.batchTimeout);
assertEquals(Long.valueOf(cfg.getMaxMemory()), bwOpts.batchMemory);
assertEquals(Long.valueOf(3000), bwOpts.batchLatency);
... | 0 |
for (String element : CONFIG_SECTIONS) {
if (element.equals(nodeName)) | 0 |
//curBufferPos += transferAmt; | 0 |
* @version $Id: TestXMLConfiguration.java,v 1.12 2004/10/04 18:14:59 ebourg Exp $
public void testSetProperty() throws Exception
{
conf.setProperty("element.string", "hello");
assertEquals("'element.string'", "hello", conf.getString("element.string"));
assertEquals("XML value of elemen... | 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.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.BeforeAll;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
@BeforeAll
@org.junit.jupiter.api.AfterAll
@org.junit.jupiter.api.Test
@org.junit.jupiter.api.Test
... | 0 |
* @version $Revision: 1.8 $ $Date: 2004/06/03 22:02:12 $
/** Serialization version */
private static final long serialVersionUID = 722374056718497858L;
| 0 |
// The following is optional and allows to display our configuration from webconsole
.setHeading("Task Configuration")
.setDescription("Configuration for the Task Service")
.setCardinality(0)
.setType(String.class)
... | 0 |
private final ClientSessionImpl session;
private int currentMethod;
NamedFactory<UserAuth> factory = NamedResource.Utils.findByName(pref, String.CASE_INSENSITIVE_ORDER, authFactories);
*
userAuth = NamedFactory.Utils.create(authFactories, method);
if (userAuth == nu... | 1 |
package com.twitter.mesos;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Marks a method as a JNI callback.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface JNI... | 0 |
BeanDefinitionBuilder defBuilder = BeanDefinitionBuilder.rootBeanDefinition(PipelineComponentInfoFactoryBean.class);
| 0 |
* Gets the alert definitions for the specified stack and service.
*
* @param stackName
* the stack name
* @param stackVersion
* the stack version
* @param serviceName
* the service name
* @return the alert definitions for a stack or an empty list if none (never
*... | 0 |
if (isValidType(type) && isValidDirection(direction))
if (!isValidType(type))
{
out.println("Invalid argument: " + type);
}
if (!isValidDirection(direction))
{
out.println("Invalid argumen... | 0 |
package org.apache.felix.karaf.shell.commands;
import org.apache.felix.karaf.shell.console.OsgiCommandSupport;
// print Karaf informations | 0 |
* $Header: /cvshome/build/org.osgi.util.tracker/src/org/osgi/util/tracker/ServiceTrackerCustomizer.java,v 1.13 2007/02/19 19:04:33 hargrave Exp $
* Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
* <code>ServiceTracker</code> object to customize the service objects that
* are tracked. The <code>Servi... | 0 |
log.debug("Closing connections idle longer than " + idleTimeout + " " + tunit); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyIterator.java,v 1.10 2003/03/25 02:41:34 dmitri Exp $
* $Revision: 1.10 $
* $Date: 2003/03/25 02:41:34 $
* @version $Revision: 1.10 $ $Date: 2003/03/25 02:41:34 $
... | 0 |
/*
String guid = repositoryService.createEntity(entityStream, ENTITY_TYPE);
*/ | 0 |
public void sendOneMessageWithoutAttributes() throws IOException {
List<OutgoingMessage> outgoing =
ImmutableList.of(
new OutgoingMessage(
DATA.getBytes(), null /* attributes */, TIMESTAMP, getRecordId(DATA)));
try (PubsubTestClientFactory factory =
PubsubTestClient... | 0 |
* Cookies are considered identical if their names are equal and
* their domain attributes match ignoring case.
* </p>
@Contract(threading = ThreadingBehavior.STATELESS) | 0 |
/*
* $HeadURL$
* $Revision$
* $Date$
*
* ====================================================================
* 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... | 0 |
* @version CVS $Id: TraversableGenerator.java,v 1.1 2003/10/23 07:55:49 gcasper Exp $ | 0 |
for (File childFile : childFiles) {
private final File file;
private final int depth; | 0 |
@Parameter(names = {"-h", "-?", "--help", "-help"}, help = true)
public void parseArgs(String programName, String[] args, Object... others) {
| 0 |
if (!isZKServerRunning()) {
if (!isZKServerRunning()) {
/**
* @return true if the server is running, false otherwise.
*/
return zkServer != null && zkServer.isRunning(); | 0 |
public CalendarConverter(final Object defaultValue) { | 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.batik.css.HiddenChildElementSupport;
for (Element t = e;
t != null;
t = HiddenChildElementSupport.getParentElement(t)) {
if (t instanceof SVGTransformable) {
String s = t.getAttributeNS(null, "transform");
} else if (t instanceo... | 0 |
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* permission of the Apache Software Foundation.
* @version $Revision: 1.4 $ $Date: 2003/10/09 21:31:42 $ | 0 |
@Test(timeout = 4 * 60 * 1000) | 0 |
import org.apache.beam.sdk.transforms.OldDoFn;
* A OldDoFn that creates entity for a long number.
static class CreateEntityFn extends OldDoFn<Long, Entity> { | 0 |
import com.google.cloud.dataflow.sdk.testing.RunnableOnService;
@Category(RunnableOnService.class)
@Category(RunnableOnService.class) | 0 |
Map<String, Map<String, Collection<DependencyInfo>>> missingDependencies = new HashMap<>();
Collection<String> cardinalityFailures = new HashSet<>();
new HashMap<>();
Collection<String> processedServices = new HashSet<>();
Map<String, Collection<String>> allRequiredProperties = new HashMap<>()... | 0 |
* @version CVS $Id: BlobSourceFactory.java,v 1.2 2003/03/16 18:03:54 vgritsenko Exp $ | 0 |
Canonicalizer.ALGO_ID_C14N_PHYSICAL).canonicalizeSubtree(contextNode) | 0 |
*
*
*
* @version $Revision: 1.7 $
registerTag("assertThrows", AssertThrowsTag.class);
if (attributeName.equals("xpath")) {
return new XPathExpression(attributeValue, xpathExpr, tagScript);
| 0 |
return getPublicKeyType().getSimpleName() + ": " + getSupportedKeyTypes(); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.