Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
protected void onException(final NHttpClientIOTarget conn, final IOException ex) { | 0 |
public void add(HostsType hostsType, String service,
boolean forUpgrade, boolean clientOnly, ProcessingComponent pc) {
List<Task> tasks = resolveTasks(forUpgrade, true, pc);
if (null != tasks && tasks.size() > 0) {
proxy.tasks.addAll(TaskWrapperBuilder.getTaskList(service, pc.name... | 0 |
import org.apache.ambari.server.orm.DBAccessor.DBColumnInfo;
public static final String COMPONENT_TABLE = "servicecomponentdesiredstate";
public static final String COMPONENT_VERSION_TABLE = "servicecomponent_version";
public static final String COMPONENT_VERSION_PK = "PK_sc_version";
public static final String... | 0 |
* $Id: TestConnectionPool.java,v 1.6 2003/08/13 15:47:17 dirkv Exp $
* $Revision: 1.6 $
* $Date: 2003/08/13 15:47:17 $
* @version $Id: TestConnectionPool.java,v 1.6 2003/08/13 15:47:17 dirkv Exp $
public void testClearWarnings() throws Exception {
Connection[] c = new Connection[getMaxActive()];
... | 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 |
@Override
@Override
@Override
@Override
@Override | 0 |
import com.google.api.services.dataflow.Dataflow.Projects.Jobs.Get;
import com.google.api.services.dataflow.Dataflow.Projects.Jobs.GetMetrics;
import com.google.api.services.dataflow.Dataflow.Projects.Jobs.Messages;
private Dataflow.Projects mockProjects;
private Dataflow.Projects.Jobs mockJobs;
when(mockWorkfl... | 0 |
import java.util.HashMap;
import java.util.Map;
Table actualTable = store.getTables().get("person");
@Test public void testGetTables() throws Exception {
assertEquals(2, store.getTables().size());
assertThat(store.getTables(),
Matchers.hasValue(mockTable("hello")));
assertThat(store.getTables(... | 0 |
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.TreeNode;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import java.util.Map.Entry;
byte[] opts = MAPPER.writeValueAsBytes(options);
JsonParser jsonParser = MAPPER.getFact... | 0 |
CallStackHelper.enterServlet(ServletServiceContext.this);
CallStackHelper.enterSuperServlet(ServletServiceContext.this);
CallStackHelper.leaveServlet(); | 0 |
import org.apache.aurora.scheduler.scheduling.RescheduleCalculator; | 0 |
mockStorage = createNiceMock(HttpCacheStorage.class);
mockEntry = createNiceMock(HttpCacheEntry.class); | 0 |
public PDone expand(PCollection<T> teamAndScore) { | 0 |
private Boolean firewallRunning;
private String firewallName;
public Boolean getFirewallRunning() {
return firewallRunning;
}
public void setFirewallRunning(Boolean firewallRunning) {
this.firewallRunning = firewallRunning;
}
public String getFirewallName() {
return firewallName;
public v... | 0 |
import org.apache.accumulo.harness.AccumuloClusterIT;
public class WriteLotsIT extends AccumuloClusterIT { | 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//jxpath/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java,v 1.3 2001/09/08 20:59:58 dmitri Exp $
* $Revision: 1.3 $
* $Date: 2001/09/08 20:59:58 $
import org.apache.commons.jxpath.functions.Types;
* @version $R... | 0 |
final JavaClass clazz = getTestClass(PACKAGE_BASE_NAME+".data.PLSETestClass");
final ClassGen gen = new ClassGen(clazz);
final ConstantPoolGen pool = gen.getConstantPool();
final Method m = gen.getMethodAt(1);
final MethodGen mg = new MethodGen(m, gen.getClassName(), pool);
... | 1 |
System.err.println(s.getRequestId());
System.err.println("adding stage "+s.getRequestId()+" "+s.getStageId()); | 0 |
if (composite == null)
throw new NullPointerException(); | 0 |
import org.apache.beam.sdk.coders.CustomCoder;
private static class ComposedAccumulatorCoder extends CustomCoder<Object[]> { | 0 |
/*
* Copyright 2002-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 ap... | 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
... | 1 |
import org.apache.ambari.server.EagerSingleton;
import org.apache.ambari.server.events.STOMPEvent;
@EagerSingleton
@Inject
public RequestUpdateEventPublisher(STOMPUpdatePublisher stompUpdatePublisher) {
super(stompUpdatePublisher);
}
@Override
public STOMPEvent.Type getType() {
return STOMPEvent.Type... | 0 |
private static final long serialVersionUID = 8417515734108306801L; | 0 |
* @since 4.0 | 0 |
addEnvVariable("COLUMNS", Integer.toString(tColumns));
addEnvVariable("LINES", Integer.toString(tRows)); | 0 |
package org.apache.xml.security.test.dom.utils.resolver; | 0 |
* <li>{@link AccumuloOutputFormat#setZooKeeperInstance(Job, ClientConfiguration)}
* Configures a {@link org.apache.accumulo.core.client.mock.MockInstance} for this job.
@Deprecated | 0 |
import java.util.Map;
public interface LogLevelFilterMonitor {
/**
* Helper function to get all log level filters
*/
Map<String, LogLevelFilter> getLogLevelFilters();
| 0 |
streamDuplexer.appendState(buf); | 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 static org.easymock.EasyMock.anyString;
import static org.easymock.EasyMock.capture;
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.createStrictMock;
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.getCur... | 0 |
.transform(Tasks::scheduledToSlaveHost) | 0 |
/** The wildcards that will be used to match file names. */
* Checks to see if the file name matches one of the wildcards.
* @return true if the file name matches one of the wildcards
* Checks a file name to see if it matches the specified wildcard matcher
* @param fileName the file name ... | 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 (value instanceof Collection) {
if (collection instanceof Collection) {
return 1;
if (collection instanceof Collection) {
return Collections.singletonList(collection).iterator();
if (collection.getClass().isArray()) {
if (collection instanceof Collection) {
... | 1 |
public void activate() throws Exception { | 0 |
public ResponseCachingPolicy(final long maxObjectSizeBytes, final boolean sharedCache,
final boolean neverCache1_0ResponsesWithQueryString
public boolean isResponseCacheable(final String httpMethod, final HttpResponse response) {
private boolean unknownStatusCode(final int s... | 0 |
import org.apache.hc.core5.reactor.ExceptionEvent;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
final List<ExceptionEvent> exceptionLog = client.getExceptionLog();
if (!exceptionLog.isEmpty()) {
final Logger log = LogManager.getLogger(getCla... | 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.ambari.server.state.Service;
createNewSliderConfigVersion();
}
protected void createNewSliderConfigVersion() {
// Here we are creating new service config version for SLIDER, to link slider-client
// config to SLIDER service, in serviceconfigmapping table. It could be not mapped becaus... | 0 |
conf.addNodes("copiedProperties", c2.getModel().getNodeHandler()
.getRootNode().getChildren()); | 0 |
if (docSource.hasTop() && docKey.equals(docSource.getTopKey(), PartialKey.ROW_COLFAM_COLQUAL)) { | 0 |
if(LOG.isDebugEnabled()){
}
if(LOG.isDebugEnabled()){
} | 0 |
super(logger);
* @throws IllegalArgumentException When the parameters passed in can not be used for introspection.
public Method getMethod(Class c, String name, Object[] params) throws IllegalArgumentException { | 0 |
agent.get(warmup, 500, 2); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestFastHashMap.java,v 1.9 2003/08/31 17:28:43 scolebourne Exp $
* $Revision: 1.9 $
* $Date: 2003/08/31 17:28:43 $
* any, must include the following acknowledgement:
* Al... | 0 |
* Defines the socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the
* timeout.
* Determines the timeout in milliseconds until a connection is established. A timeout
* value of zero is interpreted as an infinite timeout. | 0 |
import org.apache.ambari.server.controller.internal.DeleteHostComponentStatusMetaData;
cluster.getService("HDFS").delete(new DeleteHostComponentStatusMetaData()); | 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 |
* The File where the candidate reference
* should be saved if there is not candidate reference
* or if it cannot be opened.
*/
protected File candidateReference;
/**
* See {@link #candidateReference}
*/
public void setCandidateReference(File candidateReference){
this.... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/BeanUtilsTestCase.java,v 1.21 2003/02/05 00:45:53 craigmcc Exp $
* $Revision: 1.21 $
* $Date: 2003/02/05 00:45:53 $
* @version $Revision: 1.21 $
/**
* Test copying a new va... | 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 |
ResultReceiver rr = entries -> {
try {
resultsQueue.put(entries);
} catch (InterruptedException e) {
if (TabletServerBatchReaderIterator.this.queryThreadPool.isShutdown())
log.debug("Failed to add Batch Scan result", e);
else
log.warn("Failed to add Batch Scan... | 0 |
System.out.println("File not found"); | 0 |
@Override
public String toString() {
if (this.map != null) {
return this.map.toString();
} else {
return "{}";
}
} | 0 |
assertEquals("object flag b", new Vector<Object>(), line.getOptionObject("b"));
assertEquals("object flag b", new Vector<Object>(), line.getOptionObject('b')); | 0 |
deleteHandler.deleteRelationships(Collections.singleton(edge));
if (end1Vertex == null) {
throw new AtlasBaseException(AtlasErrorCode.RELATIONSHIP_END_IS_NULL, relationshipType.getEnd1Type().getTypeName());
}
if (end2Vertex == null) {
throw new AtlasBaseExceptio... | 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 |
public void testCodeIntegerNull() {
try {
Base64.encodeInteger(null);
fail("Exception not thrown when passing in null to encodeInteger(BigInteger)");
} catch(NullPointerException npe) {
// expected
} catch(Exception e) {
fail("Incorrect Excepti... | 0 |
@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"}) public class ColumnUpdate implements org.apache.thrift.TBase<ColumnUpdate, ColumnUpdate._Fields>, java.io.Serializable, Cloneable, Comparable<ColumnUpdate> {
public enum _Fields implements org.apache.thrift.TFieldIdEnum { | 0 |
ctx.setCachingEnabled(false); | 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 |
synchronized (fs)
synchronized (fs)
synchronized (fs)
synchronized (fs)
synchronized (fs)
synchronized (fs)
synchronized (fs)
synchronized (fs)
synchronized (fs) | 0 |
/**
* Clears the view CSS.
*/
public void clearViewCSS() {
defaultView = null;
}
| 0 |
package org.apache.atlas; | 1 |
// ignore | 0 |
public static <T> List<Object> createStructuralValues(Coder<T> coder, List<T> list)
* Reads all elements from the given unstarted {@link BoundedSource.BoundedReader}. | 0 |
import org.apache.sshd.common.config.VersionProperties;
super();
return FactoryManagerUtils.getStringProperty(VersionProperties.getVersionProperties(), "sshd-version", DEFAULT_VERSION).toUpperCase(); | 0 |
scanner.fetchColumnFamily(BulkPlusOne.CHECK_COLUMN_FAMILY); | 0 |
* Copyright (C) 2015 Google Inc. | 0 |
@Override
public void visit(final State state, Properties props) throws Exception {
Setup.run(state, new Runnable() {
@Override
public void run() {
try {
runLater(state);
} catch (Throwable ex) {
log.error(ex, ex);
}
}
});
}
abst... | 1 |
if (args.length == 1) {
Script script = engine.createScript(new File(args[0]));
Object value = script.execute(context);
System.out.println("Return value: " + value);
} else {
BufferedReader console = new BufferedReader(new InputStreamReader(System.in));
... | 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.ambari.server.state.StackId;
import org.apache.ambari.server.utils.VersionUtils;
private static final String TEZ_SITE = "tez-site";
private static final String TEZ_COUNTERS_MAX = "tez.counters.max";
private static final String TEZ_COUNTERS_MAX_GROUPS = "tez.counters.max.groups";
updateTezCo... | 0 |
@Override | 0 |
CUSTOM_COMMAND, | 0 |
import org.apache.avalon.framework.service.ServiceSelector;
* @version CVS $Id: SimpleFormTransformer.java,v 1.7 2003/10/27 21:18:32 joerg Exp $
private ServiceSelector inputSelector = null;
this.inputSelector = (ServiceSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);
&& this.input... | 0 |
import java.net.InetAddress;
private String m_Ip;
m_Ip = getProperty( bundleContext, "osgi.shell.telnet.ip", "127.0.0.1" );
m_ServerSocket = new ServerSocket( m_Port, 1, InetAddress.getByName(m_Ip) );
private String getProperty( BundleContext bundleContext, String propName, String defaul... | 0 |
@Override
@Override
@Override
@Override
@Override | 0 |
DistributedReadWriteLock rlocker = new DistributedReadWriteLock(lock, "reader".getBytes());
DistributedReadWriteLock wlocker = new DistributedReadWriteLock(lock, "wlocker".getBytes());
Lock writeLock2 = DistributedReadWriteLock.recoverLock(lock, "wlocker".getBytes()); | 0 |
import java.util.Objects;
return sftpLogin(new InetSocketAddress(Objects.requireNonNull(host, "No host address"), port), username, password);
return sftpLogin(new InetSocketAddress(Objects.requireNonNull(host, "No host address"), port), username, identity); | 0 |
/**
* Determine if HDFS is present and it has NameNode High Availability.
* @return true if has NameNode HA, otherwise, false.
*/
public boolean isNameNodeHA() throws AmbariException {
Map<String, org.apache.ambari.server.state.Service> services = m_cluster.getServices();
if (services != null && se... | 0 |
package org.apache.felix.ipojo.test.scenarios.service.dependency;
import org.apache.felix.ipojo.test.scenarios.service.dependency.di.DefaultImplementationTestSuite;
import org.apache.felix.ipojo.test.scenarios.service.dependency.dynamic.priority.DynamicPriorityDependencyTestSuite;
import org.apache.felix.ipojo.test.sce... | 0 |
import java.nio.charset.StandardCharsets;
byte[] bytes = PAYLOAD.getBytes(StandardCharsets.UTF_8);
byte[] bytes=PAYLOAD.getBytes(StandardCharsets.UTF_8);
session.write(IoBuffer.wrap(sb.toString().getBytes(StandardCharsets.UTF_8))); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/ObjectCreationFactory.java,v 1.9 2003/10/09 21:09:46 rdonkin Exp $
* $Revision: 1.9 $
* $Date: 2003/10/09 21:09:46 $
* Alternately, this acknowledgement may appear in the software ... | 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 java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import org.apache.felix.bundlerepository.DataModelHelper;
import org.apache.felix.bundlerepository.Repository;
import org.apache.felix.utils.collections.MapToDictionary;
import org.apac... | 0 |
/*
* Copyright 2001-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 applica... | 0 |
private static final long serialVersionUID = 0;
private static final long serialVersionUID = 0;
| 0 |
* A convenience method to set the "all columns" option on a Combiner.
* @param combineAllColumns
* if true, the columns option is ignored and the Combiner will be applied to all columns | 0 |
SortedSet<Text> splits = new TreeSet<>(); | 0 |
package org.apache.accumulo.examples.wikisearch.ingest;
import org.apache.accumulo.examples.wikisearch.reader.AggregatingRecordReader;
aggregators.add(new AggregatorConfiguration(new Text("fi\0" + family), org.apache.accumulo.examples.wikisearch.aggregator.TextIndexAggregator.class.getName()));
tops.s... | 0 |
return InstructionOutputNode.create(new InstructionOutput().setName(name), "fakeID"); | 0 |
String usernameOrig = user.getUsername();
String username = AuthorizationHelper.resolveLoginAliasToUserName(usernameOrig);
if (username.equals(usernameOrig))
return null; // create override only original username is a login alias
String userPassword = user.getPassword() != null ? user... | 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 |
Collection<String> encodedRanges =
conf.getStringCollection(enumToConfKey(implementingClass, ScanOpts.RANGES));
ByteArrayInputStream bais =
new ByteArrayInputStream(Base64.decodeBase64(rangeString.getBytes(UTF_8)));
ByteArrayInputStream bais =
new ByteArrayInputStream(Bas... | 0 |
@Override | 0 |
final SQLException nextException = e.getNextException(); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.