Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import java.io.ByteArrayOutputStream;
import java.util.zip.DeflaterOutputStream;
import com.twitter.mesos.gen.Attribute;
import com.twitter.mesos.gen.HostAttributes;
import com.twitter.mesos.gen.ScheduleStatus;
import com.twitter.mesos.gen.TwitterTaskInfo;
Snapshot snapshot = createSnapshot();
@Test
public void... | 0 |
return SVG_MASK_MASK_UNITS_DEFAULT_VALUE;
SVGAnimatedLength result;
if (xReference == null ||
(result = (SVGAnimatedLength)xReference.get()) == null) {
result = new SVGOMAnimatedLength(this, null, SVG_X_ATTRIBUTE, null);
xReference = new WeakRefe... | 0 |
import org.apache.commons.collections4.map.LRUMap; | 0 |
import static org.apache.ambari.server.api.services.stackadvisor.recommendations.RecommendationResponse.BindingHostGroup;
import static org.apache.ambari.server.api.services.stackadvisor.recommendations.RecommendationResponse.HostGroup;
import org.apache.ambari.server.api.services.AmbariMetaInfo;
import org.apache.amba... | 0 |
* <p>
* AccumuloClient objects are intended to be thread-safe, and can be used by multiple threads.
* However, care should be taken to ensure that the client is eventually closed, to clean up any
* resources in use in the client application when all threads are finished with the AccumuloClient
* object. Additional... | 0 |
import org.apache.felix.sigil.common.osgi.VersionRange;
import org.apache.felix.sigil.common.osgi.VersionRangeBoundingRule; | 0 |
return asyncExecCallback.handleResponse(response, entityDetails); | 0 |
suite.addTest(MVSFTPEntryParserTest.suite());
| 0 |
public void test_SimpleComponent_service() throws Exception
public void test_DelayedSimpleComponent_service_single_use() throws Exception
public void test_DelayedSimpleComponent_service_multi_use() throws Exception
public void test_DelayedSimpleComponent_service_keep_instance() throws Exception | 0 |
package org.apache.felix.sigil.eclipse.ui.internal.editors.project; | 0 |
import org.apache.http.auth.ChallengeState;
this.authCache.put(host, new BasicScheme(ChallengeState.TARGET));
return this;
}
public Executor authPreemptiveProxy(final HttpHost host) {
this.authCache.put(host, new BasicScheme(ChallengeState.PROXY)); | 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 no... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/impl/StaticTag.java,v 1.11 2002/09/30 17:38:16 jstrachan Exp $
* $Revision: 1.11 $
* $Date: 2002/09/30 17:38:16 $
* $Id: StaticTag.java,v 1.11 2002/09/30 17:38:16 jstrachan Exp $
import org... | 0 |
throw new TransientStorageException("Storage is not " + state); | 0 |
final int fragementSizeHint,
super(new HttpTransportMetricsImpl(), buffersize, fragementSizeHint, encoder);
this(buffer, buffersize, buffersize, null);
this(new ByteArrayOutputStream(), BUFFER_SIZE, BUFFER_SIZE, encoder);
this(new ByteArrayOutputStream(), BUFFER_SIZE, BUFFER_... | 0 |
public Object execute(JexlContext context) { | 0 |
import org.apache.commons.lang.ClassUtils;
return ClassUtils.getClass(name); | 0 |
@Override
@Override | 0 |
import org.apache.hc.core5.http.ClassicHttpRequest;
import org.apache.hc.core5.http.ClassicHttpResponse; | 0 |
* </p>
* </p> | 0 |
/*
* Copyright 2006 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 |
suite.addTest(new TestSuite(CausedIOExceptionTestCase.class)); | 0 |
package org.apache.commons.codec2.binary; | 0 |
URL url = f.toURI().toURL(); | 0 |
* (there are no defaults for a general Beam pipeline).
// ExampleUtils will try to cancel the pipeline and the injector before the program exists. | 0 |
if (batches < 0) { | 0 |
* Little class to carry in info such as a file or template name, line and column for
* information error reporting from the uberspector implementations.
* Originally taken from velocity for self-sufficiency.
public class Info implements DebugInfo {
private final int line;
private final int column;
privat... | 0 |
import com.google.common.annotations.VisibleForTesting;
import org.apache.beam.sdk.extensions.euphoria.core.translate.coder.EuphoriaCoderProvider;
this(name, pipeline, true);
}
/**
* Construct the {@link BeamFlow}.
*
* @param pipeline pipeline to wrap into this flow
*/
private BeamFlow(String nam... | 0 |
* @version $Revision$ $Date$ | 0 |
final String uri = request.getRequestUri(); | 0 |
public static class Result {
public int getExitCode() {
public String getStdout() {
public String getStderr() { | 0 |
import org.apache.batik.ext.awt.image.renderable.AffineRable;
import org.apache.batik.ext.awt.image.renderable.Filter;
import org.apache.batik.ext.awt.image.renderable.FilterChainRable;
import org.apache.batik.ext.awt.image.renderable.PadMode;
import org.apache.batik.ext.awt.image.renderable.PadRable;
import org.apache... | 0 |
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
i... | 0 |
class LoggingConnFactory implements HttpConnectionFactory<LoggingBHttpServerConnection> { | 0 |
* Copyright 1999-2005 The Apache Software Foundation.
*
*
*
* This object holds a set of objects for an environment.
*
*
* @version $Id$
| 0 |
@Override
public int execute(String fullCommand, CommandLine cl, Shell shellState) {
AccumuloClassLoader.printClassPath();
return 0;
}
@Override
public String description() {
return "lists the current files on the classpath";
}
@Override
public int numArgs() {
return 0;
} | 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/RandomAccessCharList.java,v 1.2 2003/04/16 19:03:39 rwaldhoff Exp $
* @version $Revision: 1.2 $ $Date: 2003/04/16 19:03:39 $
// could cache these like Str... | 0 |
.mergeStatesBy(WordCountState::combine)
assertNotNull(reduce.getStateMerger());
.mergeStatesBy(WordCountState::combine)
.mergeStatesBy(WordCountState::combine)
.mergeStatesBy(WordCountState::combine)
.mergeStatesBy(WordCountState::combine)
static void ... | 0 |
final Map<String, String> kerberosEnvProperties = createNiceMock(Map.class);
expect(kerberosEnvProperties.get("realm")).andReturn("EXAMPLE.COM").once();
final Map<String, String> kerberosEnvProperties = createMock(Map.class);
expect(kerberosEnvProperties.get("realm")).andReturn("FOOBAR.COM").once();
... | 0 |
protected static final String RESOURCES =
if (gdt.getOwnerDocument() == null)
* The trimming of id's is used by the 'use' element to keep
IdSoftRef(Object o, String id) {
this.id = id;
if (list != null)
}
if ((oldId == new... | 1 |
import org.apache.ambari.logsearch.common.Marker;
@Marker
public interface AuditLogRequest extends BaseLogRequest, LastPageParamDefinition, UserParamDefinition { | 0 |
@Parameter(names = {"-readonly", "--readonly"}, description = "read only")
@Parameter(names = {"-count", "--count"}, description = "count", required = true)
Opts() {
super("mrtest1");
}
| 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
import java.util.Comparator;
/**
* Compares 2 {@link NamedResource}s according to their {@link #getName()}
* value case <U>insensitive</U>
*/
Comparator<NamedResource> BY_NAME_COMPARATOR=new Comparator<NamedResource>() {
@Override
public int compare(NamedResource r1, ... | 0 |
import org.apache.hc.core5.http.impl.bootstrap.HttpRequester;
import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
import org.apache.hc.core5.http.impl.bootstrap.RequesterBootstrap;
import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap; | 0 |
* $Header: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/core/RunTag.java,v 1.8 2002/07/06 13:53:39 dion Exp $
* $Id: RunTag.java,v 1.8 2002/07/06 13:53:39 dion Exp $
public class RunTag extends TagSupport { | 0 |
import org.apache.commons.logging.Log;
import org.apache.cocoon.caching.CachedResponse;
import org.apache.cocoon.components.sax.XMLByteStreamCompiler;
import org.apache.cocoon.components.source.SourceUtil;
import org.apache.cocoon.util.AbstractLogEnabled;
* @since 2.1
* @version $Id$
public final class PreemptiveL... | 0 |
interface StepStateAndTimers<K> {
interface Provider {
<K> StepStateAndTimers<K> forStepAndKey(PTransformNode transform, StructuralKey<K> key);
}
CopyOnAccessInMemoryStateInternals<K> stateInternals();
DirectTimerInternals timerInternals(); | 0 |
import org.apache.sshd.common.util.threads.ExecutorService;
InternalScpCommand(String command, ExecutorService executorService,
super(command, executorService, sendSize, receiveSize, opener, eventListener);
getExecutorService(), | 1 |
.setSkew(Duration.ZERO) | 0 |
String name,
Flow flow, Dataset<IN> input,
UnaryFunction<KIN, KEY> extractor,
UnaryFunction<WIN, Long> eventTimeAssigner /* optional */,
super(name, flow, windowing, eventTimeAssigner, extractor, partitioning);
String name,
Flow flow,
Dataset<IN> input,
... | 0 |
// do nothing - exclude persistence from perf | 0 |
private static class GeoToWktConverter {
/**
* {@link com.thinkaurelius.titan.core.attribute.Geoshape} stores Points in the String format: point[X.0,Y.0].
* Solr needs it to be in Well-Known Text format: POINT(X.0 Y.0)
*/
static String convertToWktString(Geoshape fieldValu... | 0 |
import org.apache.cocoon.woody.FormContext;
* @deprecated use the new <wd:repeater-action> widgets.
public void handleActionEvent(FormContext context, ActionEvent actionEvent) {
Form form = actionEvent.getSourceWidget().getForm();
Repeater repeater = (Repeater) form.getWidget(this.repeate... | 0 |
filterRegion, | 0 |
public static AfterProcessingTime pastFirstElementInPane() { | 0 |
import org.apache.beam.runners.core.construction.PipelineResources;
prepareFilesToStageForRemoteClusterExecution(mOptions);
/**
* Local configurations work in the same JVM and have no problems with improperly formatted files
* on classpath (eg. directories with .class files or empty directories). Prepare f... | 0 |
if (a.length>0) {
port=Integer.parseInt(a[0]);
}
if (a.length>1) {
this.directory=a[1];
} else {
this.directory="/tmp";
}
if (!this.stopping) {
e.printStackTrace(System.err);
} | 0 |
static class KeyTokenInvalidFn extends DoFn<KV<String, String>, KV<String, String>> {
private static final long serialVersionUID = 0;
static boolean thrown = false;
@Override
public void processElement(ProcessContext c) {
if (!thrown) {
thrown = true;
throw new StreamingDataflow... | 0 |
package org.apache.zookeeper; | 0 |
// With the current implementation of MESOS-313, Mesos is also reporting clean terminations of
// custom executors via the executorLost callback.
if (status != 0) {
log.warn("Lost executor " + executorID + " on slave " + slaveID + " with status " + status);
counters.get("scheduler_lost_executors... | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; | 0 |
import org.apache.aurora.GuavaUtils;
task -> task.getJob().getRole(),
java.util.Optional.ofNullable(mutableLock).map(ILock::build));
java.util.Optional.ofNullable(mutableLock).map(ILock::build));
java.util.Optional.ofNullable(mutableLock).map(ILock::build));
private void va... | 0 |
* @param logLevel the maximum allowed log level. If message is logged with
* lower level it will not be forwarded to the logger.
String str = IOUtils.toString( templateStream, "UTF-8" );
switch ( str.charAt(0) )
{ // skip BOM
case 0xF... | 0 |
* Autogenerated by Thrift Compiler (0.11.0) | 0 |
* "License"); you may not use this file except in compliance
* distributed under the License is distributed on an "AS IS" BASIS, | 0 |
* @version CVS $Id: TempRepeaterJXPathBinding.java,v 1.4 2004/04/23 11:42:58 mpo Exp $
Repeater repeater = (Repeater) selectWidget(frmModel, this.repeaterId);
Repeater repeater = (Repeater) selectWidget(frmModel, this.repeaterId); | 0 |
* @throws IOException If failed to send identification
protected IoWriteFuture sendServerIdentification(String... headerLines) throws IOException {
ioSession.writePacket(new ByteArrayBuffer((errorMessage + "\n").getBytes(StandardCharsets.UTF_8))) | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/quartz/src/java/org/apache/commons/jelly/tags/quartz/WaitForSchedulerTag.java,v 1.1 2003/01/07 14:54:15 dion Exp $
* $Revision: 1.1 $
* $Date: 2003/01/07 14:54:15 $ | 0 |
import java.io.Serializable;
public interface FieldValueGetter<ObjectT, ValueT> extends Serializable { | 0 |
URL result = getEntry(name);
return result != null ? result : m_classLoader.getResource(name != null ? name.trim().startsWith("/") ? name.substring(1) : name : null);
Enumeration<String> result = new EntryFilterEnumeration<String>(m_revision, false, path, null, false,
return result.hasMo... | 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... | 0 |
ambariContext.createAmbariResources(isA(ClusterTopology.class), eq(CLUSTER_NAME), (SecurityType) isNull(), eq("1"), anyLong()); | 0 |
* @version $Id: DoubleMetaphone.java,v 1.21 2004/05/24 00:25:22 ggregory Exp $
}
return doubleMetaphone((String) obj); | 0 |
import org.apache.ambari.server.orm.entities.ClusterVersionEntity;
import org.apache.ambari.server.state.StackId;
import org.junit.Assert;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.persist.PersistService;
private final static StackId HDP_22_STACK = new StackId("HDP", ... | 0 |
if (!(pObject instanceof String)) { | 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 m... | 0 |
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
* Implements a {@link MultiValuedMap}, using a {@link LinkedHashMap} to provide
* data storage. This MultiValuedMap implementatio... | 0 |
import java.util.concurrent.CopyOnWriteArraySet;
protected final Collection<SessionListener> sessionListeners = new CopyOnWriteArraySet<>();
protected final Collection<ChannelListener> channelListeners = new CopyOnWriteArraySet<>();
protected final Collection<PortForwardingEventListener> tunnelListeners = n... | 0 |
/**
* Tests that when there are no tasks and all counts are 0, that the returned
* status is {@link HostRoleStatus#COMPLETED}.
*
* @throws Exception
*/
@Test
public void testGetCompletedStatusForNoTasks() throws Exception {
// no status / no tasks
CalculatedStatus status = CalculatedStatus.... | 0 |
private final String excludeString;
| 0 |
printMessage("stdout", outputFile); | 0 |
public boolean hasTask(String taskId);
public boolean isRunning(String taskId);
public void deleteCompletedTask(String taskId); | 0 |
public class UserAuthPasswordFactory extends AbstractUserAuthFactory {
public static final String NAME = PASSWORD;
super(NAME); | 0 |
if (!instructions.containsKey(Analyzer.PRIVATE_PACKAGE)) {
properties.put(Analyzer.EXPORT_PACKAGE, bsn + ".*");
} | 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 |
.getStepContext(stepName, stepName); | 0 |
* limitations under the License. | 0 |
* limitations under the License. | 0 |
entityManagerProvider.get().getEntityManagerFactory().getCache().evictAll(); | 0 |
* @version $Id$ | 0 |
import static org.easymock.EasyMock.anyLong;
import org.apache.ambari.server.agent.stomp.HostLevelParamsHolder;
import org.apache.ambari.server.events.HostLevelParamsUpdateEvent;
import org.apache.ambari.server.state.Host;
import org.easymock.MockType;
private Provider<HostLevelParamsHolder> m_hostLevelParamsHolder;
... | 0 |
import org.apache.ambari.view.hive.utils.SharedObjectsFactory;
private SharedObjectsFactory sharedObjectsFactory;
public SharedObjectsFactory getSharedObjectsFactory() {
if (sharedObjectsFactory == null) {
sharedObjectsFactory = new SharedObjectsFactory(context);
return sharedObjectsFactory;
public ... | 0 |
if (zcpa != null) {
}
if (!cacheAndWatch) {
}
if (getPropCacheAccessor().isPropertySet(prop, getPath())) {
}
this.tableIters = List.copyOf(ii);
var imb = ImmutableMap.<String,Map<String,String>>builder();
imb.put(entry.getKey(), Map.copyOf(entry.getValue()));
var builder ... | 0 |
import com.google.common.io.Files;
import java.nio.charset.StandardCharsets;
public void testGetSizeBytes() throws Exception {
String data = "TestData";
File file = tmpFolder.newFile();
Files.write(data, file, StandardCharsets.UTF_8);
assertEquals(data.length(), IOChannelUtils.getSizeBytes(file.getPa... | 0 |
// If this is an attempt to create a connection to the root of
// the bundle, then throw an exception since this isn't possible.
// We only allow "/" as a valid URL so it can be used as context
// for creating other URLs.
String path = url.getPath();
if ((path == null) |... | 0 |
try (FileWriter w = new FileWriter(new File(pkgdir, TYPE_NAME + ".java"))) { | 0 |
/**
* @author $Id: bbac24ccf55921dd04c219987d75ec0ebb16484a $
*/ | 0 |
Field field = fields[j];
Class type = field.getType();
if ((instanceName == null && type.equals(clazz))
|| (instanceName != null && field.getName().equals(instanceName) && type.isAssignableFrom(clazz))) {
fie... | 0 |
/*
* Copyright 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 applicabl... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.