Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
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 u...
0
public class DumperRule extends Rule { public void begin( String namespace, String name, Attributes attributes ) throws Exception { System.out.print( "<" ); System.out.print( name ); for ( int i = 0; i < nAttributes; ++i ) { String key = attributes.getQNa...
1
import org.springframework.ldap.support.LdapUtils; expect(ldapServerProperties.getBaseDN()).andReturn("cn=testUser,ou=Ambari,dc=SME,dc=support,dc=com").anyTimes(); expect(ldapTemplate.search(eq(LdapUtils.newLdapName("cn=testUser,ou=Ambari,dc=SME,dc=support,dc=com")), eq("(&(objectClass=objectClass)(uid=foo))"),...
0
import org.apache.beam.sdk.transforms.DoFn; return input.apply( "Identity" + name, ParDo.of( new DoFn<KV<Integer, String>, KV<Integer, String>>() { @ProcessElement * A DoFn used in testCoGroupByKeyWithWindowing(), to test processing the results of a * CoGroupByKey. ...
0
return pointer;
0
import org.apache.atlas.discovery.EntityLineageService; import org.apache.atlas.model.lineage.AtlasLineageService; bind(AtlasLineageService.class).to(EntityLineageService.class).asEagerSingleton();
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
import java.util.UUID; import org.apache.ambari.server.events.AmbariEvent.AmbariEventType; import junit.framework.Assert; * Tests that {@link ServiceComponentUninstalledEvent}s are fired correctly. * * @throws Exception */ @Test public void testClusterRenameEvent() throws Exception { Class<? extend...
0
LOG.error("Exception while detecting JMX protocol for clusterName = " + clusterName + ", componentName = " + componentName, e); LOG.error("Defaulting JMX to HTTP protocol for for clusterName = " + clusterName + ", componentName = " + componentName + componentName); jmxP...
0
import static com.google.common.collect.Iterables.getOnlyElement; import org.apache.beam.runners.direct.ExecutableGraph; private final BundleFactory bundleFactory; private final ExecutableGraph<PTransformNode, PCollectionNode> graph; ImpulseEvaluatorFactory( BundleFactory bundleFactory, ExecutableGraph<PTr...
0
/** * This program tests that the proper exit code is propagated to the shell. * $ ./bin/accumulo org.apache.accumulo.start.TestMain $ ./bin/accumulo org.apache.accumulo.start.TestMain badExit $ ./bin/accumulo * org.apache.accumulo.start.TestMain throw
0
import org.apache.ambari.server.state.Config; Config config = createNiceMock(Config.class); expect(config.getType()).andReturn("config-type").anyTimes(); expect(config.getProperties()).andReturn(configReqProps).anyTimes(); expect(config.getPropertiesAttributes()).andReturn(new HashMap<String,Map<String,...
0
import org.apache.accumulo.server.ServerConstants; private static Path createTmpDir(AccumuloConfiguration acuConf, VolumeManager fs) throws IOException { String accumuloDir = fs.choose(ServerConstants.getTemporaryDirs()); Path result = null; while (result == null) { result = new Path(accumuloDir + "...
0
import org.apache.http.impl.SessionOutputBufferMockup;
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
import cz.seznam.euphoria.core.client.io.Collector; .using((Pair<Type, Long> p, Collector<Triple<Instant, Type, Long>> ctx) -> { .using((Pair<Type, Long> p, Collector<Triple<Instant, Type, Long>> ctx) -> { DistinctState(StorageProvider storageProvider, Collector<Object> context) { ...
0
import com.google.cloud.dataflow.sdk.testing.PAssert; PAssert.that(output).containsInAnyOrder(EXPECTED_FIXED_SEPARATE_COUNT_SET); PAssert.that(output).containsInAnyOrder(EXPECTED_FIXED_SAME_COUNT_SET); PAssert.that(output).containsInAnyOrder(EXPECTED_SLIDING_COUNT_SET);
0
import java.io.Serializable;
0
* "Clients can iterate over multiple column families, and there are several mechanisms for limiting * the rows, columns, and timestamps traversed by a scan. For example, we could restrict [a] scan * ... to only produce anchors whose columns match [a] regular expression ..., or to only produce * anchors whose timest...
0
return Util.getIntValue(annotation, desc, "cardinality", Property.class); return Util.getBooleanValue(annotation, desc, "propertyPrivate", Property.class);
0
import org.apache.commons.vfs.FileSystem;
0
package org.apache.beam.sdk.transforms.windowing;
0
import com.google.common.base.Splitter; import java.nio.charset.StandardCharsets; this(new String(record.getData().array(), StandardCharsets.UTF_8), withData(ByteBuffer.wrap(data.getBytes(StandardCharsets.UTF_8))). List<String> shardIteratorParts = Splitter.on(':').splitToList(getRecordsRequ...
0
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not...
0
import org.apache.accumulo.server.ServerContext; checkOffline(master.getContext()); exportTable(master.getFileSystem(), master.getContext(), tableInfo.tableName, tableInfo.tableID, tableInfo.exportDir); public static void exportTable(VolumeManager fs, ServerContext context, String tableName, pri...
0
public static void close(final Connection conn) throws SQLException { public static void close(final ResultSet rs) throws SQLException { public static void close(final Statement stmt) throws SQLException { public static void closeQuietly(final Connection conn) { public static void closeQuietly(final...
0
return this._constructionElement.getAttributeNodeNS(null, Constants._ATT_URI);
0
import org.apache.log4j.Logger; private static final Logger LOG = Logger.getLogger(LogFormatter.class); LOG.error("Last transaction was partial.");
0
import org.apache.commons.collections.MapUtils; import java.util.HashMap; import java.util.Map; public static Map<String, Object> getParameterMap(HttpServletRequest request) { Map<String, Object> attributes = new HashMap<>(); if (MapUtils.isNotEmpty(request.getParameterMap())) { for (M...
0
/** * @return the {@link GraphicContext} of this <code>Graphics2D</code>. */ public GraphicContext getGraphicContext() { return gc; }
0
import org.apache.felix.http.base.internal.handler.HttpServiceServletHandler; import org.apache.felix.http.base.internal.handler.ServletHandler; final ServletHandler h1 = createServletHandler(1L, 0, "/foo"); final ServletHandler h1 = createServletHandler(1L, 10, "/foo"); final ServletHandler h2 ...
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
String message = "No block for " + req.getPathInfo(); res.sendError(HttpServletResponse.SC_NOT_FOUND, message); this.logger.info(message); return;
0
if ( component != null && component.state == ComponentConfigurationDTO.FAILED_ACTIVATION && component.failure != null ) { keyVal(jw, "failure", component.failure); } if ( component != null && component.service != null ) { keyVal(jw, "serviceId", component.service.id); ...
0
import com.twitter.mesos.Protobufs; LOG.info("Received status update for bootstrap task: " + Protobufs.toString(status));
0
public static class VarLenEncoder extends AbstractLexicoder<Long> { public static class FixedLenEncoder extends AbstractLexicoder<Long> { public static class StringEncoder extends AbstractLexicoder<Long> {
1
assertEquals(Integer.valueOf(4), row.getIntegerTest()); assertEquals(Integer.valueOf(4), b.getIntegerTest());
0
Boolean propagateTags = classification.isPropagate(); if (propagateTags == null) { propagateTags = true; } Boolean currentTagPropagation = currentClassification.isPropagate(); Boolean updatedTagPropagation = classification...
0
if (repositoryVersion != null && ! hostVersion.getRepositoryVersion().getVersion().equals(repositoryVersion)) { cluster.recalculateClusterVersionState(hostVersion.getRepositoryVersion().getVersion()); cluster.recalculateClusterVersionState(hostVersion.getRepositoryVersion().getVersion())...
0
* Copyright (C) 2015 Google Inc.
0
public void resolve(ThemeModule parent, Map<String, StackModule> allStacks, Map<String, ServiceModule> commonServices, Map<String, ExtensionModule> extensions) throws AmbariException {
0
public Map<Long,List<SpanStruct>> traces = new HashMap<>();
1
import org.apache.beam.runners.fnexecution.environment.EmbeddedEnvironmentFactory; public class EmbeddedSdkHarness extends ExternalResource implements TestRule { public static EmbeddedSdkHarness create() { return new EmbeddedSdkHarness(); private EmbeddedSdkHarness() {} EmbeddedEnvironmentFactory.create...
0
package org.apache.beam.sdk.extensions.euphoria.core.client.flow; import org.apache.beam.sdk.extensions.euphoria.core.client.dataset.Dataset; import org.apache.beam.sdk.extensions.euphoria.core.client.io.MockStreamDataSource; import org.apache.beam.sdk.extensions.euphoria.core.client.operator.Filter; import org.apache....
0
public static final Color aqua = Color.cyan; public static final Color fuchsia = Color.magenta; public static final Color gray = Color.gray; public static final Color green = new Color(0x00, 0x80, 0x00); // NOT Color.green! public static final Color lime = Color.green;
0
final String normalizedSubjectAlt = normaliseAddress(subjectAlt); if (normalisedHost.equals(normalizedSubjectAlt)) { if (matchIdentityStrict(host, subjectAlt)) { if (!matchIdentityStrict(host, cn)) { List<String> subjectAltList = null;
0
public class SubscribeTag extends MessageOperationTag implements ConsumerTag {
0
@Override @Override @Override @Override @Override @Override @Override @Override @Override
0
import org.apache.accumulo.core.cli.BatchWriterOpts; import org.apache.accumulo.core.cli.ScannerOpts; private static TreeSet<RowColumn> scanAll(ClientOpts opts, ScannerOpts scanOpts, Text t) throws Exception { scanner.setBatchSize(scanOpts.scanBatchSize); private static long scrambleDeleteHalfAndCheck(ClientOpt...
0
import org.apache.commons.jelly.JellyTagException; public void doTag(XMLOutput output) throws BreakException, JellyTagException {
0
import org.apache.accumulo.server.log.WalMarker; zoo.putPersistentData(zkInstanceRoot + WalMarker.ZWALS, EMPTY_BYTE_ARRAY, NodeExistsPolicy.FAIL);
0
* Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
1
import org.apache.ambari.server.state.ConfigHelper; import com.google.inject.Provider; @Inject private static Provider<ConfigHelper> m_configHelper; m_configHelper.get().updateAgentConfigs(Collections.singletonMap(request.getClusterName(), Collections.singleton(configGroup.getServiceName()))); Map...
0
import org.apache.beam.vendor.protobuf.v3.com.google.protobuf.ByteString;
0
import cz.seznam.euphoria.core.client.dataset.partitioning.Partitioning;
0
protected abstract C createConnection(T route, IOSession session) throws IOException; try { C conn = createConnection(route, session); E entry = pool.completed(request, conn); this.leased.add(entry); } catch (IOException ex) { p...
0
package org.apache.beam.sdk.io.hadoop; private transient Configuration conf; if (conf == null) { throw new NullPointerException("Configuration must not be null."); }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/PathCallParamRule.java,v 1.3 2003/10/09 21:09:46 rdonkin Exp $ * $Revision: 1.3 $ * $Date: 2003/10/09 21:09:46 $ * Alternately, this acknowledgement may appear in the software itse...
0
* DCMPL - Compare doubles: value1 &lt; value2 * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt; ..., result</PRE>
0
* @version CVS $Id: ServerPagesAction.java,v 1.1 2004/03/10 12:58:04 stephan Exp $
0
public class MemorySensitiveClassPathRepository extends AbstractClassPathRepository { super(path); // Not calling super.storeClass because this subclass maintains the mapping.
0
/** * Configuration enables all necessary options for PropertiesConfiguration: * auto-save, auto-reloading, no delimiter parsing and other */ /** * Constructor * @param fileName path to data file * @throws ConfigurationException */ public PersistentConfiguration(String fileName) throws ConfigurationE...
0
import org.apache.hc.core5.http.EntityDetails; void streamStart(EntityDetails entityDetails, FutureCallback<T> resultCallback) throws HttpException, IOException;
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 com.twitter.mesos.Tasks; private final ScheduleStatus oldState; public TaskStateChange(ScheduledTask task, ScheduleStatus oldState) { this.oldState = checkNotNull(oldState); return Tasks.id(task); return Objects.equal(task, other.task) && Objects.equal(oldState, other.oldState...
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.transforms.windowing.BoundedWindow; import org.apache.beam.sdk.transforms.windowing.WindowFn;
0
public static final PartialKey kDepth = PartialKey.ROW_COLFAM; @Override public org.apache.hadoop.util.bloom.Key transform(org.apache.accumulo.core.data.Key acuKey) { byte keyData[]; ByteSequence row = acuKey.getRowData(); ByteSequence cf = acuKey.getColumnFamilyData(); keyData = new byte[ro...
1
import org.apache.hc.core5.http.EndpointDetails; HttpCoreContext coreContext = HttpCoreContext.adapt(context); EndpointDetails endpoint = coreContext.getEndpointDetails(); System.out.println(endpoint + ": serving file " + file.getPath()...
0
protected NHttpConnectionFactory<DefaultNHttpServerConnection> createServerConnectionFactory() throws Exception { return new LoggingServerConnectionFactory(); protected NHttpConnectionFactory<DefaultNHttpClientConnection> createClientConnectionFactory() throws Exception { return new LoggingClien...
0
* @see org.apache.commons.bcel6.Const#JVM_CLASSFILE_MAGIC
0
ZooReader zreader = new ZooReader(connector.info().getZooKeepers(), connector.info().getZooKeepersSessionTimeOut()); ZooUtil.getRoot(connector.getInstanceID()) + Constants.ZMASTER_LOCK, null);
0
currentHorizAlign = WMFUtilities.getHorizontalAlignment((int)mr.ElementAt( 0 ).intValue()); currentVertAlign = WMFUtilities.getVerticalAlignment((int)mr.ElementAt( 0 ).intValue()); ...
0
* * @param resolver the {@code NodeKeyResolver} void clear(NodeKeyResolver<T> resolver);
0
* <p>The {@code ConfigurationDynaBean} maps nested and mapped properties * to the appropriate {@code Configuration} subset using the * Creates a new instance of {@code ConfigurationDynaBean} and sets Collection<?> collection = (Collection<?>) value; for (Object v : collection) ...
0
/** The factory for reloading detectors. */ private ReloadingDetectorFactory reloadingDetectorFactory; /** * Returns the {@code ReloadingDetectorFactory}. Result may be <b>null</b> * which means that the default factory is to be used. * * @return the {@code ReloadingDetectorFactory} ...
0
private static final String LOGSEARCH_CLUSTERS_QUERY_PARAMETER_NAME = "clusters"; // set the current cluster name, in case this LogSearch service supports data // for multiple clusters uriBuilder.addParameter(LOGSEARCH_CLUSTERS_QUERY_PARAMETER_NAME, cluster.getClusterName());
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
String mock = req.getParameter("mock"); ShellExecutionThread shellThread = new ShellExecutionThread(user, pass, mock); + "<table><tr><td>Mock:&nbsp</td><td><input type='checkbox' name='mock' value='mock'></td></tr>" + "<tr><td>Username:&nbsp;</td><td><input type='text' name='user'></td></t...
0
package org.apache.felix.sigil.ui.eclipse.ui.views.resolution; import org.apache.felix.sigil.model.eclipse.ISigilBundle; import org.apache.felix.sigil.ui.eclipse.ui.SigilUI;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/impl/TagScript.java,v 1.12 2002/06/25 17:11:41 jstrachan Exp $ * $Revision: 1.12 $ * $Date: 2002/06/25 17:11:41 $ * $Id: TagScript.java,v 1.12 2002/06/25 17:11:41 jstrachan Exp $ * @versio...
0
log.error("Could not instantiate AuthenticationToken " + value, e);
0
import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.ListMultimap; ListMultimap<String, FnDataReceiver<WindowedValue<?>>> consumers = ArrayListMultimap.create();
0
* ({@link LinkNameFilter} and {@link PropertyFilter}) filters handle more special cases.
0
import java.util.Map.Entry; for (Iterator it = dForms.entrySet().iterator(); it.hasNext(); ) { Entry entry = (Entry) it.next(); Object key = entry.getKey(); pForm.merge((Form) entry.getValue()); addForm((Form) entry.getValue()); ...
0
* @deprecated DO NOT USE - use ExceptionConst instead @Deprecated
0
BridgeUpdateEvent be = new BridgeUpdateEvent(this);
0
package org.apache.felix.karaf.gshell.admin;
0
* @version $Id: EnterpriseUnixFTPEntryParserTest.java,v 1.10 2004/07/29 11:38:36 scohen Exp $ "-C--E-----FTP A QUA1I1 18128 41 Aug 12 13:56 QUADTEST2" FTPFile file = getParser().parseFTPEntry("-C--E-----FTP B QUA1I1 18128 5000000000 Aug 12 13:56 QUADTEST"); assertEquals(50000000...
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/MapUtils.java,v 1.32 2003/08/31 17:52:13 scolebourne Exp $ * @version $Revision: 1.32 $ $Date: 2003/08/31 17:52:13 $ * @param label The label to be used, may be <code>null</...
0
* @version $Id$
0
* Gets a service from the given component name. * @param componentName * @return * @throws AmbariException */ Service getServiceByComponentName(String componentName) throws AmbariException; /**
0
package org.apache.beam.sdk.io.range; import java.util.ArrayList; import java.util.List; import org.apache.beam.sdk.transforms.splittabledofn.HasDefaultTracker; implements Serializable, HasDefaultTracker< OffsetRange, org.apache.beam.sdk.transforms.splittabledofn.OffsetRangeTracker> { public o...
0
import java.util.*; import org.apache.felix.scrplugin.tags.*; this.checkLifecycleMethod(javaClass, "activate", warnings); this.checkLifecycleMethod(javaClass, "deactivate", warnings); * Check for existence of lifecycle methods. * @param javaClass The java class to insp...
0
Collection<Text> splits = conn.tableOperations().listSplits(tableName, maxSplits);
0
import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection; Text prevMetaRow = TabletsSection.getRow(prevTablet.getTableId(), prevTablet.getEndRow());
0
import org.apache.cocoon.util.AbstractLogEnabled;
0
import org.apache.beam.dsls.sql.BeamSqlEnv; public PCollection<BeamSqlRow> buildBeamPipeline(PCollectionTuple inputPCollections , BeamSqlEnv sqlEnv) throws Exception { BeamSqlRelUtils.getBeamRelInput(input).buildBeamPipeline(inputPCollections, sqlEnv);
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
/* * Copyright 2005 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 app...
0