Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* Test the {@link HostVersionDAO#findByCluster(String)} method. */ @Test public void testFindByCluster() { Assert.assertEquals(3, hostVersionDAO.findByCluster("test_cluster1").size()); addMoreVersions(); Assert.assertEquals(9, hostVersionDAO.findByCluster("test_cluster1").size()); } /**
0
reader = source.createReader(options, (GeneratorCheckpoint) checkpointMark);
0
synchronized (this.trace) { protected void clearTrace() { synchronized(this.trace) { synchronized (this.trace) { return new ArrayList(trace); } synchronized(this.trace) { protected void removeTrace(AbandonedTrace trace) { synchronized(this.trace) {
0
suite.addTest(TestRequestWrapper.suite());
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestAll.java,v 1.36 2002/10/15 21:51:21 scolebourne Exp $ * $Revision: 1.36 $ * $Date: 2002/10/15 21:51:21 $ * @version $Id: TestAll.java,v 1.36 2002/10/15 21:51:21 scolebourne ...
0
this.closed = true; return this.session.hasBufferedInput() || this.inPlain.position() > 0; @Override public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append(this.session); buffer.append("[SSL handshake status: "); buffer.append(this....
0
* @param conf the hadoop configuration to build on top of public SequenceFileSource(Class<K> key, Class<V> value, String path, Configuration conf) { super(key, value, (Class) SequenceFileInputFormat.class, wrap(conf, path)); } private static Configuration wrap(Configuration conf, String path) { final ...
0
private static final long serialVersionUID = -244116825309415153L;
0
import org.apache.hadoop.metadata.typesystem.types.BaseTest;
0
private static final Map typeTransformers = Collections.unmodifiableMap(createTypeTransformers()); * @see "http://issues.apache.org/jira/browse/BEANUTILS-112" Class beanClass = bean.getClass(); // Cannot throw Exception
0
when(mockGcsUtil.bucketAccessible(any(GcsPath.class))).thenReturn(true);
0
* Copyright 2004,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
String file) { String file) {
0
waitFor(2000, new HiveHookIT.Predicate() {
0
cfg.setProperty(Property.TSERV_MAJC_DELAY, "1s");
0
* This class is a dialog used to enter an URI or to choose a local file. * Creates a new URIChooser. * Creates a new URIChooser.
1
import org.apache.ambari.server.state.StackId; // Required properties by stack version private final Map<StackId, Map<String, PropertyInfo>> requiredProperties = new HashMap<StackId, Map<String, PropertyInfo>>(); * @param stackName stack name * @param version stack version * @param serviceNam...
0
attributeInitializer.addAttribute(null, null, null, "xmlns:xlink", "xlink", "type", "simple"); "xlink", "show", "embed"); "xlink", "actuate", "o...
0
props.put("instance.name","empty-X"); props.put("instance.name","under-A"); props.put("instance.name","under"); props.put("instance.name","under"); props.put("instance.name","under-X"); props.put("instance.name","under"); props.put("instance.name","under"); props.put("instance.name","under");
0
import org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoder; public class StringLexicoder extends AbstractLexicoder<String> {
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/expression/jexl/JexlExpression.java,v 1.12 2002/11/27 12:43:19 jstrachan Exp $ * $Revision: 1.12 $ * $Date: 2002/11/27 12:43:19 $ * $Id: JexlExpression.java,v 1.12 2002/11/27 12:43:19 jstra...
0
import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Logger; import org.ops4j.pax.exam.spi.reactors.PerClass; import org.osgi.service.url.URLStreamHandlerService; import org.slf4j.LoggerFactory; @ExamReactorStrategy(PerClass.class) Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_...
0
package cz.seznam.euphoria.core.client.io; import java.io.Serializable; import java.util.List; /** * Source of data for dataset. */ public interface DataSource<T> extends Serializable { /** Retrieve list of all partitions of this source. */ List<Partition<T>> getPartitions(); /** Is this datasource bounded...
0
import java.util.WeakHashMap; import org.apache.bookkeeper.bookie.BookieException; WeakHashMap<Long, ByteBuffer> masterKeys = new WeakHashMap<Long, ByteBuffer>(); private LedgerDescriptor getHandle(long ledgerId, boolean readonly, byte[] masterKey) throws IOException { LedgerDescriptor handle = nul...
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
* Use <code>nullIsTruePredicate</code> if you want that.
0
import java.util.Map; Map<String, Map<String, MultimapSideInputSpec>> sideInputSpecs, sideInputSpecs, multimapSideInputHandlerFactory); private final Map<String, Map<String, MultimapSideInputSpec>> sideInputSpecs; Map<String, Map<String, MultimapSideInputSpec>> sideInputSpecs, this.sideI...
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 synchronized void setXaDataSourceInstance(final XADataSource xaDataSourceInstance) { public void setTransactionManager(final TransactionManager transactionManager) { public synchronized void setXADataSource(final String xaDataSource) { final ConnectionFactory driverConnectionFactory) thro...
0
* Defines an interface that a Rule class can implement if it wishes to get an initialisation callback after the rule * has been added to the set of Rules within a PluginRules instance. * public interface InitializableRule { * Called after this Rule object has been added to the list of all Rules. Note that if a...
1
public abstract class LearnerZooKeeperServer extends QuorumZooKeeperServer { int minSessionTimeout, int maxSessionTimeout, DataTreeBuilder treeBuilder, ZKDatabase zkDb, QuorumPeer self) throws IOException { super(logFactory, tickTime, minSessionTimeout, maxSessionTimeout,...
0
authState.update(authOptions);
0
public ScheduleException(Throwable t) { super(t); }
0
import static org.apache.beam.model.pipeline.v1.MetricsApi.monitoringInfoSpec; import org.apache.beam.model.pipeline.v1.MetricsApi.MonitoringInfo; import org.apache.beam.model.pipeline.v1.MetricsApi.MonitoringInfoSpecs.Enum; Enum.USER_COUNTER.getValueDescriptor().getOptions().getExtension(monitoringInfoSpec).get...
0
@Deprecated @Deprecated
0
import org.apache.cocoon.template.expression.Subst; private Subst var; private Subst value; private Subst type; private Subst pattern; private Subst timeZone; private Subst dateStyle; private Subst timeStyle;
0
public class NamingTests extends AbstractProviderTestCase { public void testRelativeURI() throws Exception { public void testRelativeUriEncoding() throws Exception { try { } catch (final FileSystemException e) { try { } catch (final FileSystemException e) { try { ...
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...
0
assertFalse(message + ": Unexpected success in read([]): " + BufferUtils.toHex(':', bytes), errorExpected); assertFalse(message + ": Unexpected success in read([],int,int): " + BufferUtils.toHex(':', bytes), errorExpected);
0
import org.apache.ambari.server.state.stack.upgrade.ParallelScheduler; assertNull(clusterGroup.parallelScheduler); assertNotNull(stopGroup.parallelScheduler); assertEquals(ParallelScheduler.DEFAULT_MAX_DEGREE_OF_PARALLELISM, stopGroup.parallelScheduler.maxDegreeOfParallelism); assertNull(clusterGroup.pa...
0
import static org.junit.Assert.assertNotEquals; // Confirms that sub-queries are not equal to original when there is more than one split. for (Query subQuery : queries) { assertNotEquals(subQuery, QUERY); } int offsetOfOriginal = query.getOffset(); Query.Builder q = Query.newBuilder(); ...
0
import javax.servlet.Servlet; public interface Block extends Processor, Servlet {
0
import org.apache.beam.sdk.extensions.euphoria.core.client.accumulators.Accumulator; import org.apache.beam.sdk.extensions.euphoria.core.client.accumulators.AccumulatorProvider; import org.apache.beam.sdk.extensions.euphoria.core.client.accumulators.Counter; import org.apache.beam.sdk.extensions.euphoria.core.client.ac...
0
private boolean initialized; if (!initialized) { this.processor = new RequestProcessor(getServletContext()); initialized = true; }
0
+ " cannot be set on " + bean.getClass().getName());
0
public Object removeAttribute(String name) { return a != null ? a.remove(name) : null;
0
@Override public void removeLogs(TInfo tinfo, TCredentials credentials, List<String> filenames) throws TException { }
0
private String serverUser; public StandaloneAccumuloCluster(ClientConfiguration clientConf, Path tmp, List<ClusterUser> users, String serverUser) { this(new ZooKeeperInstance(clientConf), clientConf, tmp, users, serverUser); public StandaloneAccumuloCluster(Instance instance, ClientConfiguration clientConf, P...
0
* <li>{@code *}</li> * <li>{@code *&lt;uri&gt;}</li> * <li>{@code &lt;uri&gt;*}</li>
0
@NamedQueries({ @NamedQuery( name = "StageEntity.findByCommandStatuses", query = "SELECT stage from StageEntity stage WHERE EXISTS (SELECT roleCommand.stageId from HostRoleCommandEntity roleCommand WHERE roleCommand.status IN :statuses AND roleCommand.stageId = stage.stageId AND roleCommand.requestI...
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 ...
0
* Parses a Property annotation. private static final class PropertyAnnotationParser extends EmptyVisitor implements AnnotationVisitor {
0
Long cluster = viewInstanceDefinition.getClusterHandle();
0
import org.apache.aurora.scheduler.storage.CronJobStore; checkCronExists(jobKey, storeProvider.getCronJobStore()); checkCronExists(jobKey, storeProvider.getCronJobStore()); removeJob(jobKey, storeProvider.getCronJobStore()); saveJob(config, storeProvider.getCronJobStore()); check...
0
package org.apache.felix.scr.impl.inject;
0
import org.apache.accumulo.core.client.TableNamespaceNotFoundException; private String oldNamespaceId; private String newNamespaceId; return Utils.reserveTableNamespace(oldNamespaceId, tid, false, true, TableOperation.RENAME) + Utils.reserveTableNamespace(newNamespaceId, tid, false, true, TableOperation...
0
@Test(/* timeout = 20000L */)
0
import org.apache.ambari.logsearch.common.Marker; @Marker public interface ServiceLogTruncatedRequest extends ServiceLogRequest, LogTruncatedParamDefinition {
0
UpgradeGroupHolder groupHolder = getClusterGroupHolder( cluster, (ClusterGrouping) group, forUpgrade ? null : version); * Special handling for ClusterGrouping that is used for tasks that are * to run on a specific targeted HostComponent. * * @param cluster the cluster * @param group...
0
import java.util.ArrayList; public void addClusterVersionEntity(ClusterVersionEntity clusterVersionEntity) { if (this.clusterVersionEntities == null) { this.clusterVersionEntities = new ArrayList<ClusterVersionEntity>(); } this.clusterVersionEntities.add(clusterVersionEntity); }
0
return Tables.getNamespace(inst, tableId);
0
* Copyright (C) 2015 Google Inc.
0
import org.apache.accumulo.core.conf.ClientConfiguration; ZooKeeperInstance instance = new ZooKeeperInstance(ClientConfiguration.loadDefault().withInstance(instanceName).withZkHosts(zooKeepers));
0
public boolean areEqualValues(Object val1, Object val2, Map<String, String> guidAssignments) { if (!valueType.areEqualValues(map1.get(key), map2.get(key), guidAssignments)) {
0
final HttpProcessor httppocessor) { this(requestProducer, responseConsumer, null, localContext, conn, httppocessor); public HttpContext getContext() { return localContext; } @Override
0
protected Map<String,String> properties = new HashMap<String,String>(); protected List<NamedFactory<KeyExchange>> keyExchangeFactories; protected List<NamedFactory<Cipher>> cipherFactories; protected List<NamedFactory<Compression>> compressionFactories; protected List<NamedFactory<Mac>> macFactories...
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
* @param className the name of the listener class
0
package com.twitter.mesos.scheduler.persistence;
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 ...
1
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Optional; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.util.concurrent.MoreExecutors;
0
private final Map<String, Map<String, String>> importedKeys = new HashMap<>(); Set<Resource> resources = new HashSet<>(); Set<String> tableSet = new HashSet<>(); Map<String, String> importedKeys = new HashMap<>(); Set<String> tables = new HashSet<>();
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
/* For development, use the container build by the current user to ensure that the SDK harness and * the SDK agree on how they should interact. This should be changed to a version-specific * container during a release. * * See https://beam.apache.org/contribute/docker-images/ for more information on how t...
0
Element context = doc.createElementNS(null, "nscontext"); context.setAttributeNS(Constants.NamespaceSpecNS, context.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:log4j", String URI = ((Element) c14nElem.item(i)).getAttributeNS(null, "URI"); (...
0
import org.apache.beam.sdk.values.PInput; public PTransform<PInput, PCollection<Row>> buildPTransform() { private class Transform extends PTransform<PInput, PCollection<Row>> { public PCollection<Row> expand(PInput inputPCollections) {
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
import javax.xml.parsers.ParserConfigurationException; import org.xml.sax.SAXException; protected void readBundles( OBRListener listener ) File index = syncOBRIndex(); try { SAXParser parser = factory.newSAXParser(); parser.parse( index, handler ); } ...
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
/** * If false, the summary is only output to the console. If true the summary is output to the * console and it's content is written to bigquery tables according to {@link * NexmarkOptions#getResourceNameMode()}. */ @JsonProperty public boolean exportSummaryToBigQuery = false;
0
private static final String TABLE_ID = "table"; pri = new ProblemReportingIterator(null, TABLE_ID, RESOURCE, false, ii);
0
import org.apache.accumulo.core.metadata.schema.RootTabletMetadata; zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET, RootTabletMetadata.getInitialJson(rootTabletDir), NodeExistsPolicy.FAIL);
0
// since the parameter names have been moved to interfaces, // this class currently is a dummy
0
@Category(NeedsRunner.class) @Category(NeedsRunner.class) @Category(NeedsRunner.class) @Category(NeedsRunner.class) @Category(NeedsRunner.class) @Category(NeedsRunner.class) @Category(NeedsRunner.class) @Category(NeedsRunner.class)
0
// ExampleUtils creates the necessary input sources to simplify execution of this Pipeline.
0
expect(kerberosHelper.getKerberosDescriptor(cluster, false)).andReturn(kerberosDescriptor).anyTimes();
0
public class TimelineMetricClusterAggregatorSecond extends AbstractTimelineAggregator { private static final Log LOG = LogFactory.getLog(TimelineMetricClusterAggregatorSecond.class); public TimelineMetricClusterAggregatorSecond(PhoenixHBaseAccessor hBaseAccessor,
0
import org.apache.accumulo.core.client.impl.Table; public static final Table.ID ID = new Table.ID("+rep");
1
import org.apache.http.params.BasicHttpParams; HttpParams params = new BasicHttpParams();
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 may not...
0
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly;
1
/** Create an appropriate AbstractMultipartForm instance */ public static AbstractMultipartForm getInstance(
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
// CHECKSTYLE:OFF // CHECKSTYLE:ON
0
package org.apache.jute.compiler;
0
/* * Copyright (C) 2015 Google Inc. * * 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 ...
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.net.HostAndPort; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.util.concurrent.Uninterruptibles;
0
public String toString() { return m_map.toString(); }
0
final Set<String> javaHomes = new HashSet<>(); private static void addAllJavaHomesOnWindows(final String keyJre, final Set<String> javaHomes) { private static Set<String> findJavaHomesOnWindows(final String keyJavaHome, final String[] keys) {
0