Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* @author Apache Software Foundation
0
import java.util.Collections; defaultModelEnforcements(options), private Map<Class<? extends PTransform>, Collection<ModelEnforcementFactory>> defaultModelEnforcements(InProcessPipelineOptions options) { return Collections.emptyMap(); }
0
import org.junit.Rule; @Rule public transient TestPipeline p = TestPipeline.create();
0
result.put(group, new HashSet<>()); parts.set(lgid, new ArrayList<>());
0
public static class OfBuilder implements Builders.Of { @Override public <IN> KeyByBuilder<IN> of(Dataset<IN> input) { return new KeyByBuilder<>(name, input); public static class KeyByBuilder<IN> implements Builders.KeyBy<IN> { KeyByBuilder(String name, Dataset<IN> input) { @Over...
0
public void dispose() {
0
public class DoubleArrayConverter extends AbstractArrayConverter {
0
* http://www.apache.org/licenses/LICENSE-2.0
0
* @version CVS $Id: QDoxSource.java,v 1.6 2004/02/29 05:55:34 antonio Exp $ $Date: 2004/02/29 05:55:34 $ protected final static String PROTOCOL = "qdox:"; classPart = ROOT_CLASSNAME; Source source = resolver.resolveURI(PROTOCOL + name); Source source = resolver.resol...
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
* http://www.apache.org/licenses/LICENSE-2.0
0
expect(kerberosDescriptor.getIdentity(KerberosHelper.SPNEGO_IDENTITY_NAME)).andReturn(ambariKerberosIdentity).once(); kerberosHelper.addAmbariServerIdentities(kerberosEnvProperties, kerberosDescriptor, identities); Assert.assertEquals(2, identities.size());
0
public void testValidator382() { UrlValidator validator = new UrlValidator(); assertTrue(validator.isValid("ftp://username:password@example.com:8042/over/there/index.dtb?type=animal&name=narwhal#nose")); }
0
import java.util.ArrayList; import java.util.Optional; import org.osgi.converter.Converter; import org.osgi.converter.StandardConverter; import org.osgi.converter.TypeReference; MyDTO2<MyEmbeddedDTO2<String>> result = new JsonSerializerImpl()
0
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, final HashMap<String,String> props = new HashMap<String,String>(); final HashSet<String> exclude = new HashSet<String>(); for (String ke...
0
new HashMap<>(); private Map<String, String> componentService = new HashMap<>(); new HashMap<>(); new HashMap<>(); private Map<String, String> dbDependencyInfo = new HashMap<>(); private Map<String, String> cardinalityRequirements = new HashMap<>(); new HashMap<>(); Map<String, Collection<Stri...
1
implements Runnable this.configServiceReg = this.context.registerService("org.osgi.service.cm.ManagedService", new JettyManagedService(this), props);
0
* Validates the operation of the <code>Main</code> class.
0
import org.apache.sshd.common.util.security.SecurityUtils;
0
import java.io.Serializable;
0
enum TestResult {OK, NOK}
0
Thread.sleep(millis);
0
buffer = session.prepareBuffer(SshConstants.SSH_MSG_USERAUTH_REQUEST, BufferUtils.clear(buffer));
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//io/src/test/org/apache/commons/io/Attic/FileUtilTestCase.java,v 1.3 2002/10/26 06:24:15 bayard Exp $ * $Revision: 1.3 $ * $Date: 2002/10/26 06:24:15 $ * This is used to test FileUtils for correctness. FileUtils.copyFile( ...
0
RoleAuthorization.CLUSTER_RUN_CUSTOM_COMMAND,
0
/** * Grant or deny authorization to an operation on a node as a function of: * * @param zks: not used. * @param acl: set of ACLs for the node * @param perm: the permission that the client is requesting * @param ids: the credentials supplied by the client */ if (LOG.isDe...
0
StringRequestEntity requestEntity = new StringRequestEntity(jsonData, "application/json", "UTF-8"); PostMethod postMethod = new PostMethod(connectUrl); postMethod.setRequestEntity(requestEntity); int statusCode = httpClient.executeMethod(postMethod); if (statusCode != 200) { LOG.in...
0
import org.apache.accumulo.server.metrics.ThriftMetricsKeys; metrics.add(ThriftMetricsKeys.idle, (now - idleStart)); metrics.add(ThriftMetricsKeys.execute, idleStart - now);
0
import org.apache.cocoon.el.objectmodel.ObjectModel;
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 applicabl...
0
public TimelineMetricClusterAggregatorSecond(String aggregatorName, PhoenixHBaseAccessor hBaseAccessor, super(aggregatorName, hBaseAccessor, metricsConf, checkpointLocation, sleepIntervalMillis, checkpointCutOffMultiplier, aggregatorDisabledParam, tableNa...
0
package org.apache.commons.vfs2;
1
import static com.google.common.base.Preconditions.checkArgument; import java.util.List; import org.apache.accumulo.cluster.ClusterUser; private ClientConfiguration clientConf; private Path tmp; private List<ClusterUser> users; public StandaloneAccumuloCluster(ClientConfiguration clientConf, Path tmp, List<Clu...
0
@Assisted("clusterHostInfo") String clusterHostInfo, @Assisted("commandParamsStage") String commandParamsStage, @Assisted("hostParamsStage") String hostParamsStage);
0
import java.util.Arrays; import java.util.List; import org.apache.accumulo.core.replication.ReplicationTable; import com.google.common.base.Joiner; return tableId != null && (RootTable.ID.equals(tableId) || MetadataTable.ID.equals(tableId) || ReplicationTable.ID.equals(tableId) || tableId.matches(VAL...
0
final SimpleHttpRequest httpget = SimpleHttpRequest.get(target, requestUri); System.out.println("Executing request " + httpget.getMethod() + " " + httpget.getUri()); httpget,
0
* public static final Set<BuiltinSignatures> VALUES = Collections.unmodifiableSet(EnumSet.allOf(BuiltinSignatures.class)); private static final Map<String, SignatureFactory> EXTENSIONS = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); BuiltinSignatures(String facName) { f...
1
* @since 3.0 * @since 3.1
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/container/ContainerPointerFactory.java,v 1.1 2002/04/21 21:52:33 dmitri Exp $ * $Date: 2002/04/21 21:52:33 $ package org.apache.commons.jxpath.ri.model.container; import org.apache...
0
parameters.setProperty("listesc", "value1\\,value2");
0
public static final String RESOURCES_NODE_NAME = "resources"; TreeNode<Resource> resourcesNode = tree.addChild(null, RESOURCES_NODE_NAME); resourcesNode.setProperty("isCollection", "true");
0
public static class AnchorListener implements EventListener { public static class CursorMouseOverListener implements EventListener { public static class CursorMouseOutListener implements EventListener {
0
import java.io.Closeable; import java.io.InputStreamReader; import java.net.MalformedURLException; if (!isNotInRootZone(key)) { System.err.println("Expected to find text entry for html: "+key); } private static boolean isNotInRootZone(String do...
0
// for now we store the core util into the servlet context as well to // allow for reloading servletContext.setAttribute(CoreUtil.class.getName(), this.coreUtil);
0
import org.apache.http.HttpHost; import org.apache.http.impl.nio.pool.BasicNIOConnFactory; import org.apache.http.nio.NHttpClientConnection; import org.apache.http.nio.pool.NIOConnFactory; protected NIOConnFactory<HttpHost, NHttpClientConnection> createPoolConnectionFactory() throws Exception { retu...
0
import org.apache.commons.lang.builder.ToStringBuilder; public static StringBuilder dumpObjects(Collection<?> objects, StringBuilder sb) { public static StringBuilder dumpObjects(Map<?, ?> objects, StringBuilder sb) { for (Map.Entry<?, ?> e : objects.entrySet()) {
0
private static final String SLAVE_ID = "SlaveId"; private static SlaveOffer makeOffer(String slaveId, int cpus, long ramBytes) {
0
final Connection connection = new ManagedConnection<>(getPool(), transactionRegistry, isAccessToUnderlyingConnectionAllowed());
0
zks.shutdown();
0
import java.io.IOException; * @version CVS $Id: EPFooter.java,v 1.6 2004/07/04 20:57:02 antonio Exp $ /** * Setup the text to be printed at the bottom of every page * @exception IOException */ public void endProcessing() throws IOException{ this.getSheet().setFooter(getLeft(), getM...
0
next.prev = end; else this.end = end;
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.io.File; import java.nio.charset.StandardCharsets;
0
import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.HOOKS_FOLDER; import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.SERVICE_PACKAGE_FOLDER; import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.VERSION; import java.text.MessageFormat; import java.util.ArrayList;...
0
ots.addTestSuite(TestComplexProperties.class);
0
import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.MutationsRejectedException; import org.apache.accumulo.core.client.TableExistsException; import org.apache.accumulo.core.client.TableNotFoundException; r...
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 m...
0
import org.apache.ambari.api.controller.utilities.PropertyHelper; this.propertyIds = PropertyHelper.getPropertyIds(type, "JMX");
0
/** addAttribute(new ConstantValue(super.getConstantPool().addUtf8("ConstantValue"), 2, index, return new Field(super.getAccessFlags(), name_index, signature_index, getAttributes(), * *
0
return in.getPipeline() .apply(ParDo.of(new SampleAnyDoFn<>(limit, iterableView)).withSideInputs(iterableView))
0
import java.util.Map; import org.apache.felix.sigil.junit.server.JUnitService; import org.osgi.framework.ServiceReference; import org.osgi.framework.ServiceRegistration; import org.osgi.util.tracker.ServiceTracker; public void start( final BundleContext ctx ) throws Exception final Hashtable props = new Has...
0
* Copyright 2000-2009 The Apache Software Foundation
0
public <SideOutputT> void sideOutputWindowedValue( TupleTag<SideOutputT> tag, SideOutputT output, Instant timestamp, Collection<? extends BoundedWindow> windows, PaneInfo pane) { context.sideOutputWindowedValue(tag, output, timestamp, windows...
0
putBridge(SVG_NAMESPACE_URI, TAG_FE_TILE, new SVGFeTileElementBridge());
0
import org.apache.ambari.server.AmbariException; UserEntity user; createLdapUser(username); user = userDAO.findLdapUserByName(username); //don't remove admin role from user if group mapping was not configured if (configuration.getLdapServerProperties().isGroupMappingEnabled()) { //Adding a...
0
import org.apache.atlas.addons.ModelDefinitionDump; String modelAsJson = falconDataModelGenerator.getModelAsJson(); if (args.length == 1) { ModelDefinitionDump.dumpModelToFile(args[0], modelAsJson); return; } System.out.println("falconDataModelAsJSON = " + model...
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.ambari.server.api.services.stackadvisor.StackAdvisorBlueprintProcessor; private StackAdvisorBlueprintProcessor stackAdvisorBlueprintProcessor; public ClusterConfigurationRequest(AmbariContext ambariContext, ClusterTopology clusterTopology, boolean setInitial, S...
0
* String server = "ftp.example.com"; * ftp.connect(server);
0
/* * Each tablet has the following sets of WALogs. While a WALog exists in one set, garbage * collection must be avoided. * * 1. WALogs for the active in memory map * * 2. WAlogs for the minor compacting in memory map * * 3. WAlogs for a newly minor compacted file that is bei...
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 java.util.Iterator; nsMap = unmodifiableCopyOfMap(namespaceMap); } @SuppressWarnings("unchecked") private static Map unmodifiableCopyOfMap(Map map) { return Collections.unmodifiableMap(new HashMap(map));
0
public void addAmbariServerIdentity_CreateAmbariPrincipal() throws Exception { addAmbariServerIdentity(Collections.singletonMap("create_ambari_principal", "true")); } @Test public void addAmbariServerIdentity_DoNotCreateAmbariPrincipal() throws Exception { addAmbariServerIdentity(Collections.singletonM...
0
// the DoFn runner can map main-input windows to side input windows // the DoFn runner can map main-input windows to side input windows // the DoFn runner can map main-input windows to side input windows outputMap, transform.getMainOutputTag());
0
HttpCacheEntry updated = new HttpCacheEntry( new HeapResource(expectedArray), InputStream instream = afterUpdate.getResource().getInputStream();
0
this.listenerFilter = "(" + Constants.OBJECTCLASS + "=" + clazz + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(StagingLocationFactory.class); LOG.info("No stagingLocation provided, falling back to gcpTempLocation");
0
import org.apache.cocoon.util.WildcardHelper;
0
import org.apache.batik.extension.GraphicsExtensionElement; extends GraphicsExtensionElement
1
opts.setTableName(name1); vopts.setTableName(name2); vopts.setTableName(name1);
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$ ChangeAspectDataEvent event = new ChangeAspectDataEvent(tabLayout, config.aspectName, new Integer(j)); attributes.addCDATAAttribute("parameter", service.getComponentManager().getLinkService().getLinkURI(event));
0
setEncoder(type.substring(CLASS_PREFIX.length())); testEncoder(Arrays.asList(0l, 1l)); setEncoder(VAR_LONG_ARRAY_ENCODER); setEncoder(FIXED_LONG_ARRAY_ENCODER); setEncoder(STRING_ARRAY_ENCODER);
0
private HttpServiceTracker httpTracker; private LogServiceTracker logTracker; this.logTracker = new LogServiceTracker(context); this.logTracker.open(); this.httpTracker = new HttpServiceTracker(context); this.httpTracker.open(); if (this.httpTracker != null) ...
0
for (Entry<String, String> entry : procEnvironment.entrySet()) {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/JellyTagException.java,v 1.2 2003/01/24 18:12:54 morgand Exp $ * $Revision: 1.2 $ * $Date: 2003/01/24 18:12:54 $ * $Id: JellyTagException.java,v 1.2 2003/01/24 18:12:54 morgand Exp $ * @ve...
0
/* ==================================================================== * Copyright (c) 2001-2004 The Apache Software Foundation. All rights * @version $Revision: 1.2 $ $Date: 2004/01/14 21:43:09 $
0
List<Map<String, Object>> list = MAPPER.convertValue(displayData, List.class); addList(getProperties(), name, list);
0
props.put( FACTORY_PID, this.getFactoryPid().toString() );
0
if (keytabFileOwnerName == null || keytabFileGroupName == null) { LOG.warn("Missing owner ({}) or group name ({}) of kerberos descriptor {}", keytabFileOwnerName, keytabFileGroupName, keytabDescriptor.getName()); } } else { throw new AmbariException(...
0
protected static synchronized void init(SecurityHeaderHandlersType securityHeaderHandlersType) throws Exception {
0
* {@link KerberosServerAction#processIdentity(java.util.Map, String, KerberosOperationHandler, java.util.Map)} * password using {@link KerberosOperationHandler#createSecurePassword()}. Then if the principal * to a given request * @return a CommandReport, indicating an error co...
0
package org.apache.beam.sdk.extensions.sql.interpreter.operator.math; import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlExpression; import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlPrimitive;
0
import org.apache.accumulo.core.security.thrift.AuthInfo; import org.apache.accumulo.core.security.thrift.Credential; import org.apache.accumulo.core.security.thrift.tokens.SecurityToken; * @deprecated since 1.5, use {@link #getConnector(String, SecurityToken)} public abstract Connector getConnector(AuthInfo auth)...
1
import java.util.ArrayList; * Delete entities from the repository identified by their guids (including their composite references) * or * Deletes a single entity identified by its type and unique attribute value from the repository (including their composite references) * @param guids list of deleti...
0
private static final long serialVersionUID = 0L;
0
/* * Copyright 2006 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 applica...
0
/** * The name of the component. */ /** * The architecture of the tarball/rpm to install. */ /** * The version of the tarball/rpm to install. */ /** * The provider of the tarball/rpm to install. */ /** * The definition of the component...
0
import org.apache.accumulo.core.util.Base64;
0