Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
public void timeout(final IOSession session, final int timeoutMillis) {
0
@Override @Override @Override @Override @Override @Override @Override @Override @Override public int hashCode() { return internalMap.hashCode(); } @Override public synchronized boolean equals(final Object o) { if (o == 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 ...
0
* The Ambari Management Pack v2 staging directory on the Ambari Server. */ @Markdown( description = "The Ambari Management Pack version-2 staging directory on the Ambari Server.", examples = { "/var/lib/ambari-server/resources/mpacks-v2" }) public static final ConfigurationProperty<String>...
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
/***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * * ------------------------------------------------------------------------- * * This software is published under the terms of the Apache Software License * * v...
1
import java.util.Vector; * This flag indicates if this node has BackgroundEnable = 'new'. * If so traversal of the gvt tree can halt here. */ protected Rectangle2D backgroundEnableRgn = null; /** public void setBackgroundEnable(Rectangle2D bgRgn) { Rectangle2D oldBgRgn = backgroundE...
0
public class TestSequencedHashMap extends TestMap {
0
* @version $Id: ASTAddNode.java,v 1.4 2003/12/17 12:49:35 geirm Exp $ if (left instanceof Float || left instanceof Double ((String) right).indexOf("E") != -1) /* * in the event that either is null and not both, then just make the * null a 0 ...
0
List<Long> ll = new ArrayList<Long>(Arrays.asList(1l, 2l, 3l));
0
* Copyright 2000-2009 The Apache Software Foundation
0
import static org.apache.ambari.metrics.core.timeline.TimelineMetricConfiguration.TIMELINE_METRICS_SUPPORT_MULTIPLE_CLUSTERS; if (Boolean.valueOf(metricsConf.get(TIMELINE_METRICS_SUPPORT_MULTIPLE_CLUSTERS, "false"))) { this.timelineMetricReadHelper = new TimelineMetricReadHelper(metadataManager, true); } ...
0
public class PoolingDataSource<C extends Connection> implements DataSource, AutoCloseable { * Close and free all {@link Connections}s from the pool. * @since 2.1 */ @Override public void close() throws Exception { try { _pool.close(); } catch(RuntimeException rte) { ...
0
* @see AbstractStringTemplateParser#parseSubstitutions(Reader) protected List parseSubstitutions(Reader in) throws Exception { if (inExpr) { } if (buf.length() > 0) { }
0
Object[] elements = data; int len = elements.length; for (Object e : c) { if (indexOf(e, elements, len) < 0) return false; } return true; } private static int indexOf(Object o, Object[] d, int len) { if (o == null) { for (i...
0
byte[] version = Constants.VERSION.getBytes(); byte[] inst = HdfsZooInstance.getInstance().getInstanceID().getBytes(); versionFails = !Arrays.equals(buff, Constants.VERSION.getBytes()); instanceFails = !Arrays.equals(buff, HdfsZooInstance.getInstance().getInstanceID().getBytes()); md.update(Co...
0
throw new UnsupportedOperationException("subComponent contains no display data; " + "cannot verify whether it is included");
0
private final static java.util.logging.Logger LOG = Logger.getLogger( ExecutorModule.class.getName()); // Thanks, Apache, for writing good code and just assuming that the path i give you has // a trailing slash. Of course it makes sense to blindly append a file name to the path // i pro...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/Attic/AbstractDualBidiMap.java,v 1.9 2003/11/08 18:40:17 scolebourne Exp $ * @version $Id: AbstractDualBidiMap.java,v 1.9 2003/11/08 18:40:17 scolebourne Exp $ public Object r...
0
/** * Serial version UID, being used, if the exception * is serialized. */ private static final long serialVersionUID = 8881893724388807504L; /** * The exceptions cause. We overwrite the cause of * the super class, which isn't available in Java 1.3. */ private final Throwa...
0
return logMgr.getHosts(); return logMgr.getComponents(); return logMgr.getLogLevelCount(); return logMgr.getComponentsCount(); return logMgr.getHostsCount();
0
try (BatchWriter bw = c.createBatchWriter(tableName)) { for (String row : "a b c d e f g h i j k".split(" ")) { Mutation m = new Mutation(row); m.put("cf", "cq", "value"); bw.addMutation(m); } try (BatchWriter bw = c.createBatchWriter(tableName)) { for (...
0
import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.xml.bind.JAXBException; import javax.xml.bind.UnmarshalException; import javax.xml.namespace.QName;
0
public static DFSLoggerInputStreams readHeaderAndReturnStream(FSDataInputStream input, AccumuloConfiguration conf) throws IOException { log.warn("Got EOFException trying to read WAL header information, assuming the rest of the file has no data.");
0
/** Flag to indicate if the buffer is currently full. */
0
Assert.assertEquals("t0p_s3cr3t", String.valueOf(kerberosCredential.getPassword())); credential = new KerberosCredential("admin/admin@FOOBAR.COM", "t0p_s3cr3t".toCharArray(), null); Assert.assertEquals(String.valueOf(credential.getPassword()), String.valueOf(decryptedCredential.getPassword()));
0
try (Scanner scanner = conn.createScanner("table1", Authorizations.EMPTY)) { int sum = 0; for (Entry<Key,Value> entry : scanner) { sum += Integer.parseInt(entry.getValue().toString()); } Assert.assertEquals(6569, sum);
0
return new NonePredicate<T>(FunctorUtils.copy(predicates));
0
* * /** * The minimum depth */ /** * The maximum depth */ * @param fileInfo The file selection information * @return true if the file or folder should be included, false otherwise. return minDepth <= depth && depth <= maxDepth; * @param fileInfo The file selection i...
0
import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Deque; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set;
0
public void testPrematureEndOfInputRequestReady() throws Exception { final State state = new HttpAsyncRequestExecutor.State(); state.setRequestState(MessageState.READY); this.connContext.setAttribute(HttpAsyncRequestExecutor.HTTP_EXCHANGE_STATE, state); this.connContext.setAttribute(...
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 ma...
0
NexmarkQueryModel(NexmarkConfiguration configuration) { static Instant windowStart(Duration size, Duration period, Instant timestamp) { static <T> List<String> toValueTimestampOrder(Iterator<TimestampedValue<T>> itr) { static <T> List<String> toValueOrder(Iterator<TimestampedValue<T>> itr) { static <T> Set<St...
0
Iterator<TabletLocationState> scanner = (Iterator<TabletLocationState>) new IteratorChain(rootScanner, metaScanner); if (state != null && state != TabletState.HOSTED && TableManager.getInstance().getTableState(locationState.extent.getTableId().toString()) != TableState.OFFLINE)
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.felix.gogo.runtime; import org.apache.felix.gogo.runtime.Tokenizer.Type;
0
import java.io.FileNotFoundException; import java.io.IOException; import org.apache.commons.io.IOUtils; if (root != null && type != null && dest != null) { } else if (root != null && dest != null) { FileReader fr = null; BufferedReader uriFile = null; fr = new FileRea...
0
public static final QName TAG_xenc_CipherReference = new QName(NS_XMLENC, "CipherReference", PREFIX_XENC); public static final QName TAG_xenc_Transforms = new QName(NS_XMLENC, "Transforms", PREFIX_XENC);
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 CVS $Id: ReferenceFieldHandler.java,v 1.4 2003/08/19 14:09:34 cziegeler Exp $ public abstract class ReferenceFieldHandler extends AbstractFieldHandler {
0
import org.apache.atlas.ApplicationProperties; url = SSLAndKerberosTest.class.getResource("/" + ApplicationProperties.APPLICATION_PROPERTIES); url = new File(confLocation, ApplicationProperties.APPLICATION_PROPERTIES).toURI().toURL(); TestUtils.writeConfiguration(configuration, persistDi...
0
import org.osgi.service.component.runtime.dto.ComponentConfigurationDTO; final ComponentConfigurationDTO aComp1 = findComponentConfigurationByName( bundle1, "org.apache.felix.scr.integration.components.Felix4188Component-1", ComponentConfigurationDTO.ACTIVE); final Felix4188Component aIn...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/BeanUtilsBean.java,v 1.15 2004/02/18 22:25:01 rdonkin Exp $ * $Revision: 1.15 $ * $Date: 2004/02/18 22:25:01 $ * @version $Revision: 1.15 $ $Date: 2004/02/18 22:25:01 $ * <p>Re...
0
private static final String DEFAULT_IMPL_CLASS = TitanGraphService.class.getName();
0
public NoVisFilter() {} public NoVisFilter(SortedKeyValueIterator<Key,Value> iterator) { super(iterator); } @Override public boolean accept(Key k, Value v) { ColumnVisibility vis = new ColumnVisibility(k.getColumnVisibility()); return vis.getExpression().length > 0; } @Override p...
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 may not...
0
return i.compareTo(Integer.valueOf(4)) < 0; list1.add(Integer.valueOf(1)); list1.add(Integer.valueOf(2)); list2.add(Integer.valueOf(3)); list2.add(Integer.valueOf(4)); // will be ignored by the predicate
0
package org.apache.commons.ognl; * http://www.apache.org/licenses/LICENSE-2.0
0
import org.apache.ambari.server.orm.dao.HostVersionDAO; import org.apache.ambari.server.orm.entities.HostVersionEntity; import org.apache.ambari.server.state.RepositoryVersionState; private HostVersionDAO hostVersionDAOMock; hostVersionDAOMock = createNiceMock(HostVersionDAO.class); HostVersionEntity hostVers...
0
private volatile Map m_propMap = new StringMap(); Map props = new StringMap();
1
import org.apache.atlas.model.legacy.EntityResult; EntityResult deleteEntities(List<String> guids) throws RepositoryException;
0
* @since 2.0 * @since 3.1
0
package org.apache.beam.runners.flink.translation.types;
0
bie = blockIndex.seekBlock(new Key(RFileTest.formatString("", row), "cf1", "cq1"), cacheBlock); Assert.assertSame(bie, blockIndex .seekBlock(new Key(RFileTest.formatString("", row - 1), "cf1", "cq1"), cacheBlock)); bie = blockIndex.seekBlock(new Key(RFileTest.formatString("", row +...
0
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
0
String version = SparkContextFactory.getSparkContext(options).version();
0
import org.apache.cocoon.portal.profile.PortalUser; /* (non-Javadoc) * @see org.apache.cocoon.portal.profile.ProfileManager#getUser() */ public PortalUser getUser() { PortalService service = null; try { service = (PortalService) this.manager.lookup(PortalService.R...
0
import java.io.Serializable; public class SamzaStoreStateInternalsTest implements Serializable { public final transient TestPipeline pipeline = TestPipeline.create();
0
in.apply( "KeyByElement", MapElements.via( new SimpleFunction<T, KV<T, Void>>() { @Override public KV<T, Void> apply(T element) { return KV.of(element, (Void) null); } ...
0
* Signals that {@link HttpCacheStorage} encountered an error performing an * update operation.
0
for (Object allAttr : allAttrs) { if (unsupportedAttributes.contains(allAttr)) {
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
* <p>The specified {@code Coder} must implement a function with the following * <p>For example, to configure the use of Java serialization as the default * <p>Similarly, to configure the use of * <p>Coders specified explicitly via
0
@VisibleForTesting static final String EVENT_BUS_DEAD_EVENTS = "event_bus_dead_events"; final AtomicLong deadEventCounter = statsProvider.makeCounter(EVENT_BUS_DEAD_EVENTS); eventBus.register(new Object() { @Subscribe public void logDeadEvent(DeadEvent event) { deadEventCounter.increment...
0
@Test(dependsOnMethods = "testGet") public void testCreateWithNestedContainerAttributes() { AtlasTypesDef typesDef = TestUtilsV2.defineTypeWithNestedCollectionAttributes(); try { AtlasTypesDef createdTypes = typeDefStore.createTypesDef(typesDef); assertEquals(typesDef.ge...
0
import org.apache.accumulo.core.util.RootTable; String systemTableToCheck = MetadataTable.NAME.equals(tableName) ? RootTable.NAME : MetadataTable.NAME; final Scanner scanner = shellState.getConnector().createScanner(systemTableToCheck, Authorizations.EMPTY);
0
private final EvaluationContext evaluationContext; public ParDoMultiEvaluatorFactory(EvaluationContext evaluationContext) { this.evaluationContext = evaluationContext; AppliedPTransform<?, ?, ?> application, CommittedBundle<?> inputBundle) throws Exception { createMultiEvaluator((AppliedPTransform...
0
import org.apache.felix.ipojo.test.online.components.MyProviderWithAnnotations; systemProperty("providerUsingAnnotations").value(providerUsingAnnotation()), public void installProviderUsingAnnotations() throws BundleException, InvalidSyntaxException, IOException { String url = context.getPro...
0
import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; private static Log LOG = LogFactory.getLog( SimpleRepeaterJXPathBinding.class ); if (LOG.isDebugEnabled()) { LOG.debug("done loading rows " + this);
0
import org.apache.http.Consts; String s = URLEncodedUtils.format(parameters, Consts.UTF_8); URLEncodedUtils.CONTENT_TYPE, Consts.UTF_8)); String s = URLEncodedUtils.format(parameters, Consts.UTF_8); List <NameValuePair> result = URLEncodedUtils.parse(s, Consts.UTF_8); Str...
0
boolean namespaces = cl.hasOption(OptUtil.namespaceOpt().getOpt()); iterators = shellState.getConnector().namespaceOperations().listIterators(OptUtil.getNamespaceOpt(cl, shellState)); throw new IllegalArgumentException("No table or namespace specified"); setting = shellState.getConnecto...
0
// Make sure redirect response body is fully consumed, if present HttpEntity entity = response.getEntity(); if (entity != null) { entity.consumeContent(); }
0
* @version $Revision: 1.3 $ $Date: 2003/02/17 09:22:14 $ extends AbstractFileName
0
import org.apache.accumulo.cloudtrace.instrument.receivers.SendSpansViaThrift;
0
public class StackConfigurationResourceDefinition extends BaseStacksResourceDefinition {
0
final Collection<Integer> collectionA = new ArrayList<>(); final Collection<Long> collectionB = new LinkedList<>(); } catch (final NullPointerException npe) { } catch (final NullPointerException npe) { final Iterable<Number> iterableIntAsNumber = Arrays.<Number>asList(1, 2, 3, 4,...
0
return (SortedBag<E>) decorated();
0
} else if (keyCoder != null) { // It is a stateful DoFn doFnRunner = DoFnRunners.defaultStatefulDoFnRunner( doFn, doFnRunner, stepContext, aggregatorFactory, windowingStrategy);
0
import org.apache.cocoon.portal.om.CompositeLayout; import org.apache.cocoon.portal.om.CopletDefinition; import org.apache.cocoon.portal.om.CopletInstance; import org.apache.cocoon.portal.om.CopletLayout; import org.apache.cocoon.portal.om.Item; CompositeLayout rootLayout = new CompositeLayout("root", "row"...
0
* @version CVS $Id: Field.java,v 1.17 2004/06/01 16:40:48 bruno Exp $ ", got " + newValue.getClass() + ").");
0
* @version CVS $Id$ implements Serviceable, FormManager, ThreadSafe, Contextualizable {
0
import org.apache.accumulo.hadoop.mapreduce.InputFormatBuilder.InputFormatOptions; InputFormatOptions<JobConf> opts = AccumuloInputFormat.configure().clientInfo(clientInfo) .table("test").auths(Authorizations.EMPTY); opts.addIterator(is).store(job); InputFormatOptions<JobConf> opts = AccumuloInputFo...
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
import static java.nio.charset.StandardCharsets.UTF_8; import java.util.HashMap; import java.util.Map; import com.google.api.client.util.ArrayMap; return new PubsubMessage(encodeInputElement(input), encodeInputElementToMapOfStrings(input)); private static Map<String, String> encodeInputElementToMapOfStrings(...
0
import org.apache.accumulo.core.replication.ReplicationTable; // create replication table in zk log.debug("Upgrade creating table " + ReplicationTable.NAME + " (ID: " + ReplicationTable.ID + ")"); TableManager.prepareNewTableState(instance.getInstanceID(), ReplicationTable.ID, Namespaces.ACCUMUL...
0
import cz.seznam.euphoria.core.client.accumulators.AccumulatorProvider; import cz.seznam.euphoria.core.client.accumulators.VoidAccumulatorProvider; /** * Set accumulator provider that will be used to collect metrics and counters. * When no provider is set a default instance of {@link VoidAccumulatorProvider} ...
0
package org.apache.http.nio.impl; import java.io.InputStream; public class ContentInputStream extends InputStream { private final ContentInputBuffer buffer; public ContentInputStream(final ContentInputBuffer buffer) { super(); if (buffer == null) { throw new IllegalArgumentException(...
0
c.output(multiPartitionsTag, KV.of(++partitionId, currResults)); c.output(singlePartitionTag, KV.of(++partitionId, currResults)); c.output(multiPartitionsTag, KV.of(++partitionId, currResults));
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
import org.joda.time.DateTime; testPipeline.apply(Create.of(BIDS_EVENTS)); testPipeline.apply(Create.of(BIDS_EVENTS)); return new Bid(id, 3L, 100L, new DateTime(432342L + id), "extra_" + id);
0
* $HeadURL$ * $Revision$ * $Date$ * <br> * <br> * This class can be used to resolve an instance of * {@link NHttpRequestHandler} matching a particular request URI. Usually the * resolved request handler will be used to process the request with the * specified request URI. * * @author <a href="mailto:oleg ...
0
* @since 2.0
1
Service sc4 = m.createService().setImplementation(new MyClient2(e, true, 13)); Service sc5 = m.createService().setImplementation(new MyClient2(e, false, 16)); // now, remove the provider, add a fourth consumer (using a required autoconfig dependency, not callbacks), and after /...
0
* @version $Id: FilenameUtilsTestCase.java,v 1.19 2004/10/31 00:03:03 scolebourne Exp $ assertEquals(true, FilenameUtils.isExtension("file", (String) null)); assertEquals(true, FilenameUtils.isExtension("file", "")); assertEquals(true, FilenameUtils.isExtension("file", (String[]) null)); ...
0
import org.apache.hc.core5.annotation.Immutable; import org.apache.hc.core5.util.Args; import org.apache.hc.core5.util.TextUtils;
0
import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
0
public static Set<String> pkPropertyIds = new HashSet<>(); new HashMap<>(); public static Set<String> propertyIds = new HashSet<>(); Set<Resource> resources = new LinkedHashSet<>(); Set<Resource> resources = new LinkedHashSet<>(); List<ServiceInfo> serviceInfoList = new ArrayList<>(); List...
1
/** $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/java/org/apache/commons/dbcp/BasicDataSource.java,v 1.2 2002/03/17 14:55:20 rwaldhoff Exp $ * $Revision: 1.2 $ * $Date: 2002/03/17 14:55:20 $ * @version $Revision: 1.2 $ $Date: 2002/03/17 14:55:20 $ GenericObjec...
0
import com.google.common.collect.ListMultimap; ListMultimap<String, FnDataReceiver<WindowedValue<?>>> pCollectionIdsToConsumers,
0
* <p> * If the array is size zero, the predicate always returns false. * If the array is size one, then that predicate is returned. * *
0