Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.beam.sdk.values.BeamRecordType;
private static final BeamRecordType RECORD_TYPE = BeamRecordSqlType.builder() | 0 |
public class NamespaceConfiguration extends AccumuloConfiguration {
private static final Logger log = Logger.getLogger(NamespaceConfiguration.class);
public NamespaceConfiguration(String namespaceId, AccumuloConfiguration parent) {
if (!(namespaceId.equals(Constants.SYSTEM_NAMESPACE_ID) && isIteratorOrConstra... | 0 |
comparator = ExtensionFileComparator.EXTENSION_COMPARATOR; | 0 |
* An abstract class used for iterators that notify observers about size in bytes of their elements,
* as they are being iterated over. The subclasses need to implement the standard Iterator interface
* and call method notifyValueReturned() for each element read and/or iterated over.
public abstract class ElementByte... | 1 |
import java.util.Collections;
import org.apache.sshd.common.util.threads.ExecutorService;
public ChannelAgentForwarding(ExecutorService executor) {
super("", Collections.emptyList(), executor);
forwardService = (service == null)
? ThreadUtils.newSingleThreadExecutor("ChannelA... | 1 |
@com.fasterxml.jackson.annotation.JsonProperty("id")
@com.fasterxml.jackson.annotation.JsonProperty("executionCommands")
@com.fasterxml.jackson.annotation.JsonProperty("statusCommands")
@com.fasterxml.jackson.annotation.JsonProperty("cancelCommands")
@com.fasterxml.jackson.annotation.JsonProperty("alertDefini... | 1 |
/**
* {@inheritDoc}
*/
@Override
public String getCopyColumnToAnotherTableStatement(String sourceTable, String sourceColumnName,
String sourceIDColumnName1, String sourceIDColumnName2,
String sourceIDCo... | 0 |
* @version CVS $Id: AbstractProducible.java,v 1.2 2003/05/21 13:06:06 cziegeler Exp $
protected String id;
/**
* Get the unique id of this object
* @return String Unique id
*/
public String getId() {
return this.id;
}
/**
* Get the unique id of this object
* @... | 0 |
public final class Constants {
public static final String GUID_PROPERTY_KEY = "guid";
public static final String GUID_INDEX = "guid_index";
public static final String ENTITY_TYPE_PROPERTY_KEY = "type";
public static final String ENTITY_TYPE_INDEX = "type_index";
public static final String VERSION_PR... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/IteratorIntIterator.java,v 1.1 2003/01/09 13:40:11 rwaldhoff Exp $
* $Date: 2003/01/09 13:40:11 $
package org.apache.commons.collections.primitives.adapt... | 0 |
webAppContext.setAllowNullPathInfo(true); | 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 |
spec.setProperty( Constants.CREATED_BY, "sigil.felix.apache.org" );
addResources( bundle, spec );
private void addResources( IBldBundle bundle, Properties spec ) | 0 |
return wrappedCollection(key);
}
@Override
List<V> wrappedCollection(final K key) { | 0 |
import org.apache.commons.bcel6.Const;
super(Const.T_UNKNOWN, "<UNINITIALIZED OBJECT OF TYPE '"+t.getClassName()+"'>"); | 0 |
package org.apache.commons.beanutils2; | 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/JXPathCompiledExpression.java,v 1.2 2002/05/08 23:05:05 dmitri Exp $
* $Revision: 1.2 $
* $Date: 2002/05/08 23:05:05 $
*
* @version $Revision: 1.2 $ $Date: 2002/05/08 23:05:05 $
... | 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 org.apache.beam.harness.test.TestStreams; | 0 |
* <p>Most implementors of this interface are expected to be {@link OldDoFn} instances, and will | 0 |
sb.append(" docID=").append(doc);
Value v = iter.getTopValue();
assertTrue(new String(v.get()).endsWith(" docID="+iter.getDocID(k)));
Value v = iter.getTopValue();
assertTrue(new String(v.get()).endsWith(" docID="+iter.getDocID(k)));
Value v = iter.getTopValue();
... | 0 |
public class SVGMaskElementBridge extends AbstractSVGBridge
implements MaskBridge {
/**
* Constructs a new bridge for the <mask> element.
*/
public SVGMaskElementBridge() {}
/**
* Returns 'mask'.
*/
public String getLocalName() {
return SVG_MASK_TAG;
} | 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 |
* @version CVS $Id$ | 0 |
initializeDynamicSupport(ctx, e, node);
if (!ctx.isInteractive())
return;
if (ctx.isDynamic()) {
this.e = e;
this.node = node;
this.ctx = ctx;
((SVGOMElement)e).setSVGContext(this);
} | 0 |
Translation.add(translations, FlowUnfolder.InputOperator.class, new InputTranslator(
splitAssignerFactory));
for (Translation<Operator<?, ?>> tx : txs) {
if (tx.accept == null || tx.accept.apply(originalOp)) { | 0 |
/**
* Create a StringBody from the specified text, mime type and character set.
*
* @param text to be used for the body, not {@code null}
* @param mimeType the mime type, may be {@code null}
* @param charset the character set, may be {@code null}, in which case the hosts default charset is... | 0 |
// One may add new permissions, but new permissions must use new numbers. Current numbers in use
// must not be changed. | 0 |
protected void toStringFields(final StringBuilder builder) { | 0 |
package org.apache.accumulo.server.test.randomwalk.concurrent;
import java.util.List;
import java.util.Properties;
import java.util.Random;
import java.util.TreeSet;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.... | 1 |
/* ====================================================================
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.5 $ $Date: 2004/01/14 21:34:26 $ | 0 |
private String tier;
.setTier(tier) | 0 |
import org.apache.commons.io.FileUtils;
// Remove directory if jar was updated since last extracting
if (archiveDir.exists() && viewArchive.lastModified() > archiveDir.lastModified()) {
FileUtils.deleteDirectory(archiveDir);
}
| 0 |
import org.apache.hc.core5.net.URIAuthority;
public HttpRoute determineRoute(final HttpHost host, final HttpContext context) throws HttpException {
proxy = determineProxy(host, context);
@Override
public HttpHost determineTargetHost(final HttpRequest request, final HttpContext context) throws Ht... | 0 |
ImmutableSet.copyOf(recovery.query(Query.unscoped())));
ImmutableSet.copyOf(recovery.query(Query.unscoped())));
ImmutableSet.copyOf(recovery.query(Query.unscoped()))); | 0 |
import org.apache.ambari.server.StaticallyInject;
@StaticallyInject
@Inject
private static AlertDefinitionDAO s_definitionDao; | 0 |
if (xid == null) {
throw new NullPointerException("xid is null");
}
if (this.currentXid == null) {
throw new XAException("There is no current transaction");
}
if (!this.currentXid.equals(xid)) {
throw new XAExcep... | 0 |
LOG.info("********* Reconciling Alert Definitions **********");
ambariMetaInfo.reconcileAlertDefinitions(clusters);
| 0 |
return headerValueList.get(0); | 0 |
import java.net.MalformedURLException;
String uri = null;
uri = file.toURL().toString();
}
else{
uri = arguments[i];
URL url = null;
try{
url = new URL(arguments[i]);
... | 0 |
protected static final String[] UNITS = {
| 1 |
import org.apache.commons.configuration.event.ConfigurationEvent;
assertEquals("Wrong separator", " = ", layout.getSeparator(TEST_KEY));
* Tests if the copy and the original are independent from each other.
* Tests changing the separator for a property.
*/
public void testSetSeparator() thro... | 0 |
final E[] values = (E[]) set.toArray(); // NOPMD - false positive for generics | 0 |
/*
import org.apache.commons.cli2.resource.ResourceConstants;
public OptionImpl(final int id,
final boolean required) {
public boolean canProcess(final WriteableCommandLine commandLine,
final ListIterator arguments) {
final String argument = (Strin... | 0 |
import org.apache.ambari.view.hive20.client.DatabaseMetadataWrapper;
private DatabaseMetadataWrapper databaseMetadata;
public DatabaseMetadataWrapper getDatabaseMetadata() {
return databaseMetadata;
}
public void setDatabaseMetadata(DatabaseMetadataWrapper databaseMetadata) {
this.databaseMetadata =... | 0 |
if ((ob != null) && (ob.lastrendered != null) && (ob.lastrendered.equals(uri))) {
ne.rendered = true;
return null;
}
if ((oldKey == null || !oldKey.equals(key)) && (--free == 0)) {
free = entries.length;
int newCapacity = free << ... | 0 |
* @version CVS $Id: EP_Name.java,v 1.4 2004/01/31 08:50:39 antonio Exp $
public class EP_Name extends BaseElementProcessor {
public EP_Name() { | 0 |
import org.apache.http.annotation.Immutable;
@Immutable // assuming injected dependencies are immutable | 0 |
final String digest) { | 0 |
port, TCompactProtocol.Factory.class, prop); | 0 |
public List<Header> formatCookies(List<Cookie> cookies) {
if (cookies.size() > 1) {
// Create a mutable copy and sort the copy.
cookies = new ArrayList<Cookie>(cookies);
Collections.sort(cookies, PATH_COMPARATOR);
} | 0 |
private static final String BASEDIR =
XMLSignature sig =
doc, null, XMLSignature.ALGO_ID_MAC_HMAC_SHA1,
File file =
new File(BASEDIR + SEP + "src/test/resources" + SEP + "javax" + SEP + "xml"
| 1 |
LogEntry logEntry = new LogEntry();
logEntry.fromBytes(logInfo);
logs.add(logEntry.logSet);
log.debug("root tablet logSet " + logEntry.logSet);
public void unassign(Collection<TabletLocationState> tablets) throws DistributedStoreException { | 0 |
* {@code null} if nonexistent
* possibly {@code null} if the entry should be deleted | 0 |
components.registerEnvironment(Environment.newBuilder().setUrl("java").build());
components.registerEnvironment(Environment.newBuilder().setUrl("java").build());
components.registerEnvironment(Environment.newBuilder().setUrl("java").build());
components.registerEnvironment(Environment.newBuilder().setUr... | 0 |
import org.apache.http.HttpHeaders;
if (!request.containsHeader(HttpHeaders.HOST)) {
request.addHeader(HttpHeaders.HOST, targethost.toHostString()); | 0 |
import org.apache.ambari.logsearch.config.api.model.inputconfig.InputConfig;
public InputConfig getInputConfig(String clusterName, String serviceName) { | 0 |
private final Log log = LogFactory.getLog(Jira339TestCase.class); | 0 |
public Map<String, Object> getWidgetsDescriptorForService(StackInfo stackInfo, String serviceName)
public Map<String, Object> getWidgetsDescriptorForCluster(StackInfo stackInfo) | 0 |
import org.junit.Assert; | 0 |
import org.apache.ambari.server.orm.dao.HostDAO;
import org.apache.ambari.server.orm.entities.HostEntity;
* {@inheritDoc}
*/
@Override
public String[] getCompatibleVersions() {
return new String[] {"1.7.*", "2.0.*"};
}
/**
HostDAO hostDAO = injector.getInstance(HostDAO.class);
HostEntity ... | 0 |
return supportUpdates ? createConnectedSubConfiguration(key)
: createIndependentSubConfiguration(key);
* Creates a connected sub configuration based on a selector for a tracked
* node.
*
* @param selector the {@code NodeSelector}
* @param parentModel the parent node mode... | 0 |
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override | 0 |
import org.apache.commons.beanutils.BeanUtilsTestCase;
if (BeanUtilsTestCase.isPre14JVM()) {
if (BeanUtilsTestCase.isPre14JVM()) { | 0 |
Object o = helloWorldClass.getDeclaredConstructor().newInstance(); | 0 |
import org.apache.http.impl.io.HttpTransportMetricsImpl;
import org.apache.http.impl.nio.reactor.SessionOutputBuffer;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
WritableByteChannel channel = newChannel(baos);
SessionOutputBuffer outbuf = new SessionOutputBuffer(1024, 128);
... | 0 |
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BILINEAR);
root.paint(g);
BridgeContext ctx = new Brid... | 0 |
FlinkRunner.class,
TestFlinkRunner.class); | 0 |
import org.apache.accumulo.core.client.impl.BaseIteratorEnvironment;
IteratorEnvironment env = new BaseIteratorEnvironment(); | 1 |
Session session = getSession();
Buffer buf = session.createBuffer(SshConstants.SSH_MSG_CHANNEL_OPEN_FAILURE,
Long.SIZE + GenericUtils.length(message) + GenericUtils.length(lang));
Buffer rsp = session.createBuffer(cmd, 2);
session.writePacket(rsp); | 0 |
import java.security.AlgorithmParameters;
import java.security.GeneralSecurityException;
import java.security.spec.ECGenParameterSpec;
private final static String ver = System.getProperty("java.version");
private final static boolean atLeast18 = !ver.startsWith("1.5") &&
!ver.startsWith("1.... | 0 |
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.collect.ImmutableMap;
import java.util.Collections; | 0 |
import java.nio.channels.Channel;
import java.nio.file.FileSystem;
@Test
public void testNewByteChannelProviderMismatchException() throws IOException {
RootedFileSystemProvider provider = new RootedFileSystemProvider();
Path tempFolder = assertHierarchyTargetFolderExists(getTempTargetFolder());
... | 0 |
import java.nio.charset.StandardCharsets;
value = new String(v, StandardCharsets.UTF_8); | 0 |
/*
* Copyright (C) 1993-2003 SEAGULL
*
* AllTests.java
* Created on Nov 5, 2003, 8:25:55 PM
*
*/
package org.apache.commons.codec.language;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Tests all test cases in this package.
*
* @author <a href="mailto:ggregory@seagullsw.com">Gary ... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/DoubleCollectionCollection.java,v 1.2 2003/08/31 17:21:17 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this... | 0 |
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> | 0 |
public void visitStackMap(StackMap obj){
tostring = toString(obj);
} | 0 |
+ "basePath = %s, fileName = %s: %s", basePath,
fileName, e)); | 0 |
import org.apache.xml.security.utils.RFC2253Parser; | 0 |
return new ArrayList<>(); | 1 |
* <p>
* This parser should be used to parse request messages on the server server.
return new BufferedHeader(buffer, true); | 0 |
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> | 0 |
@SuppressWarnings("AssertEqualsBetweenInconvertibleTypes")
JexlScript script = JEXL.createScript("#pragma one 1\n#pragma the.very.hard 'truth'\n2;");
Assert.assertTrue(script != null);
Map<String, Object> pragmas = script.getPragmas();
Assert.assertEquals(2, pragmas.size());
... | 0 |
import java.util.Objects;
import static java.util.Objects.requireNonNull;
this.taskGroupBackoff = requireNonNull(taskGroupBackoff);
this.rateLimiter = requireNonNull(rateLimiter);
this.executor = requireNonNull(executor);
requireNonNull(rateLimiter);
requireNonNull(taskScheduler);
this.backo... | 0 |
import static org.apache.aurora.scheduler.updater.StateEvaluator.Result.EVALUATE_AFTER_MIN_RUNNING_MS;
f.evaluate(EVALUATE_AFTER_MIN_RUNNING_MS, PENDING, ASSIGNED, STARTING, RUNNING);
f.evaluate(EVALUATE_AFTER_MIN_RUNNING_MS, PENDING, ASSIGNED, STARTING, RUNNING);
f.evaluate(EVALUATE_AFTER_MIN_RUNNING_MS, P... | 0 |
JCEMapper.translateURItoJCEID(EncryptionConstants.ALGO_ID_KEYWRAP_AES128) != null;
return mapKeyName(keyName.getKeyName());
if (cert != null && cert.getSerialNumber().toString().equals(rsaCertSerialNumber)) {
kek = rsaKey;
assertTrue(cc, cc!= null && cc.equals... | 0 |
import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
private final Logger connLog = LoggerFactory.getLogger("org.apache.hc.core5.http.connection"); | 0 |
@Test
public void testInflateDeflateRoundTrip() throws CodingException {
Identity original = new Identity("aurora", "jsmith");
byte[] deflated = ThriftBinaryCodec.deflateNonNull(original);
Identity inflated = ThriftBinaryCodec.inflateNonNull(Identity.class, deflated);
assertEquals(original, infl... | 0 |
/*
.setAllowedOrigins("*")
.withSockJS(); | 0 |
public HostRequest getHostRequest() {
return hostRequest;
}
| 0 |
// Estimate of overhead per StateId.
private static final int PER_STATE_ID_OVERHEAD = 20;
// Initial size of hash tables per entry.
private static final int INITIAL_HASH_MAP_CAPACITY = 4;
// Overhead of each hash map entry.
private static final int HASH_MAP_ENTRY_OVERHEAD = 16;
// Overhead of each cache e... | 0 |
import java.util.Random;
import org.apache.accumulo.core.client.BatchWriterConfig;
BatchWriter bw = getConnector().createBatchWriter("bwlt", new BatchWriterConfig());
BatchWriter bw = getConnector().createBatchWriter("bwft", new BatchWriterConfig()); | 0 |
return new ClusterBuilder(this);
/**
* Constructor.
*
* @param grouping
* the upgrade/downgrade grouping (not {@code null}).
*/
private ClusterBuilder(Grouping grouping) {
super(grouping);
}
/**
* {@inheritDoc}
*/
public List<StageWrapper> build... | 0 |
public static final String TIMELINE_METRICS_HOST_INMEMORY_AGGREGATION = "timeline.metrics.host.inmemory.aggregation";
| 0 |
* Copyright 2016 Seznam.cz, a.s. | 0 |
import com.twitter.aurora.scheduler.storage.entities.IJobConfiguration;
* An action that either accepts a configuration or rejects it with a reason.
JobFilterResult filter(IJobConfiguration jobConfiguration); | 0 |
private static final ObjectType GENERIC_ARRAY = new ObjectType("org.apache.bcel.verifier.structurals.GenericArray"); | 0 |
import org.apache.ambari.server.orm.OrmTestHelper;
import org.apache.ambari.server.orm.entities.RepositoryVersionEntity;
StackId stackId = new StackId("HDP-2.0.6");
OrmTestHelper helper = injector.getInstance(OrmTestHelper.class);
helper.createStack(stackId);
RepositoryVersionEntity repositoryV... | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(KafkaUtils.class);
LOG.debug("Failed to retrieve offsets on {}:{}: {}",
new Object[]{server, port, e}); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.