Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.beam.sdk.extensions.gcp.auth.TestCredential;
import org.apache.beam.sdk.extensions.gcp.options.GcpOptions; | 0 |
/** Tests that PipelineOptions are present after serialization. */
TypeInformation<WindowedValue<Object>> typeInformation =
TypeInformation.of(new TypeHint<WindowedValue<Object>>() {});
new OneInputStreamOperatorTestHarness<>(
deserialized, typeInformation.createSerializer(new Executi... | 1 |
// grab all check subclasses using the exact folder they are in to avoid loading the SampleServiceCheck from the test jar
Set<BeanDefinition> beanDefinitions = scanner.findCandidateComponents("org.apache.ambari.server.checks");
| 0 |
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MyEmptyBean that = (MyEmptyBean) o;
if (myInt != that.myInt) {
return false;
}
return myString != ... | 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... | 0 |
import org.apache.commons.vfs.*;
// VFS-210: do not try to get listing for anything else than directories
if (!file.isDirectory())
{
return null;
}
try
{
return new SmbFileInputStream(file);
}
catch (SmbException e)
{
... | 0 |
import com.google.cloud.dataflow.sdk.transforms.Combine.KeyedCombineFn;
return new InMemoryCombiningValue<InputT, AccumT, OutputT>(combineFn.<K>asKeyedFn());
@Override
public <InputT, AccumT, OutputT> CombiningValueStateInternal<InputT, AccumT, OutputT>
bindKeyedCombiningValue(
... | 0 |
import java.util.List;
List<String> subtransforms = transform.getSubtransformsList();
if (subtransforms.isEmpty()) {
ids.add(transformEntry.getKey());
} else {
ids.addAll(subtransforms);
} | 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 |
* can be changed at runtime using {@link LayoutInstance}.
/** This is the name of the temporary attribute in the layout instance holding the current layout id. */
public static final String ATTRIBUTE_LAYOUT_ID = "link-layout-id";
protected String linkedProfileName;
* @param name The name of the profi... | 0 |
import org.apache.hc.core5.http.io.support.ClassicRequestBuilder;
final ClassicHttpRequest login = ClassicRequestBuilder.post() | 0 |
return Utils.getNamespaceId(env.getInstance(), tableId, TableOperation.COMPACT,
this.namespaceId);
public CompactionDriver(long compactId, String namespaceId, String tableId, byte[] startRow,
byte[] endRow) {
String zCancelID = Constants.ZROOT + "/" + master.getInstance().getInstanceID()
... | 0 |
TimelineMetricAggregatorFactory.createTimelineMetricAggregatorMinute(hdb, new Configuration(), null);
TimelineMetricAggregatorFactory.createTimelineMetricAggregatorHourly(hdb, new Configuration(), null);
hdb, new Configuration(), new TimelineMetricMetadataManager(hdb, new Configuration()), null);
... | 0 |
import java.util.Objects;
this.buffer = Objects.requireNonNull(buffer, "No buffer provided"); | 0 |
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceSelector;
* @version CVS $Id: DatabaseAddAction.java,v 1.3 2003/10/25 18:06:19 joerg Exp $
throws SQLException, ConfigurationException, ComponentException, ServiceException {
throws Configurat... | 0 |
import org.apache.batik.anim.values.AnimatableLengthValue;
import org.apache.batik.anim.values.AnimatableValue;
import org.apache.batik.dom.anim.AnimationTarget;
* Updates the animated value with the gien {@link AnimatableValue}.
protected void updateAnimatedValue(AnimatableValue val) {
if (val == null... | 0 |
throw new IOException(e.getMessage()); | 0 |
private final SamzaPipelineLifeCycleListener listener;
StreamApplication app,
ApplicationRunner runner,
SamzaExecutionContext executionContext,
SamzaPipelineLifeCycleListener listener) {
this.listener = listener;
if (listener != null && (stateInfo.state == State.DONE || stateInfo.stat... | 0 |
import com.google.auth.Credentials;
import com.google.auth.http.HttpCredentialsAdapter;
Credentials credential, HttpRequestInitializer httpRequestInitializer) {
return new ChainingHttpRequestInitializer(
new HttpCredentialsAdapter(credential),
httpRequestInitializer); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/PredicatedBuffer.java,v 1.4 2003/11/16 00:39:37 scolebourne Exp $
* @version $Revision: 1.4 $ $Date: 2003/11/16 00:39:37 $
* @deprecated TO BE REMOVED BEFORE v3.... | 0 |
@Override
@Override | 0 |
import java.io.IOException;
// delete json renames and mapping files
Path renamingFile = new Path(bulkDir, Constants.BULK_RENAME_FILE);
Path mappingFile = new Path(bulkDir, Constants.BULK_LOAD_MAPPING);
try {
master.getFileSystem().delete(renamingFile);
master.getFileSystem().delete(mapping... | 0 |
import org.apache.beam.model.pipeline.v1.RunnerApi; | 0 |
// pre-init the url sub-system as otherwise we don't work on gnu/classpath
ExtensionManager extensionManager = new ExtensionManager();
try
{
(new URL("http://felix.extensions:9/")).openConnection();
}
catch (Throwable t)
{
// This doesn't ... | 0 |
/*
* Copyright 2015 Data Artisans GmbH
*
* 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 | 0 |
// <!> FIX ME CHANGE: DO INTEGER APPROX. | 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 |
* <li>If one of its arguments is a subtype of {@link RestrictionTracker}, then it is a <a
* whose type is a subtype of {@link RestrictionTracker}. This is an advanced feature and an
* overwhelming majority of users will never need to write a splittable {@link DoFn}.
* <li>It <i>may</i> define a {@link N... | 0 |
if (response.getReceivedMessages() == null || response.getReceivedMessages().isEmpty()) { | 0 |
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override | 0 |
import org.apache.accumulo.core.client.Accumulo;
try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) { | 0 |
return host;
return null; | 0 |
import org.apache.beam.vendor.grpc.v1p21p0.com.google.protobuf.ByteString;
import org.apache.beam.vendor.grpc.v1p21p0.io.grpc.stub.StreamObserver;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Charsets;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions;
import org... | 0 |
import java.util.ServiceLoader;
import org.apache.beam.sdk.options.PipelineOptionsRegistrar;
import org.apache.beam.sdk.runners.PipelineRunnerRegistrar; | 0 |
import org.apache.beam.sdk.fn.IdGenerator;
@Mock private IdGenerator bundleIdSupplier;
when(bundleIdSupplier.getId()).thenReturn(BUNDLE_ID);
verify(bundleIdSupplier, times(1)).getId();
when(bundleIdSupplier.getId()).thenReturn(BUNDLE_ID_2);
when(bundleIdSupplier.getId()).thenReturn(BUNDLE_ID);
ver... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/LongIteratorIterator.java,v 1.2 2003/08/31 17:21:17 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this ackno... | 0 |
* @since 1.8.0
* @since 1.8.0
* @since 1.8.0
* @since 1.8.0 | 0 |
package org.apache.hc.client5.http.impl.classic; | 0 |
* $Header: /cvshome/build/org.osgi.util.tracker/src/org/osgi/util/tracker/ServiceTracker.java,v 1.29 2007/02/19 19:04:33 hargrave Exp $
* Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
* <p>
* The <code>ServiceTracker</code> class is thread-safe. It does not call a
* <code>ServiceTrackerCustomizer<... | 0 |
import org.apache.sshd.util.test.NoIoTestCase;
import org.junit.experimental.categories.Category;
@Category({ NoIoTestCase.class }) | 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 serviceType = service.getServiceType();
int start = serviceType.lastIndexOf(':');
String version = serviceType.substring(start+1);
return version; | 0 |
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly; | 0 |
import org.apache.batik.dom.AbstractNode;
String baseURI = AbstractNode.getBaseURI(ref); | 1 |
* @see org.apache.commons.codec.Encoder#encode(Object)
* @see org.apache.commons.codec.Decoder#decode(Object) | 0 |
import java.util.Vector;
@SuppressWarnings("unchecked")
List<XMLStructure> li = pds[i].getExternalElements();
for (int j = 0; j < types.length; j++) {
// use raw List type to test for invalid entries
List invalidData = new Vector();
addEntryToR... | 0 |
import java.util.concurrent.TimeUnit;
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
sleepUninterruptibly(sleepTime, TimeUnit.MILLISECONDS);
sleepUninterruptibly(seekSleepTime, TimeUnit.MILLISECONDS); | 1 |
} catch (IllegalArgumentException ex) {
throw new MalformedPathException(ex.getMessage()); | 0 |
Thread thread = new Daemon(new LoggingRunnable(log, new TransactionRunner()), "Repo runner " + i);
store.setProperty(tid, DEBUG_PROP, repo.getDescription()); | 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 |
import org.apache.commons.vfs.FileObject;
import org.apache.commons.vfs.provider.AbstractFileSystemProvider;
import java.net.URL;
import java.net.MalformedURLException;
* @version $Revision: 1.9 $ $Date: 2002/11/25 05:38:45 $
extends AbstractFileSystemProvider
* Locates a file object, by absolute URI.
pub... | 0 |
import org.apache.aurora.scheduler.filter.SchedulingFilter.ResourceRequest;
import org.apache.aurora.scheduler.filter.SchedulingFilter.UnusedResource;
private static final UnusedResource RESOURCE = new UnusedResource(
ResourceSlot.from(TASK),
IHostAttributes.build(new HostAttributes().setHost("host").setM... | 0 |
package org.apache.beam.runners.apex.translation; | 0 |
assertArrayEquals(AuthenticationTokenSerializer.serialize(new PasswordToken("testing")),
tCreds.getToken());
assertTrue(AccumuloSecurityException.class.cast(e.getCause()).getSecurityErrorCode()
.equals(SecurityErrorCode.TOKEN_EXPIRED));
public void testMockConnector()
throws Accumulo... | 0 |
import org.apache.hc.core5.concurrent.Cancellable;
public interface SessionRequest extends Cancellable { | 0 |
class LocalTestNode<K extends Comparable<K>, V extends Comparable<V>> implements Comparable<LocalTestNode<K, V>> {
private K key;
private V value;
static LocalTestNode<Integer, String> createLocalTestNode(final int key) {
return new LocalTestNode<Integer, String>(key, String.valueOf(key));
}
... | 0 |
package org.apache.cocoon.portal.services; | 0 |
import org.apache.ambari.server.actionmanager.HostRoleStatus;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persiste... | 1 |
} catch (ThreadDeath td) {
throw td; | 0 |
return graphService.getBlueprintsGraph(); | 0 |
* can be realistically and quickly gathered. Tokens can have multiple commands grouped
| 0 |
implements RequestProcessorAspect, ResponseProcessorAspect, CopletDecorationProvider, Receiver { | 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 |
// Set of all mandatory bundle revisions.
private final Set<BundleRevision> m_mandatoryRevisions;
Set<BundleRevision> mandatoryRevisions, Set<BundleRevision> involvedRevisions,
m_mandatoryRevisions = mandatoryRevisions;
m_mandatoryRevisions = new HashSet<BundleRevision>();
if... | 0 |
.put(boolean.class, TypeName.BOOLEAN)
.put(byte.class, TypeName.BYTE)
.put(char.class, TypeName.BYTE)
.put(short.class, TypeName.INT16)
.put(int.class, TypeName.INT32)
.put(long.class, TypeName.INT64)
.put(float.class, TypeName.FLOAT)
.put(... | 0 |
PartialNiceMockBinder.newBuilder().addConfigsBindings().addFactoriesInstallBinding().addPasswordEncryptorBindings()
.build().configure(binder()); | 0 |
private static final Coder<String> ELEMENT_CODER = StringUtf8Coder.of();
private static final String ELEMENT_CODER_SPEC_ID = "string-coder-id";
WindowedValue.getFullCoder(ELEMENT_CODER, GlobalWindow.Coder.INSTANCE);
private static final String CODER_SPEC_ID = "windowed-string-coder-id";
private static fin... | 0 |
import org.apache.ambari.server.stack.upgrade.Direction;
import org.apache.ambari.server.stack.upgrade.UpgradeType; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/iterators/FilterIterator.java,v 1.4 2003/08/31 17:25:49 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear ... | 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 |
Felix.m_secureAction.createURL(null, "location:", new FakeURLStreamHandler()),
),
(Certificate[]) null),
m_revision = new WeakReference(bundle.adapt(BundleRevision.class));
BundleRevision getRevision()
return (felix != null) ?
return (f... | 0 |
@Test(timeout = 6 * 1000)
UtilWaitThread.sleep(500); // let zookeeper updates propagate. | 0 |
import com.google.common.collect.Lists;
import java.util.Iterator;
import java.util.List;
import org.apache.beam.runners.core.DoFnRunner;
import org.apache.beam.runners.core.DoFnRunners; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/bag/TestPredicatedSortedBag.java,v 1.5 2003/12/24 22:38:32 scolebourne Exp $
* @version $Revision: 1.5 $ $Date: 2003/12/24 22:38:32 $
return decorateBag(new TreeBag(), tru... | 0 |
return newString(bytes, Charsets.ISO_8859_1);
return newString(bytes, Charsets.US_ASCII);
return newString(bytes, Charsets.UTF_16);
return newString(bytes, Charsets.UTF_16BE);
return newString(bytes, Charsets.UTF_16LE); | 0 |
@SerializedName("Configuration") | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
import java.util.HashSet;
import org.apache.accumulo.core.replication.StatusUtil;
import org.apache.accumulo.server.security.SystemCredentials;
import org.apache.accumulo.server.util.ReplicationTableUtil;
// Need to release
if (!(commitSession.getExtent().isMeta() || commitSession.getExtent... | 0 |
import javax.json.JsonObject;
final JsonObject config = JSONUtil.parseJSON("a", JSONUtilTest.readJSON("json/simple-types.json"));
final JsonObject properties = (JsonObject)config.get("config");
assertTrue(JSONUtil.getValue(properties, "string") instanceof String);
assertTrue(JSONUtil.ge... | 0 |
public String getContentType() {
public String getContentEncoding() { | 0 |
/** Tests for {@link CommittedResult}. */
bundleFactory
.createBundle(created) | 1 |
public RequestStatus deleteResources(Request request, Predicate predicate) | 0 |
* Note: the {@link #isValid(String)} and {@link #validate(String)} methods strip off any leading | 0 |
/** Triple of any types. */
public static <F, S, T> Triple<F, S, T> of(F first, S second, T third) {
return Objects.equals(first, triple.first)
&& Objects.equals(second, triple.second)
&& Objects.equals(third, triple.third);
return "Triple{" + "first=" + first + ", second=" + second + ",... | 0 |
*/
public void notify( MethodGen method );
} | 0 |
import java.nio.ByteBuffer;
import java.util.BitSet;
import java.util.Collections;
import java.util.EnumMap;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import org.apache.thrift.protocol.TTupleProtocol;
/**
* @deprecated since 1.5, use {@link#UserPassToken} instead
*/
@SuppressWarnings(... | 0 |
if (getType() != data[1]) {
}
if (length < 5) {
} | 1 |
import java.util.Map.Entry;
Properties nodeProps = getProps(nextNodeId);
nextNode.visit(state, nodeProps);
log.debug("Properties for node: " + nextNodeId);
for (Entry<Object,Object> entry : nodeProps.entrySet()) {
log.debug(" " + entry.getKey() + ": " + entry.getValue());
... | 0 |
* @version $Revision: 1.44 $ $Date: 2004/12/24 11:03:45 $ | 0 |
import org.apache.accumulo.server.ServerContext;
static void checkTableDoesNotExist(ServerContext context, String tableName, Table.ID tableId,
static <T extends AbstractId> T getNextId(String name, ServerContext context,
IZooReaderWriter zoo = context.getZooReaderWriter();
IZooReaderWriter zk = env.ge... | 0 |
import org.apache.commons.lang.StringUtils;
mapIds.put(Resource.Type.User, StringUtils.lowerCase(userName)); | 0 |
private Scope scope = null;
*
* @param definitionName
* the definition name.
public void setName(String definitionName) {
name = definitionName;
public Scope getScope() {
public void setScope(Scope definitionScope) {
scope = definitionScope;
}
public void setInterval(int d... | 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 |
public <R, P> R accept( NodeVisitor<? extends R, ? super P> visitor, P data )
throws OgnlException | 0 |
import org.apache.mesos.v1.Protos; | 0 |
import org.easymock.EasyMock; | 0 |
NioSocketAcceptor acceptor = session.getServerFactoryManager().getX11ForwardingAcceptorFactory().createNioSocketAcceptor(session);
if ( channel != null ){
channel.close(false);
} | 0 |
* GlyphVector. This is a good bound for hit detection and
* highlighting it is not tight in any sense, and in some (rare)
* cases may exclude parts of the glyph.
* Returns the logical bounds of this GlyphVector. This is a
* good bound for hit detection and highlighting it is not tight
... | 0 |
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
final String tableName = OptUtil.getTableOpt(cl, shellState);
final ScanInterpreter interpeter = getInterpreter(cl, tableName, shellState);
final Range range = getRange(cl, interpeter);
final ... | 0 |
import org.apache.accumulo.core.clientImpl.Namespace;
import org.apache.accumulo.core.clientImpl.Namespaces; | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.