Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
private static final Integer INTEGER_0 = 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 may not... | 0 |
public class CalculatorFlow extends AbstractContinuable { | 0 |
// Master is creating entries in the replication table from the metadata table every second.
// Compaction should trigger the record to be written to metadata. Wait a bit to ensure
// that the master has time to work.
Thread.sleep(5000);
| 0 |
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
String component = getComponentName(resource);
return new HashSet<String>(GANGLIA_CLUSTER_NAME_MAP.containsKey(component) ?
GANGLIA_CLUSTER_NAME_MAP.get(component) :
Collections.<String>em... | 0 |
public boolean hasNamespacePermission(String user, String namespace,
throw new NamespaceNotFoundException(namespace, null, "while checking permissions");
public boolean hasCachedNamespacePermission(String user, String namespace,
public void grantNamespacePermission(String user, String namespace,
pub... | 0 |
// if this is an abstract component we store the extra info in the property
if ( component.isAbstract() ) {
prop.setPrivate(isPrivate);
prop.setLabel(tag.getNamedParameter(Constants.PROPERTY_LABEL));
prop.setDescription(tag.getNamedParameter(Constants.PROPERTY_DESCRIP... | 0 |
import static org.junit.Assert.assertNotNull;
assertNotNull(commands); | 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 |
try (BatchWriter bw = c.createBatchWriter(tableName, cfg)) {
for (int i = 0; i < n; i++) {
Mutation m = new Mutation(i + "");
m.put("", "", "");
bw.addMutation(m);
} | 0 |
if (userEntity == null) { | 0 |
// Decode query string only
// Path should not be decoded here (username can contain '?')
String href = m_request.getURI();
int pos = href.indexOf('?');
if (pos != -1) {
try {
href = href.substring(0, pos + 1) + URLDecoder.decode(href.substring(pos + 1), "UTF-8");
} catch (Unsupp... | 0 |
import java.util.Set;
import org.apache.ambari.server.state.stack.upgrade.ServiceCheckGrouping;
Grouping serviceCheckGroup = null;
if (g.name.equals("SERVICE_CHECK_1")) {
serviceCheckGroup = g;
}
List<String> expected_priority = Arrays.asList("HDFS", "HBASE", "YARN");
assertNotNull(se... | 0 |
@SuppressWarnings("boxing") | 0 |
public void channelClosed(Channel channel, Throwable reason) {
public void channelInitialized(Channel channel) {
handleChannelEvent("Initialized", channel);
}
@Override
public void channelClosed(Channel channel, Throwable reason) {
... | 0 |
// FIXME use different class loader
public void doAddComponent( final String role, | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions; | 0 |
if (Files.exists(linkPath, IoUtils.EMPTY_LINK_OPTIONS)) {
Files.delete(linkPath);
}
| 0 |
import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy; | 1 |
oos.writeObject(cacheEntry);
return (HttpCacheEntry) ois.readObject(); | 0 |
boolean reuse = false;
// The connection is in or can be brought to a re-usable state.
reuse = reuseStrategy.keepAlive(response, context);
if(reuse) {
// Set the idle duration of this connection
long duration = keepAliveStr... | 0 |
defaultRegion = (Rectangle2D)in.getBounds2D().clone();
defaultRegion.add(in2.getBounds2D()); | 0 |
/*
* Copyright 2004-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 ap... | 0 |
import org.apache.beam.runners.core.metrics.ExecutionStateTracker;
import org.apache.beam.runners.core.metrics.ExecutionStateTracker.ExecutionState; | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState; | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.FluentIterable;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables; | 0 |
w.write ("<!DOCTYPE ");
if (sysID != null)
StringBuffer result = new StringBuffer( s.length() );
| 0 |
/*
* Copyright 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 appl... | 0 |
import org.apache.hc.core5.util.Timeout;
Timeout connectTimeout, | 0 |
DataflowPortabilityApiUnsupported.class
DataflowPortabilityApiUnsupported.class
KV.of(42, BoundedWindow.TIMESTAMP_MIN_VALUE.plus(1774)));
@Category({
ValidatesRunner.class,
UsesTimersInParDo.class,
DataflowPortabilityApiUnsupported.class
})
DataflowPortabilityAp... | 0 |
* Read buffer size for NIO2 sessions
* See {@link org.apache.sshd.common.io.nio2.Nio2Session}
*/
public static final String NIO2_READ_BUFFER_SIZE = "nio2-read-buf-size";
/** | 0 |
import javax.xml.stream.Location;
try
for (int i = 0, nb = reader.getAttributeCount(); i < nb; i++)
resource.put(reader.getAttributeLocalName(i), reader.getAttributeValue(i));
int event;
while ((event = reader.nextTag()) == XMLStreamConstants.START_ELEMENT)
... | 0 |
@Description("The maximum number of elements in a bundle.")
@Default.Long(1000)
Long getMaxBundleSize();
void setMaxBundleSize(Long size);
| 0 |
Set<String> jsonIgnoreMethodNames =
FluentIterable.from(ReflectHelpers.getClosureOfMethodsOnInterfaces(interfaces))
.filter(AnnotationPredicates.JSON_IGNORE.forMethod)
.transform(input -> input.getName())
.toSet(); | 0 |
return new LessEqualsPredicate<>(prop, val); | 0 |
* the {@link #makeObject()} method. | 0 |
import org.xml.sax.SAXException;
import org.xml.sax.ContentHandler;
* @version CVS $Id: Convertor.java,v 1.2 2004/04/10 13:40:27 bruno Exp $
/**
* Generates a bit of information about this convertor (optional).
*/
void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXExcep... | 0 |
* @param message the message to check
* @param mode the mode type | 0 |
private List<Long> data1 = new ArrayList<>();
private List<Long> data2 = new ArrayList<>();
private List<Long> data3 = new ArrayList<>();
private List<Long> data4 = new ArrayList<>();
private List<Long> data5 = new ArrayList<>();
List<List<Long>> data = new ArrayList<>();
TreeSet<Text> sortedEnc = new... | 1 |
import org.apache.beam.vendor.grpc.v1p21p0.com.google.protobuf.ByteString;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Suppliers;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterab... | 0 |
loop: for (LogWork logWork : work) {
*
* @param meta
* the cq for the "log" entry in +r/!0
logPath = fs.choose(Optional.<String> absent(), ServerConstants.getBaseUris()) + Path.SEPARATOR + ServerConstants.WAL_DIR + Path.SEPARATOR + logger
+ Path.SEPARATOR + filename; | 0 |
import org.apache.ambari.server.api.predicate.InvalidQueryException;
public Predicate toPredicate() throws InvalidQueryException; | 0 |
g.setFont(new java.awt.Font("Lucida Sans", java.awt.Font.BOLD, 12));
java.awt.Font defaultFont = new java.awt.Font("Lucida Sans", java.awt.Font.BOLD, 16); | 0 |
c.tableOperations().addFilesTo(tableName).from(dir).load(); | 0 |
prov.put("instance.name","FooProvider1");
prov.put("instance.name","FooProvider2");
i1.put("instance.name","Subscriber1");
i2.put("instance.name","Subscriber2");
i3.put("instance.name","Subscriber3"); | 0 |
return new ValueWithRecordId<>( | 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.eclipse.jetty.server.SessionManager;
SessionManager sessionManager;
sessionManager = mock(SessionManager.class);
bind(SessionManager.class).toInstance(sessionManager); | 0 |
{
set.remove(reference);
if (set.isEmpty())
{
highestReference = null;
}
else
{
highestReference = set.last();
}
} | 0 |
@Experimental
REPLICATION_MIN_THREADS("replication.receiver.min.threads", "1", PropertyType.COUNT, "Minimum number of threads for replciation"),
@Experimental
REPLICATION_THREADCHECK("replication.receiver.threadcheck.time", "5s", PropertyType.TIMEDURATION, "The time between adjustments of the replication thread... | 1 |
import org.apache.hc.core5.pool.nio.NIOConnFactory;
import org.apache.hc.core5.reactor.ConnectingIOReactor;
import org.apache.hc.core5.reactor.IOSession;
import org.apache.hc.core5.reactor.SessionRequest;
import org.apache.hc.core5.reactor.SessionRequestCallback; | 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 ... | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
import org.apache.http.annotation.NotThreadSafe; | 0 |
* @param is The input stream to scan.
* must be '&'. | 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 m... | 0 |
Map<String, Object> requestProps = new HashMap<>();
Map<String, Object> requestProps = new HashMap<>();
requestProps = new HashMap<>();
Map<String, Object> requestProps = new HashMap<>();
Map<String, Object> requestProps = new HashMap<>(); | 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 CoderTypeSerializer<T> duplicate() {
return new CoderTypeSerializer<>(coder); | 0 |
public Optional<String> getLockToken(String updateId) {
return jobUpdateStore.getLockToken(updateId); | 0 |
if (s.length() == 0) { | 0 |
public static <TransformT extends PTransform> void registerTransformTranslator(
Class<TransformT> transformClass,
TransformTranslator<? extends TransformT> transformTranslator) {
public <TransformT extends PTransform>
TransformTranslator<TransformT> getTransformTranslator(Class<TransformT> transfo... | 0 |
* $Revision: 1.5 $
* $Date: 2003/10/09 21:05:29 $
* 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 |
/*
* 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 |
private void headersContain(final Header[] headers, final String name, final String value) { | 0 |
* <code>ResultSet</code> into a <code>List</code> of beans. This class is
*
* The RowProcessor implementation to use when converting rows
/**
*
/**
*
* @param convert The <code>RowProcessor</code> implementation
*
*
* | 0 |
import org.apache.commons.vfs.Capability;
protected void addCapabilities(final Collection<Capability> caps) | 0 |
void updateAlertTargets(long alertTargetId, | 0 |
import com.jcraft.jsch.JSch;
private static final Collection<String> GANYMEDE_MACS =
private final MacFactory factory;
private final String jschMacClass;
private SshServer sshd;
private int port;
public MacTest(MacFactory factory, String jschMacClass) {
this.factory = factory;
... | 0 |
import java.util.Map;
import org.apache.bcel.Constants;
import org.apache.bcel.classfile.Constant;
import org.apache.bcel.classfile.ConstantCP;
import org.apache.bcel.classfile.ConstantClass;
import org.apache.bcel.classfile.ConstantDouble;
import org.apache.bcel.classfile.ConstantFieldref;
import org.apache.bcel.clas... | 0 |
import java.util.SortedSet;
import java.util.TreeSet;
SortedSet<String> roleSet = new TreeSet<String>(); | 0 |
builder.put(FloatCoder.class,
CoderProviders.fromStaticMethods(Float.class, Float.class)); | 0 |
import org.junit.Assert;
import org.junit.Test;
public class TestResponseParser {
@Test
Assert.fail("IllegalArgumentException should have been thrown");
Assert.fail("IllegalArgumentException should have been thrown");
Assert.fail("IllegalArgumentException should have been thrown"... | 0 |
final List<NameValuePair> params = new ArrayList<>(); | 0 |
"WHERE confighosts.hostEntity.hostName=:hostname"),
@Column(name = "host_id", nullable = false, insertable = true, updatable = true)
private Long hostId;
@JoinColumn(name = "host_id", referencedColumnName = "host_id", nullable = false, insertable = false, updatable = false) })
public Long getHostId() {
... | 0 |
import java.nio.charset.StandardCharsets;
super(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes(StandardCharsets.UTF_8)); | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import javax.annotation.Nonnull;
import org.apache.b... | 0 |
*
*
*
/**
* @version $Revision: 1.5 $
}
//-------------------------------------------------------------------------
TestSuite parent = (TestSuite) context.getVariable("org.apache.commons.jelly.junit.suite");
}
//---------------------------------------------------------------------... | 1 |
import org.apache.accumulo.core.util.ratelimit.RateLimiter;
RateLimiter getReadLimiter();
RateLimiter getWriteLimiter();
mfw = fileFactory.openWriter(outputFilePathName, ns, ns.getConf(), env.getWriteLimiter(), acuTableConf);
reader = fileFactory.openReader(mapFile.path().toString(), false, fs, ... | 1 |
private final byte[] lenBytes = new byte[Integer.BYTES]; | 0 |
* Upon receiving an incoming request <tt>HttpAsyncService</tt> verifies
* the message for compliance with the server expectations using
* {@link HttpAsyncExpectationVerifier}, if provided, and then
* {@link HttpAsyncRequestHandlerResolver} is used to resolve the request URI
* to a particular {@link HttpAsyncRequ... | 0 |
super(operands, SqlTypeName.DOUBLE); | 0 |
private String repositoryVersionId;
builder.append(", Repository version ID(")
.append(repositoryVersionId)
public AddUpgradeRequestAuditEventBuilder withRepositoryVersionId(String repositoryVersionId) {
this.repositoryVersionId = repositoryVersionId; | 0 |
package org.apache.commons.digester3.rule; | 0 |
import org.apache.ambari.server.mpack.MpackManagerFactory;
bind(MpackManagerFactory.class).toInstance(createNiceMock(MpackManagerFactory.class)); | 0 |
package org.apache.beam.sdk.extensions.joinlibrary; | 0 |
String[] elts2 = (list.toArray(new String[0]));
String[] elts4b = (list.toArray(elts4));
return list.toArray(new String[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 m... | 0 |
package org.apache.ambari.metrics.alertservice.prototype.common;
import java.util.Arrays;
public static double mean(double[] values) {
return sum / values.length;
public static double variance(double[] values) {
public static double sdev(double[] values, boolean useBesselsCorrection) {
int n = (useBessel... | 0 |
import java.io.IOException;
import java.util.Collection; | 0 |
@Override | 0 |
true /* recovery enabled */, "Component100 Client"));
false /* recovery not enabled */, "Component101 Client"));
true /* recovery enabled */, "Component102 Client"));
false /* recovery not enabled */, "Component101 Client"));
false /* recovery not en... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/impl/TextScript.java,v 1.12 2003/01/24 05:26:13 morgand Exp $
* $Revision: 1.12 $
* $Date: 2003/01/24 05:26:13 $
* $Id: TextScript.java,v 1.12 2003/01/24 05:26:13 morgand Exp $
import org.a... | 0 |
import org.apache.accumulo.core.client.impl.thrift.ClientService.Iface;
import org.apache.accumulo.core.util.Pair;
String server = null;
Pair<String,Iface> pair = ServerClient.getConnection(instance);
server = pair.getFirst();
client = pair.getSecond();
log.debug("ClientService req... | 0 |
case PRIMITIVE:
if (attributeInfo.getVertexUniquePropertyName() != null) {
instanceVertex.removeProperty(attributeInfo.getVertexUniquePropertyName());
}
break; | 0 |
* Autogenerated by Thrift Compiler (0.9.1)
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
@SuppressWarnings("all") public class TConstraintViolationSummary implements org.apache.thrift.TBase<TConstraintViolationSummary, TConstraintViolationSummary._Fiel... | 0 |
import org.apache.beam.sdk.options.ApplicationNameOptions;
import org.apache.beam.sdk.options.DataflowPipelineOptions;
import org.apache.beam.sdk.options.Default;
import org.apache.beam.sdk.options.Description;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.StreamingOptions;
| 0 |
@Deprecated
@Override | 0 |
response = new HashSet<>();
Set<RootServiceComponentResponse> response = new HashSet<>();
Set<RootServiceHostComponentResponse> response = new HashSet<>();
Set<HostResponse> filteredHosts = new HashSet<>(hosts); | 0 |
import org.apache.sshd.server.command.Command; | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.