Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
package org.apache.aurora.scheduler.thrift.aop; import com.twitter.common.stats.Stats; import com.twitter.common.testing.easymock.EasyMockTest; import org.apache.aurora.gen.AuroraAdmin; import org.apache.aurora.gen.GetJobsResult; import org.apache.aurora.gen.JobConfiguration; import org.apache.aurora.gen.Response; imp...
0
ImmutableMap.of( ImmutableMap.of("isolation.level", "read_committed")); ImmutableMap.of( .setTopics(Collections.emptyList()) ImmutableMap.of( ImmutableMap.of( .apply("Persist sharding", GroupByKey.create()) .apply("Persist ids", GroupBy...
0
managedConn.markReusable(); //@@@ evaluate connection re-use strategy, //@@@ close and/or mark as non-reusable if necessary mcc.markReusable(); //@@@ is the connection in a re-usable state? consume response? // Do not delegate this to the c...
0
if (log.isTraceEnabled()) { log.trace("Combined: " + key.toStringNoTruncate() + " " + status.toString().replace("\n", ", ")); } if (log.isTraceEnabled()) { log.trace("Combined: " + key.toStringNoTruncate() + " " + combined.toString().replace("\n", ", ")); } if (log.isT...
0
private Set<Long> hostIds = new HashSet<>(); private Set<String> hostNames = new HashSet<>(); private Set<String> publicHostNames = new HashSet<>(); private TreeMap<String, String> componentLevelParams = new TreeMap<>(); private TreeMap<String, String> commandParams = new TreeMap<>();
0
package org.apache.hc.core5.http.io.entity;
1
import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; import org.apache.aurora.scheduler.storage.entities.IAssignedTask; private ClusterState clusterState; clusterState = createMock(ClusterState.class); clusterState, private static final Function<ScheduledTask, String> G...
0
, 1, 1.0, 0, BigDecimal.ONE); , 10, 10.0, 0, BigDecimal.TEN);
0
import cz.seznam.euphoria.shaded.guava.com.google.common.collect.Sets;
0
import org.apache.beam.sdk.io.fs.ResourceId; import org.apache.beam.sdk.options.ValueProvider; import org.apache.beam.sdk.options.ValueProvider.StaticValueProvider; abstract ValueProvider<ResourceId> getFilenamePrefix(); abstract Builder<T> setFilenamePrefix(ValueProvider<ResourceId> prefix); public Write...
0
import org.junit.Assert; import org.junit.Test;
0
Copyright 2001,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 l...
0
private final AtomicLong smallCounter = new AtomicLong(); private final AtomicLong smallDedicatedCounter = new AtomicLong(); private final AtomicLong smallRevocableCounter = new AtomicLong(); private final AtomicLong smallDedicatedRevocableCounter = new AtomicLong(); private final AtomicLong largeCounter = ne...
0
* @throws SQLException if a database access error occurs
0
@Override @Override @Override @Override
0
import javax.xml.crypto.MarshalException; import javax.xml.crypto.XMLCryptoContext; import javax.xml.crypto.XMLStructure; import javax.xml.crypto.dsig.Transform; import javax.xml.crypto.dsig.spec.TransformParameterSpec; import javax.xml.crypto.dsig.spec.XPathFilter2ParameterSpec; import javax.xml.crypto.dsig.spec.XPat...
0
return this.attribs.containsKey(name); } /** * @since 4.4 */ public boolean removeAttribute(final String name) { return this.attribs.remove(name) != null;
0
protected Map<String, Object> commands = new LinkedHashMap<String, Object>(); }
0
import com.twitter.common.application.ShutdownRegistry; import com.twitter.common.base.ExceptionalCommand; import static com.twitter.mesos.gen.ScheduleStatus.LOST; private volatile boolean shuttingDown = false; private final ShutdownRegistry shutdownRegistry; Lifecycle lifecycle, ShutdownRegistry shutdownReg...
0
public static final Function<ITaskConfig, Integer> INFO_TO_INSTANCE_ID_DEPRECATED = public static final Function<IAssignedTask, Integer> ASSIGNED_TO_INSTANCE_ID = new Function<IAssignedTask, Integer>() { @Override public Integer apply(IAssignedTask task) { return task.getInstanceId(); ...
0
// This method is only overridden to fix a mysterious MethodNotFound // error in the test cases when run under a JDK 1.3.
0
return result ? value : null;
0
if (c == EOF)
0
/* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java,v 1.15 2003/08/11 15:02:07 dirkv Exp $ * $Revision: 1.15 $ * $Date: 2003/08/11 15:02:07 $ * @version $Revision: 1.15 $ $Date: 2003/08/11 15:02:07 $ if (oldpoo...
0
* Extension of {@link LazyMapTest} for exercising the public class LazySortedMapTest<K, V> extends AbstractSortedMapTest<K, V> { public LazySortedMapTest(String testName) {
0
final ByteBuffer key = FlinkKeyUtils.encodeKey(((KV) input).getKey(), keyCoder, Coder.Context.NESTED);
0
import org.apache.accumulo.server.fs.PerTableVolumeChooser; origPropValue = conn.instanceOperations().getSystemConfiguration().get(PerTableVolumeChooser.TABLE_VOLUME_CHOOSER); conn.instanceOperations().setProperty(PerTableVolumeChooser.TABLE_VOLUME_CHOOSER, FairVolumeChooser.class.getName()); conn.instanc...
0
import org.apache.cocoon.xml.AttributesImpl; formAttrs.addCDATAAttribute("id", definition.getId());
0
* * @return list of files or null if the base file (this object) do not exist if (!exists()) { return null; }
0
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
0
public void testCreateHomogeneousJobNoShards() throws Exception { JobConfiguration job = makeJob(); job.unsetTaskConfigs(); job.setTaskConfig(nonProductionTask()); expectAuth(ROLE, true); control.replay(); CreateJobResponse response = thrift.createJob(job, SESSION); assertEquals(Response...
0
return ListCoder.of(inferCoderFromObjects(coderRegistry, schemaRegistry, (Iterable) o)); return SetCoder.of(inferCoderFromObjects(coderRegistry, schemaRegistry, (Iterable) o)); return CollectionCoder.of(inferCoderFromObjects(coderRegistry, schemaRegistry, (Iterable) o)); return IterableCoder.of(...
0
/** * Determine whether or not access to the cluster resource identified * by the given cluster name should be allowed based on the permissions * granted to the current user. * * @param clusterName the cluster name * @param readOnly indicate whether or not this check is for a read only operatio...
0
// If the provider is not the exporter of the requester's package, // then try to use the service registration to see if the requester's // class is accessible. if (!((BundleImpl) m_bundle).getInfo().hasModule(requesterWire.getExporter())) try ...
0
import org.apache.commons.collections.iterators.EmptyIterator; import org.apache.cocoon.util.AbstractLogEnabled; public abstract class AbstractInputModule extends AbstractLogEnabled implements InputModule, Configurable, Disposable {
0
public PCollection<Row> buildIOReader(PBegin begin) { return begin public POutput buildIOWriter(PCollection<Row> input) { return input.apply(new BeamTextCSVTableIOWriter(schema, filePattern, csvFormat));
0
RangeInputSplit split = new RangeInputSplit("table", "1", new Range(new Key("a"), new Key("b")), new String[] {"localhost"}); RangeInputSplit split = new RangeInputSplit("table", "1", new Range(new Key("a"), new Key("b")), new String[] {"localhost"}); Assert.assertEquals(DeprecationUtil.isMo...
0
final Map<String, String> in = new HashMap<>(); final Map<String, Double> in = new HashMap<>(); final Map<String, String> inStr = new HashMap<>(); final Map<String, Float> in = new HashMap<>(); final Map<String, String> inStr = new HashMap<>(); final Map<String, Long> in ...
0
import com.amazonaws.services.s3.model.SSEAwsKeyManagementParams; import com.amazonaws.services.s3.model.SSECustomerKey; /** Tests {@link AwsModule}. */ assertEquals( credentialsProvider.getCredentials().getAWSAccessKeyId(), assertEquals( credentialsProvider.getCredentials().getAWSSecretKey(), ...
0
/** * sum(qs) */ public static IQuota sum(Iterable<IQuota> qs) { IQuota sum = noQuota(); for (IQuota q : qs) { sum = Quotas.add(sum, q); } return sum; }
0
List<String> expectedHosts = Arrays.asList("rack1node1", "rack2node1", "rack4node1", "rack4node4");
0
private volatile Timeout socketTimeout; this(targetEndpoint, session, sslMode, sslContext, SSLBufferMode.STATIC, initializer, verifier, callback, null); * @param connectTimeout timeout to apply for the TLS/SSL handshake. May be {@code null}. final Callback<SSLIOSession> callback, ...
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 class ViewNodeBuilder extends NamedContainerNodeBuilder {
0
InetSocketAddress address = null; address = new ServerServices(new String(zk.getData(path + "/" + locks.get(0), null, null))).getAddress(Service.GC_CLIENT); log.warn("Unable to contact the garbage collector at " + address, ex);
0
import java.util.Map; Map<String, Integer> serviceComponentStateCount; Map<String, Integer> serviceComponentStateCount, this.serviceComponentStateCount = serviceComponentStateCount; * Get the count of service component for each state * @return number of service component f...
0
* @version $Id$
0
* Add stages to the request. * * @param requestStages Stages currently associated with request * @param cluster cluster being acted on * @param requestProperties the request properties * @param requestParameters the request parameters; may be null * @param changedServices ...
0
public static final String LDAP_GROUP_BASE_KEY = "authorization.ldap.groupBase"; public static final String LDAP_GROUP_OBJECT_CLASS_KEY = "authorization.ldap.groupObjectClass"; public static final String LDAP_GROUP_NAMING_ATTR_KEY = "authorization.ldap.groupNamingAttr"; public static final Str...
0
import static org.junit.Assert.assertEquals; assertEquals(count, countRead); assertEquals(bytesRetrieved, rateLimiter.getPermitsAcquired());
0
import org.apache.beam.sdk.transforms.windowing.Window.OnTimeBehavior; public static OnTimeBehavior fromProto(RunnerApi.OnTimeBehavior proto) { switch (proto) { case FIRE_ALWAYS: return OnTimeBehavior.FIRE_ALWAYS; case FIRE_IF_NONEMPTY: return OnTimeBehavior.FIRE_IF_NON_EMPTY; c...
0
public static String getRequestId() { return Thread.currentThread().getName(); }
0
package org.apache.ambari.logsearch.config.json.model.inputconfig.impl;
0
SignatureAlgorithm signatureAlgorithm, String signatureId, XMLSecStartElement xmlSecStartElement, this.signedInfoProcessor = new SignedInfoProcessor(signatureAlgorithm, signatureId, xmlSecStartElement); signatureValueSecurityEvent.setCorrelationID(this.signedInfoProcessor.getSignatureId());
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 StepContext createStepContext( StepContext context =
0
this(tabletServer, new Text(info.dir), extent, trm, CachedConfiguration.getInstance(), info.datafiles, info.time, info.initFlushID, info.initCompactID, info.lastLocation);
0
/* * Copyright 2000-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 applic...
0
* Returns a new {@code Create.Values} transform that produces an empty {@link PCollection} of * rows. */ public static Values<Row> empty(Schema schema) { return new Values<Row>( new ArrayList<>(), Optional.of( SchemaCoder.of( schema, SerializableFunctions.ident...
0
/* private ResourceHelper resources = ResourceHelper.getResourceHelper(); resources.getMessage("Argument.minimum.exceeds.maximum"), resources.getMessage("Argument.too.few.defaults"), resources.getMessage("Argument.too.many.defaults"),
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/PropertyUtils.java,v 1.30 2002/07/21 00:20:44 craigmcc Exp $ * $Revision: 1.30 $ * $Date: 2002/07/21 00:20:44 $ import java.util.Iterator; * @version $Revision: 1.30 $ $Date: 2002/0...
0
new MalformedChunkCodingException(); new MalformedChunkCodingException(""); fail("MalformedChunkCodingException should have been thrown"); } catch(MalformedChunkCodingException e) { fail("MalformedChunkCodingException should have been thrown"); } catch(MalformedCh...
0
import org.apache.sshd.common.config.keys.FilePasswordProviderHolder; ClientIdentityLoaderHolder.loaderHolderOf(Objects.requireNonNull(loader, "No client identity loader")), FilePasswordProviderHolder.providerHolderOf(Objects.requireNonNull(provider, "No password provider")), Clien...
0
if (msg == null || msg.getVersion() == null) { // older style messages not wrapped with AtlasNotificationMessage
0
* @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
0
public final long batchTimeOut; Map<String,Map<String,String>> ssio, Authorizations authorizations, long batchTimeOut) { this.batchTimeOut = batchTimeOut;
0
// modify metadata
1
return matchResult.metadata();
0
import java.io.DataOutputStream; public final void dump(DataOutputStream dos) throws IOException { super.dump(dos); default_value.dump(dos); }
0
String attr = this.getInitParameter("attr"); response.getWriter().println("Test! " + attr);
0
Justif justif = new Justif(80,30,32,70); public void help(Formatter f, @SuppressWarnings("unused") Object target, String cmd, Class< ? extends Options> specification) { f.format("%nNAME%n %s \t0- \t1%s%n%n", cmd, description); if (options.isEmpty()) f.format("SYNOPSIS%n %s ", cmd); else f.format("...
0
if (ecw.getExecutionCommand().getRole().contains("SERVICE_CHECK")) { assertEquals(actionRequest.getActionName(), hostRoleCommand.getExecutionCommandWrapper().getExecutionCommand().getRole());
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/decorators/Attic/TestObservedSet.java,v 1.4 2003/09/03 00:11:28 scolebourne Exp $ * @version $Revision: 1.4 $ $Date: 2003/09/03 00:11:28 $ public class TestObservedSet extends Tes...
0
{ controller.removedService(reference); }
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
Activator.log( LogService.LOG_DEBUG, null, "Configuring holder {0} with factory configuration {1}", new Object[] {holder, config}, null ); Activator.log( LogService.LOG_DEBUG, null, "Configuring holder {0...
0
Tables.clearCache(master.getContext()); return MetadataScanner.builder().from(master.getContext()).scanMetadataTable() bulkInfo.tableState = Tables.getTableState(master.getContext(), bulkInfo.tableId);
0
ServerMetrics.PREP_PROCESSOR_QUEUE_SIZE.add(submittedRequests.size()); long prepStartTime = Time.currentElapsedTime(); ServerMetrics.PREP_PROCESS_TIME.add(Time.currentElapsedTime() - prepStartTime); protected void addChangeRecord(ChangeRecord c) { ServerMe...
0
import static org.apache.accumulo.core.data.Mutation.SERIALIZED_FORMAT.VERSION2; @Override protected ColumnUpdate newColumnUpdate(byte[] cf, byte[] cq, byte[] cv, boolean hasts, long ts, boolean deleted, byte[] val) { return new ServerColumnUpdate(cf, cq, cv, hasts, ts, deleted, val, this);
0
* Tests for {@link WindowIntoTranslation}. public class WindowIntoTranslationTest { WindowIntoTranslation.toProto(assign.get().getTransform(), components); assertEquals(windowFn, WindowIntoTranslation.getWindowFn(payload));
0
public static final String STACK_VERSION_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "stack_version"; Arrays.asList(MPACK_ID, STACK_NAME_PROPERTY_ID, STACK_VERSION_PROPERTY_ID)); * if (registryId == null) { + ", mpackUrl=" + mpackUrl); + ", mpackName=" + mpackName ...
0
public static final String RECOMPUTE_INTERVAL = "spaceaware.volume.chooser.recompute.interval"; String propertyValue = env.getServiceEnv().getConfiguration().getCustom(RECOMPUTE_INTERVAL); FileSystem pathFs = env.getFileSystem(option);
0
private ClassLoader classLoader = null;
0
* @throws IOException if an error occurs. * @throws IOException if an error occurs. * @throws IOException if an error occurs. * @throws IOException if an error occurs. * @throws IOException if an error occurs. * @throws IOException if an error occurs. * @throws IOException if an error...
0
private String dynamicImportPackage; if ( getDynamicImportPackage() != null ) { entries.put( "DynamicImport-Package", getDynamicImportPackage() ); } public String getDynamicImportPackage() { return dynamicImportPackage; } public void setDynamicImportPack...
0
* @version CVS $Id: DefaultSessionManager.java,v 1.3 2003/09/24 21:22:33 cziegeler Exp $ this.importNode(currentProfile, currentDelta, preserve);
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
* 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
/* $Id: PluginInvalidInputException.java,v 1.10 2004/05/10 06:36:38 skitching Exp $ * Copyright 2004 The Apache Software Foundation.
0
import org.apache.zookeeper.cli.CliException; import org.apache.zookeeper.cli.CommandNotFoundException; import org.apache.zookeeper.cli.MalformedCommandException; protected int exitCode = 0; public static void main(String args[]) throws CliException, IOException, InterruptedException void run() throws CliEx...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/Attic/FileUtilTestCase.java,v 1.2 2002/07/09 15:12:23 nicolaken Exp $ * $Revision: 1.2 $ * $Date: 2002/07/09 15:12:23 $
0
public DefaultHttpRoutePlanner(final SchemeRegistry schreg) { public HttpRoute determineRoute(final HttpHost target, final HttpRequest request, final HttpContext context)
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
/** * A filter that ages off key/value pairs based on the Key's timestamp. It removes an entry if its timestamp is less than currentTime - threshold. * * This filter requires a "ttl" option, in milliseconds, to determine the age off threshold. */ /** * Constructs a filter that omits entries read from a source...
0
import cz.seznam.euphoria.shadow.com.google.common.util.concurrent.ThreadFactoryBuilder;
0
import javax.persistence.EntityManager; import org.apache.ambari.server.H2DatabaseCleaner; H2DatabaseCleaner.clearDatabase(m_injector.getProvider(EntityManager.class).get());
0
* Represents a strategy to determine length of the enclosed content entity * * *
0
schedulerCore.setTaskStatus(taskId, status, transitionMessage(context.getIdentity()));
0
private Text tableId; this.tableId = new Text(table); scanState = new ScanState(credentials, tableId, authorizations, new Range(range), options.fetchedColumns, size, options.serverSideIteratorList,
0
import org.apache.ambari.server.orm.dao.MetainfoDAO; UpgradeCatalog151 upgradeCatalog = (UpgradeCatalog151) getUpgradeCatalog(dbAccessor);
0