Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
LogEntry::new;
Log.Position position = mutate(
appendStats,
logWriter -> logWriter.append(contents, writeTimeout, writeTimeUnit));
mutate(truncateStats, logWriter -> {
logWriter.truncate(before, writeTimeout, writeTimeUnit);
return null; | 0 |
clipPathAttrBuf.append(clipDef.getAttributeNS(null, SVG_ID_ATTRIBUTE));
clipDef.setAttributeNS(null, SVG_ID_ATTRIBUTE, | 1 |
* Tests whether multiple sources of a key can be retrieved.
*/
@Test
public void testGetSourcesMultiSources()
{
setUpSourceTest();
final String key = "list.key";
config.getConfiguration(CHILD1).addProperty(key, "1,2,3");
config.getConfiguration(CHILD2).addProperty(k... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/AbstractSortedBagDecorator.java,v 1.3 2003/11/16 00:39:37 scolebourne Exp $
* @version $Revision: 1.3 $ $Date: 2003/11/16 00:39:37 $
* @deprecated TO BE REMOVED ... | 0 |
m_handlerTasks.ungetEventHandler(handler, m_eventHandlerRef); | 0 |
import org.apache.ambari.server.orm.dao.HostRoleCommandDAO;
bind(HostRoleCommandDAO.class).toInstance(createNiceMock(HostRoleCommandDAO.class)); | 0 |
implements org.apache.batik.dom.dom3.ProcessingInstruction {
* <b>DOM</b>: Implements {@link org.w3c.dom.Node#getTextContent()}.
*/
public String getTextContent() {
return getNodeValue();
}
/** | 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//collections/src/test/org/apache/commons/collections/bidimap/AbstractTestBidiMap.java,v 1.6 2003/12/03 12:59:36 scolebourne Exp $
* @version $Revision: 1.6 $ $Date: 2003/12/03 12:59:36 $
protected final Object[][] entries;
... | 0 |
* @version $Revision$ $Date$ | 0 |
/**
* Fill the buffer with random values
* @param bytes The bytes to fill
* @see #fill(byte[], int, int)
*/
void fill(byte[] bytes); // TODO in JDK-8 make this a default method | 0 |
import static org.junit.Assert.assertTrue;
public class C14nHelperTest { | 0 |
ZooKeeperServer zkServer = new ZooKeeperServer( new FileTxnSnapLog(config.dataLogDir, config.dataDir),
config.tickTime, config.minSessionTimeout, config.maxSessionTimeout, null); | 0 |
private final Iterator<E> iterator; | 0 |
SampleModel smRet = sm.createCompatibleSampleModel
(rect.width, rect.height);
// System.out.println("GD DB: " + wr.getDataBuffer().getSize()); | 0 |
* @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a> | 0 |
this.keySet = (keySet == null) ? Collections.emptyList() : keySet; | 0 |
mfw.append(rootDirKey, new Value("/root_tablet".getBytes()));
mfw.append(tableDirKey, new Value(Constants.TABLE_TABLET_LOCATION.getBytes()));
mfw.append(tableTimeKey, new Value((TabletTime.LOGICAL_TIME_ID + "0").getBytes()));
mfw.append(defaultDirKey, new Value(Constants.DEFAULT_TABLET_LOCATION.... | 0 |
import org.apache.accumulo.server.conf.ServerConfigurationFactory;
conf = new ServerConfigurationFactory(HdfsZooInstance.getInstance()).getConfiguration(); | 1 |
CachingSourceValidityStrategy validityStrategy,
super(factory, protocol, uri, sourceUri, (TraversableSource) source, expires, cacheName, async, validityStrategy, fail); | 0 |
/**
* Creates the object, a <code>FileConfiguration</code>.
*
* @param attributes the actual attributes
* @return the file configuration
* @throws Exception if the object could not be created
*/
/**
* Creates a new instance of <code>Prope... | 0 |
/**
* A zero milliseconds {@link Timeout}.
*/ | 0 |
/** The port to use, defaults to -1 if not set. */ | 0 |
*
* @version $Id: Form2Bean.java,v 1.5 2004/02/11 10:43:32 antonio Exp $ | 0 |
Object value = null;
if(propType != null) {
value = this.processColumn(rs, i, propType);
if (value == null && propType.isPrimitive()) {
value = primitiveDefaults.get(propType);
} | 0 |
SortedSet<Text> partitionKeys = new TreeSet<>(); | 0 |
final Option algorithm = new Option("a" , "algo", true, "the algorithm which it to perform executing");
final Option key = new Option("k" , "key", true, "the key the setted algorithm uses to process");
final String[] args = new String[] { "-a", "Caesar", "-k", "A" };
final CommandLine li... | 0 |
public AuthenticationToken login(String principal, Properties properties) throws AccumuloSecurityException {
throw new AccumuloSecurityException(principal, SecurityErrorCode.INSUFFICIENT_PROPERTIES); | 0 |
AbstractUpgradeCatalog.class.getDeclaredMethod("updateKerberosDescriptorArtifacts"); | 0 |
import org.apache.accumulo.core.Constants;
return Long.toString(v).getBytes(Constants.UTF8);
return Long.parseLong(new String(b, Constants.UTF8)); | 0 |
@Override
public Collection<Host> getHosts() {
//todo: really, this class doesn't have a getName() method???
String clusterName = clusterEntity.getClusterName();
Map<String, Host> hosts;
try {
//todo: why the hell does this method throw AmbariException???
//todo: this is ridiculous tha... | 0 |
// TODO(wickman) Is an IllegalStateException the right thing to do here? | 0 |
@FunctionalInterface
Collection<Supplier<Iterable<KeyPair>>> suppliers = new ArrayList<>(providers.size()); | 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.accumulo.core.tabletserver.thrift.LogCopyInfo;
public synchronized LogCopyInfo startCopy(String name, String fullyQualifiedFileName) throws ThriftSecurityException, TException { | 0 |
import java.util.Properties;
import org.apache.accumulo.core.conf.ClientProperty;
Properties properties = options.getClientProperties();
if (ClientProperty.SASL_ENABLED.getBoolean(properties)) {
logError(e.getMessage());
exitCode = 1;
return false;
try {
setInstance(options);
} c... | 0 |
* This filter follows the specification of the feSpecularLighting filter in
Filter getSource();
void setSource(Filter src);
Light getLight();
void setLight(Light light);
double getSurfaceScale();
void setSurfaceScale(double surfaceScale);
double getKs();
void setKs(double ks);
doubl... | 0 |
MimeFileObject foParent = (MimeFileObject) FileObjectUtils.getAbstractFileObject(getParent());
part = foParent.findPart(getName().getBaseName());
return;
private Part findPart(String partName) throws Exception
{
if (getType() == FileType.IMAGINARY)
{
// not existent
return null;
}
if (part.... | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
protected static final Logger LOG = LoggerFactory.getLogger(ZkDatabaseCorruptionTest.class);
} | 0 |
SplittableParDo.forJavaParDo(appliedTransform.getTransform())); | 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 java.nio.file.FileSystem;
import java.nio.file.Paths;
import org.apache.sshd.common.file.FileSystemFactory;
import org.apache.sshd.common.session.Session;
@Test // see extra fix for SSHD-538
public void testNavigateBeyondRootFolder() throws Exception {
Path rootLocation = Paths.get(OsUtils.isUN... | 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 |
import com.thinkaurelius.titan.core.TitanIndexQuery;
import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.metadata.MetadataException;
import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
import java.util.Arrays;
/... | 0 |
private final FileSystemProviderContext context;
this.context = context;
final FileObject entry = context.resolveFile( url.toExternalForm() );
catch ( FileSystemException fse )
FileObject old = context.resolveFile( u.toExternalForm() );
if ( start > 0 && spec.char... | 0 |
@Override | 0 |
public PreparedStatement getSequenceNoFromAmbariSequence(Connection connection,int id) throws SQLException {
PreparedStatement prSt = connection.prepareStatement(getSqlSequenceNoFromAmbariSequence(id));
return prSt;
}
public PreparedStatement updateSequenceNoInAmbariSequence(Connection connection, int se... | 0 |
import org.apache.aurora.scheduler.cron.CronJobManager;
bindMock(CronJobManager.class); | 0 |
package org.apache.beam.sdk.runners.inprocess;
import org.apache.beam.sdk.runners.inprocess.InProcessPipelineRunner.CommittedBundle;
import org.apache.beam.sdk.runners.inprocess.InProcessPipelineRunner.UncommittedBundle;
import org.apache.beam.sdk.util.WindowedValue;
import org.apache.beam.sdk.values.PCollection;
| 0 |
assertTrue("Should be a file.", file.isFile());
assertEquals("QUADTEST", file.getName());
assertEquals(5000000000L, file.getSize());
assertEquals("QUA1I1", file.getUser());
assertEquals("18128", file.getGroup()); | 0 |
/**
* Returns the number of registered processes.
*
* @return the number of register process
*/
public int size() {
return processes.size();
}
/**
Process process = (Process) e.nextElement();
try {
process.destroy();
}
catch(Throwable t) {
Sys... | 0 |
* <code>java.lang.System#getenv()</code> and ant is not required. | 0 |
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
@XmlEnum
@XmlEnumValue("none")
@XmlEnumValue("kerberos") | 0 |
result = answer == key; | 0 |
import java.util.List;
import org.apache.hc.core5.http.Header;
@Override
public List<? extends Header> getTrailers() {
return null;
}
| 1 |
suite.addTest(DateTest.suite()); | 0 |
import org.apache.sshd.common.channel.ChannelListener;
import org.apache.sshd.common.util.GenericUtils;
ChannelListener listener = getChannelListenerProxy();
try {
listener.channelOpenSuccess(this);
f.setOpened();
} catch (RuntimeException t) {
Throwable e = G... | 0 |
initPropMap.put("HBASE_MASTER-HTTPS", new String[]{"hbase.master.info.port"});
initPropMap.put("HBASE_REGIONSERVER-HTTPS", new String[]{"hbase.regionserver.info.port"});
initPropMap.put("HBASE_MASTER", new String[]{"hbase.http.policy"});
jmxDesiredProperties.put("HBASE_MASTER", initPropMap);
initPr... | 0 |
import org.apache.accumulo.core.client.AccumuloClient;
AccumuloClient conn) throws TableNotFoundException {
AccumuloClient conn, BatchWriter bw)
throws TableNotFoundException, MutationsRejectedException {
AccumuloClient conn, BatchWriter bw)
throws TableNotFoundException, MutationsRejected... | 0 |
private final WindowFn<T, W> windowFn;
private MergingViaWindowFnRunner(WindowFn<T, W> windowFn) { | 0 |
* Copyright 2016-2017 Seznam.cz, a.s. | 0 |
private final LRUMap<ProblemReport,Long> problemReports = new LRUMap<>(1000); | 0 |
/**
* Checks whether a given string represents a valid IPv4 address.
*
* @param name the name to validate
* @return true if the given name is a valid IPv4 address
*/
/**
* Checks whether a given string represents a valid IPv6 address.
*
* @param inet6Address the name to v... | 0 |
ROW(1), ROW_COLFAM(2), ROW_COLFAM_COLQUAL(3), ROW_COLFAM_COLQUAL_COLVIS(4), ROW_COLFAM_COLQUAL_COLVIS_TIME(5),
//everything with delete flag
ROW_COLFAM_COLQUAL_COLVIS_TIME_DEL(6) | 1 |
import java.io.IOException;
import java.math.BigInteger;
import org.apache.beam.sdk.extensions.sql.impl.BeamRowCountStatistics;
import org.apache.beam.sdk.io.gcp.bigquery.BigQueryHelpers;
import org.apache.beam.sdk.io.gcp.bigquery.BigQueryOptions;
import org.apache.beam.sdk.options.PipelineOptions;
import org.slf4j.Log... | 0 |
import java.util.Collection;
import java.util.Set;
import org.apache.sshd.common.subsystem.sftp.extensions.Supported2Parser.Supported2;
import org.apache.sshd.common.subsystem.sftp.extensions.SupportedParser.Supported;
import org.apache.sshd.common.util.GenericUtils;
SftpConstants.EXT_VENDOR... | 0 |
import org.apache.commons.configuration.io.FileHandler;
FileHandler handler = new FileHandler(conf);
handler.setFileName(testProperties);
handler.load(); | 0 |
import java.util.Date;
import com.twitter.common.quantity.Amount;
import com.twitter.common.quantity.Time;
Date now = new Date();
long elapsedMillis = now.getTime()
- Iterables.getLast(task.getTaskEvents()).getTimestamp();
if (Amount.of(elapsedMillis, Time.MI... | 0 |
public INIBuilderParametersImpl setSeparatorUsedInInput(final String separator) {
public INIBuilderParametersImpl setCommentLeadingCharsUsedInInput(final String separator) { | 0 |
final int port = host.getPort(); | 0 |
import org.apache.http.nio.pool.SocketAddressResolver;
static class BasicAddressResolver implements SocketAddressResolver<HttpHost> {
public SocketAddress resolveLocalAddress(final HttpHost host) {
return null;
}
public SocketAddress resolveRemoteAddress(final HttpHost host) {
... | 0 |
import org.apache.beam.sdk.transforms.windowing.TimestampCombiner;
* <p>This accepts the {@link TimestampCombiner} that dictates how watermark hold timestamps
* added to the returned {@link WatermarkHoldState} are to be combined.
<W extends BoundedWindow> WatermarkHoldState bindWatermark(
StateTag... | 0 |
/**
* Copyright 2016 Seznam a.s.
*
* 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 agreed to... | 0 |
public synchronized HttpParams setParameter(final String name, final Object value) {
return this;
public HttpParams setLongParameter(final String name, long value) {
return this;
public HttpParams setIntParameter(final String name, int value) {
return this;
public HttpParams setD... | 0 |
protected Map<String, String> options;
public Map<String, String> getOptions() {
public void setOptions(Map<String, String> options) { | 0 |
final MavenEntry maven; | 0 |
package org.apache.hc.core5.http.nio;
import org.apache.hc.core5.http.nio.reactor.AbstractIODispatch; | 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 |
/**
*
* @param <K>
* @param <V>
*/
protected abstract static class AbstractRecordReader<K,V> extends RecordReader<K,V> {
protected abstract void setupIterators(TaskAttemptContext context, Scanner scanner, String tableName);
* @param context
public List<InputSplit> getSplits(JobContext context) throws IO... | 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 $Revision$ | 0 |
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
ConfigurationRecommendationCommand command =
new ConfigurationRecommendationCommand(StackAdvisorCommandType.RECOMMEND_CONFIGURATIONS, file,
"1w", ServiceInfo.ServiceAdvisorType.PYTHON, 1, ... | 0 |
* <code>Object[]</code>. Defaults to a | 0 |
Collection<Option> allOptions = new ArrayList<Option>();
Collection<Option> helpOptions = options.helpOptions(); | 0 |
import org.apache.felix.framework.capabilityset.SimpleFilter;
m_filePattern = SimpleFilter.parseSubstring(filePattern);
if (SimpleFilter.compareSubstring(m_filePattern, lastElement)) | 0 |
* @since 3.0 | 0 |
public static void updateHosts(AmbariManagementController controller, Set<HostRequest> requests)
throws AmbariException {
HostResourceProvider provider = getHostProvider(controller);
provider.updateHosts(requests);
}
| 0 |
Set<String> keys = new HashSet<>(); | 0 |
package org.apache.felix.serializer.impl.yaml;
import org.osgi.service.serializer.Serializing;
public class YamlEncodingImpl implements Serializing {
public Serializing pretty() {
public Serializing ignoreNull() { | 0 |
import org.apache.beam.sdk.coders.KvCoder;
import org.apache.beam.sdk.coders.StringUtf8Coder;
import org.apache.beam.sdk.coders.VarIntCoder;
return PCollection.createPrimitiveOutputInternal(
input.getPipeline(),
WindowingStrategy.globalDefault(),
... | 0 |
Node copy = (Node) super.clone();
copy.children = null;
return copy;
Node copy = (Node) copyStack.pop();
result = copy; | 0 |
import java.util.HashMap;
import java.util.Map;
* @version $Revision: 1.4 $ $Date: 2004/05/10 20:09:47 $
public void addMimeType(final String mimeType, final String scheme)
mimeTypeMap.put(mimeType, scheme);
public void addExtension(final String extension, final String scheme)
extensionMap.put... | 0 |
* @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> | 0 |
ArrayList<ByteBuffer> result = new ArrayList<>();
ArrayList<byte[]> result = new ArrayList<>(bytesList.size()); | 0 |
import org.apache.atlas.RequestContext;
RequestContext.clear(); | 1 |
* @version $Id: BasePropertiesConfiguration.java,v 1.18 2004/09/16 21:35:57 epugh Exp $
if (filename==null){
throw new ConfigurationException("File name was not provided.");
} | 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 |
* Gets the criteria builder used to construct the query and predicates.
*
* @return the builder (never {@code null}).
*/
public CriteriaBuilder getCriteriaBuilder() {
return m_builder;
}
/** | 0 |
return offer("slave-id", resources);
}
public static Protos.Offer offer(String agentId, Protos.Resource... resources) {
.setAgentId(Protos.AgentID.newBuilder().setValue(agentId)) | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.