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 BundleCapability)
bcap1 = (BundleCapability) cap1;
bcap2 = (BundleCapability) cap2;
if ((bcap1.getRevision().getWiring() != null)
&& (bcap2.getRevision().getWiring() == null))
{
c = -1;
}
else if ((bcap1.getRevision().getWiring() == null)
&& (bcap2.getRevision().getWiring() != null))
{
c = 1;
}
if (c == 0 && bcap1 != null && bcap2 != null)
if (bcap1.getRevision().getBundle().getBundleId() <
bcap2.getRevision().getBundle().getBundleId())
else if (bcap1.getRevision().getBundle().getBundleId() >
bcap2.getRevision().getBundle().getBundleId()) | 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(mic.mergedIters).iterOpts(mic.mergedItersOpts)
.iterEnv(tie).useAccumuloClassLoader(true).context(context).classCache(classCache);
return IterConfigUtil.loadIterators(systemIter, iterLoad); | 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.ResourceProviderFactory;
import org.apache.ambari.server.controller.internal.AbstractControllerResourceProvider;
import org.apache.ambari.server.controller.internal.ServiceResourceProvider;
import org.apache.ambari.server.controller.spi.ResourceProvider;
import org.apache.ambari.server.controller.utilities.PropertyHelper;
import java.util.Map;
import java.util.Set;
ResourceProviderFactory factory = createMock(ResourceProviderFactory.class);
AmbariManagementController managementController = createMock(AmbariManagementController.class);
ResourceProvider serviceResourceProvider = new ServiceResourceProvider(PropertyHelper
.getPropertyIds(Resource.Type.Service),
PropertyHelper.getKeyPropertyIds(Resource.Type.Service),
managementController);
expect(factory.getServiceResourceProvider(anyObject(Set.class),
anyObject(Map.class),
anyObject(AmbariManagementController.class))).andReturn(serviceResourceProvider);
AbstractControllerResourceProvider.init(factory);
replay(factory, managementController);
| 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 KHZ = 54;
int DIMEN = 55;
int HASH = 56;
int IMPORT_SYM = 57;
int MEDIA_SYM = 58;
int CHARSET_SYM = 59;
int PAGE_SYM = 60;
int FONT_FACE_SYM = 61;
int ATKEYWORD = 62;
int IMPORTANT_SYM = 63;
int RANGE0 = 64;
int RANGE1 = 65;
int RANGE2 = 66;
int RANGE3 = 67;
int RANGE4 = 68;
int RANGE5 = 69;
int RANGE6 = 70;
int RANGE = 71;
int UNI = 72;
int UNICODERANGE = 73;
int FUNCTION = 74;
int UNKNOWN = 75; | 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> getInputTypeDescriptor() {
return new TypeDescriptor<InputT>(getClass()) {};
* Returns a {@link TypeDescriptor} capturing what is known statically
protected TypeDescriptor<OutputT> getOutputTypeDescriptor() {
return new TypeDescriptor<OutputT>(getClass()) {}; | 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
* @throws TableNotFoundException
* when the specified table doesn't exist
* @since 1.6.0
*/
public abstract ConditionalWriter createConditionalWriter(String tableName, ConditionalWriterConfig config) throws TableNotFoundException;
/** | 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 applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* @version $Revision: 1.40 $ | 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 use this file except in compliance with
* the License. You may obtain a copy of the License at | 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 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 distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ambari.logsearch.conf.global;
import javax.inject.Named;
@Named
public class SolrUserConfigState implements SolrCollectionState {
private volatile boolean znodeReady;
private volatile boolean solrCollectionReady;
private volatile boolean configurationUploaded;
@Override
public boolean isZnodeReady() {
return znodeReady;
}
@Override
public void setZnodeReady(boolean znodeAvailable) {
this.znodeReady = znodeAvailable;
}
@Override
public boolean isSolrCollectionReady() {
return solrCollectionReady;
}
@Override
public void setSolrCollectionReady(boolean solrCollectionReady) {
this.solrCollectionReady = solrCollectionReady;
}
@Override
public boolean isConfigurationUploaded() {
return configurationUploaded;
}
@Override
public void setConfigurationUploaded(boolean configurationUploaded) {
this.configurationUploaded = configurationUploaded;
}
} | 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ambari.server.topology.validators;
import javax.inject.Inject;
import org.apache.ambari.server.topology.ClusterTopology;
import org.apache.ambari.server.topology.InvalidTopologyException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Service implementation dealing with topology validation.
* It's intended to manage cluster topology validation by grouping validators into different sets as it's imposed by the
* callee logic.
*
* Ideally this service should be used as instead of directly use validator implementations.
*/
public class TopologyValidatorService {
private static final Logger LOGGER = LoggerFactory.getLogger(TopologyValidatorService.class);
@Inject
private TopologyValidatorFactory topologyValidatorFactory;
public TopologyValidatorService() {
}
public void validateTopologyConfiguration(ClusterTopology clusterTopology) throws InvalidTopologyException {
LOGGER.info("Validating cluster topology: {}", clusterTopology);
topologyValidatorFactory.createConfigurationValidatorChain().validate(clusterTopology);
}
}
| 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 or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* @version CVS $Id: CaseJXPathBinding.java,v 1.7 2004/03/05 13:02:26 bdelacretaz Exp $ | 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) {
flushLocationCacheEntry(reqURL, response, location);
}
private void flushLocationCacheEntry(final URL reqURL,
final HttpResponse response, final URL location) {
final String cacheKey = cacheKeyGenerator.canonicalizeUri(location.toString());
flushUriIfSameHost(reqURL, location);
private URL getLocationURL(final URL reqURL, final HttpResponse response) {
final Header clHeader = response.getFirstHeader("Location");
if (clHeader == null) {
return null;
}
final String location = clHeader.getValue();
final URL canonURL = getAbsoluteURL(location);
if (canonURL != null) {
return canonURL;
}
return getRelativeURL(reqURL, location);
}
| 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:52 $ | 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)
decimal = new BigDecimal(((Integer) value).intValue());
else if (value instanceof Long)
decimal = new BigDecimal(((Long) value).longValue());
Object result = evaluateNumeric(minExpr, expressionContext, MIN_ATTR, RANGE_ELEM);
result = evaluateNumeric(maxExpr, expressionContext, MAX_ATTR, RANGE_ELEM);
Object result = evaluateNumeric(minExpr, expressionContext, MIN_ATTR, RANGE_ELEM);
Object result = evaluateNumeric(maxExpr, expressionContext, MAX_ATTR, RANGE_ELEM);
return (clazz.isAssignableFrom(Integer.class) || clazz.isAssignableFrom(Long.class) || clazz.isAssignableFrom(BigDecimal.class)) && !arrayType; | 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;
import org.apache.aurora.scheduler.state.TaskAssigner.TaskAssignerImpl;
import org.apache.aurora.scheduler.state.UUIDGenerator.UUIDGeneratorImpl; | 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 use this file except in compliance with
the License. You may obtain a copy of the License at | 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::deleteTable);
}
private static void deleteTable() throws SQLException { | 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 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package java.util;
public abstract interface Iterator {
public abstract boolean hasNext();
public abstract java.lang.Object next();
public abstract void remove();
}
| 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 use this file except in compliance with
* the License. You may obtain a copy of the License at | 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));
assertEquals(0,comp.compare(true, true));
assertEquals(0,comp.compare(false, false));
assertTrue(comp.compare(false, true) > 0);
assertTrue(comp.compare(true, false) < 0);
assertEquals(0,comp.compare(true, true));
assertEquals(0,comp.compare(false, false));
assertTrue(comp.compare(false, true) < 0);
assertTrue(comp.compare(true, false) > 0);
| 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();
return getSocket().getInetAddress().getHostName();
for ( Iterator i = Arrays.asList( splitString( cookieHeader, ";" ) ).iterator(); i.hasNext(); )
String[] nvp = splitString( i.next().toString(), "=" );
String[] parameters = splitString( queryString, "&" );
String[] nva = splitString( i.next().toString(), "=" );
//Deprecated method decode() intentionally used for Java 1.3 compatibility.
params.put( URLDecoder.decode( nva[0].trim() ), nva[1].trim() );
private static String[] splitString( String instr, String separator )
StringTokenizer tokenizer = new StringTokenizer(instr, separator); | 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 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.cli;
/**
* @author Emmanuel Bourg
* @version $Revision$, $Date$
*/
public class DefaultParserTest extends ParserTestCase {
public void setUp() {
super.setUp();
parser = new DefaultParser();
}
} | 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.collections.primitives.RandomAccessIntList;
* @version $Revision: 1.7 $ $Date: 2003/11/16 22:15:08 $ | 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 static org.ops4j.pax.exam.OptionUtils.combine;
import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
public class FeaturesTest extends org.apache.felix.karaf.testing.AbstractIntegrationTest {
public static Option[] configuration() throws Exception{
return combine(
// Default karaf environment
Helper.getDefaultOptions(),
// add two features
// Test on both equinox and felix | 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 solr client as it is owned by Solr6Index.");
}
| 0 |
import org.apache.aurora.scheduler.storage.entities.IHostMaintenanceRequest;
stores.getHostMaintenanceStore().deleteHostMaintenanceRequests();
case SAVE_HOST_MAINTENANCE_REQUEST:
stores.getHostMaintenanceStore().saveHostMaintenanceRequest(
IHostMaintenanceRequest
.build(op.getSaveHostMaintenanceRequest().getHostMaintenanceRequest()));
break;
case REMOVE_HOST_MAINTENANCE_REQUEST:
stores.getHostMaintenanceStore().removeHostMaintenanceRequest(
op.getRemoveHostMaintenanceRequest().getHost());
break;
| 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 use this file except in compliance with
* the License. You may obtain a copy of the License at | 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));
assertExpression(jc, "3 * 3 + foo", new Byte((byte)11));
assertExpression(jc, "3 * 3 - foo", new Byte((byte)7));
assertExpression(jc, "4 % 3", new Byte((byte)1));
assertExpression(jc, "imanull + 2", new Byte((byte)2));
assertExpression(jc, "imanull + imanull", new Byte((byte)0));
assertExpression(JexlHelper.createContext(), "## double or nothing\n 1 + 1", Byte.valueOf("2")); | 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>.OnTimerContext subContext = c.forTrigger(this);
Trigger.TriggerResult result = trigger.onTimer(subContext);
public MergeResult invokeMerge(Trigger<W>.OnMergeContext c) throws Exception {
Trigger<W>.OnMergeContext subContext = c.forTrigger(this);
Trigger.MergeResult result = trigger.onMerge(subContext);
public TriggerResult invokeElement(Trigger<W>.OnElementContext c) throws Exception {
TriggerResult result = super.invokeElement(c);
public TriggerResult invokeTimer(Trigger<W>.OnTimerContext c) throws Exception {
TriggerResult result = super.invokeTimer(c);
public MergeResult invokeMerge(Trigger<W>.OnMergeContext c) throws Exception {
MergeResult result = super.invokeMerge(c); | 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 or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* @version CVS $Id: CopletModule.java,v 1.11 2004/03/05 13:02:10 bdelacretaz Exp $ | 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 applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* @version $Revision: 1.5 $ $Date: 2004/02/18 01:20:34 $ | 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(scope);
c.setScope(serviceScope);
}
// See if Bundle must be auto configured
String bundleField = srvMeta.getString(Params.bundle, null);
if (bundleField != null)
{
c.setAutoConfig(Bundle.class, bundleField);
} | 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)).andReturn(createNiceMock(KerberosHelper.class));
expect(injector.getInstance(KerberosHelper.class)).andReturn(createNiceMock(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, "FLUME_HANDLER");
resource.setProperty(COMPONENT_NAME_PROPERTY_ID, "FLUME_HANDLER");
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, "FLUME_HANDLER");
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, "FLUME_HANDLER"); | 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 (!m_stop)
} | 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().silent(true).strict(false).create());
}
@Test
public void testInterruptCancellable() throws Exception {
runInterrupt(new JexlBuilder().silent(true).strict(true).cancellable(true).create());
private void runInterrupt(JexlEngine jexl) throws Exception {
Script.Callable c = (Script.Callable) sint.callable(ctxt);
if (c.isCancellable()) {
Assert.fail("should have thrown a Cancel");
}
if (!c.isCancellable()) {
Assert.assertTrue(c.isCancelled());
Future<Object> f = null;
c = (Script.Callable) sint.callable(ctxt);
f = exec.submit(c);
t = f.get();
if (c.isCancellable()) {
Assert.fail("should have thrown a Cancel");
}
if (!c.isCancellable()) {
Assert.assertTrue(c.isCancelled());
f = exec.submit(ssleep.callable(ctxt));
t = f.get(100L, TimeUnit.MILLISECONDS);
if (f != null) {
f.cancel(true);
t = fc.get();
f = exec.submit(swhile.callable(ctxt));
t = f.get(100L, TimeUnit.MILLISECONDS);
if (f != null) {
f.cancel(true);
t = fc.get(); | 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 being evaluated.
*
* @return Instance updater status changes.
*/ | 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.