Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.beam.vendor.guava.v20_0.com.google.common.util.concurrent.Uninterruptibles; | 0 |
static final Identity IDENTITY = new Identity().setUser(USER);
.setOwner(IDENTITY)
.setOwner(IDENTITY) | 0 |
package org.apache.bcel.generic;
import org.apache.bcel.Const;
import org.apache.bcel.classfile.ConstantCP;
import org.apache.bcel.classfile.ConstantNameAndType;
import org.apache.bcel.classfile.ConstantPool;
import org.apache.bcel.classfile.ConstantUtf8; | 1 |
if (repositoryJson.get(RepositoryResourceProvider.REPOSITORY_DISTRIBUTION_PROPERTY_ID) != null) {
repositoryEntity.setDistribution(repositoryJson.get(RepositoryResourceProvider.REPOSITORY_DISTRIBUTION_PROPERTY_ID).getAsString());
}
if (repositoryJson.get(RepositoryResourceProvider.REPO... | 1 |
* @version CVS $Id: CommandAction.java,v 1.1 2003/09/04 12:42:42 cziegeler Exp $ | 0 |
import org.apache.beam.sdk.transforms.OldDoFn;
OldDoFn<InputT, OutputT> fn, | 0 |
* @author Andreas Schlosser
// invariant: buffer.length > size()
// ie.buffer always has at least one empty entry
buffer = new Object[size + 1];
// copy contents to a new buffer array
// move head to element zero in the new array
i = increment(i);
tail ... | 0 |
log.debug("completing bulk import transaction " + tid);
ZooArbitrator.cleanup(Constants.BULK_ARBITRATOR_TYPE, tid); | 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 |
import java.util.Map;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.cocoon.environment.SourceResolver;
protected long secs;
/**
* @see org.apache.cocoon.generation.FileGenerator#setup(org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.ava... | 0 |
import java.sql.SQLXML;
} else if (propType.equals(SQLXML.class)) {
return rs.getSQLXML(index);
| 0 |
import org.apache.accumulo.miniclusterImpl.MiniAccumuloConfigImpl; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestBinaryHeap.java,v 1.9 2003/08/31 17:28:43 scolebourne Exp $
* $Revision: 1.9 $
* $Date: 2003/08/31 17:28:43 $
* any, must include the following acknowledgement:
* Alt... | 0 |
updateDfsClusterAdmintistratorsProperty();
protected void updateDfsClusterAdmintistratorsProperty() throws AmbariException {
/*
* Remove trailing and leading whitespaces from hdfs-site/dfs.cluster.administrators
* property.
*/
AmbariManagementController ambariManagementController = injec... | 0 |
@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"}) public class RemoteReplicationException extends TException implements org.apache.thrift.TBase<RemoteReplicationException, RemoteReplicationException._Fields>, java.io.Serializable, Cloneable, Comparable<RemoteReplicationException> {
public enum _Fields ... | 0 |
/** Unit tests for {@link DisplayDataEvaluator}. */
new PTransform<PCollection<String>, POutput>() {
return input.apply(
ParDo.of(
new DoFn<String, String>() {
@ProcessElement
public void processElement(ProcessContext c)... | 1 |
* @version $Revision$ $Date$ | 0 |
try (Scanner scanner = c.createScanner(tableName, new Authorizations())) {
scanner.setBatchSize(1000);
Iterator<Entry<Key,Value>> iter = scanner.iterator();
verify(iter, 0, 200);
// sleep three times the session timeout
sleepUninterruptibly(9, TimeUnit.SECONDS);
verify(iter, 200,... | 0 |
* Copyright 2001-2005 The Apache Software Foundation | 0 |
import org.apache.accumulo.proxy.thrift.UserPass;
protected static ByteBuffer userpass;
userpass = tpc.proxy().login(new UserPass("root", ByteBuffer.wrap("".getBytes()))); | 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... | 0 |
return new ArrayList<>();
return new CircularFifoQueue<>(100);
final List<E> list = new ArrayList<>();
final Queue<E> queue = new CircularFifoQueue<>(list);
final CircularFifoQueue<E> fifo = new CircularFifoQueue<>(5);
final CircularFifoQueue<E> fifo = new CircularFifoQue... | 1 |
* direction="<i>load|save</i>" lenient="<i>true/false</i>"/> | 0 |
// Distinct operator with unbounded dataset without windowing do not work, | 0 |
Element imageElement = domFactory.createElement(SVGSyntax.SVG_IMAGE_TAG); | 0 |
package org.apache.ambari.logsearch.config.json.model.inputconfig.impl; | 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
... | 1 |
import org.apache.http.impl.params.DefaultHttpParams; | 0 |
/*
* $Id$
* 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... | 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 |
if (rs != null){
}
if (ps != null) {
ps.close();
}
if (rs != null) {
}
if (ps != null) {
ps.close();
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/FormSet.java,v 1.16 2004/04/04 13:53:25 rleland Exp $
* $Revision: 1.16 $
* $Date: 2004/04/04 13:53:25 $
f.process(globalConstants, constants, forms); | 0 |
package org.apache.xml.security.test.dom.interop;
import org.apache.xml.security.test.dom.utils.resolver.OfflineResolver; | 0 |
referenceable.set(AtlasClient.NAME, name);
referenceable.set(AtlasClient.REFERENCEABLE_ATTRIBUTE_NAME, name); | 0 |
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
@SuppressWarnings("unchecked")
public static <T> T runInUISync(final Callable<T> callable) throws Exception
{
final Object[] result = new Object[1];
final Exception[] exception = new Exception[1];
runInUISync(n... | 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 |
* 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 |
return Collections.singleton(new IntWindow(input.getElement() / 4)); | 0 |
@Test(timeout = 5 * 60 * 1000) | 0 |
*
*
* This class sets up all necessary environment information to implement own test cases.
private MockWebApplicationContext staticWebApplicationContext;
// setting up an webapplicationcontext is neccesarry to make spring believe
// it runs in a servlet container. we initialize it with our curre... | 0 |
import org.apache.beam.sdk.coders.RowCoder;
import org.apache.beam.sdk.values.Row;
import org.apache.beam.sdk.values.RowType;
RowType beamRowType = CalciteUtils.toBeamRowType(relDataType);
Row row =
Row
.withRowType(beamRowType)
RowCoder coder = beamRowType.getRowCoder(); | 0 |
final Map<String, String> rspMap = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER) {
for (Map.Entry<String, String> re : rspMap.entrySet()) {
final String hostClienUser = getClass().getSimpleName();
final String hostClientName = SshdSocketAddress.toAddressString(SshdSo... | 0 |
import org.apache.accumulo.core.util.ratelimit.RateLimiter;
RateLimiter readLimiter, AccumuloConfiguration tableConf) throws IOException;
RateLimiter readLimiter, AccumuloConfiguration tableConf, BlockCache dataCache, BlockCache indexCache) throws IOException;
public abstract FileSKVIterator openReader(St... | 1 |
AppliedPTransform<?, ?, ?> application, CommittedBundle<?> inputBundle) | 0 |
import java.util.concurrent.Executors;
protected void checkConfig() {
if (getKeyExchangeFactories() == null) {
throw new IllegalArgumentException("KeyExchangeFactories not set");
}
if (getScheduledExecutorService() == null) {
setScheduledExecutorService(Executors.newS... | 0 |
import org.apache.xml.security.utils.UnsyncByteArrayInputStream;
import org.apache.xml.security.utils.UnsyncByteArrayOutputStream;
private UnsyncByteArrayOutputStream baos;
baos = new UnsyncByteArrayOutputStream();
getTransf... | 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 |
Set<String> temp = new HashSet<>(); | 0 |
* FTPFileList list = f.createFileList(directory, parser);
* @version $Id: FTPFileEntryParser.java,v 1.13 2004/01/10 15:36:40 scohen Exp $
* This method is a hook for those implementers (such as
* VMSVersioningFTPEntryParser, and possibly others) which return
* multiple files with the same name... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/test/org/apache/commons/dbcp/TesterConnection.java,v 1.6 2003/08/13 15:47:17 dirkv Exp $
* $Revision: 1.6 $
* $Date: 2003/08/13 15:47:17 $
* @version $Id: TesterConnection.java,v 1.6 2003/08/13 15:47:17 dirkv Exp $
... | 0 |
* A specialized {@code ValueTransformer} implementation which does no
* transformation. The {@code transformValue()} method just returns the
* passed in object without changes. This instance can be used by
* configurations which do not require additional encoding.
*/
ValueTransformer NOOP_T... | 0 |
/**
* Name used for default config group.
*/
public static final String DEFAULT_CONFIG_GROUP_NAME = "default";
/**
* Name used for config groups that were deleted in the service config version response.
*/
public static final String DELETED_CONFIG_GROUP_NAME = "deleted";
| 0 |
import org.apache.accumulo.core.volume.VolumeConfiguration;
FileSystem fs = TraceFileSystem.wrap(VolumeConfiguration.getDefaultVolume(conf, aconf).getFileSystem()); | 1 |
* @return A map of Aggregator Table Properties.
* @see TableOperations#attachIterator(String, IteratorSetting) | 0 |
Map<String, TemporalInfo> temporalInfoMap = new HashMap<>();
Map<String, TemporalInfo> temporalInfoMap = new HashMap<>(); | 1 |
public class PreProcessFilter extends AbstractXMLPipe {
extends TransformerChainBuilderFilter { | 0 |
import net.jcip.annotations.NotThreadSafe;
@NotThreadSafe | 0 |
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.aggregation.Aggregator;
@SuppressWarnings("deprecation") | 0 |
* @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a> | 0 |
super(enumDef);
public AtlasEnumDef getEnumDef() { return enumDef; }
| 0 |
public PBegin getInput(Map<TupleTag<?>, PValue> inputs, Pipeline p) {
Map<TupleTag<?>, PValue> outputs, PCollection<Long> newOutput) {
Map.Entry<TupleTag<?>, PValue> original = Iterables.getOnlyElement(outputs.entrySet());
Map.Entry<TupleTag<?>, PValue> replacement =
Iterables.getOnlyE... | 0 |
final List<String> variantHeaderNames = new ArrayList<>(); | 0 |
@Override
@Override
final Dictionary<String, Object> properties = new Hashtable<String, Object>(); | 0 |
return item -> values.add(item);
return () -> onCompletedWasCalled.set(true); | 0 |
sock.setSoLinger(true, linger); | 0 |
import java.util.Optional;
doExplicitReconcile(batchSize.orElse(settings.explicitBatchSize)); | 0 |
* Copyright 2005-2010 The Apache Software Foundation.
((DOMStructure) signatureMethod).marshal(siElem, dsPrefix, context); | 0 |
import org.apache.sshd.server.shell.ShellFactory;
public class AsyncEchoShellFactory implements ShellFactory { | 0 |
import org.apache.ambari.server.ParentObjectNotFoundException;
Map<String, ServiceInfo> services = getManagementController().getAmbariMetaInfo().getServices(stackName, sourceStackVersion);
} catch (ParentObjectNotFoundException parentNotFoundException) {
LOG.error("Invalid stack version: " + stack... | 0 |
.addInt32Field("ageYears")
.addStringField("name") | 0 |
import org.apache.accumulo.core.conf.ClientProperty;
cfg.setClientProperty(ClientProperty.INSTANCE_ZOOKEEPERS_TIMEOUT, "15s"); | 0 |
private static final long UNINITIALIZED_OFFSET = -1;
private long nextOffset;
PartitionState(TopicPartition partition, long nextOffset) {
this.nextOffset = nextOffset;
this.latestOffset = UNINITIALIZED_OFFSET;
nextOffset = offset + 1;
if (latestOffset < 0 || nextOffset <... | 0 |
return new HDFSFileSource<>(filepattern, formatClass, keyClass, valueClass);
private final Class<? extends FileInputFormat<?, ?>> formatClass; | 0 |
Path inputFile = rootFolder.resolve(getCurrentTestName() + ".bin");
try (InputStream in = Files.newInputStream(inputFile)) {
try (LimitInputStream limited = new LimitInputStream(in, expected.length)) {
} catch (IOException e) {
} catch (IOException e) {
... | 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/ListShortList.java,v 1.3 2003/11/07 20:08:15 rwaldhoff Exp $
*
* @deprecated This code has been moved to Jakarta Commons Primitives (http://jakarta.apa... | 0 |
public HttpSession getSession() {
return this.getSession(true);
}
@Override
final HttpSession session = super.getSession(create);
return new HttpSessionWrapper(this.contextId, session, this.servletContext); | 0 |
* A seekable table converts a JOIN operator to an inline lookup. It's triggered by {@code SELECT *
* FROM FACT_TABLE JOIN LOOKUP_TABLE ON ...}.
public interface BeamSqlSeekableTable extends Serializable {
/** prepare the instance. */
default void setUp() {};
/** return a list of {@code Row} with given key set. ... | 0 |
private final List<BoundedDataSource<T>> splits;
InputSplitAssigner> splitAssignerFactory,
int parallel) {
long sizeEstimate = dataSource.sizeEstimate();
splits = dataSource.split(sizeEstimate / parallel);
if (minNumSplits > splits.size()) {
throw new IllegalArgumentException(
... | 0 |
*
* @param out the output stream
* @throws IOException if an error occurs while writing to the stream
*
* @param in the input stream
* @throws IOException if an error occurs while reading from the stream
* @throws ClassNotFoundException if an object read from the stream can not be lo... | 0 |
this.row = new ArrayList<>(size);
return new TableRowComparator<>(index, comp); | 1 |
* @version $Revision$ | 0 |
import com.twitter.nexus.gen.CronCollisionPolicy;
private CronJobManager cron;
cron = new CronJobManager();
scheduler = new SchedulerCoreImpl(cron, new ImmediateJobManager(),
cron.schedulerCore = scheduler;
public void testCronNoSuicide() throws Exception {
JobConfiguration job = makeJob(JOB_OWNER_A... | 0 |
package org.apache.felix.ipojo.test.scenarios.service.dependency;
import org.apache.felix.ipojo.test.scenarios.service.dependency.service.CheckService;
| 0 |
/** Factory methods for creating the {@link StateNamespace StateNamespaces}. */
public static <W extends BoundedWindow> StateNamespace windowAndTrigger(
Coder<W> windowCoder, W window, int triggerIdx) {
/** {@link StateNamespace} that is global to the current key being processed. */
/** {@link StateNamespac... | 1 |
import java.util.Collections;
import org.apache.ambari.server.api.resources.ResourceInstance;
import org.apache.ambari.server.controller.spi.Resource; | 0 |
LOG.debug("Stack id: {} exists in map. Appended new upgrade type {}{}", up.getType(), repositoryVersionEntity.getId()); | 1 |
* Copyright 2000-2009 The Apache Software Foundation | 0 |
import org.apache.batik.util.DoublyIndexedTable; | 0 |
package org.apache.beam.sdk.transforms.windowing; | 0 |
package aQute.bnd.service;
import java.util.*;
import aQute.libg.reporter.*;
/**
* An optional interface for plugins. If a plugin implements this interface then
* it can receive the reminaing attributes and directives given in its clause as
* well as the reporter to use.
*
*/
public interface Plugin {
/**
... | 0 |
if (__writer == null) {
throw new IllegalStateException("Socket is not connected");
}
String message = __commandBuffer.toString();
__writer.write(message); | 0 |
// !!! FUTURE: check for component
@Override | 0 |
* In order to work properly the methods provided by this interface require some
*
Object references = referenceObject;
entry = (Map.Entry)iterator.next();
| 0 |
* A context for executing a request.
* The context is used to tie together the request, the response,
* and optional application data. It is also used for internal data.
* Attribute names starting with the prefix "http." are
* {@link #RESERVED_PREFIX reserved} for internal data.
*
/** The prefix reserved for ... | 0 |
protected abstract void doWork(Map<String, Object> properties)
throws AmbariException;
protected abstract void finalizeExecution(Map<String, Object> properties)
throws AmbariException;
Map<String, Object> properties = context.getMergedJobDataMap()
.getWrappedMap();
doWork(properties);
... | 0 |
Object o = org.apache.felix.gogo.runtime.Expander.expand(
.expander(new Expander(newSession)) | 0 |
assertEquals("http://commons.apache.org/digester/Foo", nsmap.get("foo"));
assertEquals("http://commons.apache.org/digester/Bar", nsmap.get("bar"));
assertEquals("http://commons.apache.org/digester/Foo1", nsmap.get("foo"));
assertEquals("http://commons.apache.org/digester/Bar1", nsmap.get... | 0 |
log.error("Unable to make parent directories of {}", path, ex); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.