Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
this.soLinger = TimeValue.NEG_ONE_SECONDS; | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private final Logger log = LoggerFactory.getLogger(InMemoryDnsResolver.class); | 0 |
/** need to delete all metrics from accumulator before running another test. */ | 0 |
.setTimestamp(WindmillTimeUtils.harnessToWindmillTimestamp(
BoundedWindow.TIMESTAMP_MAX_VALUE)) | 0 |
/** Implementing this interface allows for exposing name of implementing class. */
/** @return non-unique name either given by user oe automatically generated. */ | 0 |
import org.apache.commons.configuration.ex.ConfigurationException; | 0 |
TabletLocationState tls = MetaDataTableScanner.createTabletLocationState(k, v); | 0 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
public class IAIKTest {
assertTrue(ex.getCause() instanceof XMLSecurityException);
assertEquals("INVALID signature -- core ... | 0 |
// Set up the factory we will use (passing the pool associates
// the factory with the pool, so we do not have to do so
// explicitly)
CPDSConnectionFactory factory = new CPDSConnectionFactory(cpds,
getValidationQuery(), isRollbackAfterValidation(), username,
... | 0 |
return name.equalsIgnoreCase(req.getName()) && req.getNamespace() == null;
return name.equalsIgnoreCase(req.getName()) && namespace.equalsIgnoreCase(req.getNamespace()); | 0 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test; | 0 |
FileSystem.get(path.toUri(), conf).delete(path, false);
FileSystem fs = FileSystem.get(path.toUri(), conf);
FileSystem fs = FileSystem.get(path.toUri(), conf); | 0 |
WindowedValue.valueInGlobalWindow(9), WindowedValue.valueInEmptyWindows(19)); | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/io/ByteArrayInputStream.java,v 1.6 2006/03/14 01:20:24 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 no... | 0 |
package org.w3c.dom.svg;
import org.w3c.dom.DOMException;
public interface SVGLangSpace {
public String getXMLlang( );
public void setXMLlang( String xmllang )
throws DOMException;
public String getXMLspace( );
public void setXMLspace( String xmlspace )
... | 1 |
DynaBean extraElement = testDynaClass.newInstance(); | 0 |
}
private Map<String,TServerInfo> current = new HashMap<>();
private Map<TServerInstance,TServerInfo> currentInstances = new HashMap<>();
private Map<String,Long> locklessServers = new HashMap<>();
final Set<TServerInstance> updates = new HashSet<>();
final Set<TServerInstance> doomed = new HashSet<... | 1 |
package org.apache.commons.ognl.internal.entry;
/*
* $Id$
*/
| 0 |
/** {@inheritDoc} */
/** {@inheritDoc} */
/** {@inheritDoc} */ | 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.kerberos.KerberosDescriptorFactory;
private static final KerberosDescriptorFactory KERBEROS_DESCRIPTOR_FACTORY = new KerberosDescriptorFactory();
KerberosDescriptor descriptor = KERBEROS_DESCRIPTOR_FACTORY.createInstance(new File(hbaseDirectory, "kerberos.json"));
Kerber... | 0 |
@Override
@Override
@Override
@Override | 0 |
import org.apache.accumulo.core.trace.TraceUtil;
final TInfo tinfo = TraceUtil.traceInfo(); | 0 |
import java.util.ArrayList;
"2.2.0.1-1111", new ArrayList<>());
"2.2.0.1-1111", new ArrayList<>()); | 0 |
* Base64-like method to convert binary bytes into ASCII chars.
* <p>
* </p>
static final String B64T_STRING = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
/**
* Table with characters for Base64 transformation.
*/
static final char[] B64T_ARRAY = B64T_STRING.toCharArray()... | 0 |
final int len = this.name.length() + 1 + this.value.length();
final StringBuilder buffer = new StringBuilder(len);
buffer.append(this.name);
buffer.append("=");
buffer.append(this.value);
return buffer.toString();
return false; | 0 |
package org.apache.hadoop.metadata.typesystem.types;
public EnumTypeDefinition(String name, EnumValue... enumValues) { | 0 |
public interface TcpipForwarder extends PortForwardingManager, Closeable { | 0 |
protected String name;
this.name = other.name;
public String getName() {
return name;
public void setName(final String name) {
this.name = name;
return Objects.equals(name, that.name) &&
return Objects.hash(super.hashCode(), name, shortDescription, longDescription, cl... | 0 |
private Instance inst; | 0 |
import org.apache.accumulo.core.conf.DefaultConfiguration;
ConfigurationCopy acuconf = new ConfigurationCopy(DefaultConfiguration.getInstance()); | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
LoggerFactory.getLogger(CommandLineDriverSettingsModule.class);
LOG.error("Authentication File not Found");
LOG.info(
"Connecting to master using authentication (principal: {}).",
properties.get(PRINCIPAL_KEY));
LOG.e... | 0 |
super(ExtensibleSVGDOMImplementation.getDOMImplementation(),
parser, dd);
public SVGOMDocument createDocument(String uri, InputStream inp)
throws IOException {
public SVGOMDocument createDocument(String uri, Reader r)
throws IOException {
public Document createDocument(... | 0 |
shell.config("--fake", "-p", ""); | 0 |
* @param context | 0 |
ParDo.SingleOutput<Integer, Integer> parDo1 = ParDo.of(fn1);
ParDo.SingleOutput<Integer, Integer> parDo2 = ParDo.of(fn2); | 0 |
public <InputT, OutputT, T extends Operator<InputT, OutputT>> T add(T operator) {
Dataset<OutputT> output = operator.output();
Dataset<OutputT> dagOutput = (Dataset) Iterables.getOnlyElement(unfolded.getLeafs()).get().output(); | 0 |
notification.DispatchProperties = new HashMap<>(); | 0 |
Collections.unmodifiableSet(EnumSet.allOf(BuiltinCiphers.class));
new TreeMap<>(String.CASE_INSENSITIVE_ORDER); | 0 |
package org.apache.ambari.server;
import java.util.Map;
/**
* Service Interface for representing various products in the
* Hadoop eco-system such as HDFS, MAPREDUCE, HBASE.
*/
public interface Service {
/**
* @return Name of the Service Instance
*/
public String getName();
/**
* Get the Service Ty... | 0 |
.setTimestamp(WindmillTimeUtils.harnessToWindmillTimestamp(data.getTimestamp())) | 0 |
WalkingSecurity ws = new WalkingSecurity(state);
String targetUser = WalkingSecurity.get(state).getSysUserName();
boolean hasPerm = ws.hasSystemPermission(targetUser, sysPerm);
throw new AccumuloException("Got GRANT_INVALID when not dealing with GRANT", ae);
ws.revokeSystemPermission(targe... | 1 |
m_contentTime = bundle.getLastModified();
| 0 |
return new TestSuite(BeanificationTestCase.class); | 0 |
import org.apache.metadata.storage.StructInstance;
StructInstance ts = structType.convert(s, Multiplicity.REQUIRED);
StructInstance ts = recursiveStructType.convert(s2, Multiplicity.REQUIRED); | 0 |
* Copyright 2001-2005 The Apache Software Foundation.
/**
* Tests if properties can be appended by simply calling load() another
* time.
*/
public void testAppend() throws Exception
{
File file2 = new File("conf/threesome.properties");
conf.load(file2);
assertEqu... | 0 |
package org.apache.batik.anim.dom; | 0 |
boolean sawTimeSet = false;
for (DataFileValue dfv : files.values()) {
if (dfv.isTimeSet()) {
sawTimeSet = true;
break;
}
}
if (sawTimeSet) {
// constucting FileRef is expensive so avoid if not needed
DataFileValue value = files.get(new... | 0 |
* Copyright (c) OSGi Alliance (2010, 2016). All Rights Reserved.
* Resolver Service Package Version 1.1.
* {@code Import-Package: org.osgi.service.resolver; version="[1.1,2.0)"}
* {@code Import-Package: org.osgi.service.resolver; version="[1.1,1.2)"}
* @author $Id: 6ac829e72173e50ab58bedd13edd66a1b50e58bd $
@Ver... | 0 |
AbstractSession s = getSession();
AbstractSession s = getSession(); | 0 |
try (AccumuloClient c = createClient()) { | 0 |
@Deprecated | 0 |
import org.apache.felix.framework.searchpolicy.ModuleImpl;
String s = (String) ((BundleImpl) bundles[i])
.getCurrentModule().getHeaders().get(Constants.BUNDLE_VERSION);
String s1 = (String) ((BundleImpl) o1)
.getCurrentModule().getHeaders().get(Con... | 1 |
document = XMLUtils.read(is, false);
document = XMLUtils.read(is, false);
document = XMLUtils.read(is, false);
document = XMLUtils.read(is, false);
document = XMLUtils.read(is, false);
document = XMLUtils.read(is, false);
document = XML... | 0 |
* For each of the methods, this lexicoder just passes the input through untouched. It is meant to
* be combined with other lexicoders like the {@link ReverseLexicoder}.
// overrides AbstractLexicoder since this simply returns the array; this is more flexible than
// the superclass behavior, since it can retur... | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument; | 0 |
public class Bean2
extends Object
private Bean3 bean3 = new Bean3();
public void setPageBreakAfter( boolean value )
public boolean equals( Object o )
if ( this == o )
return true;
if ( o == null || getClass() != o.getClass() )
return false;
if ( _pageBreak... | 0 |
import java.util.Collections;
ArgumentChecker.notNull(namespace);
doNamespaceOperation(TableOperation.CREATE, Arrays.asList(ByteBuffer.wrap(namespace.getBytes())), Collections.<String,String> emptyMap());
public void delete(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceNotF... | 0 |
* @throws WebApplicationException Throws exception (TBD)
* @param dry_run Whether to do a dry run
* @param role Optionally specify the role name to get the nodes | 0 |
LOG.info("Start downsampling cycle..."); | 0 |
public void execute(Storage.MutableStoreProvider storeProvider) { | 0 |
package org.apache.aurora.scheduler.discovery;
MonitorException(String message, Throwable cause) { | 0 |
* @version CVS $Id: CopletDataFieldHandler.java,v 1.2 2003/06/13 14:20:09 cziegeler Exp $
public class CopletDataFieldHandler implements FieldHandler {
public void checkValidity(Object object) {
}
public Object getValue(Object object) {
Map map = ((CopletDataManager) object).getCopletData();
... | 0 |
import org.apache.batik.util.SVGTypes;
* Implements {@link ValueManager#isAnimatableProperty()}.
*/
public boolean isAnimatableProperty() {
return false;
}
/**
* Implements {@link ValueManager#isAdditiveProperty()}.
*/
public boolean isAdditiveProperty() {
return fal... | 1 |
* @param constrainClass
* class of constraint that was violated
* @param violationCode
* violation code
* @param violationDescription
* description of violation
* @param numberOfViolatingMutations
* number of mutations that produced this particular violation... | 0 |
@Test
public void testSuitableIfCacheEntryIsHeuristicallyFreshEnough() {
Date oneSecondAgo = new Date(now.getTime() - 1 * 1000L);
Date twentyOneSecondsAgo = new Date(now.getTime() - 21 * 1000L);
Header[] headers = {
new BasicHeader("Date", DateUtils.formatDate(oneSecondA... | 0 |
import org.apache.http.nio.util.ByteBufferAllocator;
final ByteBufferAllocator allocator,
super(session, responseFactory, allocator, params); | 0 |
import org.apache.aurora.scheduler.resources.ResourceBag;
import org.apache.aurora.scheduler.resources.ResourceManager;
public ResourceBag getResourceBag() {
return ResourceManager.bagFromResources(task.getTask().getResources()); | 0 |
this.log.debug("Clearing cached auth scheme for " + authhost); | 0 |
public static final String PROPERTY_PROVIDER_THREADPOOL_MAX_SIZE_KEY = "server.property-provider.threadpool.size.max";
public static final int PROPERTY_PROVIDER_THREADPOOL_MAX_SIZE_DEFAULT = 4 * Runtime.getRuntime().availableProcessors();
public static final String PROPERTY_PROVIDER_THREADPOOL_CORE_SIZE_KEY = "s... | 0 |
import org.apache.atlas.TestModules;
@Guice(modules = TestModules.TestOnlyModule.class)
// AtlasGraphProvider.cleanup(); | 0 |
import org.apache.http.nio.NHttpConnectionFactory;
import org.apache.http.nio.reactor.ssl.SSLIOSession;
import org.apache.http.nio.reactor.ssl.SSLMode;
public class LoggingSSLClientConnectionFactory implements NHttpConnectionFactory<DefaultNHttpClientConnection> {
private final SSLContext sslcontext;
public Lo... | 0 |
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("Length delimited encoder (content length: ");
buffer.append(this.contentLength);
buffer.append("; pos: ");
buffer.append(this.len);
buffer.append("; completed: ");
buffer.appe... | 0 |
protected final void setBundleContext(BundleContext context)
{
this.context = context;
}
| 0 |
/**
* Send a message (and accompanying exception) to the user in the <b>warn</b> error level.
* <br/>
* The error's stacktrace will be output when this error level is enabled.
*
* @param content
* @param location The location at which the error occurred
* @param lineNumber The lin... | 0 |
package org.apache.felix.dm.test.integration.api;
import org.apache.felix.dm.test.components.Ensure;
import org.apache.felix.dm.test.integration.common.TestBase; | 0 |
private final Map<String, PathResolver> activeServletMappings = new ConcurrentHashMap<String, PathResolver>();
for(final Map.Entry<String, PathResolver> entry : this.activeServletMappings.entrySet())
if ( pr != null && (resolver == null || entry.getValue().compareTo(resolver) < 0) )
... | 0 |
String firstpart = parts[0];
if (firstpart.length() > 1) { // e.g. server*
String prefix = firstpart.substring(0, firstpart.length() - 1); // e.g. server
String suffix = cn.substring(firstpart.length()); // skip wildcard part from cn | 0 |
private static final char[] PASSWORD_RESERVED = {'@', '/', '?'}; | 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 |
* 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 com.google.cloud.dataflow.sdk.util.common.worker.NativeReader;
class PubsubReader<T> extends NativeReader<WindowedValue<T>> {
public NativeReader<?> create(
throws Exception {
public NativeReaderIterator<WindowedValue<T>> iterator() throws IOException {
class PubsubReaderIterator extends Lega... | 0 |
// set the context path
this.servletServiceContext.setContextPath(this.contextPath);
// create servlet-service specific Spring web application context
// create and initialize the embedded servlet | 0 |
return null; | 0 |
parent.invalidateCache(context, src.tablet_location);
parent.invalidateCache(context, tserver); | 0 |
package org.apache.commons.digester3.annotations.employee;
import org.apache.commons.digester3.annotations.rules.BeanPropertySetter;
import org.apache.commons.digester3.annotations.rules.ObjectCreate;
import org.apache.commons.digester3.annotations.rules.SetProperty;
import org.apache.commons.digester3.annotations.rule... | 1 |
import org.apache.accumulo.core.data.TableId;
private final HashMap<TableId,Long> mincIdleThresholds = new HashMap<>();
TableId tableId = extent.getTableId();
protected boolean tableExists(TableId tableId) { | 0 |
* Wraps a {@link BufferedReader} and returns an {@code Iterable<String>} | 0 |
Copyright 2000 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 |
import org.apache.hc.core5.util.Timeout;
private final Timeout waitForContinueTimeout;
H1Config(final int bufferSize, final int chunkSizeHint, final Timeout waitForContinueTimeout,
this.waitForContinueTimeout = waitForContinueTimeout;
public Timeout getWaitForContinueTimeout() {
return waitF... | 0 |
} catch (RuntimeException e) {
throw new SystemException("An exception occurred during cluster provisioning: " + e.getMessage(), e); | 0 |
public class DefaultKeyValue<K, V> extends AbstractKeyValue<K, V> {
public DefaultKeyValue(final K key, final V value) {
public DefaultKeyValue(final KeyValue<K, V> pair) {
public DefaultKeyValue(final Map.Entry<K, V> entry) {
public K setKey(final K key) {
final K old = this.key;
public V s... | 0 |
package com.twitter.nexus.scheduler.persistence;
import com.google.common.base.Preconditions;
/**
* A persistence layer that uses a codec to translate objects.
*
* @author wfarner
*/
public class EncodingPersistenceLayer<T, U> implements PersistenceLayer<T> {
private final Codec<T, U> codec;
private final Per... | 0 |
import static org.easymock.EasyMock.expect;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
| 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/Predicate.java,v 1.5 2002/08/15 20:04:31 pjack Exp $
* $Revision: 1.5 $
* $Date: 2002/08/15 20:04:31 $
/**
* Returns true if the input object matches this predicate.
... | 0 |
import org.junit.Assert;
import org.junit.Test;
public class JexlScriptEngineOptionalTest {
@Test
Assert.assertEquals("JEXL.out.print('foo\\u00a9bar')", output);
Assert.assertEquals("foo\u00a9bar", outContent.toString());
@Test
Assert.assertEquals("ERROR", outContent.toString());
@Te... | 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 by applic... | 0 |
@Override
@Override | 0 |
int target = bi.getPosition() + bi.getIndex(); /* Byte code position:
target = bi.getPosition() + indices[j]; | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.