Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
* Default implementation of {@link IOEventDispatch} interface for plain
* The following parameters can be used to customize the behavior of this
* class:
* Creates a new instance of this class to be used for dispatching I/O event
*
final NHttpClientHandler handler,
* Creates an instance o... | 0 |
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly; | 0 |
* Constructor needed for subclass serialisation.
protected AbstractListValuedMap() {
super();
* @throws NullPointerException if the map is null
protected AbstractListValuedMap(final Map<K, ? extends List<V>> map) {
super(map);
}
// ---------------------------------------------... | 0 |
* @throws Exception if ServiceManager enterEnvironment fails
* @throws Exception if enterEnvironment fails
* @throws Exception if enterEnvironment fails | 0 |
* @version CVS $Id: LuceneCocoonPager.java,v 1.3 2003/10/26 00:56:05 vgritsenko Exp $
* Default count of hits per page.
* Default starting index
* Current index of hit to return by next()
* Maximum count of hits to return by next(), and previous()
* Hits to iterate upon
* Constructor for... | 0 |
Assert.assertEquals(propertyProvider.getSpec("domu-12-31-39-0e-34-e1.compute-1.internal:50070"), streamProvider.getLastSpec());
Assert.assertEquals(propertyProvider.getSpec("domu-12-31-39-14-ee-b3.compute-1.internal:50075"), streamProvider.getLastSpec());
Assert.assertEquals(propertyProvider.getSpec("domu-1... | 0 |
package org.apache.atlas.web.security;
import org.apache.atlas.web.TestUtils;
public class SSLAndKerberosIT extends BaseSSLAndKerberosTest {
String persistDir = TestUtils.getTempDirectory();
final PropertiesConfiguration configuration = getSSLConfiguration(providerUrl);
TestUtils.writeConfigura... | 0 |
import java.util.Set;
import org.apache.ambari.server.state.PropertyInfo;
import org.apache.ambari.server.utils.SecretReference;
private Map<PropertyInfo.PropertyType, Set<String>> propertiesTypes;
public ConfigurationResponse(String clusterName, StackId stackId,
String type, String ... | 0 |
import static org.hamcrest.Matchers.is;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.beam.sdk.io.TextIO.Read;
import org.apache.beam.sdk.runners.TransformHierarchy.Node;
/**
* Tests that all reads are consumed by at least one {@link PTransform}.
*/
@Test
public void testUnconsumedRead... | 0 |
import org.apache.felix.dm.annotation.api.ResourceDependency;
import org.apache.felix.dm.annotation.api.ServiceDependency; | 0 |
Copyright 2002-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 |
package org.apache.sshd.client.subsystem.sftp.fs; | 0 |
public EncryptedKeyResolver(String algorithm) {
public EncryptedKeyResolver(String algorithm, Key kek) { | 0 |
final ArrayList<Object> actual = new ArrayList<>(IteratorUtils.toList(map.iterator("one")));
final ArrayList<Object> expected = new ArrayList<>(Arrays.asList("uno", "un")); | 0 |
private static final Map<Resource.Type, String> keyPropertyIds = ImmutableMap.<Resource.Type, String>builder()
private static final Set<String> propertyIds = Sets.newHashSet( | 0 |
* @version CVS $Id: SimpleSessionContext.java,v 1.9 2004/03/19 14:16:55 cziegeler Exp $
/** The source resolver */
private SourceResolver resolver;
public SimpleSessionContext(XPathProcessor xPathProcessor, SourceResolver resolver)
this.data = DOMUtil.createDocument();
this.data.append... | 0 |
import java.net.URL;
import java.util.HashMap;
import org.apache.commons.io.FilenameUtils;
import org.osgi.framework.Bundle;
request.setAttribute( WebConsoleConstants.ATTR_LANG_MAP, getLangMap() );
private Map langMap;
private final Map getLangMap()
{
if (null != langMap) return la... | 0 |
package org.apache.commons.digester3.annotations.rules;
import org.apache.commons.digester3.CallParamRule;
import org.apache.commons.digester3.annotations.DigesterRule;
import org.apache.commons.digester3.annotations.DigesterRuleList;
import org.apache.commons.digester3.annotations.providers.StackCallParamRuleProvider;... | 1 |
* @since 1.0 | 0 |
* This class maintains a map of HTTP routes to maximum number of connections allowed
* for those routes. This class can be used by pooling
* {@link org.apache.http.conn.ClientConnectionManager connection managers} for
* a fine-grained control of connections on a per route basis.
*
| 0 |
GuiceUtils.bindJNIContextClassLoader(binder(), Scheduler.class);
GuiceUtils.bindExceptionTrap(binder(), Scheduler.class); | 0 |
public synchronized DatagramPacket getDatagramPacket()
{
if (dp == null) {
dp = new DatagramPacket(buf, buf.length);
dp.setPort(NTP_PORT);
} | 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/util/AbstractList.java,v 1.6 2006/03/14 01:20:25 hargrave Exp $
*
* (C) Copyright 2001 Sun Microsystems, Inc.
* Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use ... | 0 |
import java.nio.charset.StandardCharsets;
Buffer buf = new ByteArrayBuffer("SSH-2.0-software\r\n".getBytes(StandardCharsets.UTF_8));
Buffer buf = new ByteArrayBuffer("SSH-2.0-software\n".getBytes(StandardCharsets.UTF_8));
Buffer buf = new ByteArrayBuffer(("a header line\r\nSSH-2.0-software\r\n")... | 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 javax.servlet.http.HttpServletRequest;
public void testWithInvalidRequest()
{
HttpServletRequest hsr = HttpServletRequestFactory.createInvalidHttpServletRequest();
FileUpload fu = null;
fu = new FileUpload();
HttpServletRequest req = HttpServletRequestFactory.createInva... | 0 |
package org.apache.beam.sdk.extensions.euphoria.core.util; | 0 |
public class RowSetDynaClass extends JDBCDynaClass { | 0 |
dbAccessor.executeQuery("ALTER TABLE ambari_sequences RENAME COLUMN value to sequence_value DECIMAL(38) NOT NULL"); | 0 |
public class ArrayListHandler extends AbstractListHandler {
* @see org.apache.commons.dbutils.handlers.AbstractListHandler#handle(ResultSet) | 0 |
@SuppressWarnings("StringSplitter") | 0 |
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Overrid... | 0 |
@Deprecated | 0 |
result = this.executor.invokePreparableMatcher(this,
objectModel,
matcher,
preparedPattern,
... | 0 |
package org.apache.aurora.scheduler.config.converters;
import com.beust.jcommander.converters.BaseConverter;
public class InetSocketAddressConverter extends BaseConverter<InetSocketAddress> {
public InetSocketAddressConverter(String optionName) {
super(optionName);
}
public InetSocketAddress convert(Strin... | 0 |
* {@link #setSender(String) setSender} and
* {@link #addRecipient(String) addRecipient}, and then sends the
* message using {@link #sendShortMessageData(String) sendShortMessageData}.
* <p>
* Note that the method ignores failures when calling
* {@link #addRecipient(String) addRecipient... | 0 |
* Returns an {@link AsMultimap} that takes a {@link PCollection} as input
* A {@link PTransform} that produces a {@link PCollectionView} of a singleton
* {@link PCollection} yielding the single element it contains.
* A {@link PTransform} that produces a {@link PCollectionView} of a singleton
* {@link PCo... | 0 |
public String getTargetServerName() {
public String getSourceServerName() {
public void setSourceServerName(String sourceClusterName) {
public void setTargetServerName(String targetClusterName) { | 0 |
import org.apache.aurora.common.application.Lifecycle;
import org.apache.aurora.common.base.Command;
private Command shutdownCommand;
shutdownCommand = createMock(Command.class);
storageUtil.storage,
new Lifecycle(shutdownCommand));
shutdownCommand.execute();
| 0 |
try (SshServer sshd = setupTestServer()) {
try (SshClient client = setupTestClient()) {
try (ClientSession session = client.connect(getCurrentTestName(), SshdSocketAddress.LOCALHOST_IP, port).verify(7L, TimeUnit.SECONDS).getSession()) {
try (ChannelExec channel = sess... | 0 |
public static <T> Predicate<T> andPredicate(final Predicate<? super T> predicate1,
final Predicate<? super T> predicate2) { | 0 |
* Gets the user privilege service
*/
@Path("{userName}/privileges")
public PrivilegeService getPrivilegeService(@Context javax.ws.rs.core.Request request,
@PathParam ("userName") String userName) {
return new UserPrivilegeService(userName);
}
/** | 0 |
XMLUtils.repoolDocumentBuilder(db); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//cli/src/java/org/apache/commons/cli/CommandLineParser.java,v 1.3 2002/08/26 20:15:02 jkeyes Exp $
* $Revision: 1.3 $
* $Date: 2002/08/26 20:15:02 $
* A class that implements the <code>CommandLineParser</code> interface
* can pa... | 0 |
import static org.junit.jupiter.api.Assertions.assertTrue;
@org.junit.jupiter.api.Test
@org.junit.jupiter.api.Test
@org.junit.jupiter.api.Test
@org.junit.jupiter.api.Test
@org.junit.jupiter.api.Test | 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
... | 0 |
* TODO Add javadoc
*
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
* @param factory The {@link CloseableExecutorService} factory to use for spawning threads.
* If {@code null} then an internal service is allocated. | 0 |
private static final String IS_TENTATIVE_KEY = "tentative";
// Prefer the tentative (fresher) value if it exists.
if (Boolean.parseBoolean(context.get(IS_TENTATIVE_KEY)) || !results.containsKey(fullName)) {
results.put(fullName, toValue(aggregator, metricUpdate));
} | 0 |
protected void setupDefaults(Connection con, String username) throws SQLException {
boolean defaultAutoCommit = isDefaultAutoCommit();
if (con.getAutoCommit() != defaultAutoCommit) {
con.setAutoCommit(defaultAutoCommit);
}
boolean defaultReadOnly = isDefaultReadOnly();
... | 0 |
protected int port1;
protected int port2;
protected int port3;
protected int port4;
protected int port5;
protected int portLE1;
protected int portLE2;
protected int portLE3;
protected int portLE4;
protected int portLE5; | 0 |
package org.apache.ambari.server.controller.ganglia;
import org.apache.ambari.server.controller.internal.PropertyIdImpl;
import org.apache.ambari.server.controller.utilities.PredicateHelper; | 0 |
import org.apache.beam.sdk.metrics.MetricResults;
@Override
public MetricResults metrics() {
throw new UnsupportedOperationException("The FlinkRunner does not currently support metrics.");
} | 0 |
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.Reader;
import java.net.MalformedURLException;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import org.tempuri.javac.JavaClassWriter;
impo... | 0 |
import org.apache.avalon.framework.configuration.ConfigurationException;
// Create and store all blocks
for (int i = 0; i < blockConfs.length; i++) {
Configuration blockConf = blockConfs[i];
String id = null;
String location = null;
try {
i... | 0 |
public static final BogusPasswordAuthenticator INSTANCE = new BogusPasswordAuthenticator();
public BogusPasswordAuthenticator() {
super();
}
@Override | 0 |
/**
* Generated data to check that the wire format has not changed. To regenerate, see
* {@link com.google.cloud.dataflow.sdk.coders.PrintBase64Encodings}.
*/
private static final List<String> TEST_ENCODINGS = Arrays.asList(
"__________U",
"__________0",
"__________8",
"AAAAAAAAAAA... | 0 |
import org.apache.accumulo.core.security.tokens.UserPassToken;
import org.junit.Assert;
return instance.getConnector(new UserPassToken("user", "pass")).tableOperations();
Connector c = instance.getConnector(new UserPassToken("user", "pass".getBytes())); | 0 |
Collections.singletonMap(Resource.Type.User, userName)); | 0 |
import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl; | 0 |
import static java.util.Objects.requireNonNull;
this.delegate = requireNonNull(delegate); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/core/IfTag.java,v 1.12 2003/10/09 21:21:29 rdonkin Exp $
* $Revision: 1.12 $
* $Date: 2003/10/09 21:21:29 $
* any, must include the following acknowledgement:
* Alternately, thi... | 0 |
import org.apache.aurora.scheduler.async.HistoryPruner.HistoryPrunnerSettings;
@CmdLine(name = "history_max_per_job_threshold",
help = "Maximum number of terminated tasks to retain in a job history.")
private static final Arg<Integer> HISTORY_MAX_PER_JOB_THRESHOLD = Arg.create(100);
@CmdLine(name = "histor... | 0 |
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.junit.Test;
public class Base32OutputStreamTest {
// @Test
@Test
@Test
@Test
@Test
@Test
@Test | 1 |
import org.apache.hc.core5.util.Timeout;
final Timeout timeout, | 0 |
return new HttpServiceServletHandler(this.context, info, this.servlet); | 0 |
this.manager.addServlet(service, ref); | 0 |
*
* @version $Id$ | 0 |
public final class ContextHandler implements Comparable<ContextHandler> | 0 |
@Override
public String toString() {
return "BatchRequest {" +
"orderId=" + orderId +
", type=" + type +
", uri='" + uri + '\'' +
'}';
} | 0 |
import com.google.cloud.dataflow.sdk.util.TimerManager.TimeDomain; | 0 |
import java.lang.ref.WeakReference;
elementMap.put(idValue, new WeakReference(element));
WeakReference weakReference = (WeakReference) elementMap.get(id);
if (weakReference != null)
{
return (Element) weakReference.get();
} | 0 |
int blocksCount = (len + 4) / outCipher.getCipherBlockSize();
int blocksCount = inCipherSize / inCipher.getCipherBlockSize();
int blocksCount = updateLen / inCipher.getCipherBlockSize();
int inBlockSize = inCipher.getCipherBlockSize();
int ... | 0 |
this.buf = new SimpleInputBuffer((int) len, HeapByteBufferAllocator.INSTANCE); | 0 |
public static <E> List<E> unmodifiableList(final List<E> list) {
public UnmodifiableList(final List<E> list) {
public boolean add(final Object object) {
public boolean addAll(final Collection<? extends E> coll) {
public boolean remove(final Object object) {
public boolean removeAll(final Collect... | 0 |
Float rotation = null;
// calculate the total rotation for this glyph
// set the new glyph position
// calculte the position of the next glyph
// need to translate so that the spacing
gv.setGlyphTransform(i, Aff... | 0 |
environmentVersion.put(PropertyNames.ENVIRONMENT_VERSION_MAJOR_KEY, ENVIRONMENT_MAJOR_VERSION); | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
import org.apache.cocoon.SitemapTestCase; | 0 |
import org.apache.felix.webconsole.WebConsoleUtil;
String actionName = WebConsoleUtil.getParameter( req, Util.PARAM_ACTION );
if ( PARAM_NO_REDIRECT_AFTER_ACTION.equals( WebConsoleUtil.getParameter( req, | 0 |
* Copyright 2001-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 |
* be used, if applicable.
void to(OutputStream out);
void to(OutputStream out, Charset charset); | 0 |
import org.apache.beam.sdk.options.Validation.Required;
import org.apache.beam.sdk.util.common.ReflectHelpers; | 0 |
public static void main(final String[] args) throws Exception {
final IOReactorConfig config = IOReactorConfig.custom()
final Future<ListenerEndpoint> future = server.listen(new InetSocketAddress(port));
final ListenerEndpoint listenerEndpoint = future.get(); | 0 |
public Response getTargetCluster(String body, @Context HttpHeaders headers, @Context UriInfo ui,
return handleRequest(headers, body, ui, Request.Type.GET, createTargetClusterResource(targetName));
public Response getTargetClusters(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
return hand... | 0 |
import cz.seznam.euphoria.core.client.util.Pair; | 0 |
* @param wildcards the list of wildcards to match, not null
* @param caseSensitivity how to handle case sensitivity, null means
* case-sensitive
* @param wildcards the list of wildcards to match, not null
* The array is not cloned, so could be changed after construc... | 0 |
import java.util.WeakHashMap;
import org.apache.batik.dom.util.SoftDoublyIndexedTable;
* The ElementsByTagName lists.
*/
protected transient WeakHashMap elementsByTagNames;
/**
/**
* Returns an ElementsByTagName object from the cache, if any.
*/
public ElementsByTagName getElementsB... | 1 |
public PCollection.IsBounded isBounded() {
return null;
}
@Override | 0 |
* INSTALLING -> INSTALLED | INSTALL_FAILED | OUT_OF_SYNC
* INSTALLED -> INSTALLED | INSTALLING | OUT_OF_SYNC
* OUT_OF_SYNC -> INSTALLING
INSTALLING(2),
INSTALLED(3),
INSTALL_FAILED(0),
/**
* Repository version that is installed for some components but not for all.
*/
OUT_OF_SYNC(1),
CURRENT(7),
U... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/xml/XMLParser.java,v 1.2 2003/03/11 00:59:35 dmitri Exp $
* $Revision: 1.2 $
* $Date: 2003/03/11 00:59:35 $
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* @versi... | 0 |
config.put(Server.CONFIG_PROPERTY_HTTP_HOST,
context.getProperty(Server.CONFIG_PROPERTY_HTTP_HOST)); | 0 |
import javax.mail.Header;
private Map<String, Object> attributeMap;
List<MimeFileObject> vfs = new ArrayList<MimeFileObject>();
return vfs.toArray(new MimeFileObject[vfs.size()]);
protected Map<String, Object> doGetAttributes() throws Exception
attributeMap = Collections.emptyMap... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/Attic/ResettableListIterator.java,v 1.1 2003/11/14 22:58:27 scolebourne Exp $
* @version $Revision: 1.1 $ $Date: 2003/11/14 22:58:27 $
public interface ResettableListIte... | 0 |
package org.apache.accumulo.server.test.randomwalk;
import org.apache.log4j.Logger;
public abstract class Fixture {
protected final Logger log = Logger.getLogger(this.getClass());
public abstract void setUp(State state) throws Exception;
public abstract void tearDown(State state) throws Exception;
} | 1 |
NoFlushOutputStream nfos = new NoFlushOutputStream(logFile);
params.setPlaintextOutputStream(nfos);
if (encipheringOutputStream == nfos) {
log.debug("No enciphering, using raw output stream");
encryptingLogFile = nfos;
log.debug("Enciphering found, wrapping in DataOutputStream"... | 0 |
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.cocoon.xml.XMLConsumer;
* @version CVS $Id: JXTemplateGenerator.java,v 1.52 2004/07/06 10:34:36 unico Exp $
final Serializable templateKey = (Serializable) getValue(cacheKeyExpr, globalJexlContext, jxpathContext);
if ... | 0 |
* @version CVS $Id: DelayRefresher.java,v 1.6 2004/04/25 20:01:36 haul Exp $
// TODO when an error occurs during write, we wouldn't try again although the
// list is still dirty. In addition, the access through the Iterator is not
// synchronized -- Collections.synchronizedMap() doesn't suff... | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Splitter; | 0 |
@Parameter(names={ "-s", "--setlevel" }, description="set the bundle's start level",
@Parameter(names={ "-i", "--setinitial" }, description="set the initial bundle start level",
options.put(p.names()[0], p);
flags.put(p.names()[0], p);
... | 0 |
* Copyright 2016-2017 Seznam.cz, a.s. | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.