Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
ArrayList<String> children = new ArrayList<>(zoo.getChildren(path));
1
* * A BatchScanner instance will use no more threads than provided in the construction of the BatchScanner * implementation. Multiple invocations of <code>iterator()</code> will all share the same resources of the instance. * A new BatchScanner instance should be created to use allocate additional threads.
0
import org.apache.hadoop.fs.Trash; private Trash trash; GarbageCollectWriteAheadLogs(Instance instance, FileSystem fs, boolean noTrash) throws IOException { if (!noTrash) this.trash = new Trash(fs, fs.getConf()); Path path = new Path(Constants.getWalDirectory(conf), filename); if ...
0
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
0
package org.apache.felix.gogo.api; import java.util.List; import org.apache.felix.service.command.CommandSession; /** * Get the job running in the current thead or null. */ static Job current() { Process p = Process.current(); Job j = p != null ? p.job() : null; while (j != nu...
0
import java.util.Collection; public InputStream read(String path) throws IOException { return read(path, DEFAULT_READ_BUFFER_SIZE); } @Override public InputStream read(String path, int bufferSize) throws IOException { return read(path, bufferSize, EnumSet.of(OpenMode.Read)); ret...
0
Set<String> failedTypes = new HashSet<>();
0
import com.google.common.base.Objects; @Override public Object structuralValue(BidsPerSession v) { return v; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } BidsPerSessio...
0
import static org.junit.Assert.assertEquals; assertEquals(resString, _octetStreamTextInput);
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...
1
* @version $Id: DefaultDatatypeManager.java,v 1.3 2004/04/21 13:20:27 bruno Exp $ typeBuilderSelector.enableLogging(getLogger()); validationRuleBuilderSelector.enableLogging(getLogger());
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 java.io.FilterOutputStream; * If this is set to <i>true</i>, then the stream passed to {@link CryptoModule#getEncryptingOutputStream(CryptoModuleParameters)} will be <i>written to by * the module</i> before it is returned to the caller. There are situations where it is easier to let the crypto module do th...
0
import org.apache.beam.sdk.extensions.gcp.util.Transport;
0
import org.apache.accumulo.core.util.SimpleThreadPool; final VolumeManager vm = VolumeManagerImpl.get(); SimpleThreadPool pool = new SimpleThreadPool(50, "directory maker"); final String newLocation = vm.choose(ServerConstants.getBaseUris()) + Path.SEPARATOR + ServerConstants.TABLE_DIR + Path.SEPARATOR +...
0
import org.apache.commons.lang.StringUtils; * @version CVS $Id$ /** * Interpreter id that this continuation is bound to */ protected String interpreterId; String interpreterId, this.interpreterId = interpreterId; public boolean interpreterMatches( String inte...
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger log = LoggerFactory.getLogger(ShellTest.class); if (!config.delete()) { log.error("Unable to delete {}", config); }
0
int socket = 0; for (int port = 3333; socket < NUM_CONNECTIONS && port < 4000; port++) if (socket < NUM_CONNECTIONS) { System.err.println("Only created "+socket+" clients; wanted "+NUM_CONNECTIONS); }
0
p.run().waitUntilFinish();
0
switch (sch.getState()) { case INIT: case INSTALLING: //don't send commands until component is installed at least continue; default: StatusCommand statusCmd = createStatusCommand(hostname, cl, sch); cmds.add(statusCmd); }
0
//Collection<StackInfo> stacks = metaInfo.getStacks(); checkNoAggregatedFunctionsForJmx(list); } else { checkNoAggregatedFunctionsForJmx(list); private static void checkNoAggregatedFunctionsForJmx(List<MetricDefinition> metricDefinitions) { for (MetricDefinition metricDefinition:...
0
* limitations under the License.
0
Table.ID tableId = Table.ID.of("1"); Table.ID tableId = Table.ID.of("1");
1
assertEquals(2017L, assertEquals(5L, assertEquals(22L, assertEquals(2L, assertEquals(142L, assertEquals(21L, assertEquals(2L,
0
import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Properties; import java.util.Set; import org.apache.ambari.server.configuration.Configuration; import org.apache.commons.io.IOUtils; import com.google.inject.Singleton; if (!f.exists()) { ...
0
private static final long serialVersionUID = -432884354459701506L;
0
import org.apache.accumulo.core.metadata.schema.TabletsMetadata; Stream<TabletMetadata> tabletStream = TabletsMetadata.builder().scanTable(tableName) .checkConsistency().fetchDir().fetchFiles().fetchScans().build(getClient()).stream();
0
@Test(timeout = 40 * 1000)
0
/** * The possible statement types */
0
Connector conn = instance.getConnector(getPrincipal(context), CredentialHelper.extractToken(getTokenClass(context), getToken(context)));
0
for (String mimeType : mimeTypes) { interpreterMap.put(mimeType, interpreter); for (Object anEventListenerSet : eventListenerSet) { EventListenerMememto elm = (EventListenerMememto) anEventListenerSet; boolean uc = elm.getUseCapture(); ...
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 static com.google.common.base.Preconditions.checkArgument; checkArgument(duration > 0, "Windowing with zero duration");
0
import org.apache.hc.core5.concurrent.DefaultThreadFactory; import org.apache.hc.core5.http.config.CharCodingConfig; import org.apache.hc.core5.http2.HttpVersionPolicy; * Creates {@link CloseableHttpAsyncClient} instance with default public static MinimalHttpAsyncClient createMinimal( final HttpVer...
1
@Parameter(names = "--scanThreads", description = "Number of threads to use when batch scanning") @Parameter(names = "--scanTimeout", converter = TimeConverter.class, description = "timeout used to fail a batch scan")
0
/* * Copyright (c) 2004 World Wide Web Consortium, * * (Massachusetts Institute of Technology, European Research Consortium for * Informatics and Mathematics, Keio University). All Rights Reserved. This * work is distributed under the W3C(r) Software License [1] in the hope that * it will be useful, but WITHOUT A...
0
new ClassificationTextPatch(context), new FreeTextRequestHandlerPatch(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
assertThat(tester.getKeyedStateInUse(), Matchers.containsInAnyOrder( tester.finishedSet(firstWindow))); assertThat(tester.getKeyedStateInUse(), Matchers.containsInAnyOrder( tester.finishedSet(firstWindow))); assertThat(tester.getKeyedStateInUse(), Matchers.containsInAnyOrder( tester....
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; LoggerFactory.getLogger(ZooKeeperServerMain.class); LOG.error("Invalid arguments, exiting abnormally", e); LOG.error("Invalid config, exiting abnormally", e); LOG.error("Unexpected exception, exiting abnormally", e);
0
public class SynchronizedSet<E> extends SynchronizedCollection<E> implements Set<E> { public static <T> Set<T> decorate(Set<T> set) { return new SynchronizedSet<T>(set); protected SynchronizedSet(Set<E> set) { protected SynchronizedSet(Set<E> set, Object lock) { protected Set<E> getSet() { ...
0
* @version $Id: EncoderException.java,v 1.12 2004/09/09 13:39:08 ggregory Exp $ * @see <a href="http://c2.com/cgi/wiki?AlwaysDeclareSerialVersionUid">Always Declare Serial Version Uid</a>
0
import org.apache.accumulo.core.clientImpl.Table; import org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException; import org.apache.accumulo.core.dataImpl.KeyExtent;
0
* Check that a POJO is already manipulated or not. * Update the implemented interface list. * @param access : access of the class @param debug : additional debug information to compute the relationship between source and compiled elements of the class. May be null. * @see org.objectweb.asm.ClassV...
0
String tableId = conn.tableOperations().tableIdMap().get(name); log.info("Created index table " + name + "(id:" + tableId + ")"); SortedSet<Text> splits = genSplits(numPartitions, rand.nextInt(numPartitions) + 1, "%06x"); conn.tableOperations().addSplits(name, splits); log.info("Added " + sp...
0
* * @version CVS $Id: LanguageCompiler.java,v 1.2 2003/03/11 16:01:48 vgritsenko Exp $ /** * Set the name of the file containing the source program * * @param file The name of the file containing the source program */ void setFile(String file); /** * Set the name of the director...
0
protected Object convertToString(Object value) { Object result = value;
0
public class RecoveryWithEmptyRFileIT extends ConfigurableMacBase {
0
* * This is defined by the parameter {@code ClientPNames.CONN_MANAGER_TIMEOUT}. * Failing that it uses the parameter {@code CoreConnectionPNames.CONNECTION_TIMEOUT} *
0
/** The variable resolver. */ protected VariableResolver variableResolver; if ( this.variableResolver == null ) { this.variableResolver = (VariableResolver)this.getService(VariableResolver.class.getName()); return this.variableResolver;
0
import org.apache.http.impl.nio.DefaultNHttpClientConnectionFactory; import org.apache.http.impl.nio.DefaultNHttpServerConnectionFactory; protected HttpParams serverParams; protected HttpParams clientParams; this.serverParams = new SyncBasicHttpParams(); this.serverParams this.server = n...
0
private static SiteConfiguration siteConfig = new SiteConfiguration();
0
import org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException;
0
@NamedQuery(name = "WidgetEntity.findByName", query = "SELECT widget FROM WidgetEntity widget " + "WHERE widget.clusterId = :clusterId " + "AND widget.widgetName = :widgetName " + "AND widget.author = :author " + "AND widget...
0
client.update(Tracer.traceInfo(), context.rpcCreds(), new KeyExtent("!!", null, new Text("row_0003750000")).toThrift(), mutation.toThrift(),
0
assertNull(iter.requestFork(toForkRequest(createApproximateProgress(proposedForkPosition)))); // Cannot fork since the value provided is past the current stop position. assertNull( iter.requestFork(forkRequestAtPosition(makeShufflePosition(kNumRecords + 1, null))));
0
import org.apache.xml.security.utils.*;
0
* * @deprecated since 2.0. This class maintained for backwards compatibility please do not remove. * New users should use org.apache.accumulo.hadoop.mapred.AccumuloRowInputFormat @Deprecated
0
import org.apache.commons.lang.StringUtils; // if guid is empty/null, equality should be based on typeName/uniqueAttributes if (StringUtils.isEmpty(guid) && StringUtils.isEmpty(that.guid)) { return Objects.equals(typeName, that.typeName) && Objects.equals(uniqueAttributes, that.uniqueAttrib...
1
import org.apache.ambari.server.orm.entities.RepoDefinitionEntity; import org.apache.ambari.server.orm.entities.RepoOsEntity; for (RepoOsEntity operatingSystem : repositoryVersion.getRepoOsEntities()) { if (operatingSystem.getFamily().equals(osType)) { for (RepoDefinitionEntity repository ...
0
assertTrue(provider.getInfo().contains("Santuario"));
0
options.fetchedColumns.size() != 0);
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.
0
Create.of(KV.<Integer, Iterable<Void>>of(-1, Collections.emptyList())) .apply(GroupByKey.create()) .apply(GroupByKey.create()) .apply(Keys.create());
0
protected static final String RESOURCES =
0
package org.apache.commons.jexl2.internal;
0
import java.nio.charset.Charset; import java.nio.charset.CodingErrorAction; import org.apache.http.Consts; final InputStream instream, int buffersize, final Charset charset, int maxLineLen, int minChunkLimit, final CodingErrorAction malformedInpu...
0
for (Constructor cst2 : csts) { System.out.println(Arrays.asList(cst2.getParameterTypes())); if (cst2.getParameterTypes().length == 1 && cst2.getParameterTypes()[0].equals(InstanceManager.class)) { cst = cst2;
0
@Override @Override
1
class TaskStateMachine {
0
import org.apache.accumulo.core.data.ByteSequence; int sum2 = 0; Key firstKey = null; if (rowIterator.hasTop()) { firstKey = new Key(rowIterator.getTopKey()); } // ensure that seeks are confined to the row rowIterator.seek(new Range(), new HashSet<ByteSequence>(), fal...
0
PCollectionConsumerRegistry pCollectionConsumerRegistry = new PCollectionConsumerRegistry( metricsContainerRegistry, mock(ExecutionStateTracker.class));
0
StageWrapper.Type.UPGRADE_TASKS, StageWrapper.Type.UPGRADE_TASKS,
0
* The other constructor is the one that takes a DOM Element and a baseURI. private SignedInfo signedInfo; private KeyInfo keyInfo; * @param baseURI URI to be used as context for all relative URIs. * @param signatureMethodURI signature algorithm to use. public XMLSignature(Document doc, String bas...
1
public abstract class ElementWiseOperator<IN, OUT> extends SingleInputOperator<IN, OUT> { protected final Dataset<OUT> output; public Dataset<OUT> output() {
0
private static final byte[] ZERO = {0}; private final MockAccumulo acu; private final String username; Text startText = new Text(start); Text endText = new Text(end); startText.append(ZERO, 0, 1); endText.append(ZERO, 0, 1); Set<Key> keep = new TreeSet<Key>(t.table.subMap(new Key(startText), n...
0
import org.apache.sshd.common.config.keys.AuthorizedKeyEntry; import org.apache.sshd.common.config.keys.AuthorizedKeysTestSupport;
0
lastCache = null; lastCR = null; * rendering * return completed renderings (or null if nothing is available). * isDoubleBuffered is true). * * repaint completes. if (isDoubleBuffered) * * coordinate system. * * user space coordinate system. ...
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
import java.util.concurrent.Semaphore; Semaphore start0; Semaphore finish3; start0 = new Semaphore(0); finish3 = new Semaphore(0); finish3.acquire(); start0.release(); finish3.release(); start0.acquire();
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/locale/converters/BigIntegerLocaleConverter.java,v 1.4 2003/10/05 13:34:17 rdonkin Exp $ * $Revision: 1.4 $ * $Date: 2003/10/05 13:34:17 $ * * Copyright (c) 2001-2003 The Apache S...
0
import org.apache.sshd.common.SshException; public void verify() throws SshException { try { await(); } catch (InterruptedException e) { throw new SshException("Interrupted", e); } if (!is...
0
import java.util.Objects; Objects.requireNonNull(LOG_PATH.get());
0
import cz.seznam.euphoria.core.client.dataset.asserts.DatasetAssert; ListDataSink<Triple<TimeInterval, String, Long>> output = ListDataSink.get(); DatasetAssert.unorderedEquals( output.getOutputs(), Triple.of(new TimeInterval(-5, 5), "one", 2L), Triple.of(new TimeInterval(-5, 5), "two",...
0
public final void printHelp(int width) { Shell.printHelp(usage(), "description: " + this.description(), getOptionsWithHelp(), width); } printHelp(usage, description, opts, Integer.MAX_VALUE); } private static final void printHelp(String usage, String description, Options opts, int width) {...
0
import java.util.List; import com.google.common.base.Optional; import org.apache.mesos.Protos.Attribute; import org.apache.mesos.Protos.SlaveID; import com.twitter.mesos.gen.AssignedTask; import com.twitter.mesos.gen.ScheduleStatus; * Performs a simple state change, transitioning all tasks matching a query to the ...
0
.setKey(new JobKey("owner-role", "devel", "email_stats")) .setEnvironment("devel")
0
import org.apache.cocoon.sitemap.SitemapServlet; this.blockServlet.init(blockServletConfig);
0
import org.apache.hc.core5.net.URIAuthority; final String challengeResponse, final URIAuthority authority, final String requestUri, final HttpContext context) { final String challe...
0
import java.util.List; import org.apache.felix.gogo.api.JobListener; import org.apache.felix.gogo.runtime.Job; List<Job> jobs(); Job currentJob(); Job foregroundJob(); void setJobListener(JobListener listener);
0
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; assertNotNull(keystoreUrl); assertArrayEquals("password".getBytes(UTF_8), token.getPassword()); assertArrayEquals("bob".getBytes(U...
0
final HashSet<E> set = new HashSet<>();
1
driver.stop(); // shut down incoming offers scheduler.stop(); // shut down offer and slave update processing
0
if (!(namespaceId.equals(Namespaces.ACCUMULO_NAMESPACE_ID) && isIteratorOrConstraint(key))) { * Invalidates the <code>ZooCache</code> used for storage and quick retrieval of properties for this namespace configuration.
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
/* $Id: TestBean.java,v 1.8 2004/05/07 01:29:59 skitching Exp $ * * @version $Revision: 1.8 $ $Date: 2004/05/07 01:29:59 $
0
log.debug("Serialized octets:\n" + new String(serializedOctets, "UTF-8"));
0
import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertThat; import org.apache.beam.sdk.values.TypeDescriptor; @Test public void testEncodedTypeDescriptor() throws Exception { assertThat(TEST_CODER.getEncodedTypeDescriptor(), equalTo(TypeDescriptor.of(Byte.class))); }
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$ /** The redirector */ protected Redirector redirector; /** The Selector for the processing pipeline */ protected ServiceSelector pipelineSelector; this, this.processingPipelineObject...
0