Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import javax.persistence.EntityManager; import org.apache.ambari.server.H2DatabaseCleaner; H2DatabaseCleaner.clearDatabase(m_injector.getProvider(EntityManager.class).get());
0
public class TestUnmodifiableIterator<E> extends AbstractTestIterator<E> { protected List<E> testList; /** * {@inheritDoc} */ @SuppressWarnings("unchecked") @Override protected void setUp() throws Exception { super.setUp(); testList = new ArrayList<E>(Arrays.asList((E[]) te...
0
public final class BooleanConverter extends AbstractConverter {
0
public void testValidator420() { UrlValidator validator = new UrlValidator(); assertFalse(validator.isValid("http://example.com/serach?address=Main Avenue")); assertTrue(validator.isValid("http://example.com/serach?address=Main%20Avenue")); assertTrue(validator.isValid("http://example.com...
0
* @param configTags a Map of configuration tags to set for this command - if null, no * configurations will be available for the command @Nullable Map<String, Map<String,String>> configTags, addServerActionCommand(actionName, role, comm...
0
import org.apache.ambari.server.controller.internal.AmbariServerConfigurationHandler; private final AmbariServerConfigurationHandler ambariServerConfigurationHandler; AmbariMetaInfo metaInfo, AmbariServerConfigurationHandler ambariServerConfigurationHandler) throws IOException { this.a...
0
package org.apache.cocoon.forms.validation; import org.w3c.dom.Element; * A {@link WidgetValidator} that can recieve a configuration {@link Element} * public interface ConfigurableWidgetValidator extends WidgetValidator { /** * Set the configuration Element */ void setConfiguration(Element ele...
0
protected SideInputReader getSideInputReader(Iterable<? extends SideInputInfo> sideInputInfos) { protected SideInputReader getSideInputReaderForViews( Iterable<? extends PCollectionView<?>> views) {
0
private static final long serialVersionUID = 1L; private static final Logger log = Logger.getLogger(StopLogger.class); private String logger; public StopLogger(String logger) { this.logger = logger; } @Override public long isReady(long tid, Master environment) throws Exception { return 0;...
1
* 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 applicabl...
0
/* * $Header: /cvshome/build/ee.foundation/src/java/io/PushbackInputStream.java,v 1.6 2006/03/14 01:20:23 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...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/BeanUtilsTestCase.java,v 1.15 2002/12/09 22:17:12 rwaldhoff Exp $ * $Revision: 1.15 $ * $Date: 2002/12/09 22:17:12 $ import junit.framework.TestCase; * @version $Revision: 1.15 $ ...
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
import org.apache.beam.sdk.state.TimeDomain;
0
@Override
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/map/ReferenceMap.java,v 1.2 2003/12/05 20:23:57 scolebourne Exp $ import org.apache.commons.collections.keyvalue.DefaultMapEntry; * @version $Revision: 1.2 $ $Date: 2003/12/05 20:...
0
* Represents an integer. int INTEGER = 24; * represents a real number. */ int REAL = 54; /** null,
0
private static final Logger log = LoggerFactory.getLogger(CachingHDFSSecretKeyEncryptionStrategy.class); Key plaintextKey = cipher.unwrap(params.getEncryptedKey(), params.getAlgorithmName(), Cipher.SECRET_KEY); String pathToKeyName = params.getAllOptions().get(Property.CRYPTO...
0
import org.apache.ambari.server.state.svccomphost.ServiceComponentHostDisableEvent; // disabled sch.handleEvent(new ServiceComponentHostDisableEvent(sch.getServiceComponentName(), assertEquals(sch.getServiceComponentName(), State.DISABLED,
0
super.deactivate(m_bundles.removeLast());
0
try (BatchScanner bs = client.createBatchScanner(table3)) {
0
getVariantCacheEntriesReturns(new HashMap<String,Variant>()); Map<String,Variant> variants = new HashMap<String,Variant>(); variants.put("\"etag1\"", new Variant("A","B",variant1)); variants.put("\"etag2\"", new Variant("C","D",variant2)); variants.put("\"etag3\"", new Variant("...
0
private final int tid; private final int seq;
0
/** * Create a new NodeNameTest. * @param qname name to match */ /** * Create a new NodeNameTest. * @param qname name to match * @param namespaceURI uri to match */ /** * Get the node name. * @return QName */ /** * Get the ns URI. * @return S...
0
}catch(Exception e){ public abstract TestReport runImpl() throws Exception;
0
InputStream readFrom(String spec) throws IOException; InputStream readFrom(String spec, String requestMethod, String params) throws IOException;
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
0
v.visitNameSignatureInstruction(this);
0
doc.println("<!-- WARNING: Do not edit this file. It is a generated file" + " that is copied from Accumulo build (from core/target/generated-docs)" + " -->"); doc.println("Below are properties set in `accumulo-client.properties`" + " that configure [Accumulo clients]({{ page.docs_baseurl...
0
import java.util.Map; public class JobsPropertyMap<T extends JobProperties<T>> implements JobExecutionListener { private final Map<String, T> propertyMap; public JobsPropertyMap(Map<String, T> propertyMap) { T defaultProperties = propertyMap.get(jobName); properties.validate(jobName);
0
import org.apache.batik.util.DoublyIndexedTable;
0
Scope.Frame frame = context instanceof TemplateContext Scope.Frame frame = context instanceof TemplateContext Scope.Frame frame = script.createFrame((Object[]) null); Scope.Frame frame = script.createFrame(args); private final Scope.Frame frame; pr...
0
import static org.easymock.EasyMock.aryEq; dbAccessor.dropFKConstraint(eq(UpgradeCatalog242.HOST_GROUP_TABLE), eq("FK_hg_blueprint_name")); dbAccessor.dropFKConstraint(eq(UpgradeCatalog242.BLUEPRINT_CONFIGURATION), eq("FK_cfg_blueprint_name")); dbAccessor.dropFKConstraint(eq(UpgradeCatalog242.BLUEPRINT_SETT...
0
public HostStatus getNodeStatus() { return nodeStatus; } public void setNodeStatus(HostStatus nodeStatus) { this.nodeStatus = nodeStatus; }
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
* by Spark, and then submitting the job to Spark to be executed. If we wanted to run a Beam
0
Set<Long> ids = new HashSet<>();
0
package org.apache.http.impl.nio;
0
@Test public void testDoFilter_stackAdvisorCalls() throws Exception { final Table<String, String, Boolean> urlTests = HashBasedTable.create(); urlTests.put("/api/v1/stacks/HDP/versions/2.3/validations", "POST", true); urlTests.put("/api/v1/stacks/HDP/versions/2.3/recommendations", "POST", true); per...
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...
1
<T> void runTestWrite(T[] elems, Coder<T> coder, String header, String footer) throws Exception { <T> void runTestWrite(T[] elems, String header, String footer, Coder<T> coder, int numShards) write = TextIO.Write.to(baseFilename).withCoder(coder); final String header, final String footer, Co...
0
* Basic implementation of {@link HttpAsyncRequestConsumer}. Please note that * this consumer buffers request content in memory and should be used for * relatively small request messages. *
0
public Number convert(String obj, Type targetType, Object root, Object[] key) throws Exception { public Long convert(Integer obj, Type targetType, Object root, Object[] key) throws Exception { public Object convert(List t, Type type, Object root, Object[] key) throws Exception { ...
0
import org.easymock.EasyMock; import com.twitter.mesos.scheduler.CronJobManager.CronScheduler; private CronScheduler cronScheduler; cronScheduler = createMock(CronScheduler.class); cron = new CronJobManager(storage, cronScheduler, delayExecutor); JobConfiguration job = makeJob(); expect(cronScheduler...
0
* Flink Beam runner exemple. package org.apache.beam.runners.flink.examples.streaming;
0
import java.awt.Shape; import java.awt.Stroke;
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
return ftpClient != null && ftpClient.isConnected();
0
//rootLogger.removeHandler(handler);
0
Capture<String> capturedTezViewUpdate = newCapture(); expect(dbAccessor.executeUpdate(capture(capturedTezViewUpdate))).andReturn(1).once(); Assert.assertNotNull(capturedTezViewUpdate.getValue()); Assert.assertEquals("UPDATE viewinstanceproperty SET name = 'yarn.ats.url' where name = 'yarn.timeline-ser...
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
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/ResultSetDynaClass.java,v 1.6 2002/12/07 23:34:40 craigmcc Exp $ * $Revision: 1.6 $ * $Date: 2002/12/07 23:34:40 $ * @version $Revision: 1.6 $ $Date: 2002/12/07 23:34:40 $ * in...
0
Buffer buffer = session.createBuffer(SshConstants.SSH_MSG_CHANNEL_REQUEST);
0
import java.util.HashMap; public void flush(Class targetClazz, Object lock) throws Exception { if (System.getSecurityManager() != null) { Actions actions = (Actions) m_actions.get(); actions.set(Actions.FLUSH_FIELD_ACTION, targetClazz, lock); try {...
0
package cz.seznam.euphoria.operator.test; import cz.seznam.euphoria.core.client.dataset.windowing.Window; class IntWindow extends Window { private int val; IntWindow(int val) { this.val = val; } public int getValue() { return val; } @Override public boolean equals(Object o) { if (o instan...
0
List<ConfigurationRequest> cr = getConfigurationRequests("Hosts", properties); hostRequest.setDesiredConfigs(cr); if (null != request.getClusterName() && null != request.getDesiredConfigs()) { for (ConfigurationRequest cr : request.getDesiredConfigs()) { if (null != cr.getProperties(...
0
Optional<IHostAttributes> attributes = getHostAttributes(Iterables.getOnlyElement(hosts)); if (!attributes.isPresent()) { missingAttributes.incrementAndGet(); return Optional.absent(); }
0
FileInstall.refresh(bundles);
0
import org.apache.cocoon.woody.event.WidgetEvent; import org.apache.cocoon.woody.event.ValueChangedEvent; public void broadcastEvent(WidgetEvent event) { this.definition.fireValueChangedEvent((ValueChangedEvent)event); }
0
classLoader.close(); } if (fileSystem != null) { fileSystem.close();
0
import java.util.ArrayList; import java.util.List; public class FlinkWindowAssigner<T, GROUP, LABEL> extends WindowAssigner<MultiWindowedElement<GROUP, LABEL, T>, FlinkWindow<GROUP, LABEL>> { private final Windowing<?, GROUP, LABEL, ? extends WindowContext<GROUP, LABEL>> windowing; Windowing<?, GROUP, L...
0
@Test(timeout=60*1000)
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 u...
0
import org.apache.hc.client5.http.impl.sync.HttpClients; import org.apache.hc.client5.http.sync.methods.HttpGet;
0
scheduler.cancelHostRoleCommands(EasyMock.<Collection<HostRoleCommand>>anyObject(),EasyMock.anyObject(String.class)); Capture<Collection<HostRoleCommand>> cancelCommandList = EasyMock.newCapture();
0
package org.apache.felix.fileinstall.internal; import org.apache.felix.fileinstall.internal.DirectoryWatcher; import org.apache.felix.fileinstall.internal.FileInstall;
0
import java.io.FileFilter; import java.io.UnsupportedEncodingException; import java.util.List; //----------------------------------------------------------------------- * Reads the contents of a file line by line to a List of Strings. * </p> * <p> * There is no readLines method without encoding ...
1
private byte[] data; int[] offsets = new int[numIndexEntries];
0
* function is a lot like that of the class in Java. Users of the Cocoon Forms framework * @version CVS $Id: WidgetDefinition.java,v 1.2 2004/03/11 02:56:33 joerg Exp $
0
* * http://www.apache.org/licenses/LICENSE-2.0 * /** * Provider class that provides KafkaNotification for Guice. */
0
import org.apache.beam.integration.nexmark.model.Auction; import org.apache.beam.integration.nexmark.model.Bid; import org.apache.beam.integration.nexmark.model.Person; public class NexmarkDriver<OptionT extends NexmarkOptions> {
0
* An exception was caught and the session will be closed * (if not already so). <B>Note:</B> the code makes no guarantee * that at this stage {@link #sessionClosed(Session)} will be called * or perhaps has already been called * * @param session The referenced {@link Session} * @param ...
0
import org.apache.http.nio.NHttpMessageWriter; /** * Default {@link NHttpMessageWriter} implementation for {@link HttpResponse}s. * * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a> * * @version $Revision$ */
0
(String) null, Collections.emptyMap()); Collections.emptyMap());
0
import org.apache.atlas.utils.AtlasPerfTracer; private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.LineageResource"); AtlasPerfTracer perf = null; if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) { perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "LineageRes...
0
public CliCommand parse(String[] cmdArgs) throws CliParseException { try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } throw new CliParseException(getUsageStr()); public boolean exec() throws Cl...
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
@NamedQuery(name = "AlertCurrentEntity.findByCluster", query = "SELECT alert FROM AlertCurrentEntity alert JOIN alert.alertHistory history WHERE history.clusterId = :clusterId"), @NamedQuery(name = "AlertCurrentEntity.findByService", query = "SELECT alert FROM AlertCurrentEntity alert JOIN alert.alertHistory hi...
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
* @version CVS $Id: URICopletAdapter.java,v 1.6 2003/05/26 09:52:59 cziegeler Exp $ final String uri = (String)coplet.getCopletData().getAttribute("uri");
0
import org.apache.commons.jelly.JellyTagException; public void doTag(XMLOutput output) throws JellyTagException {
0
@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"}) public class BatchScanOptions implements org.apache.thrift.TBase<BatchScanOptions, BatchScanOptions._Fields>, java.io.Serializable, Cloneable, Comparable<BatchScanOptions> { public enum _Fields implements org.apache.thrift.TFieldIdEnum {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/plugins/PluginCreateRule.java,v 1.5 2003/10/28 23:31:08 rdonkin Exp $ * $Revision: 1.5 $ * $Date: 2003/10/28 23:31:08 $ Log log = LogUtils.getLogger(digester); boolean ...
0
new HierarchicalTypeDefinition<>(ClassType.class, HiveDataTypes.HIVE_STORAGEDESC.getName(), null, new HierarchicalTypeDefinition<>(ClassType.class, HiveDataTypes.HIVE_DB.getName(), null, new HierarchicalTypeDefinition<>(ClassType.class, HiveDataTypes.HIVE_TYPE.getName(), ...
0
package org.apache.beam.sdk.nexmark.model;
0
* * * * *
1
/* $Id: DigesterLoaderRulesTest.java,v 1.3 2004/05/07 01:30:00 skitching Exp $ *
0
* to pump the streams and also to check if the shell is alive. /** * default buffer size for the IO pumps. */ ThreadUtils.newSingleThreadExecutor("shell[" + Integer.toHexString(shell.hashCode()) + "]"), true, bufferSize);
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 m...
0
* <li>Digester will call the <code>addRuleInstances()</code> method of your RuleSet to configure the * necessary rules.</li>
0
package org.apache.felix.karaf.shell.commands; import org.apache.felix.karaf.shell.console.OsgiCommandSupport;
0
import org.apache.accumulo.core.client.Accumulo; try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) { try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) { try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) {
0
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
0
final Connector conn = instance.getConnector("root", new PasswordToken(""));
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/RequiredNameTest.java,v 1.13 2003/09/06 05:17:59 rleland Exp $ * $Revision: 1.13 $ * $Date: 2003/09/06 05:17:59 $ * @version $Revision: 1.13 $ $Date: 2003/09/06 05:17:59 $ public cl...
0
import org.apache.accumulo.core.util.DeprecationUtil; import org.apache.accumulo.shell.commands.DeleteScanIterCommand; import org.apache.accumulo.shell.commands.SetScanIterCommand; if (!options.isFake()) { DistributedTrace.enable(InetAddress.getLocalHost().getHostName(), "shell", clientConf); } ...
0
* @version $Revision$ $Date$
0
DefaultListDelimiterHandler listHandler = new DefaultListDelimiterHandler(','); config.setListDelimiterHandler(listHandler); Parameters.xml().setExpressionEngine(engine) .setListDelimiterHandler(listHandler))); assertEquals(...
0
import org.apache.ambari.controller.rest.resources.StackResource; import org.apache.ambari.controller.rest.resources.StacksResource;
0
{ } { } { }
0