Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
} @Test public void testGetComponentDependency() throws AmbariException { DependencyInfo dependency = metaInfo.getComponentDependency("HDP", "1.3.4", "HIVE", "HIVE_SERVER", "ZOOKEEPER_SERVER"); assertEquals("ZOOKEEPER/ZOOKEEPER_SERVER", dependency.getName()); assertEquals("ZOOKEEPER_SERVER", dependenc...
0
static final byte[] getBytes(BigInteger big, int bitlen) { public static final String encode(BigInteger big) { public static final byte[] encode(BigInteger big, int bitlen) { public static final BigInteger decodeBigIntegerFromElement(Element element) throws Base64DecodingException public static final Bi...
0
/* * $Header: /cvshome/build/ee.foundation/src/java/io/PipedReader.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 use thi...
0
import org.apache.commons.beanutils.DynaBean; import org.apache.commons.configuration.PropertiesConfiguration; * Tests whether a wrapper DynaBean for a Java bean can be created. */ @Test public void testCreateWrapDynaBean() { PropertiesConfiguration config = new PropertiesConfiguration(); ...
0
import org.apache.commons.httpclient.auth.AuthScope; AuthScope scope = new AuthScope(proxyHost, AuthScope.ANY_PORT); client.getState().setProxyCredentials(scope, proxyCreds); AuthScope scope = new AuthScope(hostname, AuthScope.ANY_PORT); cl...
0
public PCollection<TableRow> expand(PCollection<KV<String, LaneInfo>> flowInfo) { public PCollection<String> expand(PBegin begin) {
0
import java.io.StringWriter; private String expected = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<html xmlns=\"http://www.w3.org/TR/xhtml1/strict\" " + "xmlns=\"http://www.w3.org/TR/xhtml1/strict\">" + "<head><title>Expense Report Summary</title></head>" + "<body><p>Total Amo...
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
* <code>GVTTreeRendererEvent</code> events.
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
@SuppressWarnings("checkstyle:VariableDeclarationUsageDistance") username, session, keyType, KeyUtils.getFingerPrint(clientKey), clientUsername, clientHostName, GenericUtils.size(certs)); username, session, keyType, KeyUtils.getFingerPrint(clientKey), ...
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
* Exception to throw if an operation is attempted on a table namespace that doesn't exist.
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
synchronized protected String getSpanKey(Map<String,String> data) {
0
* @version $Id: FileUtils.java,v 1.33 2004/07/03 11:20:45 jeremias Exp $ OutputStream out = new java.io.FileOutputStream(file, true); file.setLastModified(System.currentTimeMillis());
0
* @deprecated This block is deprecated and will be removed in future versions.
0
import static org.apache.aurora.scheduler.resources.ResourceManager.bagFromResources; import static org.apache.aurora.scheduler.updater.StateEvaluator.Result.KILL_TASK_WITH_RESERVATION_AND_EVALUATE_ON_STATE_CHANGE; private boolean resourceFits(ITaskConfig desired, ITaskConfig existing) { return bagFromResources(e...
0
registry, registry, registry, registry,
0
Map<Type, ? extends Coder<?>> knownCoders, TypeVariable<?> param) Map<Type, Coder<?>> inferredCoders = getDefaultCoders(subClass, baseClass, knownCoders); Coder<OutputT> paramCoderOrNull = (Coder<OutputT>) inferredCoders.get(param); "Cannot infer coder for type parameter " + param.getName(...
0
import org.apache.maven.shared.osgi.DefaultMaven2OsgiConverter; * Use locally patched version for now. private Maven2OsgiConverter m_maven2OsgiConverter = new DefaultMaven2OsgiConverter();
0
return new PrivateBean(); return new PrivateBeanSubclass();
0
ds.getConnection("foo", "bay");
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...
0
import org.apache.cocoon.components.flow.FlowHelper; Object bean = FlowHelper.getContextObject(objectModel); WebContinuation kont = FlowHelper.getWebContinuation(objectModel); // FIXME (VG): Is this required (what it's used for - examples)? // Here I use Rhino's live-connect obje...
0
this.createClassloader(); protected void readProperties(String directoryName, SourceResolver resolver) {
0
* Copyright 2016-2017 Seznam.cz, a.s.
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestObject.java,v 1.12 2002/10/12 22:36:22 scolebourne Exp $ * $Revision: 1.12 $ * $Date: 2002/10/12 22:36:22 $ import java.io.InputStream; * @version $Id: TestObject.java...
0
if (session instanceof SingleScanSession) { SingleScanSession ss = (SingleScanSession) session; if (session instanceof SingleScanSession) { SingleScanSession ss = (SingleScanSession) session;
0
parentArg.setValue(bean);
0
import com.twitter.mesos.executor.migrations.DeadTaskMigratorModule; // Binds a migrator for dead task serialized structs install(new DeadTaskMigratorModule());
0
import org.apache.felix.dependencymanager.test2.components.Ensure; import org.apache.felix.dependencymanager.test2.integration.common.TestBase; import org.ops4j.pax.exam.junit.PaxExam;
0
import java.util.ArrayList; import java.util.List; private List m_instanceListeners = new ArrayList(); /** * Is the component instance state changing? */ private boolean m_inTransition = false; /** * Queue of stored state changed. */ private List m_stateQueue = new ArrayList()...
0
evaluationContext .createKeyedBundle( null, keyTimers.getKey(), (PCollection) transform.getInput())
0
import org.apache.ambari.server.orm.dao.StackDAO; private static StackDAO stackDAO; @Inject // First, set desired cluster stack version to enable cross-stack upgrade StackId stackId = rve.getStackId(); ClusterEntity cluster = clusterDAO.findByName(clName); StackEntity stackEntity = stackDAO...
0
Map<String, String> configurationMap = new HashMap<>();
1
* @version CVS $Id: GeneratorSelector.java,v 1.1 2004/03/10 12:58:04 stephan Exp $
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
* * * * * * * *
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
CREATE, UPDATE,
0
public interface FileFilter {
1
import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestCharCollectionCollection.java,v 1.3 2003/10/02 22:14:31 scolebourne Exp $ import org.apache.commons.collections.AbstractTestObject; * @version $Revis...
0
import com.google.common.collect.ImmutableSet; HierarchicalTypeDefinition<ClassType> deptTypeDef = createClassTypeDef("Department", "Department"+_description, ImmutableSet.<String>of(), HierarchicalTypeDefinition<ClassType> personTypeDef = createClassTypeDef("Person", "Person"+_description, ImmutableSe...
0
@Override
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 applicabl...
0
* thrown if there is an error condition during the encoding process.
0
expect(clusterMock.getServiceComponentHosts("LOGSEARCH", "LOGSEARCH_SERVER")).andReturn(Collections.emptyList()).atLeastOnce();
0
* {@link org.apache.beam.sdk.extensions.sql.impl.rel.BeamRelNode}. package org.apache.beam.sdk.extensions.sql.impl.rule;
0
synchronized (validUserPasswords) { validUserPasswords.put(username, password); } synchronized (validUserPasswords) { String realPassword = validUserPasswords.getProperty(user); if (realPassword == null) { throw new SQLException(user + " is not...
0
LOG.debug("Failed to get application default credentials, falling back to gcloud."); LOG.info("Got user credential from GCloud");
0
this.remoteWindow.init(rwsize, rmpsize, session.getFactoryManager().getProperties());
0
public NodeSelector(final String key) private NodeSelector(final List<String> keys) public ImmutableNode select(final ImmutableNode root, final NodeKeyResolver<ImmutableNode> resolver, final NodeHandler<ImmutableNode> handler) final Iterator<String> itKeys = nodeKeys.iterator...
0
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException {
0
matcher.setObjects(map);
0
public abstract class AbstractLexicoder<T> extends AbstractEncoder<T> implements Lexicoder<T> {}
0
protected void setUpIterator(final int prio, final String name, final String term, final BatchScanner scanner, CommandLine cl) throws IOException { RegExFilter.setRegexs(si, term, term, term, term, true, cl.hasOption(matchSubstringOption.getOpt())); matchSubstringOption = new Option("g", "global...
0
for (final Map.Entry<K, V> entry : source.entrySet()) {
0
public class RestartStressIT extends ConfigurableMacIT { "-u", "root", "-p", ROOT_PASSWORD,
0
@Override
0
/** * Returns the width of the viewport which directly contains the * given element. */ public float getViewportWidth() { return ctx.getBlockWidth(e); } /** * Returns the height of the viewport which directly contains the * given element. */ public float getVi...
0
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
0
import org.apache.ambari.server.orm.entities.UserEntity; public void testAuthId() throws Exception { Integer userId = AuthorizationHelper.getAuthenticatedId(); Assert.assertEquals(Integer.valueOf(-1), userId); PrincipalEntity principalEntity = new PrincipalEntity(); UserEntity userEntity = new UserEn...
0
import org.apache.sshd.sftp.subsystem.SftpConstants; public class SshFxpRenameRequest extends BaseRequest { public SftpConstants.Type getMessage() { return SftpConstants.Type.SSH_FXP_RENAME; } return getName() + "[old=" + oldPath + ", new=" + newPath + "]";
0
import org.apache.beam.runners.gearpump.translators.utils.DoFnRunnerFactory; import org.apache.beam.runners.gearpump.translators.utils.NoOpAggregatorFactory; transform.getNewFn(), private final DoFnRunnerFactory<InputT, OutputT> doFnRunnerFactory; private DoFnRunner<InputT, OutputT> doFnRunner; ...
0
String preferredCollectorHost = findPreferredCollectHost(); collectorUri = constructTimelineMetricUri(protocol, preferredCollectorHost, port); containerMetricsUri = constructContainerMetricUri(protocol, preferredCollectorHost, port);
0
* responsibilty of the ServletSource) and resolve it with respect to the
0
LinkedCallParamBuilder ofIndex(int paramIndex);
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
import org.apache.accumulo.core.security.Authorizations; * * @param opts Scanner scanner = connector.createScanner(table, Authorizations.EMPTY);
0
import org.apache.ambari.server.orm.entities.PermissionEntity; import org.apache.ambari.server.orm.entities.PrivilegeEntity; import org.apache.ambari.server.security.authorization.AmbariGrantedAuthority; private static final PrivilegeEntity ADMIN_PRIV_ENTITY = new PrivilegeEntity(); Collections.singleton(new Amb...
0
/** * Set the number of ticks that the initial sync phase can take */ public void setInitLimit(int initLimit); /** * Set the number of ticks that can pass between sending a request * and getting a acknowledgment */ public void setSyncLimit(int syncLimit);
0
setupTestEnv(); ensureNames.add("InMemoryDataTree"); + ",name1=replica." + i + ",name2="); ensureNames.add("name0=ReplicatedServer_id" + i);
0
public static class LogWriter extends Thread { public List<LogWriter> getLogWriters() { return logWriters; }
0
/* * $HeadURL$ * $Revision$ * $Date$ * * ==================================================================== * * Copyright 1999-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...
0
package com.google.cloud.dataflow.sdk.runners.inprocess;
0
String tableName = Tables.getPrintableTableInfoFromId(Monitor.getContext(), entry.getKey()); String tableName = Tables.getPrintableTableInfoFromId(Monitor.getContext(),
0
Copyright 2002-2003 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 applicable l...
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Sets;
0
import java.util.Objects; PublicKey key = Objects.requireNonNull(entry, "No key extracted").resolvePublicKey(PublicKeyEntryResolver.FAILING);
0
private ConcurrentMap<String, String> stateNameMap; ConcurrentMap<ByteString, UnboundedSource.UnboundedReader<?>> readerCache, ConcurrentMap<String, String> stateNameMap) { this.stateNameMap = stateNameMap; String prefix = (stateNameMap.containsKey(stepName) ? stateNameMap.get(stepName...
0
import org.apache.beam.runners.core.construction.BeamUrns; environment .getUrn() .equals(BeamUrns.getUrn(RunnerApi.StandardEnvironments.Environments.PROCESS)), final RunnerApi.ProcessPayload processPayload = RunnerApi.ProcessPayload.parseFrom(environment.getPayload()); Im...
0
package org.apache.accumulo.server.monitor.util.celltypes; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class DateTimeType extends CellType<Long> { private SimpleDateFormat simple; private int dateFormat; private int timeFormat; public Dat...
1
import com.google.common.net.HostAndPort; private void getZooLock(HostAndPort addr) throws KeeperException, InterruptedException { if (lock.tryLock(lockWatcher, new ServerServices(addr.toString(), Service.GC_CLIENT).toString().getBytes())) { private HostAndPort startStatsService() throws UnknownHostException ...
0
* Since v4.1 only closures which are considered to be safe are
0
* Retrieve matching {@link HttpCacheEntry} from the cache if it exists.
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestAll.java,v 1.37 2002/11/18 23:58:46 scolebourne Exp $ * $Revision: 1.37 $ * $Date: 2002/11/18 23:58:46 $ * @version $Id: TestAll.java,v 1.37 2002/11/18 23:58:46 scolebourne ...
0
* @version $Revision$
0
/** Invoked whenever a new resource is added. */ public void added(Resource resource); /** Invoked whenever an existing resource changes. */ public void changed(Resource resource); /** Invoked whenever an existing resource is removed. */ public void removed(Resource resource);
0
import org.apache.ambari.server.controller.spi.PropertyId;
1
* any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * permission of the Apache Software Foundation.
0
if (reports == null) { return; }
1
package org.apache.hc.core5.reactor;
1
package org.apache.beam.sdk.extensions.euphoria.beam.testkit.accumulators;
0
import org.junit.runners.Parameterized; @RunWith(Parameterized.class) @Parameterized.Parameters public static Object[] data() { return new Object[] {true, false}; } @Parameterized.Parameter public boolean isStateful; if (isStateful) { function.reduce(Collections.emptyList(), collector); } e...
0
import org.apache.hadoop.conf.Configuration; public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
0
/** * TODO Add javadoc * * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> * @version $Rev$, $Date$ */
0
* Copyright 2016 Seznam.cz, a.s.
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