Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
package org.apache.http.contrib.benchmark;
import org.apache.http.message.BasicHeader;
public class DefaultHeader extends BasicHeader {
public DefaultHeader(final String name, final String value) {
| 0 |
// System.out.println("Rgns: " + srcORgn + " - " + srcNRgn);
// System.out.println("ATs: " + oat + " - " + nat);
// System.out.println
// ("Adding: " + oat + " - " + nat + "\n" +
// org.ImageDisplay.stringShape(oRgn) + "\n" +
... | 0 |
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; | 0 |
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.Set;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.apache.xml.security.signature.XMLSignatureInput;
import org.apache.xpath.CachedXPathAPI... | 0 |
* Copyright 1999-2006 The Apache Software Foundation | 0 |
throw new IOException("Follower is ahead of the leader, leader summary: "
+ leaderStateSummary.getCurrentEpoch()
+ " (current epoch), "
+ leade... | 0 |
assertEquals("true", config2.getString("configuration.loaded"));
assertEquals("true", config2.getString("configuration.loaded"));
/**
* Tests whether the escape character for list delimiters can be itself
* escaped and survives a save operation.
*/
public void testSaveEscapedEscap... | 0 |
import org.apache.aurora.scheduler.resources.Resources; | 0 |
filterValue = SVG_NONE_VALUE;
operator = SVG_ARITHMETIC_VALUE;
operator = SVG_ARITHMETIC_VALUE;
operator = SVG_IN_VALUE;
operator = SVG_OUT_VALUE;
operator = SVG_IN_VALUE;
operator = SVG_OUT_VALUE;
Element compositeFilter = ... | 0 |
} catch (AssertionError | Exception e) { | 0 |
import org.apache.accumulo.core.crypto.CryptoServiceFactory;
mfw = new RFileOperations().newWriterBuilder()
.forFile(file, fs, conf, CryptoServiceFactory.newDefaultInstance()) | 0 |
import java.util.concurrent.atomic.AtomicReference;
| 0 |
import java.nio.charset.StandardCharsets;
import org.apache.beam.sdk.io.BoundedSource.BoundedReader;
public void testEstimatedSizeBytes() {
public void testRead() {
@Override
public void testWrite() {
assertEquals(1000, service.getTable().size());
void load() {
Map<Integer, Scientist... | 0 |
* @version CVS $Id: Cocoon.java,v 1.14 2003/09/04 19:41:58 bruno Exp $
params.setParameter("force-shutdown", "true"); | 0 |
public class H2AsyncMainClientExec implements AsyncExecChainHandler { | 0 |
/**
* @return a human readable explanation why the annotated operator is recommendation
* for native implementation by an executor
*/
/** @return the state complexity */
StateComplexity state();
/** @return the number of global repartition operations */ | 0 |
checkCountOverflow(usage.m_count.incrementAndGet());
checkCountOverflow(usage.m_serviceObjectsCount.incrementAndGet());
private void checkCountOverflow(long c)
{
if (c == Long.MAX_VALUE)
{
throw new ServiceException(
"The use c... | 0 |
import javax.security.sasl.SaslException;
public CustomQuorumPeer() throws SaslException {
}
protected QuorumPeer getQuorumPeer() throws SaslException { | 0 |
/*
* Copyright 2004-2005 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 |
InputStream is = null;
is = this.getClass().getClassLoader().getResourceAsStream(CLUSTER_DEFINITION_FILE);
} finally {
if (is != null) {
try {
is.close();
} catch (IOException ex) {
}
} | 0 |
* One element of an HTTP {@link Header header} value. Header element
* is a name / value pair with a number of optional name / value
* parameters.
/**
* Returns header element name.
*
* @return header element name
*/
/**
* Returns header element value.
*
* @return heade... | 0 |
import org.apache.cocoon.portal.services.LayoutFactory; | 0 |
span.getSpan().addKVAnnotation("files", ("" + smallestFiles.size()));
span.getSpan().addKVAnnotation("read", ("" + mcs.getEntriesRead()));
span.getSpan().addKVAnnotation("written", ("" + mcs.getEntriesWritten()));
span.getSpan().addKVAnnotation("extent", ("" + getExtent()));
... | 0 |
* Gets the path encoded suitable for url like file system e.g. (http, webdav). | 0 |
throw new RuntimeException(e);
throw new RuntimeException(e);
throw new RuntimeException(e); | 0 |
import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
import org.apache.accumulo.core.security.tokens.PasswordToken; | 0 |
import org.apache.beam.runners.spark.util.BroadcastHelper;
import org.apache.beam.sdk.transforms.OldDoFn;
import org.apache.beam.sdk.util.WindowedValue;
import org.apache.beam.sdk.values.TupleTag;
import org.apache.spark.api.java.function.PairFlatMapFunction;
import org.joda.time.Instant; | 0 |
import java.util.Set;
import org.apache.aurora.gen.storage.StoredJobUpdateDetails;
* TODO(wfarner): Generate immutable wrappers for storage.thrift structs, use an immutable object
* here.
Set<StoredJobUpdateDetails> fetchAllJobUpdateDetails();
/**
* Determines whether an update ID represent... | 0 |
LOG.info("writeToDisk == true but configFilename == 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... | 0 |
CombinedConfiguration cc = factory.getConfiguration(true);
String value = cc.getString("key1");
CombinedConfiguration cc = factory.getConfiguration(true);
String value = cc.getString("key1"); | 0 |
private final Map<String, Plugin> plugins;
this.plugins = new HashMap<String, Plugin>();
plugin = plugins.get( label );
Map<String, String> getLocalizedLabelMap( final ResourceBundleManager resourceBundleManager, final Locale locale )
final Map<String, String> map = new HashMap<S... | 0 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import org.junit.Test;
public class StringUtilTest {
@Test
@Test
@Test
@Test | 0 |
package org.apache.commons.codec; | 1 |
this.cloneInfo.namespaceId = Namespaces.getNamespaceId(HdfsZooInstance.getInstance(),
Tables.qualify(this.cloneInfo.tableName).getFirst());
Utils.checkTableDoesNotExist(environment.getInstance(), cloneInfo.tableName,
cloneInfo.tableId, TableOperation.CLONE);
TableManager.getInstance().... | 0 |
* Copyright 2001-2006 The Apache Software Foundation | 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 javax.net.ssl.SSLContext;
import org.apache.hc.core5.reactor.ssl.TlsCapable;
private final SSLContext sslContext;
final ConnectionReuseStrategy connectionReuseStrategy,
final SSLContext sslContext) {
this.sslContext = sslContext;
if (sslContext != null && ioSession in... | 0 |
import org.apache.accumulo.server.tabletserver.log.DfsLogger.DFSLoggerInputStreams;
DFSLoggerInputStreams inputStreams = DfsLogger.readHeaderAndReturnStream(fs, srcPath, conf);
this.input = inputStreams.getOriginalInput();
this.decryptingInput = inputStreams.getDecryptingInputStream(); | 0 |
import org.apache.accumulo.core.clientImpl.Credentials;
if (job.isSuccessful()) {
return 0;
} else {
System.out.println(job.getStatus().getFailureInfo());
return 1;
}
@SuppressFBWarnings(value = "PATH_TRAVERSAL_IN", justification = "path provided by test")
File tf = fol... | 0 |
try (AccumuloClient c = getAccumuloClient()) {
c.tableOperations().create(table1);
c.tableOperations().create(table2);
BatchWriter bw = c.createBatchWriter(table1, new BatchWriterConfig());
BatchWriter bw2 = c.createBatchWriter(table2, new BatchWriterConfig());
for (int i = 0; i < 100;... | 0 |
@Override | 0 |
import org.apache.commons.configuration.builder.BuilderParameters;
CombinedConfigurationBuilder parentBuilder =
new CombinedConfigurationBuilder()
{
@Override
protected void initChildBuilderParameters(
BuilderPar... | 0 |
Predicate predicate = new GreaterPredicate<>(propertyId, 10);
GreaterPredicate predicate = new GreaterPredicate<>(propertyId, 10);
Predicate predicate = new GreaterPredicate<>(propertyId, 0.1); | 1 |
* Returns a content stream of the entity.
* {@link #isRepeatable Repeatable} entities are expected
* to create a new instance of {@link InputStream} for each invocation
* of this method and therefore can be consumed multiple times.
* Entities that are not {@link #isRepeatable repeatable} are... | 0 |
Type targetKeyType = null, targetValueType = null;
if (typeArguments != null && typeArguments.length > 1) {
targetKeyType = typeArguments[0];
targetValueType = typeArguments[1]; | 0 |
import org.apache.hc.core5.testing.SSLTestContexts;
scheme == ProtocolScheme.HTTPS ? SSLTestContexts.createClientSSLContext() : null); | 0 |
AccumuloConfiguration acuconf = FileOutputConfigurator
.getAccumuloConfiguration(AccumuloFileOutputFormat.class, job1.getConfiguration());
assertEquals(new SamplerConfigurationImpl(samplerConfig),
SamplerConfigurationImpl.newSamplerConfig(acuconf));
acuconf = FileOutputConfigurator.getAccumu... | 0 |
private void addChangeRecord(ChangeRecord c) { | 0 |
import static java.util.concurrent.TimeUnit.SECONDS;
import static org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.TimelineMetricConfiguration.AGGREGATOR_CHECKPOINT_DELAY;
import static org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.TimelineMetricConfiguration.RESULTSE... | 0 |
private TemporaryFolder folder1 = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
| 0 |
Node selectedElem = null;
selectedElem = doc;
//Set resultSet = dereferenceSameDocumentURI(selectedElem);
XMLSignatureInput result = new XMLSignatureInput(selectedElem);
result.setExcludeComments(true);
//log.debug("We return a nodeset with " + resultSet.size() + " nodes"); | 0 |
private final InstructionHandle[] targets; | 0 |
import org.apache.beam.sdk.schemas.annotations.DefaultSchema; | 0 |
import org.apache.hc.core5.io.ShutdownType;
local.initiateShutdown();
try {
local.awaitTermination(gracePeriod, timeUnit);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
local.shutdown(ShutdownType.IMME... | 0 |
public static final class LogLevel {
public static final LogLevel DEBUG = new LogLevel( "DEBUG", 0 );
public static final LogLevel INFO = new LogLevel( "INFO", 1 );
public static final LogLevel WARN = new LogLevel( "WARN", 2 );
public static final LogLevel ERROR = new LogLevel( "ERR... | 0 |
import org.apache.accumulo.harness.AccumuloClusterIT;
public class SplitRecoveryIT extends AccumuloClusterIT { | 0 |
import static org.apache.beam.sdk.extensions.sql.impl.utils.CalciteUtils.VARCHAR;
Schema payloadSchema = Schema.builder().addInt32Field("id").addStringField("name").build();
Schema.builder()
.addDateTimeField("event_timestamp")
.addMapField("attributes", VARCHAR, VARCHAR)
... | 0 |
import java.util.concurrent.atomic.AtomicReference;
import org.apache.aurora.scheduler.app.ServiceGroupMonitor;
import static org.easymock.EasyMock.expectLastCall;
private AtomicReference<ImmutableSet<ServiceInstance>> schedulers;
ServiceGroupMonitor serviceGroupMonitor = createMock(ServiceGroupMonitor.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 may... | 0 |
Buffer buffer = session.createBuffer(SshConstants.SSH_MSG_CHANNEL_OPEN); | 0 |
private ThreadLocal<DateFormat> dateFormatThreadLocal = new ThreadLocal<DateFormat>(){
@Override
protected DateFormat initialValue() {
//2016-03-11T10:42:36.376Z
return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSX");
}
}; | 1 |
/**
* Sets the default Kafka topic to write to. Use {@code ProducerRecords} to set topic name per
* published record.
*/
checkArgument(getTopic() != null, "withTopic() is required when isEOS() is true"); | 0 |
import org.apache.accumulo.core.iterators.user.IntersectingIterator; | 0 |
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
final String tableName = OptUtil.getTableOpt(cl, shellState);
final List<IteratorSetting> tableScanIterators = shellState.scanIteratorOptions.remove(tableName);
if (tableScanIterators == null)... | 0 |
super(logFactory, self.tickTime, self.minSessionTimeout, self.maxSessionTimeout,
self.clientPortListenBacklog, zkDb, self); | 0 |
if (splits.size() == 0) {
splits = ImmutableList.of(boundedSource);
} | 0 |
@Override
public String toString()
@Override
public String stringifyValue()
@Override
public void dump(DataOutputStream dos) throws IOException | 0 |
* Copyright 2001-2005 The Apache Software Foundation | 0 |
if (saslEnabled()) {
opts.updateKerberosCredentials();
vopts.updateKerberosCredentials(); | 0 |
@Test
public void testFELIX2987(BundleContext context) {
// mimics testComponentWithRequiredConfigurationAndServicePropertyPropagation
DependencyManager m = new DependencyManager(context);
// helper class that ensures certain steps get executed in sequence
Ensure e = new Ens... | 0 |
/*
* Copyright (c) OSGi Alliance (2012, 2013). All Rights Reserved.
*
* 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 re... | 0 |
* limitations under the License. | 0 |
QueryResponse queryForResources(Request request, Predicate predicate) | 0 |
private DirectGraph graph;
ConsumerTrackingPipelineVisitor visitor = new ConsumerTrackingPipelineVisitor();
p.traverseTopologically(visitor);
graph = visitor.getGraph();
manager = WatermarkManager.create(clock, graph);
ConsumerTrackingPipelineVisitor trackingVisitor = new ConsumerTrackingPipelineV... | 0 |
package org.apache.accumulo.server.test.functional;
import java.util.Iterator;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.Combiner;
public class BadCombiner extends Combiner {
@Override
public Value reduce(Key key, Iterator<Valu... | 1 |
import java.util.Objects;
return this.equals(other);
@Override
public int hashCode() {
return Objects.hash(countElems);
} | 0 |
import org.osgi.util.converter.TypeReference; | 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 |
conf.set("mapreduce.cluster.local.dir", new File(System.getProperty("user.dir"), "target/mapreduce-tmp").getAbsolutePath()); | 0 |
* @deprecated (4.2) use {@link AuthenticationStrategy}
@Deprecated | 0 |
final StringBuilder data = new StringBuilder();
try
{
accept( ToStringVisitor.INSTANCE, data );
}
catch ( OgnlException e )
{
// ignored.
}
return data.toString(); | 0 |
import org.apache.commons.configuration.ex.ConfigurationException;
import org.apache.commons.configuration.ex.ConfigurationRuntimeException; | 0 |
long delayMillis = 50;
tailer = new Tailer(file, listener, delayMillis, false);
final long testDelayMillis = delayMillis * 10;
Thread.sleep(testDelayMillis);
Thread.sleep(testDelayMillis);
Thread.sleep(testDelayMillis);
Thread.sleep(testDelayMillis);
Threa... | 0 |
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.ServiceSelector;
import org.apache.avalon.framework.service.Serviceable;
* @version CVS $Id$
implements Serviceable, Disposable {
/** The service ma... | 0 |
new DBAccessor.DBColumnInfo(USER_AUTHENTICATION_AUTHENTICATION_KEY_COLUMN, String.class, 2048, null, true), | 0 |
} catch (Throwable t) {
LOG.fatal("Severe unrecoverable error, exiting", t);
LOG.info("SyncRequestProcessor exited!"); | 0 |
import com.twitter.aurora.scheduler.storage.Storage.Work.Quiet;
if (Quotas.greaterThan(additionalQuota, Quotas.noQuota())) {
public boolean hasRemaining(final String role, final Quota quota) {
return storage.consistentRead(new Quiet<Boolean>() {
@Override public Boolean apply(StoreProv... | 0 |
*
*
*
*
*
*
*
*
| 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.dom.AbstractElement;
import org.apache.batik.util.SVGConstants;
((AbstractElement) doc.getDocumentElement()).setIdAttributeNS(null, "blah", true); | 0 |
/**
* Test Flink runner.
*/
FlinkPipelineOptions flinkOptions =
PipelineOptionsValidator.validate(FlinkPipelineOptions.class, options);
OutputT apply(PTransform<InputT, OutputT> transform, InputT input) { | 0 |
protected String name;
name = Arrays.asList(args).toString();
log.debug("Executing command {}", name);
new Thread(this, "ScpCommand: " + name).start();
if (file.exists() && file.isDirectory()) {
throw new IOException("File is a directory: " + file);
} else if ... | 0 |
for (String arg : args)
{
System.out.println("Last modified: " + DateFormat.getInstance().format(
new Date(file.getContent().getLastModifiedTime()))); | 0 |
* @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
* @version $Id: ClassPropertiesConfiguration.java,v 1.8 2004/06/24 12:35:14 ebourg Exp $
throw new FileNotFoundException("Could not open Resource " + resourceName); | 0 |
import org.apache.accumulo.core.client.Accumulo;
client = Accumulo.newClient().from(getClientProperties()).build(); | 0 |
$Id: BooleanVariableAssignmentImpl.java,v 1.1 2004/03/01 12:30:49 cziegeler Exp $
package org.apache.cocoon.workflow.impl;
import org.apache.cocoon.workflow.BooleanVariableAssignment;
import org.apache.cocoon.workflow.WorkflowException;
import org.apache.cocoon.workflow.WorkflowInstance;
* @version $Id: BooleanVariabl... | 0 |
return TypeInformation.of((Class) MultiWindowedElement.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 may not... | 1 |
.setUrl(dockerImageUrl) | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.