Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import static org.junit.Assert.assertEquals;
assertEquals("0123456789", new String(buf, UTF_8));
assertEquals("34567", new String(buf, UTF_8)); | 0 |
public int setCount(final E object, final int count) { | 0 |
private static final Logger LOG = LoggerFactory.getLogger(TopologyHostTask.class);
} | 1 |
String name = defn.getProvider().replace('.', '/') + "/acd/" +
defn.setProvider("org.apache.ambari"); | 0 |
package org.apache.batik.anim.dom; | 0 |
* @version $Revision$ | 1 |
final Command executionCommand = new ExecutionCommand(exchangeHandler, context);
context); | 0 |
* {@link Flatten.PCollections} translation to Apex operator.
TransformTranslator<Flatten.PCollections<T>> {
public void translate(Flatten.PCollections<T> transform, TranslationContext context) { | 0 |
public boolean equals(Object o) {
if (o instanceof QCMutation)
return compareTo((QCMutation) o) == 0;
return false;
}
@Override | 0 |
import org.apache.beam.sdk.extensions.gcp.util.BackOffAdapter;
import org.apache.beam.sdk.extensions.gcp.util.Transport; | 0 |
* Copyright 2003-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 applicable law o... | 0 |
import com.google.common.util.concurrent.AbstractIdleService;
import org.apache.aurora.scheduler.SchedulerServicesModule;
// TODO(ksweeney): Would this be better as a scheduler active service?
SchedulerServicesModule.addAppStartupServiceBinding(binder()).to(RegisterSubscribers.class);
static class RegisterSub... | 0 |
import java.util.function.Supplier; | 0 |
* Removes all tasks from the store.
void deleteTasks();
* Deletes specific tasks from the store.
* @param taskIds IDs of tasks to delete.
void deleteTasks(Set<String> taskIds); | 0 |
import org.apache.accumulo.server.zookeeper.IZooReaderWriter;
IZooReaderWriter zk = ZooReaderWriter.getInstance(); | 0 |
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegeme... | 0 |
import java.util.HashMap;
config.setZooKeeperPort(0);
HashMap<String,String> site = new HashMap<String,String>();
site.put(Property.TSERV_WORKQ_THREADS.getKey(), "2");
config.setSiteConfig(site);
@Test
public void testConfig() {
// ensure what user passed in is what comes back
Assert.assertE... | 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: SimpleFormTransformer.java,v 1.15 2004/03/28 22:03:02 antonio Exp $
if (aName == null || this.fixed || (fixed != null && BooleanUtils.toBoolean(fixed))) {
if (aName != null && !(this.fixed || (fixed != null && BooleanUtils.toBoolean(fixed)))) {
if (value == null || this.fixe... | 0 |
public class TestSequencedHashMap extends TestMap
public void setUp() throws Exception { | 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 |
package org.apache.felix.coordinator.impl; | 0 |
import org.apache.zookeeper.server.TxnLogProposalIterator;
* Test case verifying TxnLogProposalIterator closure.
*/
@Test
public void testTxnLogProposalIteratorClosure() throws Exception {
long peerZxid;
// CommmitedLog is empty, we will use txnlog up to lastProcessZxid
db = n... | 0 |
MacroContext macroContext, Event startEvent, Event endEvent)
macroContext, startWhen.getNext(),
macroContext, this.otherwise.getNext(), | 0 |
* @deprecated since 4.1, use {@link IterableUtils#frequency(Iterable, Object)} instead.
return IterableUtils.frequency(coll, obj);
* @deprecated since 4.1, use {@link IterableUtils#forEach(Iterable, Closure)} instead
IterableUtils.forEach(collection, closure);
* @deprecated since 4.1,... | 0 |
package org.apache.xml.security.algorithms.encryption;
import org.w3c.dom.*;
import org.apache.xml.security.utils.*;
import org.apache.xml.security.exceptions.XMLSecurityException;
/**
*
* @author $Author$
*/
public class KeyTransportAlgorithm_RSA15 extends EncryptionMethod {
public KeyTransportAlgorithm_RSA15(... | 0 |
import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.osgi.service.metatype.annotations.ObjectClassDefinition;
@ObjectClassDefinition(name="Spell Checker Dictionary",
factoryPid = "org.apache.felix.dm.lambda.samples.dictionary.DictionaryConfiguration",
@AttributeDefinition(description = ... | 0 |
package org.apache.accumulo.cloudtrace.instrument; | 0 |
TableSetup ts = new TableSetup("test_ingest", config, TestIngest.getSplitPoints(0, NUM_TO_INGEST, NUM_TABLETS)); | 1 |
if (LOG.isDebugEnabled()) {
LOG.info("Could not load JMX from {}/{} from {}", beanName, attributeName, hostname, e);
} else {
LOG.info("Could not load JMX from {}/{} from {}", beanName, attributeName, hostname);
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/ProxyIterator.java,v 1.2 2003/01/15 21:49:14 scolebourne Exp $
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* any, must include the followin... | 0 |
//TODO handle logger.setLogger(config.getLogger()) | 0 |
import org.junit.Ignore; | 0 |
* @param listener | 0 |
public Class<? extends Number> getLiteralClass() { | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/PackageFunctions.java,v 1.2 2002/04/10 03:40:19 dmitri Exp $
* $Revision: 1.2 $
* $Date: 2002/04/10 03:40:19 $
* <p>
* If the first argument of a method or constructor is ExpressionConte... | 0 |
* @param baseURI
public XMLX509Certificate(Element element, String baseURI) throws XMLSecurityException {
super(element, baseURI); | 0 |
Collections.emptyList()); | 0 |
ValidationError validate(Object value, ExpressionContext expressionContext);
boolean supportsType(Class clazz, boolean arrayType); | 0 |
* This class is derived from the abstract {@link Constant} | 0 |
* Methods annotated with {@code SetRoot} will be bound with {@code SetRootRule} digester rule.
*
@Retention( RetentionPolicy.RUNTIME )
@Target( ElementType.METHOD )
@DigesterRule( reflectsRule = SetRootRule.class, providedBy = SetRootRuleProvider.class, handledBy = MethodHandler.class )
public @interface SetRoot
{
... | 1 |
* <p></p>
* <p></p> | 0 |
pushDelegate,
getExtraContextFactoryMethodDescription(
ROW_PARAMETER_METHOD, DoFn.class))); | 0 |
/**
* A utility class for checking over configuration entries.
*/
/**
* Validates the given configuration entries.
*
* @param entries iterable through configuration keys and values
* @throws SanityCheckException if a fatal configuration error is found
*/
public static void validate(Iterable<Entry<S... | 0 |
try (TestReceiver receiver = new TestReceiver()) {
receiver.receiveSpan(createSpan(0));
while (receiver.getQueueSize() > 0) {
Thread.sleep(500);
}
assertEquals(0, receiver.getQueueSize());
assertEquals(0, receiver.getSpansSent());
receiver.receiveSpan(createSpan(1));
... | 0 |
* Indicates whether or not to alter the names of the data store entities to
* avoid db reserved word conflicts.
*/
@Column(name = "alter_names")
@Basic
private Integer alterNames;
/**
this.alterNames = 1;
this.alterNames = 1;
* Determine whether or not to alter the names of the
* data st... | 0 |
public static Class<? extends ScanInterpreter> getCurrentInterpreter(final String tableName, final Shell shellState) { | 0 |
super(HttpException.clean(message)); | 0 |
Copyright 2002 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 law or a... | 0 |
public class CursorFactory
extends AbstractIdentifierFactory
implements ValueConstants {
values.put(CSS_AUTO_VALUE, AUTO_VALUE);
values.put(CSS_CROSSHAIR_VALUE, CROSSHAIR_VALUE);
values.put(CSS_DEFAULT_VALUE, DEFAULT_VALUE);
values.put(CSS_E_RESIZE_VALUE, E_RESIZE_VALUE);
values.put(CSS_HELP... | 0 |
this.webAdapter = new WebConsoleAdapter(context);
this.printerManager = new InventoryPrinterManagerImpl(context); | 0 |
/*
* Copyright 2000-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 ... | 0 |
private static final String TASK_ID = "taskId";
assertTrue(defaultFilter.filter(twoPorts, HOST_A, noPortTask, TASK_ID).isEmpty());
assertTrue(defaultFilter.filter(twoPorts, HOST_A, onePortTask, TASK_ID).isEmpty());
assertTrue(defaultFilter.filter(twoPorts, HOST_A, twoPortTask, TASK_ID).isEmpty());
... | 0 |
public class LogSearchConfigServerClass2 implements LogSearchConfigServer {
public void init(Map<String, String> properties) {}
public boolean inputConfigExists(String clusterName, String serviceName) throws Exception { | 0 |
/* ====================================================================
* @version $Revision: 1.26 $ $Date: 2004/01/14 21:43:03 $ | 0 |
if (loginMap.isEmpty()) | 0 |
import org.apache.hc.client5.http.methods.RoutedHttpRequest;
import org.apache.hc.core5.http.ClassicHttpResponse;
import org.apache.hc.core5.http.message.BasicClassicHttpResponse;
final RoutedHttpRequest get = RoutedHttpRequest.adapt(new HttpGet("http://somehost/"), route);
final HttpClientContext conte... | 0 |
((FileSystemBased)conf).getFileSystem() == fs);
public void testFileMonitor1() throws Exception
output.delete();
output.delete();
public void testFileMonitor2() throws Exception
{
// create a new configuration
File input = new File("target/test-cla... | 0 |
return Integer.valueOf(types.length);
return Integer.valueOf(types[arg-1]); | 0 |
// Workaround for problem with copy()
boolean delimiterParsingStatus = hc.isDelimiterParsingDisabled();
hc.setDelimiterParsingDisabled(true);
hc.setDelimiterParsingDisabled(delimiterParsingStatus); | 0 |
package org.apache.accumulo.core.util.shell.commands;
import org.apache.accumulo.core.util.shell.Shell;
import org.apache.accumulo.core.util.shell.Shell.Command; | 0 |
import java.security.Security;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
static {
Security.addProvider(new BouncyCastleProvider());
} | 0 |
import com.google.common.collect.Iterables; | 0 |
import org.apache.ambari.server.serveraction.kerberos.ConfigureAmbariIdentitiesServerAction;
* @see ConfigureAmbariIdentitiesServerAction#installAmbariServerIdentity(String, String, String, ActionLog)
injector.getInstance(ConfigureAmbariIdentitiesServerAction.class)
addAmbariServerIdentities(... | 0 |
/**
package org.apache.ambari.view.hive2.utils;
public class ResultFetchFormattedException extends ServiceFormattedException {
private final static int STATUS = 500;
public ResultFetchFormattedException(String message, Throwable exception) {
super(message, exception, STATUS); | 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//jelly/jelly-tags/validate/src/java/org/apache/commons/jelly/tags/validate/VerifierTag.java,v 1.1 2003/01/06 15:46:01 dion Exp $
* $Date: 2003/01/06 15:46:01 $
* $Id: VerifierTag.java,v 1.1 2003/01/06 15:46:01 dion Exp $ | 0 |
import org.apache.batik.util.SVGFeatureStrings;
SVGFeatureStrings.addSupportedFeatureStrings(FEATURES); | 0 |
import org.apache.commons.configuration.convert.DefaultListDelimiterHandler; | 0 |
updateTezViewProperty();
/**
* Update properties with name
* yarn.timeline-server.url to yarn.ats.url
*/
private void updateTezViewProperty() throws SQLException {
dbAccessor.executeUpdate("UPDATE viewinstanceproperty SET name = 'yarn.ats.url' where name = 'yarn.timeline-server.url'");
} | 0 |
* it should be the same as for MKD i.e.
* {@code 257<space>"<directory-name>"[<space>commentary]}
* where any double-quotes in {@code <directory-name>} are doubled.
* Unlike MKD, the commentary is optional. | 0 |
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
public void testHeapByteBufferAllocator() {
HeapByteBufferAllocator allocator = new HeapByteBufferAllocator();
ByteBuffer buffer = allocator.allocate(1);
assertNotNull(buffer);
assertFals... | 0 |
public static final String CONF_METADATA_NAMESPACE = "atlas.metadata.namespace";
public static final String CLUSTER_NAME_KEY = "atlas.cluster.name";
public static final String DEFAULT_CLUSTER_NAME = "primary";
pri... | 0 |
WebContinuation wk = continuationsMgr.createWebContinuation(continuation, null, timeToLive,
getInterpreterID(), null);
WebContinuation parentwk = continuationsMgr.lookupWebContinuation(id, getInterpreterID());
WebContinuation w... | 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 |
@SuppressWarnings( "unchecked" ) // checked by the condition in the if clause
Class<? extends Number> numberClass = (Class<? extends Number>) context.getCurrentType();
ret.append( OgnlRuntime.getNumericLiteral( numberClass ) ); | 0 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.junit.T... | 0 |
* <p>The XML file must be of the following form, where {@code root} and {@code record} are XML
* element names that are defined by the user:
* <p>Basically, the XML document should contain a single root element with an inner list consisting
* entirely of record elements. The records may contain arbitrary XML conten... | 0 |
import org.apache.beam.sdk.transforms.DoFnSchemaInformation;
private final DoFnSchemaInformation doFnSchemaInformation;
Map<TupleTag<?>, Coder<?>> outputCoderMap,
DoFnSchemaInformation doFnSchemaInformation) {
this.doFnSchemaInformation = doFnSchemaInformation;
windowingStrategy,
... | 0 |
synchronized (createdTables) {
// Another thread may have succeeded in creating the table in the meanwhile, so
// check again. This check isn't needed for correctness, but we add it to prevent
// every thread from attempting a create and overwhelming our BigQuery quota.
... | 0 |
/*
* Copyright 1999-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... | 0 |
import org.junit.BeforeClass;
@BeforeClass
public static void jschInit() {
JSchLogger.init();
}
| 0 |
* {@link org.apache.felix.scr.impl.manager.SingleComponentManager} for configuration updating this map is
private final Map<String, SingleComponentManager<S>> m_configuredServices = new HashMap<String, SingleComponentManager<S>>();
SingleComponentManager<S> cm;
SingleComponentManager<S>... | 0 |
private static final Logger log = Logger.getLogger(CountTest.class); | 0 |
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.List; | 0 |
protected NodeHandler<ImmutableNode> createHandler(final ImmutableNode root) | 0 |
if (!ex.getMsgID().equals("algorithms.HMACOutputLengthMin")) {
if (!ex.getMsgID().equals("algorithms.HMACOutputLengthMin")) { | 0 |
} catch (Exception e) {
// make sure to log what is going wrong
LOG.error("Failed " + e);
throw e;
} catch (Exception e) {
LOG.error("Cannot validate credentials: " + e); | 0 |
import org.apache.accumulo.core.security.tokens.AuthenticationToken;
public AuthenticationToken login(Properties properties) throws AccumuloSecurityException {
return new PasswordToken(properties.getProperty("password")); | 1 |
new StatCB(zk).verifyExists();
new StatCB(zk).verifyExistsFailure_NoNode(); | 0 |
import com.google.common.collect.ImmutableMap;
split.setExecutionHints(ImmutableMap.of("priority", "9"));
Assert.assertEquals(split.getExecutionHints(), newSplit.getExecutionHints()); | 0 |
import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
new Range(TabletsSection.getRow(tableId, new Text()),
TabletsSection.getRow(tableId, null)), | 0 |
* @since 1.4 | 0 |
import org.apache.felix.scrplugin.annotations.ScannedAnnotation; | 0 |
return createCommandReport(-1, HostRoleStatus.FAILED, structuredOut, outSB.toString(), errSB.toString()); | 0 |
import java.util.Objects;
@Override
public boolean equals(Object other) {
if (!(other instanceof TimestampedValue)) {
return false;
}
TimestampedValue that = (TimestampedValue) other;
return Objects.equals(value, that.value) && Objects.equals(timestamp, that.timestamp);
}
@Override
publ... | 0 |
import com.google.common.collect.ImmutableMap;
Service hdfsService = mock(Service.class);
when(hdfsService.getDesiredStackId()).thenReturn(new StackId("HDP-2.0.6"));
when (cluster.getServices()).thenReturn(ImmutableMap.<String, Service>builder()
.put("HDFS", hdfsService)
.build());
Serv... | 0 |
import org.apache.zookeeper.server.quorum.BufferStats;
BufferStats proposalStats = leader.getProposalStats(); | 1 |
* @version $Id$ | 0 |
package org.apache.hc.core5.http.nio.codecs;
import org.apache.hc.core5.http.nio.reactor.SessionInputBufferImpl; | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.