Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import java.awt.Shape;
import java.awt.geom.Rectangle2D;
import org.apache.batik.ext.awt.image.rendered.CachableRed; | 0 |
package org.apache.beam.sdk.util;
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.sdk.util.BaseExecutionContext.StepContext;
import org.apache.beam.sdk.values.TupleTag; | 0 |
StackId mockStackId = easyMockSupport.createNiceMock(StackId.class);
expect(mockClusterExpected.getDesiredStackVersion()).andReturn(mockStackId).atLeastOnce();
configHelper.createConfigType(mockClusterExpected, mockStackId,
mockAmbariManagementController, "slider-client",
| 0 |
package org.apache.beam.learning.katas.coretransforms.partition;
| 0 |
* @param sessionId the session ID to check | 0 |
SummingCombiner.setCombineAllColumns(is, true);
BulkPlusOne.counter.set(0l); | 0 |
import org.osgi.resource.Capability;
public class CandidateComparator implements Comparator<Capability>
public int compare(Capability cap1, Capability cap2)
BundleCapability bcap1 = null;
BundleCapability bcap2 = null;
if (cap1 instanceof BundleCapability &&
cap2 instanceof Bu... | 1 |
* Copyright (c) 2002 The Apache Software Foundation. All rights | 0 |
String tableName = getUniqueNames(1)[0];
c.tableOperations().create(tableName);
c.tableOperations().setProperty(tableName, Property.TABLE_SPLIT_THRESHOLD.getKey(), "10K");
BinaryIT.runTest(c, tableName);
String id = c.tableOperations().tableIdMap().get(tableName);
| 0 |
import org.apache.sshd.common.util.security.SecurityUtils; | 0 |
if (LOG.isDebugEnabled()) {
LOG.warn("State machine exception.", ex);
} else {
LOG.warn("State machine exception. " + ex.getMessage());
} | 0 |
private int maxTotal = GenericObjectPoolConfig.DEFAULT_MAX_TOTAL;
public int getMaxTotal() {
return (this.maxTotal);
public void setMaxTotal(int maxTotal) {
this.maxTotal = maxTotal;
tmpPool.setMaxTotalPerKey(getMaxTotal());
if (maxTotal <= 0) { | 0 |
throw new IllegalArgumentException(e);
throw new IllegalArgumentException(e);
throw new IllegalArgumentException(e); | 0 |
protected int electionAlg = 3;
protected int electionPort = 2182; | 0 |
import org.apache.beam.sdk.values.PBegin;
transform.getDefaultOutputCoder((PBegin)context.getInput())); | 0 |
@Deprecated
@Deprecated | 0 |
import org.apache.accumulo.core.conf.IterConfigUtil;
import org.apache.accumulo.core.conf.IterLoad;
private Map<String,Class<SortedKeyValueIterator<Key,Value>>> classCache;
IterConfigUtil.mergeIteratorConfig(mergedIters, mergedItersOpts, tableIters, tableIterOpts,
IterLoad iterLoad = new IterLoad().iters(mi... | 0 |
import static com.google.common.base.Preconditions.checkArgument;
import com.google.common.base.Joiner;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.TreeSet; | 0 |
public static final String TIMELINE_METRICS_EVENT_METRIC_PATTERNS =
"timeline.metrics.downsampler.event.metric.patterns";
| 0 |
invoker.invokeSplitRestriction("blah", restriction, output -> outputs.add(output)); | 0 |
super.seek(range, columnFamilies, inclusive); | 0 |
NodePointer pointer)
| 0 |
import javax.annotation.Nullable;
// Initialized in prepareWrite
@Nullable private DataFileWriter<OutputT> dataFileWriter;
| 0 |
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.anyObject;
import org.apache.ambari.server.controller.AmbariManagementController;
import org.apache.ambari.server.controller.ResourceProviderFactor... | 0 |
int IDENT = 35;
int NUMBER = 36;
int _URL = 37;
int URL = 38;
int PERCENTAGE = 39;
int PT = 40;
int MM = 41;
int CM = 42;
int PC = 43;
int IN = 44;
int PX = 45;
int EMS = 46;
int EXS = 47;
int DEG = 48;
int RAD = 49;
int GRAD = 50;
int MS = 51;
int SECOND = 52;
int HZ = 53;
int K... | 0 |
import org.apache.ambari.server.controller.spi.TemporalInfo;
* @param temporalInfo
public void addProperty(String group, String property, TemporalInfo temporalInfo); | 0 |
import com.google.cloud.dataflow.sdk.values.TypeDescriptor;
* <p>The default value is {@code Duration.ZERO}, in which case
* Returns a {@link TypeDescriptor} capturing what is known statically
* <p> See {@link #getOutputTypeDescriptor} for more discussion.
protected TypeDescriptor<InputT> getInputTypeDescrip... | 0 |
BranchHandle bh = bh_list;
bh_list = (BranchHandle)bh.next;
bh.setInstruction(i);
return bh; | 0 |
* Factory method to create a ConditionalWriter connected to Accumulo.
*
* @param tableName
* the name of the table to query data from
* @param config
* configuration used to create conditional writer
*
* @return ConditionalWriter object for writing ConditionalMutations
* @... | 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/map/TestAll.java,v 1.8 2003/12/03 15:50:12 scolebourne Exp $
* @version $Revision: 1.8 $ $Date: 2003/12/03 15:50:12 $
suite.addTest(TestReferenceMap.suite()); | 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 ap... | 0 |
* taking any of its rendering attribute into account. That is, | 1 |
map = new HashMap<>();
map = new HashMap<>(); | 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 |
/*
* 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 |
* @version $Id$ | 0 |
return new SingletonMap<>((K) ONE, (V) TWO); | 1 |
import cz.seznam.euphoria.core.client.dataset.partitioning.HashPartitioner;
import cz.seznam.euphoria.core.client.dataset.partitioning.HashPartitioning; | 0 |
import org.apache.hc.core5.annotation.Contract;
import org.apache.hc.core5.annotation.ThreadingBehavior;
@Contract(threading = ThreadingBehavior.STATELESS) | 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
* distribut... | 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 |
package org.apache.cocoon.components.source.impl;
class BlockHttpServletResponseWrapper extends HttpServletResponseWrapper { | 0 |
* @version $Revision$ $Date$ | 0 |
// create garbage:
@SuppressWarnings("unused")
final byte[] b = new byte[bytz];
bytz = bytz * 2; | 0 |
final URL contentLocation = getContentLocationURL(reqURL, response);
if (contentLocation != null) {
flushLocationCacheEntry(reqURL, response, contentLocation);
}
final URL location = getLocationURL(reqURL, response);
if (location != null) {
flushLocationCa... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/map/LRUMap.java,v 1.5 2004/01/02 01:36:52 psteitz Exp $
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.5 $ $Date: 2004/01/02 01:36:... | 0 |
private int index; // index to constant pool | 0 |
ctx.addUIEventListeners(imgDocument);
| 0 |
* Checks numeric ranges. Works for Integer, Long and BigDecimal values.
private Expression maxExpr;
private static final String RANGE_ELEM = "range";
private static final String MIN_ATTR = "min";
private static final String MAX_ATTR = "max";
if (value instanceof Integer)
deci... | 0 |
.put(FieldType.FLOAT, FloatCoder.of()) | 0 |
* @version $Revision: 1.6 $ $Date: 2004/11/08 21:07:44 $
return (String) mimeTypeMap.get(mimeType); | 0 |
RangeInputSplit split = new RangeInputSplit(new Range(new Key("a"), new Key("b")), new String[] {"localhost"});
RangeInputSplit split = new RangeInputSplit(new Range(new Key("a"), new Key("b")), new String[] {"localhost"});
| 0 |
package org.apache.aurora.scheduler.state;
import org.apache.aurora.scheduler.MesosTaskFactory;
import org.apache.aurora.scheduler.MesosTaskFactory.MesosTaskFactoryImpl;
import org.apache.aurora.scheduler.events.PubsubEventModule;
import org.apache.aurora.scheduler.state.MaintenanceController.MaintenanceControllerImpl;... | 0 |
// In case we are going to retry the same request,
// clear auto-generated headers
followup.getRequest().clearHeaders(); | 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 |
c1.addService("MAPREDUCE");
c1.addService("HDFS"); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestNodeCachingLinkedList.java,v 1.8 2003/10/06 21:02:50 scolebourne Exp $
* @version $Revision: 1.8 $ $Date: 2003/10/06 21:02:50 $
return "3"; | 0 |
import static org.apache.beam.sdk.io.common.IOITHelper.executeWithRetry;
public static void setup() throws Exception {
executeWithRetry(JdbcIOIT::createTable);
}
private static void createTable() throws SQLException {
public static void tearDown() throws Exception {
executeWithRetry(JdbcIOIT::deleteTab... | 0 |
import java.io.IOException; | 0 |
package org.apache.accumulo.core.trace;
public class CountSampler extends org.htrace.impl.CountSampler {
public CountSampler(long frequency) {
super(frequency); | 1 |
response.getDesiredHostConfigs(), requestedIds);
r.setDesiredHostConfigs(h.getDesiredHostConfigs(cluster)); | 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/util/Iterator.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 this... | 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.cocoon.el.Expression;
import org.apache.cocoon.el.ExpressionCompiler;
import org.apache.cocoon.el.ExpressionException;
* @see org.apache.cocoon.el.ExpressionCompiler#compile(java.lang.String, java.lang.String) | 0 |
public class TestBooleanComparator extends AbstractTestComparator<Boolean> {
public Comparator<Boolean> makeObject() {
public List<Boolean> getComparableObjectsOrdered() {
List<Boolean> list = new ArrayList<Boolean>();
list.add(true);
allTests(true,new BooleanComparator(true));
... | 0 |
* Note that access to the pool data structures is synchronized via the
private final HttpParams params; | 0 |
import org.junit.After;
@After
public void clean() {
shardReadersPool.stop();
}
| 0 |
//TODO: Make locale static and perhaps global to the service.
private final Locale m_locale = new Locale( System.getProperty( "user.language" ), System.getProperty( "user.country" ) );
//private final static String m_encoding = "UTF-8";
return getSocket().getInetAddress().getHostAddress();
r... | 0 |
import java.util.Collections;
import java.util.Map;
import org.apache.beam.sdk.values.PValue;
@Override
public Map<PValue, ReplacementOutput> mapOutputs(
List<TaggedPValue> outputs, PDone newOutput) {
return Collections.emptyMap();
}
| 0 |
* CVS $Id: EffectWidgetReplacingPipe.java,v 1.3 2003/12/29 17:52:12 stefano Exp $ | 0 |
* @return {@code true} iff the route is complete
* Checks the output of {@code toString}.
* @return the result of {@code rt.toString()} | 0 |
TRANSLATORS.put(ParDo.MultiOutput.class, new ParDoTranslatorBatch());
ParDo.MultiOutput<InputT, OutputT>> {
ParDo.MultiOutput<InputT, OutputT> transform, | 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 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestIntListList.java,v 1.7 2003/11/16 22:15:08 scolebourne Exp $
import org.apache.commons.collections.list.AbstractTestList;
import org.apache.commons.co... | 0 |
import org.apache.felix.karaf.testing.Helper;
import static org.junit.Assert.assertNotNull;
import static org.ops4j.pax.exam.CoreOptions.equinox;
import static org.ops4j.pax.exam.CoreOptions.felix;
import static org.ops4j.pax.exam.CoreOptions.maven;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
import st... | 0 |
import org.apache.beam.sdk.testing.ValidatesRunner;
@Category(ValidatesRunner.class)
@Category(ValidatesRunner.class)
@Category(ValidatesRunner.class)
@Category(ValidatesRunner.class)
@Category(ValidatesRunner.class)
@Category(ValidatesRunner.class) | 0 |
if(logger.isDebugEnabled()) {
logger.debug("Closed the solr client successfully.");
}
logger.warn("Failed to close SolrClient.", excp);
if(logger.isDebugEnabled()) {
logger.debug("Ignoring the closing of sol... | 0 |
import org.apache.aurora.scheduler.storage.entities.IHostMaintenanceRequest;
stores.getHostMaintenanceStore().deleteHostMaintenanceRequests();
case SAVE_HOST_MAINTENANCE_REQUEST:
stores.getHostMaintenanceStore().saveHostMaintenanceRequest(
IHostMaintenanceRequest
.build(o... | 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 |
assertExpression(jc, "foo.substring(0, 1+1)", "ab");
assertExpression(jc, "foo + 2", new Byte((byte)4));
assertExpression(jc, "3 + 3", new Byte((byte)6));
assertExpression(jc, "3 + 3 + foo", new Byte((byte)8));
assertExpression(jc, "3 * 3", new Byte((byte)9));
assertExpre... | 0 |
public TriggerResult invokeElement(Trigger<W>.OnElementContext c) throws Exception {
Trigger<W>.OnElementContext subContext = c.forTrigger(this);
Trigger.TriggerResult result = trigger.onElement(subContext);
public TriggerResult invokeTimer(Trigger<W>.OnTimerContext c) throws Exception {
Trigger<W>.OnTi... | 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 |
input.apply("Write", write);
return PDone.in(input.getPipeline()); | 0 |
import org.apache.beam.runners.core.DoFnAdapters; | 0 |
/*
* Copyright 2003-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 applica... | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(GraphData.class);
} | 0 |
@Override
public EntityMutationResponse createOrUpdateForImport(EntityStream entityStream) throws AtlasBaseException { | 0 |
public static class ElementTypeInfo implements TypeInfo { | 0 |
filterIterator.setPredicate(NotNullPredicate.notNullPredicate()); | 0 |
* @since 1.8.0 | 0 |
import org.apache.felix.dm.Component.ServiceScope;
c.setAutoConfig(Bundle.class, Boolean.FALSE);
// See if a service scope is provided
String scope = srvMeta.getString(Params.scope, null);
if (scope != null) {
ServiceScope serviceScope = ServiceScope.valueOf(scop... | 0 |
* Autogenerated by Thrift Compiler (0.10.0)
public enum Durability implements org.apache.thrift.TEnum { | 0 |
import org.apache.ambari.server.controller.KerberosHelper;
expect(injector.getInstance(KerberosHelper.class)).andReturn(createNiceMock(KerberosHelper.class));
expect(injector.getInstance(KerberosHelper.class)).andReturn(createNiceMock(KerberosHelper.class));
expect(injector.getInstance(KerberosHelper.class)... | 0 |
resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "FLUME_HANDLER");
String metricsList = getMetricsRegexes(metricsRegexes, gangliaPropertyIds, "FLUME_HANDLER");
resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "FLUME_HANDLER");
String metricsList = getMetricsRegexes(metricsRegexes, gangliaPropertyIds, "F... | 0 |
import org.apache.accumulo.core.singletons.SingletonReservation;
client = new AccumuloClientImpl(SingletonReservation.noop(), this); | 0 |
private volatile boolean m_stop = false;
m_stop = true;
// Check to see if we have stdin.
try
{
System.in.available();
}
catch (IOException ex)
{
m_stop = true;
}
while (!... | 0 |
* Get a property for the given key from the ambari configuration.
*
* @param key the property key
*
* @return the property value; null indicates that the configuration contains no mapping for the key
*/
public String getAmbariProperty(String key);
/** | 0 |
import org.apache.commons.jexl3.internal.Script;
runInterrupt(new JexlBuilder().silent(false).strict(true).create());
runInterrupt(new JexlBuilder().silent(false).strict(false).create());
runInterrupt(new JexlBuilder().silent(true).strict(true).create());
runInterrupt(new JexlBuilder().s... | 0 |
public SideEffect(Optional<InstanceAction> action, Set<InstanceUpdateStatus> statusChanges) {
/**
* Gets the action that should be performed with this side-effect, if any.
*
* @return The action associated with this side-effect.
*/
/**
* Gets the status changes that the instance underwent while bei... | 0 |
* for (int i = 0; i < files.length; i++) { | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.