Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import java.util.TimerTask;
import org.apache.accumulo.server.util.time.SimpleTimer;
static String cachedInstanceName = null;
synchronized(BasicServlet.class) {
// Learn our instance name asynchronously so we don't hang up if zookeeper is down
if (cachedInstanceName == null) {
SimpleTimer.getI... | 0 |
package org.apache.commons.beanutils2.bugs;
import org.apache.commons.beanutils2.BeanUtils; | 1 |
entityGuids, Constants.ATTR_NAME_REPLICATED_TO, result.getChangeMarker());
Constants.ATTR_NAME_REPLICATED_FROM, result.getExportResult().getChangeMarker()); | 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 |
Set<Resource> expected = new HashSet<>();
Set<String> names = new HashSet<>();
Set<String> requestedIds = new HashSet<>(); | 1 |
import org.apache.http.util.Asserts;
Asserts.notNull(queue, "Queue");
Asserts.notNull(testjob, "Test job"); | 0 |
import aQute.service.reporter.*; | 0 |
import org.apache.hc.core5.http.nio.AsyncPushConsumer;
import org.apache.hc.core5.http.nio.HandlerFactory;
final HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
}, pushHandlerFactory, executeContext);
public void execute(
final AsyncClientExchangeHandler exc... | 0 |
Optional.absent(), | 0 |
Assert.assertEquals(0, URLEncodedUtils.format(params, StandardCharsets.US_ASCII).length());
Assert.assertEquals("Name0", URLEncodedUtils.format(params, StandardCharsets.US_ASCII));
Assert.assertEquals("Name1=Value1", URLEncodedUtils.format(params, StandardCharsets.US_ASCII));
Assert.asse... | 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 |
builder.setHeader("Export-Package", "org.apache.felix.scr.integration.components,org.apache.felix.scr.integration.components.activatesignature,org.apache.felix.scr.integration.components.circular,org.apache.felix.scr.integration.components.concurrency");
mavenBundle( "org.apache.felix", "org.apa... | 0 |
* output stream to write to the standard input stream of the subprocess
* @throws IOException
* thrown when an I/O exception occurs.
* @throws IOException
* thrown when an I/O exception occurs.
* @throws IOException
* thrown when an I/O e... | 0 |
return new SplittableParDo(transform); | 0 |
int i = index; | 0 |
@Override | 0 |
// <!> FIXME: hack to compute the original document's size
if (ctx.getDocumentSize() == null) {
ctx.setDocumentSize(new Dimension((int)w, (int)h));
} | 0 |
*
*
private Object readResolve() {
return INSTANCE;
}
| 0 |
import org.apache.commons.collections.iterators.EmptyIterator;
import org.apache.commons.collections.iterators.EmptyListIterator;
import org.apache.commons.collections.iterators.EmptyMapIterator;
import org.apache.commons.collections.iterators.EmptyOrderedMapIterator;
* <p>
* WARNING: Due to human error certain binar... | 0 |
import java.util.HashSet;
HashSet<String> processedPTransformIds,
processedPTransformIds,
// Skip reprocessing processed pTransforms.
if (!processedPTransformIds.contains(pTransformId)) {
urnToPTransformRunnerFactoryMap
.getOrDefault(pTransform.getSpec().getUrn(), defaultPTrans... | 0 |
/*
ots.addTestSuite(AutoHandlerTest.class); | 0 |
* Copyright 2001-2006 The Apache Software Foundation | 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 |
* <LI>Hadoop input, output formats and partitioners in {@code org.apache.accumulo.hadoop.mapred}
* and {@code org.apache.accumulo.hadoop.mapreduce} packages.
* <LI>{@link Lexicoder} and all of its implementations in the same package. | 0 |
runner.onTimer( | 0 |
/* $Id$
*
* 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"); ... | 0 |
Element rootElement = doc.createElementNS(null, "root");
signedResourceElement.setAttributeNS(Constants.NamespaceNS, "xmlns:custom", "http://custom/");
Element signedResourceElement = doc.createElementNS(null, "signedContent"); | 0 |
taskMapper.insertPorts(result.getId(), task.getAssignedTask().getAssignedPorts()); | 0 |
private WeakFastHashMap converters = new WeakFastHashMap();
converters.setFast(false);
converters.setFast(true); | 0 |
public synchronized FileObject resolveFile(final FileName name) throws FileSystemException
synchronized (listenerMap)
ArrayList listeners = (ArrayList) listenerMap.get(file.getName());
if (listeners == null)
{
listeners = new ArrayList();
l... | 0 |
import org.apache.accumulo.cloudtrace.instrument.Span;
import org.apache.accumulo.cloudtrace.instrument.Trace; | 0 |
/**
* @since Mar 20, 2002
* @version CVS $Id: CocoonInstallationBean.java,v 1.2 2003/03/16 17:49:05 vgritsenko Exp $ | 0 |
for (double testValue : testValues) {
maxLength = Math.max((gc.doubleString(testValue)).length(), maxLength); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/Digester.java,v 1.24 2001/11/14 18:42:16 craigmcc Exp $
* $Revision: 1.24 $
* $Date: 2001/11/14 18:42:16 $
* @version $Revision: 1.24 $ $Date: 2001/11/14 18:42:16 $
if (debug ... | 0 |
import javax.management.NotCompliantMBeanException;
public FeaturesServiceMBeanImpl() throws NotCompliantMBeanException {
super(FeaturesServiceMBean.class, new NotificationBroadcasterSupport() {
@Override
public MBeanNotificationInfo[] getNotificationInfo() {
return g... | 0 |
/**
* Create a new PageScopeContext.
* @param pageContext base
*/
* @return Enumeration of attribute names
/**
* Get the value of the specified attribute.
* @param attribute name
* @return Object
*/
/**
* Set the specified attribute.
* @param attribute to se... | 0 |
import org.apache.batik.util.awt.image.GraphicsUtil;
GraphicsUtil.copyData(origSrc, src);
srcCMPre = GraphicsUtil.coerceColorModel(srcCM, true);
GraphicsUtil.copyData(origSrc, src);
dstCMPre = GraphicsUtil.coerceColorModel(dstCM, true);
GraphicsUtil.copyData(... | 0 |
// FELIX-1473 - allow method calls on String objects
assertEquals("hello", c.execute("cmd = echo; eval $cmd hello"));
assertEquals(4, c.execute("'four' length"));
try {
c.execute("four length");
fail("expected: command not found: four");
} catch ... | 0 |
import org.apache.http.nio.NHttpClientEventHandler;
public class HttpAsyncClientProtocolHandler implements NHttpClientEventHandler {
HttpAsyncRequestExecutionHandler<?> handler = state.getHandler();
handler = (HttpAsyncRequestExecutionHandler<?>) conn.getContext().removeAttribute(
... | 0 |
import org.apache.sshd.client.auth.UserAuthPublicKeyFactory; | 0 |
package org.apache.accumulo.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
for (@SuppressWarnings("unused")
Entry<Key,Value> entry : c.createScanner(tableName, Authorizations.EMPTY))
} | 0 |
void putMetrics(Collection<TimelineMetric> elements); | 0 |
setLocation(widgetElement, definition); | 0 |
* @since 1.11.2 | 0 |
if (future.isWritten()) {
log.debug("Message SSH_MSG_CHANNEL_CLOSE written on channel {}", AbstractChannel.this);
if (gracefulState.compareAndSet(0, CLOSE_SENT)) {
// Waiting f... | 0 |
public static final String ZUSERS = "/users"; | 0 |
package org.apache.commons.vfs2.provider;
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.FileSelector;
import org.apache.commons.vfs2.FileSystemException; | 1 |
import org.apache.accumulo.test.randomwalk.Environment;
public void visit(State state, Environment env, Properties props) throws Exception {
Connector conn = env.getInstance().getConnector(WalkingSecurity.get(state,env).getSysUserName(), WalkingSecurity.get(state,env).getSysToken());
String tableUserName = Wa... | 0 |
import java.io.Writer;
import org.apache.zookeeper.common.AtomicFileWritingIdiom;
import org.apache.zookeeper.common.AtomicFileWritingIdiom.WriterStatement;
private void writeLongToFile(String name, final long value) throws IOException {
new AtomicFileWritingIdiom(file, new WriterStatement() {
@... | 0 |
ContainerUtil.dispose(bean); | 0 |
implements Serviceable { | 0 |
configureForSsl(cfg);
BulkIT.runTest(getConnector(), getTableNames(1)[0], this.getClass().getName(), cluster.getConfig().getDir()); | 0 |
import org.apache.ambari.logsearch.config.zookeeper.model.inputconfig.impl.MapFieldCopyDescriptorImpl;
MapFieldCopyDescriptorImpl mapFieldCopyDescriptor = new MapFieldCopyDescriptorImpl();
mapFieldCopyDescriptor.setCopyName("someOtherField");
assertTrue("Could not initialize!", mapperFieldCopy.init(null, "s... | 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 |
} catch (ClassNotFoundException e) {
classLoader = MappedPropertyDescriptor.class.getClassLoader();
} catch (ClassNotFoundException e) { | 0 |
package org.apache.felix.dm.samples.annotation;
import org.apache.felix.dm.annotation.api.Service;
import org.apache.felix.dm.annotation.api.Start;
import org.apache.felix.dm.annotation.api.Stop;
@Service
public class ServiceProvider implements ServiceInterface
{
public ServiceProvider()
{
}
@Start
... | 0 |
for (E e : getConfirmed()) { | 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 |
* @deprecated (4.3) use {@link org.apache.http.client.config.RequestConfig}
* and constructor parameters of
* {@link org.apache.http.auth.AuthSchemeProvider}s.
* Defines the order of preference for supported
* {@link org.apache.http.auth.AuthScheme}s when authenticating with
* the target host.
... | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Objects; | 0 |
Assert.assertEquals(8, results.size());
Assert.assertEquals("user0_MagentaKangaroo", results.get(0).getUser());
Assert.assertEquals("MagentaKangaroo", results.get(0).getTeam());
Assert.assertEquals(Integer.valueOf(3), results.get(0).getScore()); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/fmt/src/java/org/apache/commons/jelly/tags/fmt/FormatDateTag.java,v 1.3 2003/10/09 21:21:18 rdonkin Exp $
* $Revision: 1.3 $
* $Date: 2003/10/09 21:21:18 $
* any, must include the following acknowledgement:
*... | 0 |
@Deprecated | 0 |
import java.util.Map;
@Override
public ConfigValidationResult validateTargetConfig(Map<String, String> properties) {
return null;
}
@Override
public ConfigValidationResult validateTargetConfig(
Map<String, String> properties) {
return null;
} | 0 |
public <T2> Window[] apply(Context<T2> context) { | 0 |
import static org.junit.Assert.assertEquals;
@Test
public void testGetStackArtifactResourceProvider() {
AmbariManagementController managementController = createMock(AmbariManagementController.class);
ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider(
Resource.Type.S... | 0 |
final AccumuloClient client = this.getClient();
assertEquals(1, client.instanceOperations().getTabletServers().size());
client.tableOperations().create(tableName);
client.tableOperations().addSplits(tableName, splits);
while (client.instanceOperations().getTabletServers().size() == 1) { | 0 |
import java.awt.font.FontRenderContext; | 0 |
ComponentServiceTest.class, HostComponentServiceTest.class, ReadHandlerTest.class, | 0 |
public static final String RPC_ACCUMULO_PRINCIPAL_MISMATCH_MSG = "RPC principal did not match requested Accumulo principal";
throw new org.apache.accumulo.proxy.thrift.AccumuloSecurityException(RPC_ACCUMULO_PRINCIPAL_MISMATCH_MSG); | 0 |
import org.apache.beam.integration.nexmark.NexmarkOptions;
NexmarkOptions options = PipelineOptionsFactory.as(NexmarkOptions.class);
NexmarkOptions options = PipelineOptionsFactory.as(NexmarkOptions.class);
NexmarkOptions options = PipelineOptionsFactory.as(NexmarkOptions.class); | 0 |
* @param body the body of the request; may be null
public InputStream readFrom(String path, String requestMethod, String body,
Map<String, String> headers, boolean useAmbariSession) throws IOException;
/**
* Read from the input stream specified by the given path on ... | 0 |
private static final long serialVersionUID = 1L;
public BadArgumentException(String desc, String badarg, int index) {
super(desc, badarg, index);
} | 1 |
if (!offer.hasCpuAndMem()) {
// This offer lacks any type of CPU or mem resource, and therefore will never match
// a task.
continue;
}
evaluatedOffers.incrementAndGet(); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/HashBag.java,v 1.11 2003/12/28 16:36:48 scolebourne Exp $
* @deprecated Moved to bag subpackage and rewritten internally. Due to be removed in v4.0.
* @version $Revision: 1.11 $ ... | 0 |
import org.apache.batik.ext.awt.image.GraphicsUtil;
* This implements an adaptive pallete generator to reduce images to a
* specified number of colors.
* @version $Id$ */
* approximagely in half to generate two cubes.
*/
* palette with number of colors specified.
* @param bi the image to be pr... | 0 |
if (s==2) {
acc.add(new Integer(idx+1));
}
if (s.contains(any)) {
return s;
} | 0 |
boolean thisOneWasSigned = sig.getSignedInfo().getVerificationResult(i);
if (thisOneWasSigned) {
System.out.println("--- Signed Content follows ---");
System.out.println(new String(sig.getSignedInfo().getSignedContentItem(i)));
}
System.out.println("");
Sys... | 0 |
import com.google.inject.Singleton;
| 0 |
if (path.length() == 0) {
//it means input parameter path is just plugin name like /features but not real resource path.
//on felix the return url would be null in this case, which is correct expected behavior.
//but on equinox the return url is like bundleresource://184.fwk1... | 0 |
import org.apache.hc.core5.annotation.Immutable;
import org.apache.hc.core5.util.Args; | 1 |
private static final HashSet<SpanReceiver> receivers = new HashSet<>(); | 0 |
private static final org.slf4j.Logger log =
org.slf4j.LoggerFactory.getLogger(ClassLoaderUtils.class);
log.debug(e.getMessage(), e);
log.debug(e.getMessage(), e);
log.debug(e.getMessage(), e);
log.debug(e.getMessage(), e);
... | 1 |
* will cause each image pixel to be normalized. Default is "false".
* </dd>
* <dt><allow-enlarging></dt>
* <dd>This parameter is optional. By default, if the image is smaller
* than the specified width and height, the image will be enlarged.
* In some circumstances this b... | 1 |
* @version $Id: BasePropertiesConfiguration.java,v 1.16 2004/07/24 15:49:01 epugh Exp $
catch (IOException ioe2)
{
throw new ConfigurationException("Could not close writer while saving to file " + filename,ioe2);
} | 0 |
log( LogService.LOG_DEBUG, "ImmediateComponentHolder About to actually configure the dependency managers for component for pid {0} ",
new Object[] {pid}, null );
log( LogService.LOG_DEBUG, "ImmediateComponentHolder Finished configuring the dependency managers for ... | 0 |
* a framework-specific way using {@link Reader.DynamicSplitRequest}: e.g., if the framework
* supports the notion of positions, it might be a position at which the input is asked to split
* itself (which is not necessarily the same position at which it <i>will</i> split itself);
* it might be an app... | 0 |
import org.apache.accumulo.server.ServerContext;
ServerContext context = EasyMock.createMock(ServerContext.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 |
@Override
@Override | 0 |
"ZooKeeper Server process", "Supervisors process")); | 0 |
/**
* {@inheritDoc}
*/
@Override
public boolean isUpgradeSuspended() {
UpgradeEntity lastUpgradeItemForCluster = upgradeDAO.findLastUpgradeForCluster(clusterId);
if (null != lastUpgradeItemForCluster) {
return lastUpgradeItemForCluster.isSuspended();
}
return false;
} | 0 |
import java.nio.charset.StandardCharsets;
private final DoFnTester<KeyedWorkItem<byte[], KV<InputT, RestrictionT>>, OutputT> tester;
KeyedWorkItems.elementsWorkItem(
"key".getBytes(StandardCharsets.UTF_8), Collections.singletonList(windowedValue)));
tester.processElement(
Key... | 0 |
import com.google.common.collect.Multimap;
import net.lag.crai.Crai;
import net.lag.craijce.CraiJCE;
import net.lag.jaramiko.Message;
import net.lag.jaramiko.PKey;
import net.lag.jaramiko.SSHException;
Pair<String, String> key = Pair.of(role, user); | 0 |
* @return The ClientFactoryManager for this session.
@Override ClientFactoryManager getFactoryManager(); | 0 |
public UnsupportedDigestAlgorithmException(final String message) {
public UnsupportedDigestAlgorithmException(final String message, final Throwable cause) { | 0 |
private static final byte[] ZERO_BYTE = "0".getBytes(Constants.UTF8);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAME, tableName.getBytes(Constants.UTF8), existsPolicy);
zoo.putPersistentData(zTablePath + Constants.ZTABLE_STATE, state.name().getBytes(Constants.UTF8), existsPolicy);
zoo.putPer... | 0 |
* Autogenerated by Thrift Compiler (0.9.3) | 0 |
/**
* examples included the Dataflow SDK provide examples of using these utilities. | 0 |
boolean release = obtainReadLock( "ServiceFactoryComponentManager.getService.1" );
releaseReadLock( "ServiceFactoryComponentManager.getService.1" );
try
{
if ( !collectDependencies() )
{
log(
LogS... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.