Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
* Base class for the VFS Ant tasks. Takes care of creating a FileSystemManager, and for cleaning it up at the end of
* the build. Also provides some utility methods.
public class VfsTask extends Task {
protected FileObject resolveFile(final String uri) throws FileSystemException {
if (manager == null) {
... | 1 |
import java.nio.channels.SelectionKey;
if (this.contentDecoder != null && (this.session.getEventMask() & SelectionKey.OP_READ) > 0) { | 0 |
@FunctionalInterface | 0 |
*
* @param cmd The incoming command type | 1 |
producer.sendResponse(responseChannel, context);
responseChannel.sendInformation(new BasicHttpResponse(HttpStatus.SC_CONTINUE), context); | 0 |
TestIngest.ingest(c, opts, BWOPTS);
VerifyIngest.verifyIngest(c, vopts, SOPTS); | 1 |
public MultiMap(Map<K,List<V>> other) {
this();
for ( java.util.Map.Entry<K,List<V>> e : other.entrySet()) {
addAll(e.getKey(), e.getValue());
}
}
| 0 |
methods.add(klass.getMethod("cloneAs", Class.class)); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/converters/SqlTimestampConverter.java,v 1.6 2003/10/09 20:43:16 rdonkin Exp $
* $Revision: 1.6 $
* $Date: 2003/10/09 20:43:16 $
* Alternately, this acknowledgement may appear in ... | 0 |
if (algorithmURI != null) {
Algorithm algorithm = algorithmsMap.get(algorithmURI);
if (algorithm != null) {
return algorithm.requiredKey;
} | 0 |
public class NestedJarTestCase extends AbstractProviderTestConfig {
public static Test suite() throws Exception {
public void prepare(final DefaultFileSystemManager manager) throws Exception {
public FileObject getBaseTestFolder(final FileSystemManager manager) throws Exception { | 1 |
* @version $Revision$ $Date$ | 0 |
package org.apache.commons.codec2.language;
import org.apache.commons.codec2.EncoderException;
import org.apache.commons.codec2.StringEncoder;
import org.apache.commons.codec2.StringEncoderAbstractTest; | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(CertGenerationTest.class); | 1 |
public DOMSignatureProperty(List<? extends XMLStructure> content,
String target, String id)
this.content = Collections.unmodifiableList(
new ArrayList<XMLStructure>(content));
for (int i = 0, size = this.content.size(); i < size; i++) {
... | 0 |
private static final Arg<Double> MAX_SCHEDULE_ATTEMPTS_PER_SEC = Arg.create(40D); | 0 |
/*
* Copyright (c) 2015, Cloudera, Inc. All Rights Reserved.
*
* Cloudera, Inc. licenses this file to you 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-... | 0 |
import org.apache.accumulo.core.trace.TraceUtil;
SimpleThriftService.Iface actualHandler = TraceUtil.wrapService(handler); | 0 |
import org.apache.sshd.common.auth.MutableBasicCredentials;
MutableBasicCredentials, SimpleClientConfigurator,
@Override
public String getUsername() {
* @param user The (never {@code null}/empty) username
@Override
public void setUsername(String user) {
@Override
@Override
S... | 0 |
package org.apache.commons.dbcp2; | 1 |
private static void copyStreamToFileSystem(FileSystem fs, String jarName, Path path)
throws IOException {
try (FSDataOutputStream dest = fs.create(path);
InputStream stream = ClassLoaderIT.class.getResourceAsStream(jarName)) {
IteratorSetting is = new IteratorSetting(10, "TestCombiner",
... | 0 |
* Flag indicating whether this configuration object is statically or
* dynamically bound.
*/
private volatile boolean staticallyBound;
/**
this.staticallyBound = bundleLocation != null;
this.staticallyBound = bundleLocation != null;
setAutoProperties( props, staticall... | 0 |
* @version $Id$ | 0 |
repeater.clear(); | 0 |
/* ====================================================================
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.3 $ $Date: 2004/01/14 21:43:09 $ | 0 |
import com.google.common.collect.Iterators;
import java.util.Iterator;
return new Builder().as(PipelineOptions.class);
return new Builder().as(klass);
return new Builder().fromArgs(args);
return new Builder().withValidation();
private Builder() {
this(null, false, true);
private Builder(St... | 0 |
public synchronized String toString() { | 0 |
import org.apache.beam.runners.spark.PipelineRule;
public final PipelineRule pipelineRule = PipelineRule.batch();
Pipeline p = pipelineRule.createPipeline(); | 0 |
/**
* If the command fails and is skippable, then this will instruct the
* scheduler to skip the command.
*/
@Column(name = "auto_skip_on_failure", nullable = false)
private Integer autoSkipOnFailure = Integer.valueOf(0);
/**
* Gets whether commands which fail and are retryable are automatically
... | 1 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.apache.accumulo.core.client.impl.BaseIteratorEnvironment;
import org.apache.accumulo.core.data.ByteSequence;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo... | 1 |
import java.net.InetSocketAddress;
import org.apache.hc.core5.http.Header;
import org.apache.hc.core5.http.HttpConnection;
import org.apache.hc.core5.http.HttpException;
import org.apache.hc.core5.http.HttpHeaders;
import org.apache.hc.core5.http.HttpHost;
import org.apache.hc.core5.http.HttpRequest;
import org.apache.... | 0 |
import org.apache.cocoon.xml.XMLUtils;
import org.w3c.dom.Document;
Document expected = load(outputURI);
getLogger().error( XMLUtils.serializeNode( expected ) );
Document actual = generate(JX, inputURI, EMPTY_PARAMS);
getLogger().error( XMLUtils.serializeNode( actual ) );
assertE... | 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 |
desiredStateEntity.setHostId(hostEntity.getHostId()); | 0 |
final static List<Short> NO_VIOLATIONS = new ArrayList<Short>();
// fast size check
if (mutation.numBytes() < maxSize)
return NO_VIOLATIONS;
| 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 |
/**
* 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 |
timerInternals.cleanupPendingTimer(timer.getNamespace()); | 0 |
@Deprecated | 0 |
import org.apache.beam.sdk.util.WindowedValue;
* Returns elements that were provided to the {@link TransformEvaluator} as input but were not
* processed.
*/
Iterable<? extends WindowedValue<?>> getUnprocessedElements();
/** | 0 |
private final HttpEntity wrappedEntity; | 0 |
if (log.isTraceEnabled()) {
log.trace("createSftpClient(" + session + ") client close failure details", t);
}
if (log.isTraceEnabled()) {
log.trace("createSftpClient(" + session + ") session close failure details", e);
... | 0 |
if (log.isDebugEnabled()) {
if (log.isTraceEnabled()) {
port = ((InetSocketAddress) acceptor.getBoundAddresses().iterator().next()).getPort();
log.info("start() listen on auto-allocated port=" + port);
port = ((InetSocke... | 0 |
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.io.StringWriter;
import java.io.Writer;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.xml.IncludeXMLConsumer;
import org.apache.cocoon.xml.XMLUtils;
import org.apache.excalibur.source.SourceParameters;
i... | 0 |
import org.apache.accumulo.core.client.AccumuloClient;
AccumuloClient c = getAccumuloClient(); | 0 |
/**
* Create a new JXPathContextFactoryReferenceImpl.
*/
/**
* {@inheritDoc}
*/
Object contextBean) { | 0 |
/** {@link org.apache.commons.logging} logging facility */
static org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory.getLog(
X509IssuerSerialResolver.class.getName());
log.debug("Can I resolve " + element.getTagName() + "?");
log.debug("I can't"... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/java/org/apache/commons/dbcp/DelegatingResultSet.java,v 1.7 2003/03/06 00:11:32 rwaldhoff Exp $
* $Revision: 1.7 $
* $Date: 2003/03/06 00:11:32 $
// Will be commented by the build process on a JDBC 2.0 system | 0 |
if (!shellState.getConnector().tableOperations().exists(tableName))
throw new TableNotFoundException(null, tableName, null);
if (tableIterators == null)
Shell.log.info("No scan iterators set on table " + tableName);
else
Shell.log.info("Removed the following scan iterators from... | 1 |
public int compare(final K o1, final K o2) {
static boolean isOutOfBoundsIndex(final int bitIndex) {
static boolean isEqualBitKey(final int bitIndex) {
static boolean isNullBitKey(final int bitIndex) {
static boolean isValidBitIndex(final int bitIndex) { | 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 |
boolean hasNext = false;
if (hasNext)
while (true) {
try {
return hasNext = true;
if (!hasNext && !hasNext())
hasNext = false;
| 0 |
import static com.google.cloud.dataflow.sdk.io.SourceTestUtils.assertSplitAtFractionExhaustive;
assertSplitAtFractionExhaustive(original, 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... | 0 |
* This method can be used to log I/O exception thrown while closing
* {@link java.io.Closeable} objects (such as
* {@link org.apache.http.HttpConnection}}).
* @param ex I/O exception thrown by {@link java.io.Closeable#close()} | 0 |
import static org.apache.aurora.scheduler.base.TaskTestUtil.makeTaskEvent;
int startTime = 100;
if (status == ScheduleStatus.SANDBOX_DELETED) {
return makeTask(status, ImmutableList.of(
makeTaskEvent(startTime + 10, ScheduleStatus.FAILED),
... | 0 |
* {@code --pubsubTopic=projects/PROJECT ID/topics/YOUR_TOPIC_NAME} | 0 |
//If host doesn't belongs to any cluster
if (report.getStatus().equals("COMPLETED")) { | 0 |
import java.nio.charset.Charset;
String xmlString = FileUtils.readFileToString(file, Charset.defaultCharset()); | 0 |
public static Option[] configure() {
.prepare(
.prepare(
.prepare(
mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo.handler.transaction").version(asInProject()),
| 0 |
public OpenSSHFsyncExtensionImpl(SftpClient client, RawSftpClient raw, Map<String, byte[]> extensions) { | 1 |
import org.apache.ambari.logfeeder.util.S3Util; | 0 |
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
ComponentSSLConfiguration configuration1 = ComponentSSLConfigurationTest.getConfiguration(
"tspath", "tspass", "tstype", false);
ComponentSSLConfiguration configuration2 =... | 0 |
* @version $Id$ | 0 |
* @param responseHandler the response handler
<T> T execute(ClassicHttpRequest request, HttpClientResponseHandler<? extends T> responseHandler) throws IOException;
* @param responseHandler the response handler
<T> T execute(
ClassicHttpRequest request,
HttpContext context,
... | 0 |
private final Object statusLock;
this.statusLock = new Object();
synchronized (this.statusLock) {
if (this.status.compareTo(IOReactorStatus.SHUTDOWN_REQUEST) >= 0) {
this.status = IOReactorStatus.SHUT_DOWN;
this.statusLock.notifyAll();
retu... | 0 |
private static final SecureRandom rand = new SecureRandom();
return new Path(path.getParent(), path.getName() + "_" + System.currentTimeMillis() + "_" + (rand.nextInt(Integer.MAX_VALUE) + 1) + ".bak"); | 0 |
import org.junit.Assert; | 0 |
* @param context the context for the request execution | 0 |
import org.apache.beam.sdk.values.WindowingStrategy; | 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 |
import java.io.InputStream;
import org.apache.commons.fileupload.UploadContext;
public class PortletRequestContext implements UploadContext { | 0 |
@Override | 0 |
import org.junit.rules.ExpectedException;
import java.io.FileNotFoundException;
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Test
public void testErrorOnFileNotFound() throws Exception {
expectedException.expect(FileNotFoundException.class);
readElems("file-not-found", 0... | 0 |
new Resources(0.01, Amount.of(32L, Data.MB), Amount.of(1L, Data.MB), 0); | 0 |
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.apache.beam.runners.core.construction.ModelCoderRegistrar;
import org.apache.beam.runners.core.construction.SdkComponents;
CloudObject cloudObject = CloudObjects.asCloudObject(coder, /*sdkComponents=*/ null);
@T... | 0 |
import org.apache.http.util.CharArrayBuffer; | 0 |
package org.apache.accumulo.core.util.shell.commands; | 0 |
final HttpHost target = context.getTargetHost();
flushEntriesInvalidatedByRequest(context.getTargetHost(), request);
final HttpHost target = context.getTargetHost();
final HttpHost target = context.getTargetHost();
context.getTargetHost(), conditionalRequest, requestDate,... | 0 |
AmbariMetaInfo ambariMetaInfo = injector.getInstance(AmbariMetaInfo.class);
ServiceResourceProviderTest.createServices(controller, requests);
ServiceResourceProviderTest.updateServices(controller, sReqs, mapRequestProps, true, false); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/ArrayLongList.java,v 1.3 2003/08/31 17:21:15 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may a... | 0 |
import org.apache.felix.scr.impl.manager.ScrConfiguration;
private final ScrConfiguration m_configuration;
public ComponentRegistry( final ScrConfiguration scrConfiguration, final ScrLogger logger )
m_configuration = scrConfiguration;
try
timer.schedule(new TimerTask... | 0 |
this.requestFactory = requestFactory != null ? requestFactory : DefaultHttpRequestFactory.INSTANCE;
protected IOException createConnectionClosedException() {
return new ConnectionClosedException("Client closed connection");
}
@Override
protected HttpRequest createMessage(final CharArrayB... | 0 |
try {
httpclient.getCredentialsProvider().setCredentials(
new AuthScope(targetHost.getHostName(), targetHost.getPort()),
new UsernamePasswordCredentials("username", "password"));
// Create AuthCache instance
AuthCache authCache = new Ba... | 0 |
* $HeadURL$
* $Revision$
* $Date$
import org.apache.http.conn.params.ConnManagerParams;
ConnManagerParams.setMaxTotalConnections(params, 5);
ConnManagerParams.setMaxConnectionsPerRoute(params,
ConnManagerParams.setMaxTotalConnections(params, 5);
ConnManagerParams.setMaxConnectionsPer... | 0 |
import java.util.List;
private List<JFile> mInclFiles;
private List<JRecord> mRecords; | 0 |
import com.fasterxml.jackson.annotation.JsonIgnore;
private String relationshipLabel;
setRelationshipLabel(getDefaultRelationshipLabel());
public AtlasRelationshipDef(AtlasRelationshipDef other) throws AtlasBaseException {
super(other);
if (other != null) {
... | 0 |
import static java.util.Arrays.asList;
import org.junit.Test;
.read(
ListDataSource.unbounded(
asList("0-one 1-two 0-three 1-four 0-five 1-six 0-seven".split(" ")))
.withReadDelay(READ_DELAY))
.apply(
input ->
ReduceByKey.of(in... | 0 |
import com.google.common.collect.ImmutableMap;
public BeamSqlPrimitive evaluate(
Row inputRow, BoundedWindow window, ImmutableMap<Integer, Object> correlateEnv) {
Collection<Object> collection = opValueEvaluated(0, inputRow, window, correlateEnv); | 0 |
* @version CVS $Id: CopletAdapter.java,v 1.3 2003/05/26 09:52:59 cziegeler Exp $
/**
* Initialize the coplet
* This method is called immediately after a new instance is created.
* For each coplet, this method is only invoked once.
* @param coplet The coplet
*/
/**
* Destroy the co... | 0 |
import javax.annotation.Nullable;
@Nullable
@Nullable
@Nullable Windowing<IN, W> windowing,
@Nullable UnaryFunction<IN, Long> eventTimeAssigner) {
@Nullable Windowing<IN, W> windowing,
@Nullable UnaryFunction<IN, Long> eventTimeAssigner) { | 0 |
@JsonProperty("statusCommands")
private List<StatusCommand> statusCommands = null;
public List<StatusCommand> getStatusCommands() {
return statusCommands;
public void setStatusCommands(List<StatusCommand> statusCommands) {
this.statusCommands = statusCommands;
@Override
public String toString() {
... | 1 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.BiMap;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableBiMap;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap; | 0 |
public static List<PublicKey> resolveAuthorizedKeys(
PublicKeyEntryResolver fallbackResolver, Collection<? extends AuthorizedKeyEntry> entries)
throws IOException, GeneralSecurityException { | 0 |
protected ConfigurationNodeIteratorBase(final ConfigurationNodePointer<T> parent,
final boolean reverse)
public boolean setPosition(final int pos)
protected void setStartOffset(final int startOffset)
protected int positionToIndex(final int pos)
protected static String prefixName(final St... | 0 |
/**
*
* @version $Id$
*/
private volatile Map imageWriterMap = new HashMap();
synchronized( ImageWriterRegistry.class ){
if ( instance == null ){
instance = new ImageWriterRegistry();
}
}
| 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 applica... | 0 |
import org.apache.beam.sdk.extensions.sql.impl.utils.CalciteUtils;
import org.apache.beam.sdk.schemas.Schema.FieldType;
FieldType type = field.getType();
if (CalciteUtils.isStringType(type)) {
} else if (CalciteUtils.isDateTimeType(type)) {
} else if (type.getTypeName().isNumericType()
|| (r... | 0 |
import org.apache.http.annotation.Immutable;
@Immutable
* streamed from cannot be reused until | 0 |
package org.apache.felix.sigil.common.repository; | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.