Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
this(mgr.requestConnection(route), route, timeout);
(conn_timeout, TimeUnit.MILLISECONDS); | 0 |
CharArrayBuffer buf = new CharArrayBuffer(64);
int len = inbuffer.readLine(buf);
assertEquals(len, SWISS_GERMAN_HELLO.length);
assertEquals(s1, buf.toString()); | 0 |
import static org.hamcrest.Matchers.startsWith;
import java.nio.channels.Pipe.SinkChannel;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
public void testStagingPreservesClasspath() throws Exception {
File smallFile = makeFileWithContents("small.txt", "small");
File largeF... | 0 |
* Special network address
*/
private static String BIND_ALL_IP_ADDRESS = "0.0.0.0";
/**
return propertyValue.contains(BIND_ALL_IP_ADDRESS);
Map<String, PropertyUpdater> amsSiteMap = new HashMap<String, PropertyUpdater>();
singleHostTopologyUpdaters.put("ams-site", amsSiteMap);
// AMS
ams... | 0 |
abstract class AbstractTypeAware<FuncT, T> implements Serializable, TypeHintAware<T> {
private final FuncT function;
AbstractTypeAware(FuncT function, TypeHint<T> typeHint) {
public FuncT getDelegate() { | 0 |
private String url;
private String fileName;
private String userName;
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getFileName() { return fileName; }
public void setFileName(String fileName) { this.fi... | 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.2) use {@link org.apache.http.pool.ConnPoolControl} | 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 |
import org.apache.sshd.common.FactoryManagerUtils;
Map<String,Object> props = sshd.getProperties();
FactoryManagerUtils.updateProperty(props, ServerFactoryManager.WELCOME_BANNER, "Welcome to SSHD\n");
props.putAll(options);
sshd.setPublickeyAuthenticator(PublickeyAuthenticator.AcceptAll... | 0 |
import org.apache.commons.vfs.provider.Uri;
* @version $Revision: 1.2 $ $Date: 2002/10/31 10:40:58 $
final Uri parsedUri = parseUri( uri );
final FileName rootName = new DefaultFileName( parser, parsedUri.getContainerUri(), "/" );
private Uri parseUri( final String uri ) throws FileSystemExcept... | 0 |
if (result.getCommandResult() != null
&& result.getCommandResult().getExitCode() != 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 static org.apache.hc.client5.http.osgi.impl.HostMatcher.HostMatcherFactory.createMatcher;
private final Map<String, ServiceRegistration<ProxyConfiguration>> registeredConfigurations;
final Map<String, ServiceRegistration<ProxyConfiguration>> registeredConfigurations) {
for (final Service... | 0 |
mappingsByType.put(type, new ArrayList<>()); | 0 |
if (tokens.length > 1) {
throw new ThriftTableOperationException(tableId, null, TableOperation.COMPACT, TableOperationExceptionType.OTHER,
"Another compaction with iterators is running");
}
| 0 |
/*******************************************************************************
* Copyright (c) Intel Corporation
* Copyright (c) 2017
*
* 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
... | 0 |
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT", justification =
"prefetch side effect")
@SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT", justification =
"prefetch side effect") | 0 |
* Copyright (c) 2002 The Apache Software Foundation. All rights
* @version $Revision: 1.5 $ | 0 |
import static org.junit.jupiter.api.Assertions.assertTrue;
@org.junit.jupiter.api.Test | 0 |
Class<?> vfsClassLoader = AccumuloClassLoader.getClassLoader().loadClass("org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader");
ClassLoader cl = (ClassLoader) vfsClassLoader.getMethod("getClassLoader", new Class[] {}).invoke(null, new Object[] {});
Class<?> runTMP = null;
... | 1 |
package org.apache.felix.sigil.model; | 0 |
* @cocoon.sitemap.component.documentation
* The <code>SendmailAction</code> class sends email. Please use the <code>Sendmail</code>
* action instead.
*
* The action needs four parameters: | 0 |
public XMLSignatureException(String msgID, Object[] exArgs) {
public XMLSignatureException(Exception originalException, String msgID, Object[] exArgs) { | 0 |
import org.apache.hc.core5.util.Timeout;
Timeout getTimeout() {
return ioSession.getSocketTimeout();
void onTimeout(final Timeout timeout) throws IOException {
handler.timeout(this, timeout);
public Timeout getSocketTimeout() {
return ioSession.getSocketTimeout();
public void set... | 0 |
import org.apache.hc.client5.http.async.methods.SimpleHttpRequests;
final SimpleHttpRequest httpget = SimpleHttpRequests.GET.create(requestUri); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/LongTest.java,v 1.3 2002/12/15 21:46:41 martinc Exp $
* $Revision: 1.3 $
* $Date: 2002/12/15 21:46:41 $
import org.apache.commons.logging.LogFactory;
* @version $Revision: 1.3 $ $Da... | 0 |
so = new ServerSocket(0);
return so.getLocalPort();
count++;
| 0 |
* Copyright 2001-2005 The Apache Software Foundation | 0 |
import org.apache.cocoon.forms.datatype.SelectionList;
public class Output extends AbstractWidget
implements DataWidget, ValueChangedListenerEnabled {
public Datatype getDatatype() {
return definition.getDatatype();
}
public OutputDefinition getOutputDefinition() {
retur... | 0 |
public LRUMap(final Map<? extends K, ? extends V> map) {
public LRUMap(final Map<? extends K, ? extends V> map, final boolean scanUntilRemovable) { | 0 |
public int random(int max) {
return random.random(max);
}
| 0 |
import org.apache.cocoon.portal.coplet.CopletInstance;
final CopletInstance cid = ((CopletLayout)layout).getCopletInstanceData();
Boolean b = (Boolean)cid.getCopletDefinition().getAttribute("basket-content");
b = (Boolean)cid.getCopletDefinition().getAttribute("basket-link"); | 0 |
* <li>{@link FTPClientConfig#SYST_UNIX UNIX}</li>
* <li>{@link FTPClientConfig#SYST_NT WINDOWS}</li>
* <li>{@link FTPClientConfig#SYST_OS2 OS/2}</li>
* <li>{@link FTPClientConfig#SYST_OS400 OS/400}</li>
* <li>{@link FTPClient... | 0 |
* Return true if the trigger is guaranteed to never finish.
*/
public boolean willNeverFinish() {
return false;
}
/** | 0 |
m_componentManager.reconfigureReadLock();
try
{
DependencyManager<S, ?> dm = m_componentManager.getDependencyManager( name );
return ( dm != null ) ? dm.getService() : null;
}
finally
{
m_componentManager.reconfigureReadUnlock();
... | 0 |
import org.apache.commons.bcel6.Const;
setFlag(Const.ACC_PUBLIC, flag);
return (access_flags & Const.ACC_PUBLIC) != 0;
setFlag(Const.ACC_PRIVATE, flag);
return (access_flags & Const.ACC_PRIVATE) != 0;
setFlag(Const.ACC_PROTECTED, flag);
return (access_flags & Const.ACC_PR... | 0 |
} catch(IllegalArgumentException ex) {
} catch(IllegalArgumentException ex) {
} catch(IllegalArgumentException ex) {
} catch(IllegalArgumentException ex) {
} catch(IllegalArgumentException ex) {
} catch(IllegalArgumentException ex) {
LRUMap<K, V> lruMap = (LRUMap<... | 0 |
comparator = LastModifiedFileComparator.LASTMODIFIED_COMPARATOR; | 0 |
import java.util.ArrayList;
import java.util.List;
import org.apache.accumulo.core.cli.Help;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
static class Opts extends Help {
@Parameter(names="-r", description="print only mutations associated with the given row")
String row;
... | 0 |
* {@code factory-property} and {@code factory-properties} elements. This
* must be {@code null} if the component description is not declared as a | 0 |
import org.apache.beam.vendor.grpc.v1p21p0.com.google.protobuf.InvalidProtocolBufferException;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap; | 0 |
import org.apache.ambari.server.configuration.Configuration;
static final String AMBARI_SERVER_HOST = "ambari_server_host";
private static String server_hostname;
static {
try {
server_hostname = InetAddress.getLocalHost().getCanonicalHostName();
} catch (UnknownHostException e) {
LOG.warn("Co... | 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 |
TRACKING_OPTIONAL,
/**
* The component is starting. At this point, the required
* dependencies have been injected, but the service has not been registered
* yet.
*/
STARTING,
/**
* The component is started. At this point, the component has been
* registered.
*/
... | 0 |
refs = new WrappedCloseWriteAheadLogReferences(new AccumuloServerContext(mockInst, factory)); | 0 |
import org.apache.http.nio.util.SharedInputBuffer;
import org.apache.http.nio.util.SharedOutputBuffer; | 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.aurora.scheduler.storage.entities.IHostAttributes;
public static IHostAttributes getAttributes(Offer offer) {
return IHostAttributes.build(new HostAttributes(
.setSlaveId(offer.getSlaveId().getValue())); | 0 |
static final String HIVE_COMPILE_ERROR_MSG = "Error while compiling statement:";
// For schemantic exception Error code is between 10000-19999
// https://issues.apache.org/jira/browse/HIVE-3001
// https://issues.apache.org/jira/browse/HIVE-12867
if((status.getErrorCode() >= 10000 && status.g... | 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 |
/*
* 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 |
import java.util.HashSet;
import java.util.Set;
import org.apache.beam.sdk.values.PValue;
import org.apache.beam.sdk.values.TaggedPValue;
/**
* A {@link PTransformMatcher} which matches a {@link Flatten.PCollections} which
* consumes a single input {@link PCollection} multiple times.
*/
public static PTran... | 0 |
int modulusResult = calculateModulus(code, true);
return (modulusResult == 0); | 0 |
import java.nio.ByteBuffer; | 0 |
public static String pathToCacheId(Path p) {
return p.toString();
}
this(pathToCacheId(dataFile), () -> fs.open(dataFile),
() -> fs.getFileStatus(dataFile).getLen(), fileLenCache, data, index, readLimiter, conf,
accumuloConfiguration, cryptoService); | 0 |
void translate(TransformT transform, TranslationContext context); | 0 |
state.getConnector().tableOperations().delete(Setup.getTableName()); | 0 |
try
String ukey = null;
if (null != key)
{
ukey = key.toUpperCase();
}
if (ukey.indexOf(FTPClientConfig.SYST_UNIX) >= 0)
{
parser = createUnixFTPEntryParser();
}
else if... | 0 |
* Copyright 2002,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 applic... | 0 |
import org.apache.beam.runners.direct.DirectRunner.CommittedBundle; | 0 |
public class TransformBase64DecodeTest extends Assert { | 0 |
TextIndexCombiner.setLossyness(setting, true);
GlobalIndexUidCombiner.setLossyness(setting, true);
GlobalIndexUidCombiner.setLossyness(setting, true); | 0 |
/** Felix specific property to configure the max form size. Default is 200KB */
public static final String FELIX_JETTY_MAX_FORM_SIZE = "org.apache.felix.http.jetty.maxFormSize";
public int getMaxFormSize()
{
return getIntProperty(FELIX_JETTY_MAX_FORM_SIZE, 200 * 1024);
}
| 0 |
@SuppressWarnings("unchecked")
List<List<Integer>> partitions = CollectionUtils.partition(input, EQUALS_TWO);
@SuppressWarnings("unchecked")
List<List<Integer>> partitions = CollectionUtils.partition(input, EQUALS_TWO, EVEN); | 0 |
public static boolean setSystemProperty(ServerContext context, String property, String value)
String zPath = context.getZooKeeperRoot() + Constants.ZCONFIG + "/" + property;
public static void removeSystemProperty(ServerContext context, String property)
String zPath = context.getZooKeeperRoot() + Constants... | 0 |
import org.apache.beam.sdk.extensions.euphoria.core.client.operator.windowing.WindowingDesc;
import org.apache.beam.sdk.transforms.windowing.AfterWatermark;
import org.apache.beam.sdk.transforms.windowing.FixedWindows;
import org.apache.beam.sdk.values.WindowingStrategy.AccumulationMode;
/**
* Test operator Join.
*/
... | 0 |
* @version $Revision: 1.11 $ $Date: 2003/12/10 04:25:15 $
assertEquals(0, this.getEncoder().difference(null, null));
assertEquals(0, this.getEncoder().difference("", ""));
assertEquals(0, this.getEncoder().difference(" ", " "));
assertEquals(4, this.getEncoder().difference("Smith", "Smy... | 0 |
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.Serviceable;
* @version CVS $Id: DeliImpl.java,v 1.8 2004/02/06 22:46:53 joerg Exp $
implements Parameterizable, Deli, Serviceable, Disposable, Initiali... | 0 |
logger.warn("Solr is not reachable yet. getCollections() attempt count=" + pingCount
final String logMessageKey = this.getClass().getSimpleName()
+ "_FETCH_FILTER_CONFIG_ERROR";
LogFeederUtil.logErrorMessageByInterval(logMessageKey,
"Error getting filter config from solr", e, l... | 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 |
static void update(ClientContext context, Mutation m) {
update(context, createUpdateMutation(new Path(file), v, extent)); | 0 |
if (managedConn.isMarkedReusable()) {
this.poolEntry.updateExpiry(keepalive, tunit != null ? tunit : TimeUnit.MILLISECONDS);
if (this.log.isDebugEnabled()) {
String s;
if (keepalive > 0) {
... | 0 |
baseUris =
checkBaseUris(VolumeConfiguration.getVolumeUris(SiteConfiguration.getInstance()), false);
String replacements =
SiteConfiguration.getInstance().get(Property.INSTANCE_VOLUMES_REPLACEMENTS); | 0 |
/** A context is given to {@link Trigger} methods to allow them to register timer callbacks. */
* Fire specific trigger on given time. Schedule the given trigger at the given stamp. The trigger
* will be fired as close to the time as possible.
/** @return the current timestamp from runtime (may be different fro... | 0 |
package cz.seznam.euphoria.core.executor.inmem; | 0 |
for (Entry<Path,DataFileValue> entry : paths.entrySet()) {
log.log(TLevel.TABLET_HIST, extent + " import " + abs2rel(entry.getKey()) + " " + entry.getValue());
return Long.parseLong(new String(ZooReaderWriter.getRetryingInstance().getData(zTablePath, null), Constants.UTF8));
return Long.parseL... | 0 |
import javax.annotation.Nullable; | 0 |
import org.apache.commons.configuration.ConfigurationLookup;
import org.apache.commons.configuration.DynamicCombinedConfiguration;
import org.apache.commons.configuration.HierarchicalConfiguration;
import org.apache.commons.configuration.builder.BuilderConfigurationWrapperFactory;
/**
* Tests whether infinite... | 0 |
* Copyright 1999-2005 The Apache Software Foundation.
import org.apache.cocoon.sitemap.ComponentLocator;
/**
* Return the sitemap component locator - if available.
*/
ComponentLocator getComponentLocator();
/**
* Return all event listers that are registered for the
* {@link org.apache... | 0 |
permissionEntity.setId(PermissionEntity.AMBARI_ADMINISTRATOR_PERMISSION);
permissionEntity.setId(PermissionEntity.CLUSTER_ADMINISTRATOR_PERMISSION);
permissionEntity.setId(5);
permissionEntity.setId(6);
permissionEntity.setId(PermissionEntity.CLUSTER_USER_PERMISSION);
permissionEntity.setId(Perm... | 0 |
final ConfigBuilder configBuilder = new ConfigBuilder(options);
SamzaPipelineTranslator.createConfig(pipeline, idMap, configBuilder);
final ApplicationRunner runner = ApplicationRunner.fromConfig(configBuilder.build());
final SamzaExecutionContext executionContext = new SamzaExecutionContext(); | 0 |
if (TabletServerBatchReaderIterator.this.queryThreadPool.isShutdown())
log.debug("Failed to add Batch Scan result for key " + key, e);
else
log.warn("Failed to add Batch Scan result for key " + key, e);
if (nextEntry != null)
return true;
if (fatalExcept... | 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/set/ListOrderedSet.java,v 1.2 2003/12/03 11:37:44 scolebourne Exp $
import org.apache.commons.collections.list.UnmodifiableList;
* @version $Revision: 1.2 $ $Date: 2003/12/03 11:3... | 0 |
//COMMENTED THE FOLLOWING LINE TO WORK AROUND AMBARI-159
//root.addHandler(security); | 0 |
* Creates or updates host versions for all of the hosts within a cluster
* based on state of cluster stack version. This is used to transition all
* hosts into the {@link RepositoryVersionState#INSTALLING} state.
* <p/>
* The difference between this method compared to
* {@link Cluster#mapHostVersions}... | 0 |
final DSVersion dsVersion,
final boolean configurableServiceProperties,
@Override
suitableMethodNotAccessible = true;
suitableMethodNotAccessible = true;
if (type == ClassUtils.MAP_CLASS)
suitableMeth... | 0 |
Integer element, SomeRestriction restriction, OutputReceiver<SomeRestriction> receiver) {}
Integer element, RestrictionT restriction, OutputReceiver<RestrictionT> receiver) {}
"Third argument must be DoFn.OutputReceiver<SomeRestriction>, "
Integer element, SomeRestriction restr... | 0 |
public class SVGPatternElementBridge extends AbstractSVGBridge
implements PaintBridge, ErrorConstants {
* Returns 'pattern'.
*/
public String getLocalName() {
return SVG_PATTERN_TAG;
}
/**
//
// - viewPortTranslation is the transform that translate to the viewPort's
... | 0 |
*
*
* Replaces the first occurence of the header with the same name. If no header with
*
* @param header the new header that should replace the first header with the same
*
*
*
return null;
* maintains the relative order in which the headers were added.
*... | 0 |
Map<String, Object> requestProperties = request.getQueryProperties();
assertTrue(request.getQueryProperties().isEmpty());
assertEquals(request.getQueryProperties().size(), 2);
assertEquals(request.getQueryProperties().get("name"), "testTaxonomy");
assertEquals(request.getQueryPro... | 0 |
import java.util.List;
public String create(String path, byte data[], List<ACL> acl, int flags)
* @see #create(String, byte[], List, int)
public void create(String path, byte data[], List<ACL> acl, int flags,
public List<ACL> getACL(String path, Stat stat)
public Stat setACL(String path, List<ACL> ... | 0 |
// without this we get NPE
@BeforeClass(alwaysRun = true) | 0 |
Copyright 2001,2003 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 applicable law... | 0 |
import org.junit.Test;
import static org.junit.Assert.assertEquals;
@Test
@Test
@Test | 0 |
* @author <a
* href="http://commons.apache.org/configuration/team-list.html">Commons
* Configuration team</a>
* Returns the name of the {@code BeanFactory} that should be used
Map<String, Object> getBeanProperties();
* initialization scenarios: a bean for a bean that contains complex
* properties ... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/iterators/TestArrayIterator.java,v 1.1 2002/08/15 23:13:52 pjack Exp $
* $Revision: 1.1 $
* $Date: 2002/08/15 23:13:52 $
package org.apache.commons.collections.iterators;
* @ver... | 0 |
log.error("Unable to delete ZooLock for mini accumulo-gc", e);
cluster.getConfig().setDefaultMemory(16, MemoryUnit.MEGABYTE);
log.error("IO error reading the IT's accumulo-gc STDOUT", ex); | 0 |
public Response getFeed(String body, @Context HttpHeaders headers, @Context UriInfo ui,
return handleRequest(headers, body, ui, Request.Type.GET, createFeedResource(feedName));
public Response getFeeds(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
return handleRequest(headers, body, ui, ... | 0 |
import java.net.URISyntaxException;
import org.apache.hc.client5.http.methods.RoutedHttpRequest;
import org.apache.hc.core5.annotation.Contract;
import org.apache.hc.core5.annotation.ThreadingBehavior;
import org.apache.hc.core5.http.ClassicHttpRequest;
import org.apache.hc.core5.http.ClassicHttpResponse;
import org.ap... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.