Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import java.util.Comparator;
Collections.sort(reports, new Comparator<CommandReport>() {
@Override
public int compare(CommandReport o1, CommandReport o2) {
return (int) (o1.getTaskId()-o2.getTaskId());
}
}); | 0 |
* @param params additional {@link HttpParams parameters}
Socket createSocket(HttpParams params) throws IOException; | 0 |
protected abstract Storage createStorage() throws Exception;
Storage storage = createStorage();
cron = new CronJobManager(storage);
cron.cronTriggered(job);
cron.cronTriggered(job);
cron.cronTriggered(job);
expectPersists(2);
tasks.add(new TwitterTaskInfo(task).setOwner(owner).setJobNam... | 0 |
* @version $Revision$ | 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 java.util.stream.Collectors;
import java.util.stream.Stream;
import org.junit.After;
import org.junit.Before;
import org.osgi.service.converter.Adapter;
import static org.junit.Assert.assertArrayEquals;
private Converter converter;
@Before
public void setUp() {
converter = new ConverterImpl... | 0 |
import static com.google.common.collect.Iterables.getOnlyElement;
/** Executes flatten PTransforms. */
/** A registrar which provides a factory to handle flatten PTransforms. */
String output = getOnlyElement(pTransform.getOutputsMap().values());
consumersBuilder.addAll((Iterable) pCollectionIdsToConsume... | 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.accumulo.core.file.streams.PositionedOutputs;
CachableBlockFile.Writer _cbw = new CachableBlockFile.Writer(PositionedOutputs.wrap(dos), "gz", conf, accumuloConfiguration); | 1 |
* @version $Revision: 1.9 $ $Date: 2004/05/31 22:39:20 $
if (!(list instanceof Serializable && isTestSerialization())) return;
if (!(list instanceof Serializable && isTestSerialization())) return;
if(list instanceof Serializable && !skipSerializedCanonicalTests() && isTestSerialization()) {
... | 0 |
*/
package org.apache.cocoon;
* @version CVS $Id: Main.java,v 1.7 2003/06/24 16:59:24 cziegeler Exp $ | 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 |
* @param baseURI
public RetrievalMethod(Element element, String baseURI) throws XMLSecurityException {
super(element, baseURI); | 0 |
conf.set("dfs.datanode.data.dir.perm", "775"); | 0 |
return "${" + text + "}"; | 0 |
import static org.hamcrest.Matchers.isA;
expectedException.expect(RuntimeException.class);
expectedException.expectCause(isA(CoderException.class));
pipeline.run(); | 0 |
if ("left".equals(root.getId())) { | 0 |
UserInteraction ui = session.getUserInteraction();
if ((ui != null) && ui.isInteractionAllowed(session)) { | 0 |
import org.apache.accumulo.core.util.ratelimit.RateLimiter;
public FileSKVIterator openReader(String file, boolean seekToBeginning, FileSystem fs, Configuration conf, RateLimiter readLimiter,
AccumuloConfiguration acuconf) throws IOException {
FileSKVIterator iter = findFileFactory(file).openReader(file, se... | 1 |
new HashMap<>();
userResourceList = new HashMap<>();
resourceList = new ArrayList<>(); | 0 |
return new TestSuite(ConvertUtilsTestCase.class); | 0 |
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
* @param origin details of the cookie origin
Cookie[] parse(Header header, CookieOrigin origin) throws MalformedCookieException;
* @param origin details of the cookie origin
void validate(Cookie cookie, CookieOrigin origin) throws Mal... | 0 |
import static org.junit.Assert.fail;
* Reject non-distinct output filenames.
*/
@Test
public void testCollidingOutputFilenames() {
SimpleSink sink = new SimpleSink("output", "test", "-NN");
SimpleSink.SimpleWriteOperation writeOp = new SimpleSink.SimpleWriteOperation(sink);
// A single shard does... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/axes/AncestorContext.java,v 1.13 2003/10/09 21:31:39 rdonkin Exp $
* $Revision: 1.13 $
* $Date: 2003/10/09 21:31:39 $
* any, must include the following acknowledgement:
* Altern... | 0 |
import org.apache.ambari.server.configuration.ComponentSSLConfiguration;
ComponentSSLConfiguration configuration = ComponentSSLConfiguration.instance();
PROPERTY_REQUEST_CONNECT_TIMEOUT, PROPERTY_REQUEST_READ_TIMEOUT,
configuration.getTruststorePath(), configuration.getTruststorePassword(), configur... | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
import junit.framework.Assert;
| 0 |
import org.apache.hc.core5.http.ClassicHttpResponse;
void submitResponse(ClassicHttpResponse response) throws IOException, HttpException; | 0 |
package org.apache.aurora.scheduler.quota;
import org.apache.aurora.gen.Quota;
import org.apache.aurora.scheduler.storage.entities.IQuota;
import static org.apache.aurora.scheduler.quota.QuotaComparisonResult.Result.INSUFFICIENT_QUOTA;
import static org.apache.aurora.scheduler.quota.QuotaComparisonResult.Result.SUFFIC... | 0 |
* @version $Id: UnixFTPEntryParserTest.java,v 1.12 2004/05/28 23:00:28 scohen Exp $
"-rwsr-sr-- 1 500 500 0 Mar 25 08:23 testSuidExec",
"-rw-r--r-- 1 1 3518644 May 25 12:12 std" | 0 |
component(m).impl(new ServiceConsumer(e)).withSvc(ServiceAbstract.class, srv -> srv.add(ServiceConsumer::bind).remove(ServiceConsumer::unbind)).build(); | 0 |
/**
* Gets the controller value as a String.
* @return the value
*/ | 0 |
new Object[] {(int) getNodeType(), | 0 |
* @param fileInfo the file to check (ignored) | 0 |
import org.apache.ambari.view.hive.resources.files.FileService;
import org.apache.ambari.view.hive.resources.jobs.atsJobs.ATSParserFactory;
import org.apache.ambari.view.hive.resources.jobs.atsJobs.ATSRequestsDelegate;
import org.apache.ambari.view.hive.resources.jobs.atsJobs.ATSRequestsDelegateImpl;
import org.json.si... | 0 |
import org.apache.commons.vfs.FileSystemManager;
* @version $Revision: 1.5 $ $Date: 2004/05/03 19:48:47 $
public DefaultLocalFileProvider(FileSystemManager manager)
super(manager);
return new LocalFileSystem(getFileSystemManager(), rootName, rootName.getRootFile()); | 0 |
@SuppressWarnings("synthetic-access")
@SuppressWarnings("synthetic-access") | 0 |
* Copyright 2016 Seznam.cz, a.s. | 0 |
public void validateCreatePayload(Request request) throws InvalidPayloadException { | 0 |
/**
* An element in a request processing chain.
*
* @since 5.0
*/ | 0 |
sb.append("Service={ serviceName=").append(getName())
.append(", clusterName=").append(cluster.getClusterName())
.append(", clusterId=").append(cluster.getClusterId())
.append(", desiredStackVersion=").append(getDesiredStackVersion())
.append(", desiredState=").append(getDesiredState())
... | 0 |
assertTrue(target.getAlertStates().size() > 0);
*
*/
@Test
public void testDeleteTargetWithNotices() throws Exception {
AlertTargetEntity target = m_helper.createAlertTarget();
List<AlertDefinitionEntity> definitions = createDefinitions();
AlertDefinitionEntity definition = definitions.get(0);... | 0 |
// XXX: this is not threaded yet, so it will block AWT!
if (globalBuffer != null) {
globalBuffer.flush();
}
// always de-register as a listener, to avoid
// memory leak
renderer.dispose();
... | 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 |
m.put(asText(random.nextInt()), asText(random.nextInt()),
new Value(Integer.toHexString(r).getBytes()));
BatchWriter bw = c.createBatchWriter("test", new BatchWriterConfig().setMaxMemory(10000L)
.setMaxLatency(1000L, TimeUnit.MILLISECONDS).setMaxWriteThreads(4));
String keys[][] = {{"foo... | 0 |
//TODO make this value customizable, just use this as a default | 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 java.util.UUID;
import java.util.concurrent.atomic.AtomicLong;
import org.codehaus.jackson.annotate.JsonIgnore;
@JsonIgnore
private static AtomicLong s_nextId = new AtomicLong(System.nanoTime());
setGuid(nextInternalId());
@JsonIgnore
public boolean validate(String id) {
try {
... | 0 |
import org.apache.hc.core5.reactor.IOSession;
import org.apache.hc.core5.reactor.ssl.SSLIOSession;
import org.apache.hc.core5.reactor.ssl.SSLMode;
import org.apache.hc.core5.reactor.ssl.SSLSetupHandler; | 1 |
* <p/> | 0 |
import org.apache.atlas.model.instance.AtlasEntity;
import org.apache.atlas.model.instance.AtlasObjectId;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collection;
public static Collection<AtlasObjectId> toObjectIds(Collection<AtlasEntity> entities) {
List<AtlasObjectId> ret = new ... | 1 |
/*
* 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 ma... | 0 |
* system dependent case sensitive way. A number of singleton instances | 0 |
package org.apache.felix.karaf.shell.log.layout; | 0 |
@Override
@Override
@Override | 0 |
import org.apache.http.nio.reactor.ListeningIOReactor;
ListeningIOReactor ioReactor = new DefaultIOReactor(params); | 0 |
*
*
*
/**
* @version $Revision: 1.5 $
* Creates a new Order object
}
} | 1 |
import org.apache.felix.framework.BundleWiringImpl;
// TODO: OSGi R4.3 - We need to get dynamic requirements using public API
// then we might not need to make the BundleWiringImpl and BundleRevisionImpl
// classes public.
? ((BundleWiringImpl) br.getWiring()).getDynamicRequirements() | 0 |
import com.google.common.collect.ImmutableMap;
import java.util.Collection;
import java.util.Map;
import javax.annotation.Nullable; | 0 |
* @ProcessElement | 0 |
import org.apache.commons.vfs.FileSystemOptions;
* @version $Revision: 1.4 $ $Date: 2004/05/01 18:14:28 $
public final static String ATTR_FILE_ENTRY_PARSER = "FEP";
protected FileName parseUri(final String uri)
return GenericFileName.parseUri(uri, DEFAULT_PORT);
protected FileSystem doCreateFileSys... | 0 |
public InputSplit getNextInputSplit(String host, int taskId) { | 0 |
* A file name for layered files.
* @version $Revision: 1.1 $ $Date: 2003/01/23 12:27:23 $
public class LayeredFileName
extends DefaultFileName
private String outerUri;
/**
* Returns the URI of the outer file.
*/
public String getOuterUri()
return outerUri;
public void setOuterUri... | 0 |
FileObject file = (opts == null) ? manager.resolveFile(path.getURI())
: manager.resolveFile(path.getURI(), opts);
file = (opts == null) ? VFS.getManager().resolveFile(url.toString())
: VFS.getManager().resolveFile(url.toString(), opts);
FileObj... | 0 |
import org.apache.sshd.util.BaseTest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
| 0 |
import javax.annotation.Nullable;
extends DoFn<
Iterable<WriteBundlesToFiles.Result<DestinationT>>,
KV<ShardedKey<DestinationT>, List<String>>> {
@Nullable private TupleTag<KV<ShardedKey<DestinationT>, List<String>>> multiPartitionsTag;
List<WriteBundlesToFiles.Result<DestinationT>> results = ... | 0 |
throw new SCRDescriptorException("Unable to write xml", file.toString(), 0, e);
throw new SCRDescriptorException("Unable to generate xml", file.toString(), 0, e);
throw new SCRDescriptorException("Unable to write xml", file.toString(), 0, e); | 0 |
* @version $Revision$ $Date$ | 0 |
/**
* Copyright 2013 Apache Software Foundation | 0 |
import javax.persistence.FetchType;
@Column(name="request_id", nullable = false)
private Long requestId;
/**
* @return the request id
*/
public Long getRequestId() {
return requestId;
}
/**
* @param id the request id
*/
public void setRequestId(Long id) {
requestId = id;
}
| 0 |
import java.util.concurrent.TimeUnit;
import org.apache.accumulo.core.cli.BatchScannerOpts;
import org.apache.accumulo.core.cli.ClientOpts;
import com.beust.jcommander.Parameter;
static class Opts extends ClientOpts {
@Parameter(names="--shardTable", required=true, description="name of the shard table")
S... | 1 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
Session session = (Session) request.getSession(createFlag); | 0 |
*
* @param type type should be the name of enum
* org.apache.hadoop.metadata.typesystem.types.DataTypes.TypeCategory
* Typically, would be one of all, TRAIT, CLASS, ENUM, STRUCT
* @return entity names response payload as json | 0 |
import org.apache.calcite.adapter.java.JavaTypeFactory;
import org.apache.calcite.jdbc.JavaTypeFactoryImpl;
import org.apache.calcite.rel.type.RelDataTypeSystem;
static final JavaTypeFactory TYPE_FACTORY = new JavaTypeFactoryImpl(RelDataTypeSystem.DEFAULT);
static RexBuilder rexBuilder = new RexBuilder(TYPE_FACTORY... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/WrapDynaBeanTestCase.java,v 1.3 2002/01/23 22:52:26 sanders Exp $
* $Revision: 1.3 $
* $Date: 2002/01/23 22:52:26 $
import junit.framework.Test;
import junit.framework.TestSuite;
* ... | 0 |
if (Tables.getNameToIdMap(HdfsZooInstance.getInstance()).containsKey(tableName))
{
String why = "Table name already exists: " + tableName;
throw new ThriftTableOperationException(null, tableName, operation, TableOperationExceptionType.EXISTS, why);
}
| 0 |
import org.osgi.framework.Constants;
configProps.setProperty(Constants.FRAMEWORK_STORAGE, args[0]); | 0 |
@Override | 0 |
Map<Resource.Type, String> mapIds = new HashMap<>();
Map<Resource.Type, String> mapIds = new HashMap<>(); | 1 |
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> | 0 |
new ServiceComponentHostInstallEvent("NAMENODE", hostname, now, "HDP-1.2.0"), "cluster1",
"HDFS", false, false); | 1 |
message.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION,
ByteArrayEntity entity = new ByteArrayEntity(content);
| 0 |
import java.io.IOException;
import java.util.Collections;
import org.apache.beam.sdk.values.PBegin;
import org.apache.beam.sdk.values.PCollection;
public static <T> BoundedSource<T> boundedSourceFromTransform(
AppliedPTransform<PBegin, PCollection<T>, PTransform<PBegin, PCollection<T>>> transform)
throws ... | 0 |
import java.util.Set;
* Fills the given set with the attribute names found in this selector.
*/
public void fillAttributeSet(Set attrSet) {
((ExtendedSelector)getSelector()).fillAttributeSet(attrSet);
((ExtendedSelector)getSiblingSelector()).fillAttributeSet(attrSet);
}
/** | 0 |
* @version $Id: Configuration.java,v 1.11 2004/10/18 09:52:02 ebourg Exp $
* If the key doesn't map to an existing object, the default value
* is returned.
* If the key doesn't map to an existing object, the default value
* is returned.
* If the key doesn't map to an existing object, the defau... | 0 |
import org.apache.sshd.server.scp.ScpCommandFactory; | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
// Findbugs does not correctly understand inheritance + nullability.
//
// coder & executionContext may be null due to parent class signature, and must be checked,
// despite not being nullable here
Datafl... | 0 |
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.SocketException; | 0 |
import org.apache.ambari.server.state.AlertFirmness;
* its {@link AlertState} changed or has it's {@link AlertFirmness} changed.
* <p/>
* An {@link AlertState} change coupled with a {@link AlertFirmness#HARD}
* firmness is what would eventually trigger notifications to be created.
buffer.append(", firmness=").a... | 0 |
/**
* Creates a copy of this instance
*
* @return new instance of the BasicHttpProcessor
*/
public BasicHttpProcessor copy() {
BasicHttpProcessor clone = new BasicHttpProcessor();
if (this.requestInterceptors != null) {
clone.requestInterceptors = new ArrayList(t... | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 0 |
import org.apache.commons.lang.StringUtils;
import org.junit.Test;
| 0 |
private KeyPair kp; | 1 |
import java.util.Map;
import junit.framework.Assert; | 0 |
import com.google.cloud.dataflow.sdk.util.SerializableUtils;
this.source = SerializableUtils.ensureSerializable(source);
this.source = SerializableUtils.ensureSerializable(source); | 0 |
import com.twitter.mesos.gen.HostStatus;
* Event sent when a host changed maintenance state.
*/
public static class HostMaintenanceStateChange implements PubsubEvent {
private final HostStatus status;
public HostMaintenanceStateChange(HostStatus status) {
this.status = checkNotNull(status);
}... | 0 |
if (client != null) {
mmi = client.getMasterStats(null, SecurityConstants.getSystemCredentials());
} else {
mmi = null;
}
if (client != null) {
}
if (mmi == null)
UtilWaitThread.sleep(1000); | 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 |
package org.apache.accumulo.examples.wikisearch.logic;
import org.apache.accumulo.examples.wikisearch.logic.AbstractQueryLogic;
import org.apache.accumulo.examples.wikisearch.logic.QueryLogic;
import org.apache.accumulo.examples.wikisearch.parser.RangeCalculator;
import org.apache.accumulo.examples.wikisearch.sample.Do... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.