Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
/**
* Returns a new {@link PTransform} with a new relative error {@code epsilon}.
*
* <p>Keep in mind that the lower the {@code epsilon} value, the greater the width.
*
* @param eps the error relative to the total number of distinct elements
*/
/**
* Returns a new {@link PTran... | 0 |
* <p/>
* the address in the {@link org.apache.sshd.agent.SshAgent#SSH_AUTHSOCKET_ENV_NAME} environment
* <p/>
* <p/>
* for inbound connections on, and relay them through the client.
enum Type implements NamedResource {
public static final Set<Type> VALUES =
... | 1 |
import org.apache.sshd.server.config.SshServerConfigFileReader;
String SFTP_VERSION = SshServerConfigFileReader.SFTP_FORCED_VERSION_PROP; | 0 |
void handleError(SVGGraphics2DIOException ex)
void handleError(SVGGraphics2DRuntimeException ex) | 0 |
* Returns true if the given Attr node represents an 'id'
* for this document.
public boolean isID(Attr node) {
if (node.getNamespaceURI() != null) return false;
return SVG_ID_ATTRIBUTE.equals(node.getNodeName()); | 0 |
printRecords(cl, shellState, scanner, formatter, null); | 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
... | 0 |
public static final DefaultHttpResponseParserFactory INSTANCE = new DefaultHttpResponseParserFactory(); | 0 |
import org.apache.commons.bcel6.generic.ConstantPoolGen;
import org.apache.commons.bcel6.generic.InstructionList;
import org.apache.commons.bcel6.generic.MethodGen;
import org.apache.commons.bcel6.generic.PUSH; | 1 |
import org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.collection
.BeamSqlSingleElementExpression;
// collections functions
case "ELEMENT":
return new BeamSqlSingleElementExpression(subExps, node.type.getSqlTypeName());
| 0 |
package org.apache.accumulo.tracer.thrift; | 1 |
import com.fasterxml.jackson.databind.JsonNode;
final ObjectNode jsonResponse = callAPIWithQueryParams(API_V1.LIST_TYPES, null);
return extractStringList(jsonResponse);
return extractStringList(response);
String typeJson = AtlasType.toJson(response.get(DEFINITION));
String en... | 0 |
import java.util.Dictionary;
public Dictionary getProperties() {
return m_registration.getProperties();
} | 0 |
class NestedValueProvider<T, X> implements ValueProvider<T>, Serializable { | 0 |
import org.apache.beam.model.pipeline.v1.RunnerApi;
import org.apache.beam.model.pipeline.v1.RunnerApi.FunctionSpec; | 0 |
expect(metricStore.putMetricsSkipCache(anyObject(TimelineMetrics.class)))
.andReturn(new TimelinePutResponse());
| 0 |
final ConfigurationLogger logger1 =
final ConfigurationLogger logger2 = new ConfigurationLogger(getClass());
final Log log = EasyMock.createMock(Log.class);
final ConfigurationLogger logger = new ConfigurationLogger(log);
final Log log = EasyMock.createMock(Log.class);
fi... | 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 |
/**
* 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... | 1 |
for (BenchmarkWorker worker : workers) {
Stats s = worker.getStats(); | 0 |
* @param cfg
* fully specified scan-time iterator, including all options for the iterator. Any changes to the iterator setting after this call are not propagated
* to the stored iterator.
* Remove an iterator from the list of iterators
*
* @param iteratorName
* nickname ... | 0 |
*
*
*
private String memberId = null;
private String name = null;
private String position = null;
private String country = null;
public TeamMember() {
super();
}
public String getMemberId() {
return memberId;
}
public void setMemberId(String memberID) {
thi... | 0 |
@Override
public Object answer() throws Exception { | 0 |
import org.apache.ambari.server.state.StackId;
StackId stackId = cluster.getCurrentStackVersion();
boolean isServiceWitNoConfigs = ambariMetaInfo.get().isServiceWithNoConfigs(stackId.getStackName(), stackId.getStackVersion(), service.getName());
if (isServiceWitNoConfigs){
LOG.info(String.form... | 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 |
// processBundle() returns all the output like takeOutputElements().
List<String> take = tester.processBundle(1L, 2L, 3L, 4L);
tester.processBundle(1L, 2L, 4L, 8L);
tester.processBundle();
tester.processBundle(0L, 0L); | 0 |
import cz.seznam.euphoria.core.client.operator.state.StateFactory;
static void combine(SortState target, Iterable<SortState> others) {
for (SortState other : others) {
target.data.addAll(other.data.get());
.mergeStatesBy(SortState::combine)
.mergeStatesBy(SortState::combine)
... | 0 |
* Copyright 2001-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 |
package org.apache.bcel.util;
import org.apache.bcel.classfile.ClassParser;
import org.apache.bcel.classfile.JavaClass;
* @see org.apache.bcel.Repository | 1 |
import org.apache.ambari.logsearch.config.api.LogSearchConfig;
import org.apache.ambari.logsearch.config.api.model.outputconfig.OutputSolrProperties;
import org.apache.ambari.logsearch.config.zookeeper.model.outputconfig.impl.OutputSolrPropertiesImpl;
private LogSearchConfig logSearchConfigMock;
@SuppressWarnin... | 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 |
final byte[] buf = new byte[2048];
} catch (final IOException ignore) {
} catch (final IOException ex) {
final RandomAccessFile f1 = new RandomAccessFile(in, "r");
final RandomAccessFile f2 = new RandomAccessFile(out, "rw");
final FileChannel c1 = f1.getChannel();
... | 0 |
package org.apache.accumulo.core.iterators;
import java.util.Iterator;
import java.util.NoSuchElementException;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
/*
* Subclasses should implement a switch on the "type" variable
* in their reduce method.
*/
public abstract clas... | 1 |
* or more contributor license agreements. See the NOTICE file
* regarding copyright ownership. The ASF licenses this file
* with the License. You may obtain a copy of the License at
* KIND, either express or implied. See the License for the | 0 |
public static Status openWithUnknownLength(long timeCreated) {
Builder builder = Status.newBuilder();
builder.setBegin(0);
builder.setEnd(0);
builder.setInfiniteEnd(true);
builder.setClosed(false);
builder.setCreatedTime(timeCreated);
return builder.build(); | 0 |
* @see <a href="https://issues.apache.org/jira/browse/BEANUTILS-422">https://issues.apache.org/jira/browse/BEANUTILS-422</a> | 0 |
* run on the provided window across all panes that were produced by the arrival of early data.
*
* @return a new {@link IterableAssert} like this one but with the assertion only applied to the
* specified window.
*/
IterableAssert<T> inEarlyPanes(BoundedWindow window);
/**
* Creat... | 0 |
final class IOReactorWorker implements Runnable {
private final AbstractSingleCoreIOReactor ioReactor;
private volatile Throwable throwable;
public IOReactorWorker(final AbstractSingleCoreIOReactor ioReactor) {
this.ioReactor = ioReactor;
@Override
public void run() {
try {
... | 0 |
import org.apache.http.impl.nio.DefaultServerIODispatch;
return new DefaultServerIODispatch(serviceHandler, sslcontext, null, params); | 0 |
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Map; | 0 |
* Adaptor class to wrap byte-array backed objects (including java byte array) as RawComparable objects.
private final byte[] buffer;
private final int offset;
private final int len;
/**
* Constructing a ByteArray from a {@link BytesWritable}.
*
* @param other
*/
public Byt... | 0 |
public Collection<Resource> populateResources() throws SystemException, IOException {
TimelineMetrics metricsResponse = getTimelineMetricsFromCache(
TimelineMetrics metricsResponse = getTimelineMetricsFromCache(
for (MetricsRequest metricsRequest : clusterEntry.getValue().values()) {
... | 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 org.apache.beam.sdk.io.FileBasedSink;
import org.apache.beam.sdk.io.WriteFiles;
// TextIO is implemented in terms of the WriteFiles PTransform. When sharding is not specified,
WriteFiles<Object> original = WriteFiles.to(new TestSink());
AppliedPTransform<PCollection<Object>, PDone, WriteFiles<Object>... | 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 |
p.apply("ReadLines", TextIO.read().from(options.getInputFile())) | 0 |
Arrays.asList("._sum", "._max", "._min", "._avg", "._rate"); | 0 |
public class JarProviderTestCase extends AbstractProviderTestConfig implements ProviderTestConfig
static FileObject getTestJar(final FileSystemManager manager, String name) throws Exception
{
final File jarFile = AbstractVfsTestCase.getTestResourceFile(name);
final String uri = "jar:file:" + jar... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestBidiMap.java,v 1.6 2003/10/07 22:20:57 scolebourne Exp $
* @version $Revision: 1.6 $ $Date: 2003/10/07 22:20:57 $
protected boolean isAllowDuplicateValues() { | 0 |
* <code>max(cardinality(<i>e</i>,<i>a</i>),cardinality(<i>e</i>,<i>b</i>)) - min(cardinality(<i>e</i>,<i>a</i>),
* cardinality(<i>e</i>,<i>b</i>))</code>. | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 0 |
* Copyright 2002,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... | 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 |
// print the output record of case 1;
// expect output:
// print the output record of case 2;
// expect output: | 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 void resetErrorCount(final String identifier) {
final int errorCount = oldValue.getErrorCount(); | 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 |
write.getShardTemplate(), DefaultFilenamePolicy.DEFAULT_UNWINDOWED_SHARD_TEMPLATE));
outputPrefix, shardNameTemplate, "", i, numShards, null, null)
| 1 |
public final void consume(final ByteBuffer src) throws IOException {
responseConsumer.consume(src); | 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 |
import java.util.logging.Level;
Level level = SshClient.resolveLoggingVerbosity(args);
SshClient.setupLogging(level);
System.err.println("usage: sftp [-v[v][v]] [-i identity] [-l login] [-P port] [-o option=value] hostname/user@host"); | 0 |
Job job = Job.getInstance();
Job job = Job.getInstance();
Job job = Job.getInstance();
Job job = Job.getInstance();
Job job = Job.getInstance();
Job job = Job.getInstance(getConf(), this.getClass().getSimpleName() + "_" + System.currentTimeMillis());
Job job = Job.getInstance(new Configura... | 0 |
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> | 0 |
table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value" | 0 |
package org.apache.ambari.server.state; | 0 |
import org.apache.beam.model.fnexecution.v1.ProvisionApi;
public ProvisionApi.ProvisionInfo toProvisionInfo() {
return ProvisionApi.ProvisionInfo
.newBuilder()
.setJobId(jobId())
.setJobName(jobName())
.setPipelineOptions(pipelineOptions())
.build();
} | 0 |
public class ClientConfiguration {
private final CompositeConfiguration compositeConfig;
private ClientConfiguration(List<? extends Configuration> configs) {
compositeConfig = new CompositeConfiguration(configs);
// Don't do list interpolation; the items in configs should already have set this
composit... | 0 |
@Override
@Override
@Override | 0 |
if (null != columnInfo.getDefaultValue() && isConstraintSupportedAfterNullability()) {
fieldDefinition.setConstraint("DEFAULT " + escapeParameter(columnInfo.getDefaultValue()));
}
/**
* {@inheritDoc}
*/
@Override
public boolean isConstraintSupportedAfterNullability() {
return true;
}
... | 0 |
import org.apache.accumulo.shell.Shell; | 0 |
import org.apache.beam.sdk.values.BeamRecordType;
private static final BeamRecordType PERSON_RECORD_TYPE = BeamRecordSqlType.builder()
private static final BeamRecordType BID_RECORD_TYPE = BeamRecordSqlType.builder()
private static final BeamRecordType AUCTION_RECORD_TYPE = BeamRecordSqlType.builder()
BeamRec... | 0 |
import org.apache.accumulo.shell.Token; | 0 |
final ByteBuffer src = ByteBuffer.wrap(buf.array(), 0, buf.length()); | 0 |
return type().getCollectionElementType(); | 0 |
private int statuscode = HttpStatus.SC_MOVED_TEMPORARILY;
private String host = null;
this.statuscode = statuscode;
"http://" + this.host + ":" + this.port + "/newlocation/")); | 0 |
import org.apache.ambari.server.state.RepositoryVersionState;
StackId stackId = new StackId("HDP-0.1");
cluster.setDesiredStackVersion(stackId);
cluster.createClusterVersion(stackId.getStackName(), stackId.getStackVersion(), "admin", RepositoryVersionState.CURRENT);
| 0 |
import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.FILES;
import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.LOCATION;
import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.PREV_ROW;
.overRange(nextRange).fetch(FILES, LOCATIO... | 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 |
package org.apache.hc.core5.pool.nio;
import org.apache.hc.core5.pool.PoolEntry;
import org.apache.hc.core5.reactor.SessionRequest; | 1 |
/**
* @author $Id: e13e1ab6e75b979602b6611c48a4ea66a20551b0 $
*/ | 0 |
package org.apache.felix.dm.impl.dependencies;
import org.apache.felix.dm.dependencies.Dependency; | 0 |
* {@link DOMStreamer}) the results of the {@link #toDOM(Node)} that must be | 0 |
* When a property is added to a configuration, it is checked whether it
* or an array. For strings the association {@link ListDelimiterHandler} is
* consulted to find out whether the string can be split into multiple
* @see #setListDelimiterHandler(ListDelimiterHandler) | 0 |
import org.apache.sshd.common.util.logging.AbstractLoggingBean; | 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 |
int cidrPart = rangeCheck(Integer.parseInt(matcher.group(5)), 0, NBITS-1);
int n = (rangeCheck(Integer.parseInt(matcher.group(i)), 0, 255));
for (int i =0; i < octets.length; ++i){
str.append(octets[i]);
if (i != octets.length - 1) {
str.append(".");
}
}
private int rangeCheck(in... | 0 |
LOG.error(error + ", config version not created for {}", serviceName); | 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 |
(String)null, | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestFloatArrayList.java,v 1.3 2002/09/07 20:33:32 rwaldhoff Exp $
* $Revision: 1.3 $
* $Date: 2002/09/07 20:33:32 $
* @version $Revision: 1.3 $ $Date: 2002/09/0... | 0 |
this.serverKeyVerifier = Objects.requireNonNull(serverKeyVerifier, "No server key verifier");
this.hostConfigEntryResolver = Objects.requireNonNull(resolver, "No host configuration entry resolver");
this.filePasswordProvider = Objects.requireNonNull(provider, "No file password provider");
... | 0 |
e.getClass().equals(new NoSuchElementException().getClass())); | 0 |
DataflowExecutionStateRegistry executionStateRegistry) {
/**
* {@link DataflowExecutionStateRegistry} that creates {@link BatchModeExecutionState} instances.
*/
public static class BatchModeExecutionStateRegistry extends DataflowExecutionStateRegistry { | 0 |
package org.apache.http.client.mime.content;
import org.apache.http.client.mime.ContentDescriptor; | 0 |
import java.awt.Graphics2D;
import org.apache.batik.ext.awt.image.SVGComposite;
import org.apache.batik.ext.awt.image.renderable.Filter;
import org.apache.batik.gvt.GraphicsNode; | 0 |
package org.apache.commons.vfs2.operations;
import org.apache.commons.vfs2.FileObject; | 1 |
import static org.mockito.ArgumentMatchers.eq; | 0 |
@Override
public boolean equals(final Object object) {
if (object == this) {
return true;
}
synchronized (lock) {
return getBag().equals(object);
}
}
@Override
public int hashCode() {
synchronized (lock) {
return getBag().h... | 0 |
@Override
//TODO Remove deprecation warning suppression when Hadoop1 support is dropped
@SuppressWarnings("deprecation") | 0 |
public byte[] toByteArray() {
final ByteBuffer dup = this.buf.duplicate();
dup.flip();
final byte[] bytes = new byte[dup.remaining()];
dup.get(bytes);
return bytes;
}
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.