Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
* @param body the body of the request; may be null
public InputStream readFrom(String spec, String requestMethod, String body, Map<String, String> headers)
/**
* Read from the input stream specified by the given URL spec as the given user. This method sets the
* "doAs" user header to impersonat... | 0 |
* HTTP entity wrapper whose content is provided by a
* {@link ContentInputBuffer}.
*
| 0 |
GroupAlsoByWindowsDoFn.create(windowingStrategy, combineFn,
StringUtf8Coder.of(), BigEndianLongCoder.of()); | 0 |
log.debug("handleExtendedData({}) SSH_MSG_CHANNEL_FAILURE - non STDERR type: {}", this, ex);
if ((len < 0) || (len > ByteArrayBuffer.MAX_LEN)) {
log.trace("handleExtendedData({}) extended data: {}",
this, BufferUtils.printHex(buffer.array(), buffer.rpos(), len))... | 0 |
String serviceName = null;
if (configGroup.getConfigurations() != null) {
serviceName = cluster.getServiceForConfigTypes(configGroup.getConfigurations().keySet());
}
if (serviceName != null) {
cluster.createServiceConfigVersion(serviceName, getManagementController().getAuthName(... | 0 |
fileInfo = null;
children = EMPTY_FTP_FILE_ARRAY;
detach();
detach(); | 0 |
@Deprecated | 0 |
if (requirement != null) {
resource.addRequire(requirement);
}
String effective = directives.get("effective");
if (effective != null && !effective.equals("resolve")) {
return null;
}
| 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 |
/**
* Current number of entries in list.
*/
protected int n = 0;
/**
* Simple Linked list of listeners.
*/
protected Entry first = null;
/**
* Array of listeners retained between calls to getEventListeners if the
* list of listeners d... | 0 |
String taskId = "fred";
Optional<IScheduledTask> mutated = Optional.of(task("a", ScheduleStatus.STARTING));
expect(storageUtil.taskStore.mutateTask(taskId, mutation)).andReturn(mutated);
Op.saveTasks(new SaveTasks(ImmutableSet.of(mutated.get().newBuilder()))))
assertEquals(mutated, s... | 0 |
import static com.google.common.base.Preconditions.checkArgument;
checkArgument(harnessId != null, "harnessId must not be null"); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/IntList.java,v 1.12 2003/01/13 12:59:45 rwaldhoff Exp $
* An ordered collection of <code>int</code> values.
* @version $Revision: 1.12 $ $Date: 2003/01/13 12:59:... | 0 |
final MockFilterConfig config = new MockFilterConfig();
final ServletFilterConfiguration resultConfig = new ServletFilterConfiguration(config);
public String getInitParameter(final String key)
public void setInitParameter(final String key, final String value) | 0 |
final boolean fail[] = {false};
} | 0 |
private TypeDescriptor<OutputT> outputType;
UnaryFunctor<InputT, OutputT> functor, TypeDescriptor<OutputT> outputType) {
Objects.requireNonNull(outputType);
casted.outputType = outputType;
Sets.newHashSet(outputHints), outputType); | 0 |
return m_felix.loadBundleClass(this, name); | 0 |
* @param useCurator {@code true} to use Apache Curator; otherwise commons/zookeeper is used.
public static ZooKeeperConfig create(boolean useCurator, Iterable<InetSocketAddress> servers) {
useCurator,
private final boolean useCurator;
private final Iterable<InetSocketAddress> servers;
private final b... | 0 |
*
* @since 4.0 | 0 |
public void accept( final Visitor v ) { | 0 |
import org.apache.http.client.utils.URIBuilder;
import java.net.URISyntaxException;
public String getProxyUrl(String baseUrl, String endPoint, MultivaluedMap<String, String> queryParameters) {
URIBuilder builder;
try {
builder = new URIBuilder(baseUrl + "/" + endPoint);
for(String key: keySet) {
... | 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 ap... | 1 |
* @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a> | 1 |
import javax.xml.crypto.dsig.XMLSignature;
String namespace = childElem.getNamespaceURI();
if (localName.equals("PGPKeyID") && XMLSignature.XMLNS.equals(namespace)) {
} else if (localName.equals("PGPKeyPacket") && XMLSignature.XMLNS.equals(namespace)) { | 0 |
String inAttr = filterElement.getAttributeNS(null, SVG_IN_ATTRIBUTE); | 0 |
import com.twitter.common.testing.easymock.EasyMockTest; | 0 |
import org.apache.cocoon.acting.ServiceableAction;
* @version CVS $Id: LoginAction.java,v 1.3 2003/10/15 20:47:14 cziegeler Exp $
extends ServiceableAction
this.manager.release( authManager); | 0 |
* @version $Id$ | 0 |
readWriteLock.writeLock().lock();
ClusterEntity clusterEntity = clusterDAO.findById(cluster.getClusterId());
if (newConfig) {
ClusterConfigEntity entity = new ClusterConfigEntity();
entity.setClusterEntity(clusterEntity);
entity.setClusterId(cluster.getClusterId());
enti... | 0 |
* <p>
* A file provider may also implement {@link VfsComponent}. | 0 |
/* ====================================================================
* @version $Revision: 1.3 $ $Date: 2004/01/14 21:43:11 $ | 0 |
* limitations under the License. | 0 |
try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
ByteArrayInputStream bais = new ByteArrayInputStream(in)) | 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 |
* Default {@link WindowFn} where all data is in the same window.
@Override
public GlobalWindow getSideInputWindow(BoundedWindow window) {
return GlobalWindow.INSTANCE;
} | 0 |
grace(500);
}
public static void grace(int time) {
try {
Thread.sleep(time);
} catch (InterruptedException e) {
// Ignore it.
} | 0 |
// Otherwise we failed to load it
return hadoopClassesAvailable && null != getProvidersMethod && null != hadoopCredProviderFactory
&& null != getCredentialEntryMethod && null != getCredentialMethod; | 0 |
import org.junit.Test;
import static org.junit.Assert.*;
public class DefaultKeyValueTest<K, V> {
@Test
@Test
@Test
@Test
@Test
@Test | 0 |
* @throws IOException If an I/O error occurs while creating the Socket.
* @throws UnknownHostException If the hostname cannot be resolved.
* @throws IOException If an I/O error occurs while creating the Socket.
* @throws IOException If an I/O error occurs while creating the Socket.
* @throws U... | 0 |
private int executions = 0;
executions++;
executions++;
executions++;
executions++;
executions++;
executions++;
executions++;
executions++;
public int getExecutions() {
return executions;
} | 0 |
import org.apache.batik.ext.awt.image.renderable.Filter;
import org.apache.batik.ext.awt.image.renderable.PadMode;
import org.apache.batik.ext.awt.image.renderable.AffineRable8Bit;
import org.apache.batik.ext.awt.image.renderable.PadRable8Bit;
import org.apache.batik.ext.awt.image.renderable.RasterRable;
... | 0 |
import org.apache.beam.sdk.transforms.CombineWithContext.CombineFnWithContext;
return new SparkCombiningState<>(namespace, address, accumCoder, combineFn);
bindCombiningValueWithContext(
CombineFnWithContext<InputT, AccumT, OutputT> combineFn) {
return new SparkCombiningState<>(
... | 0 |
final Map<Resource.Type, String> mapIds = new HashMap<>(); | 0 |
* Copyright 2016-2017 Seznam.cz, a.s.
package cz.seznam.euphoria.benchmarks.model; | 0 |
public Set<String> findConfigTypesByPropertyName(StackId stackId, String propertyName, String clusterName) throws AmbariException {
for(Service service : clusters.getCluster(clusterName).getServices().values()) {
Set<PropertyInfo> stackProperties = ambariMetaInfo.getProperties(stack.getName(), stack.getVer... | 0 |
import org.apache.beam.runners.core.metrics.ExecutionStateTracker; | 0 |
List<String> errorMessages = new ArrayList<>(); | 0 |
expectedKeys = new ArrayList<>(initialListSize);
expectedValues = new ArrayList<>(initialListSize);
expectedPositions = new ArrayList<>(initialListSize); | 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 applicable law o... | 0 |
* @version CVS $Id: ObjectModelAction.java,v 1.3 2003/08/04 03:13:22 joerg Exp $
String[] names = parameters.getNames();
for(int i = 0; i < names.length; i++) {
name = names[i];
objectModel.put("cocoon-portal-" + name, parameters.getParameter(name)); | 0 |
EasyMock.expect(subControllers[2].checkForReloading(null)).andReturn(
Boolean.FALSE);
EasyMock.expect(subControllers[1].checkForReloading(null)).andReturn(
Boolean.FALSE);
EasyMock.expect(subControllers[2].checkForReloading(null)).andReturn(
Boolea... | 0 |
package org.apache.felix.ipojo.test.scenarios.service.dependency.statics;
import org.apache.felix.ipojo.test.scenarios.service.dependency.service.CheckService;
| 0 |
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, | 1 |
// TODO for JDK-8 use Comparator.naturalOrder()
// TODO for JDK-8 use Comparator.naturalOrder()
* @param <V> The element type
* @param values The values to be added (ignored if {@code null})
* @param <T> The exception type | 0 |
// Get the value of credential store enabled from the DB
Service clusterService = cluster.getService(serviceName);
execCmd.setCredentialStoreEnabled(String.valueOf(clusterService.isCredentialStoreEnabled()));
| 0 |
extends LayoutEvent
implements JXPathEvent {
protected final String path;
protected final Object value;
super( target );
this.path = path;
this.value = value;
}
/**
* @see org.apache.cocoon.portal.event.impl.JXPathEvent#getPath()
*/
public String getPath()... | 0 |
import cz.seznam.euphoria.core.annotation.operator.StateComplexity;
@Derived(
state = StateComplexity.ZERO,
repartitions = 0
) | 0 |
final Set<String> extensionSet = new HashSet<>();
final Set<String> extensionSet = new HashSet<>(); | 0 |
package org.apache.felix.karaf.gshell.features.commands;
import org.apache.felix.karaf.gshell.features.FeaturesService; | 0 |
public static final String CONFIGURATION_ADMIN = "org.osgi.service.cm.ConfigurationAdmin";
private final ServiceTracker<ConfigurationAdmin, RegionConfigurationSupport> configAdminTracker;
public ConfigAdminTracker(final ComponentActivator componentActivator)
{
//TODO this assumes that there is 0... | 0 |
import java.util.Arrays;
@Override
public String toString() {
StringBuilder builder = new StringBuilder(super.toString());
builder.append("[cpds=");
builder.append(cpds);
builder.append(", validationQuery=");
builder.append(validationQuery);
builder.append(", val... | 0 |
* @throws FunctorException (runtime) if the closure execution resulted in a | 0 |
buff.set(buff.getBytes(), section.getRowPrefix().length(), buff.getLength() - section.getRowPrefix().length()); | 0 |
* Convenience {@link FileAlterationListener} implementation that does nothing.
* @see FileAlterationObserver
public class FileAlterationListenerAdaptor implements FileAlterationListener {
public void onStart(final FileAlterationObserver observer) {
public void onStop(final FileAlterationObserver observer) { | 0 |
/* $Id$ | 0 |
import static org.apache.beam.runners.spark.translation.TranslationUtils.avoidRddSerialization;
import org.apache.spark.storage.StorageLevel;
StorageLevel level = StorageLevel.fromString(context.storageLevel());
if (avoidRddSerialization(level)) {
// if it is memory only reduce the overh... | 0 |
interpreter.setArguments(script.getParameters(), null);
return interpreter.interpret(script);
}
/**
* {@inheritDoc}
*/
public Object execute(JexlContext context, Object...args) {
Interpreter interpreter = jexl.createInterpreter(context);
interpreter.setArgument... | 0 |
* @version $Revision: 1.6 $ $Date: 2004/05/16 11:16:01 $
* Evaluates the predicate returning the result of the decorated predicate
* once a null check is performed.
*
* @param object the input object
* @return true if decorated predicate returns true
* @throws FunctorException if input ... | 0 |
import java.util.Objects;
super(Objects.requireNonNull(in, "No input stream provided")); | 0 |
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceException;
import org.apache.excalibur.source.SourceResolver;
import org.apache.excalibur.source.SourceValidity;
import org.apache.excalibur.store.Store;
import org.apache.cocoon.util.AbstractLogEnabled;
import org.xml.sax.SAXExceptio... | 0 |
import org.apache.beam.sdk.fn.IdGenerators;
environmentFactory, dataServer, stateServer, IdGenerators.incrementingLongs()); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/decorators/Attic/TestAll.java,v 1.6 2003/09/03 00:11:28 scolebourne Exp $
* @version $Revision: 1.6 $ $Date: 2003/09/03 00:11:28 $
suite.addTest(TestObse... | 0 |
private static final long serialVersionUID = 0;
private static final long serialVersionUID = 0;
private static final long serialVersionUID = 0; | 0 |
import org.apache.accumulo.harness.AccumuloClusterHarness;
public class RecoveryCompactionsAreFlushesIT extends AccumuloClusterHarness { | 0 |
import org.apache.zookeeper.server.DatadirCleanupManager;
// Start and schedule the the purge task
DatadirCleanupManager purgeMgr = new DatadirCleanupManager(config
.getDataDir(), config.getDataLogDir(), config
.getSnapRetainCount(), config.getPurgeInterval());
pu... | 0 |
* Copyright 2001-2005 The Apache Software Foundation. | 0 |
import static com.google.common.base.Charsets.UTF_8;
this.value = new Value(Integer.toString(count).getBytes(UTF_8)); | 0 |
storage.writeOp(new MutateWork.NoResult.Quiet() {
storage.writeOp(new MutateWork.NoResult.Quiet() {
storage.writeOp(new MutateWork.NoResult.Quiet() { | 0 |
cacheBlock.close();
cacheBlock.close(); | 0 |
import org.apache.accumulo.core.client.Accumulo; | 0 |
* The bundle which has created the service dependency.
m_bundleContext.ungetService(m_reference); | 0 |
final int chunk = Math.min(bytes, chunkSize); | 0 |
conn.shutdown(); | 0 |
private final Parser parser = new PosixParser(); | 0 |
if (!"POST".equals(request.getMethod()))
throw new MalformedURLException("Cannot create consumer source for request that is not POST."); | 0 |
config.setStackId(cluster.getDesiredStackVersion()); | 0 |
import org.apache.sshd.client.channel.ClientChannelEvent;
Collection<ClientChannelEvent> result =
channel.waitFor(EnumSet.of(ClientChannelEvent.CLOSED), TimeUnit.SECONDS.toMillis(15L));
assertFalse("Timeout while waiting for channel closure", result.contains(Clien... | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists;
import org.apache.beam.vendor.guava.v20_0.com.google.common.util.concurrent.Unin... | 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 |
LOG.info("Got injector: {}", injector); | 0 |
package org.apache.commons.ognl;
* http://www.apache.org/licenses/LICENSE-2.0
import java.util.Enumeration;
import java.util.Iterator; | 0 |
* @version $Id$ | 0 |
private static final String PROPERTY_LOCK_URL = "karaf.lock.jdbc.url";
private static final String PROPERTY_LOCK_JDBC_DRIVER = "karaf.lock.jdbc.driver";
private static final String PROPERTY_LOCK_JDBC_USER = "karaf.lock.jdbc.user";
private static final String PROPERTY_LOCK_JDB... | 0 |
import org.apache.hc.client5.http.DnsResolver;
import org.apache.hc.core5.annotation.Immutable;
import org.apache.hc.core5.http.protocol.HttpContext; | 0 |
package org.apache.felix.ipojo.runtime.core.components;
import org.apache.felix.ipojo.runtime.core.services.CheckService;
import org.apache.felix.ipojo.runtime.core.services.Service;
import java.util.Properties;
public class ServiceConsumer implements CheckService {
private Service service;
private Properti... | 0 |
void addMixedIndex(String vertexIndex, AtlasPropertyKey propertyKey); | 0 |
* <p>
* As it's name suggests just a simple bean used for testing.
public class SimpleTestBean
{
public String getAlpha()
{
public void setAlpha( String alpha )
{
public String getBeta()
{
public void setBeta( String beta )
{
public String getGamma()
{
public void setGamma(... | 1 |
import org.apache.accumulo.core.client.impl.Namespace;
protected Namespace.ID namespaceId = null;
public NamespaceConfiguration(Namespace.ID namespaceId, Instance inst, AccumuloConfiguration parent) {
PropCacheKey key = new PropCacheKey(inst.getInstanceID(), namespaceId.canonicalID());
protected Namespace... | 1 |
* @param rs ResultSet that supplies the array data
* @throws SQLException if a database access error occurs
* @return the newly created array
* @see org.apache.commons.dbutils.BeanProcessor#toBean(java.sql.ResultSet, java.lang.Class)
* @param <T> The type of bean to create
* @param rs Resu... | 0 |
import java.util.Queue;
* @return authentication auth schemes that can be used for authentication. Can be empty.
Queue<AuthOption> select( | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.