Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.beam.sdk.fn.data.FnDataReceiver;
@Captor private ArgumentCaptor<FnDataReceiver<WindowedValue<String>>> consumerCaptor;
when(mockBeamFnDataClient.receive(any(), any(), any(), any()))
verify(mockBeamFnDataClient).receive(
when(mockBeamFnDataClient.receive(
verify(mockBeamFnDataClient).... | 0 |
import org.apache.http.util.ByteArrayBuffer;
if (i < 0) {
i = 4096;
ByteArrayBuffer buffer = new ByteArrayBuffer(i);
byte[] tmp = new byte[4096];
buffer.append(tmp, 0, l);
return buffer.getBytes(); | 0 |
package org.apache.http.impl.client.builder;
import org.apache.http.impl.client.BasicCookieStore;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.client.DefaultConnectionKeepAliveStrategy;
import org.apache.http.impl.client.DefaultHttpRequestRetryHandler;
import org.apache.http.... | 0 |
(JPEGTranscoder.KEY_QUALITY, quality);
trans.addTranscodingHint(PNGTranscoder.KEY_INDEXED, 8); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/locale/LocaleBeanUtils.java,v 1.5 2003/07/14 21:44:08 rdonkin Exp $
* $Revision: 1.5 $
* $Date: 2003/07/14 21:44:08 $
* <p>The implementations for these methods are provided by <cod... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/Field.java,v 1.19 2003/06/12 01:04:11 dgraham Exp $
* $Revision: 1.19 $
* $Date: 2003/06/12 01:04:11 $
* @version $Revision: 1.19 $ $Date: 2003/06/12 01:04:11 $
Field field... | 0 |
import org.apache.accumulo.examples.simple.mapreduce.bulk.VerifyIngest;
goodExec(VerifyIngest.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "--table", tableName, "--start-row", "0", "--count", "10000"); | 0 |
/* $Id: TestRecursion.java,v 1.5 2004/05/07 01:30:00 skitching Exp $
* | 0 |
package org.apache.felix.framework;
import org.apache.felix.framework.cache.BundleCache;
import org.apache.felix.framework.util.LibraryInfo;
import org.apache.felix.moduleloader.LibrarySource; | 1 |
/*
* 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 org.apache.sshd.common.auth.UsernameHolder;
public class HostConfigEntry implements Cloneable, UsernameHolder {
@Override | 0 |
* @throws IOException
void rollLog() throws IOException; | 0 |
import org.apache.http.client.protocol.HttpClientContext;
final HttpClientContext context, | 0 |
throws IOException {
throws IOException {
default void syncFileData(
ServerSession session, SftpEventListenerManager subsystem, Path file, String handle, Channel channel)
throws IOException { | 0 |
TaskConfig task1 = defaultTask(false).setMaxTaskFailures(1);
TaskConfig task2 = defaultTask(false).setMaxTaskFailures(2);
TaskConfig task3 = defaultTask(false).setMaxTaskFailures(3);
TaskConfig task4 = defaultTask(false).setMaxTaskFailures(4);
TaskConfig task5 = defaultTask(false).setMaxTaskFailures... | 0 |
if (configuration.isSetTaskConfig()) {
configuration.getTaskConfig().setThermosConfig("BLANKED".getBytes());
} | 0 |
return new FlinkTestPipeline(flinkRunner.getPipelineOptions());
private FlinkTestPipeline(PipelineOptions options) {
super(options); | 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 |
public class ServiceModule extends BaseModule<ServiceModule, ServiceInfo> implements Validable{
* validity flag
*/
protected boolean valid = true;
/**
if (isValid()){
setValid(config.isValid() && info.isValid());
if (!isValid()){
setErrors(config.getEr... | 0 |
public Response killTasks(TaskQuery query, Lock lock, SessionKey session) throws TException {
return delegate.killTasks(query, lock, session); | 0 |
/**
* TODO Add javadoc
*
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
* @version $Rev$, $Date$
*/ | 0 |
* The singleton ExpressionFactory also holds a single instance of
protected static Parser parser =
* @throws Exception An exception can be thrown if there is a problem
if (node instanceof ASTReferenceExpression
|| node instanceof ASTIfStatement
) {
throw new Excepti... | 0 |
@SuppressWarnings("deprecation") | 0 |
/** This is just a wrapper class to serialize HBase {@link Scan} using Protobuf. */
private transient Scan scan;
public SerializableScan() {}
public SerializableScan(Scan scan) {
if (scan == null) {
throw new NullPointerException("Scan must not be null.");
this.scan = scan;
}
private void writeO... | 0 |
System.arraycopy(cq.getBackingArray(), cq.offset(), keyData, row.length() + cf.length(),
cq.length()); | 0 |
public String getContentType() {
return getHeaderField("Content-Type");
}
| 0 |
* @version CVS $Id: LayoutFactory.java,v 1.4 2003/05/26 14:03:49 cziegeler Exp $
/**
* This method is invoked for a newly loaded profile
*/
/**
* Create a new layout instance.
* The instance is also registered at the profile manager.
*/
/**
* Remove the layout instance.
*... | 0 |
try (AutoCloseable bundleFactoryCloser = stageBundleFactory) {} | 0 |
* Tests a given byte array to see if it contains only valid characters within the Base64 alphabet. Currently the
* method treats whitespace as valid.
*
* @param arrayOctet
* byte array to test
* @return <code>true</code> if all bytes are valid characters in the Base64 alphabet ... | 0 |
import java.util.ArrayList;
import java.util.List; | 0 |
import junit.framework.Assert;
| 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 |
final int testOffset = Byte.SIZE / 2;
byte[] data = new byte[expected.length + 2 * testOffset];
System.arraycopy(expected, 0, data, testOffset, expected.length);
Buffer buf = ByteArrayBuffer.getCompactClone(data, testOffset, expected.length); | 0 |
case HOST_SVCCOMP_UPGRADE:
return new ServiceComponentHostUpgradeEvent(serviceComponentName, hostName, opTimestamp, stackId); | 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 |
final Option implicitRoutingOption = Option.builder("ir")
.longOpt("implicit-routing")
.desc("Use implicit routing when creating a collection")
options.addOption(implicitRoutingOption);
boolean implicitRouting = cli.hasOption("ir");
.isImplicitRouting(implicitRouting) | 0 |
(float)p.getX(),
(float)p.getY(),
(float)p.getX(),
(float)p.getY(),
gvtevt = new GraphicsNodeMouseEv... | 0 |
AccumuloConfiguration conf = ClientContext.convertClientConfig(clientConfig); | 0 |
final Soundex s = Soundex.US_ENGLISH_GENEALOGY;
final Soundex s = Soundex.US_ENGLISH_SIMPLIFIED; | 0 |
package org.apache.cocoon;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTes... | 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... | 0 |
import org.apache.atlas.type.AtlasTypeUtil;
String typeName = "test_.v1_type_XXXX";
assertTrue (e.getCause().getMessage().contains(AtlasTypeUtil.getInvalidTypeNameErrorMessage()), e.getCause().getMessage()); | 0 |
if (bundle == null)
throw new BuildException("missing attribute: bundle");
if (header == null)
throw new BuildException("missing attribute: header");
jar = new JarFile(bundle, false);
String value = mf.getMainAttributes().getValue(header);
if ... | 0 |
Object v1 = children[0].getValue( context, source );
Object v2 = children[1].getValue( context, source ); | 0 |
AccumuloInputFormat.configure().clientProperties(info.getProperties()).table(tableName)
.auths(auths).store(job);
AccumuloOutputFormat.configure().clientProperties(info.getProperties()).defaultTable(tableName)
.createTables().store(job); | 0 |
import org.apache.accumulo.test.functional.ConfigurableMacIT;
public class BalanceIT extends ConfigurableMacIT {
@Test(timeout = 60 * 1000)
System.out.println("Creating table");
System.out.println("Adding splits");
System.out.println("Waiting for balance"); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/Tag.java,v 1.10 2002/10/30 19:16:26 jstrachan Exp $
* $Revision: 1.10 $
* $Date: 2002/10/30 19:16:26 $
* Copyright (c) 2002 The Apache Software Foundation. All rights
* $Id: Tag.java,v 1.... | 0 |
import org.apache.http.Header;
import org.apache.http.protocol.HTTP;
Header ct = response.getFirstHeader(HTTP.CONTENT_TYPE);
Header ce = response.getFirstHeader(HTTP.CONTENT_ENCODING);
CacheEntity entity = new CacheEntity(
body,
ct != null ? ct.getValue() : null,... | 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 |
/*
* 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 |
@interface Volatile { } | 0 |
private VarianceFn(boolean isSample, SerializableFunction<BigDecimal, T> decimalConverter) { | 0 |
import org.apache.ambari.server.stack.upgrade.UpgradeType; | 0 |
public AbstractListIteratorTest(final String testName) {
final ListIterator<E> it = makeEmptyIterator();
} catch (final NoSuchElementException e) {
} catch (final NoSuchElementException e) {
final ArrayList<E> list = new ArrayList<E>();
final ListIterator<E> it = makeObject()... | 0 |
final byte[] bytes = s.getBytes(Consts.ISO_8859_1); | 0 |
public final <E extends ConfigurationBuilderEvent> void addEventListener(
EventType<E> eventType, EventListener<? super E> listener)
public final <E extends ConfigurationBuilderEvent> void removeEventListener(
EventType<E> eventType, EventListener<? super E> listener) | 0 |
validateTransform();
* Validates construction of this transform.
@VisibleForTesting
void validateTransform() { | 0 |
Set<String> roolesToDelete = new HashSet<String>(u.getRoles());
Set<String> roolesToAdd = request.getRoles();
roolesToDelete.removeAll(request.getRoles());
for (String role : roolesToDelete) {
users.removeRoleFromUser(u, role);
u.getRoles().remove(role);
}
roole... | 0 |
boolean inheritedLeniency = jxpc.isLenient();
jxpc.setLenient(inheritedLeniency);
boolean inheritedLeniency = jxpc.isLenient();
}
jxpc.setLenient(inheritedLeniency); | 0 |
* $Id: BundleInfo.java 94 2008-12-03 13:31:50Z peter.kriens@aqute.biz $
* @version $Revision: 94 $
// The next code is using the subset operator
// to check mandatory attributes, it seems to be
// impossible to rewrite. It must assert that whateber
// is in mandatory: must be in any of the attributes.
/... | 0 |
import org.apache.beam.sdk.transforms.windowing.TimestampCombiner;
public <W extends BoundedWindow> WatermarkHoldState bindWatermark(
StateTag<? super K, WatermarkHoldState> address,
TimestampCombiner timestampCombiner) { | 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 |
while (requestConns.getCount() > 0) {
requestConns.countDown();
} | 0 |
Map<String, String> hostAttributes = new HashMap<>();
Set<ServiceRequest> requests = new HashSet<>();
new HashSet<>();
new HashSet<>(); | 0 |
import org.apache.batik.constants.XMLConstants; | 0 |
import org.apache.commons.collections.collection.AbstractCollectionTest;
* Extension of {@link AbstractCollectionTest} for exercising the
public class TestUnmodifiableBuffer<E> extends AbstractCollectionTest<E> { | 0 |
if (bundle != null && isKeyed(bundle.getPCollection())) { | 0 |
private final ConcurrentMap<ComponentContextImpl<S>, T> instances = new ConcurrentHashMap<>();
"Could not get service from serviceobjects for ref {0}", null, getRef() ); | 0 |
import org.apache.felix.scr.parser.KXml2SAXParser;
import org.apache.felix.scr.parser.ParseException; | 0 |
if (entity != null) {
if (entity instanceof ProducingNHttpEntity) {
connState.setProducingEntity((ProducingNHttpEntity) entity);
} else {
connState.setProducingEntity(new NHttpEntityWrapper(entity));
... | 0 |
return TransformedList.transformingList(new ArrayList<E>(), (Transformer<E, E>) TestTransformedCollection.NOOP_TRANSFORMER);
return TransformedList.transformingList(list, (Transformer<E, E>) TestTransformedCollection.NOOP_TRANSFORMER);
List<E> list = TransformedList.transformingList(new ArrayLis... | 0 |
import javax.management.MBeanServerFactory;
private static MBeanRegistry instance = new MBeanRegistry();
private MBeanServer mBeanServer;
public static MBeanRegistry getInstance() {
public MBeanRegistry () {
try {
mBeanServer = ManagementFactory.getPlatformMBeanServer();
... | 0 |
"Finalize Operations",
"Create Principals",
"Create Keytabs",
"Distribute Keytabs",
"Update Service Configurations", | 0 |
import cz.seznam.euphoria.core.annotation.operator.Recommended;
@Recommended(
reason =
"Might be useful to override the default "
+ "implementation because of performance reasons"
+ "(e.g. using bloom filters)",
basic = { ReduceByKey.class, FlatMap.class }
) | 0 |
* @author James House
* @version $Revision: 1.18 $ $Date: 2004/02/28 12:18:17 $ | 0 |
private IntersectingIterator(IntersectingIterator other, IteratorEnvironment env) { | 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 |
PCollection<Event> bids = testPipeline.apply(Create.of(BIDS_EVENTS));
PCollection<Event> bids = testPipeline.apply(Create.of(BIDS_EVENTS));
return new Bid(id, 3L, 100L, new DateTime(432342L + id), "extra_" + id); | 0 |
throw new IllegalArgumentException(String.format("Patch %s was uploaded, but there are no repositories for %s",
throw new IllegalArgumentException(String.format(format,
throw new IllegalArgumentException(String.format("More than one repository matches patch %s: %s", | 0 |
/**
* 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 or agreed to in writing, software
* distribu... | 0 |
package org.apache.bcel.generic;
public interface VisitorSupportsInvokeDynamic extends Visitor{
void visitINVOKEDYNAMIC(INVOKEDYNAMIC obj);
} | 0 |
import com.google.common.reflect.TypeResolver;
/**
* Returns a new {@code TypeDescriptor} where type variables represented by
* {@code typeParameter} are substituted by {@code typeDescriptor}. For example, it can be used to
* construct {@code Map<K, V>} for any {@code K} and {@code V} type: <pre> {@code
*... | 0 |
import org.apache.accumulo.core.clientImpl.ClientContext;
import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl; | 0 |
* @param bytes the raw bytes that represent the double value | 0 |
import org.apache.ambari.server.AmbariException;
import org.apache.ambari.server.api.services.RootServiceComponentConfiguration;
public abstract Map<String, RootServiceComponentConfiguration> getConfigurations(String categoryName) throws NoSuchResourceException;
* @throws AmbariException in case an error occurred ... | 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 |
* Copyright 2000-2009 The Apache Software Foundation | 0 |
private static final String PERMISSION_ADMIN_NAME = "org.osgi.service.permissionadmin.PermissionAdmin"; //$NON-NLS-1$
private static final String CONDITIONAL_PERMISSION_ADMIN_NAME = "org.osgi.service.condpermadmin.ConditionalPermissionAdmin"; //$NON-NLS-1$
final Object paSvc = paRef != null ? bc.getServ... | 0 |
import io.swagger.annotations.ApiModelProperty;
public class UserResponse implements ApiModel {
@ApiModelProperty(name = "Users/user_name",required = true)
@ApiModelProperty(name = "Users/groups")
@ApiModelProperty(name = "Users/ldap_user")
@ApiModelProperty(name = "Users/active")
@ApiModelProperty(name = "U... | 0 |
List<Range> ranges, ClientContext context)
throws AccumuloException, TableNotFoundException, AccumuloSecurityException {
if (Tables.getTableState(context, tableId) != TableState.OFFLINE) {
Tables.clearCache(context);
if (Tables.getTableState(context, tableId) != TableState.OFFLINE) {
S... | 0 |
IN, WIN, KIN, KEY, OUT, W extends Window<?>, TYPE extends Dataset<OUT>,
OP extends StateAwareWindowWiseOperator<IN, WIN, KIN, KEY, OUT, W, TYPE, OP>>
extends WindowWiseOperator<IN, WIN, OUT, W, TYPE> implements StateAware<KIN, KEY> {
protected final UnaryFunction<KIN, KEY> keyExtractor;
String n... | 0 |
* @since 1.0 | 0 |
private static final int NUM_WORK_QUEUE_THREADS = 1; | 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 |
* It uses synthetic sources and {@link SyntheticStep} which both can be parametrized to generate
* keys and values of various size, impose delay (sleep or cpu burnout) in various moments during
* the pipeline execution and provide some other performance challenges.
* <p>In addition, this test allows to: - fanout: p... | 0 |
* Thrown when an {@link AbstractFactory} cannot generate an object for
* the requested path. | 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/PredicatedSortedMap.java,v 1.6 2003/11/16 00:39:37 scolebourne Exp $
* @version $Revision: 1.6 $ $Date: 2003/11/16 00:39:37 $
* @deprecated TO BE REMOVED BEFORE ... | 0 |
// name attribute is optional
if ( attributes.getAttribute( "name" ) != null )
{
ref.setName( attributes.getAttribute( "name" ) );
}
| 0 |
/**
* This method takes a List<String> and a delimiter and joins the strings
* into a single string, where the original strings are separated using
* the given delimiter.
*
*/
public static String joinStrings(List<String> list, String delim)
{
if (list == null)
... | 0 |
import org.apache.ambari.logsearch.conf.SolrPropsConfig;
import org.apache.ambari.logsearch.conf.global.SolrCollectionState;
import org.apache.ambari.logsearch.configurer.SolrAuditAliasConfigurer;
import org.apache.ambari.logsearch.configurer.SolrCollectionConfigurer;
@Named("solrAuditLogsState")
private SolrCollec... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.