Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.beam.sdk.io.Write; | 0 |
import org.osgi.framework.Version;
ResourceImpl f1 = new ResourceImpl("F1", IdentityNamespace.TYPE_FRAGMENT, Version.emptyVersion);
ResourceImpl f2 = new ResourceImpl("F2", IdentityNamespace.TYPE_FRAGMENT, Version.emptyVersion); | 0 |
import org.apache.aurora.scheduler.storage.db.DbUtil;
storage = DbUtil.createStorage(); | 0 |
if (this == n)
throw createDOMException
(DOMException.HIERARCHY_REQUEST_ERR,
"add.self", new Object[] { getNodeName() });
| 0 |
* A general {@link GroupAlsoByWindowsAggregators}. This delegates all of the logic to the
GroupAlsoByWindowsAggregators.DROPPED_DUE_TO_CLOSED_WINDOW_COUNTER, Sum.ofLongs());
createAggregator(
GroupAlsoByWindowsAggregators.DROPPED_DUE_TO_LATENESS_COUNTER, Sum.ofLongs()); | 0 |
* in the form of an Object[].
*
* <p>The first time the Introspector sees a class it creates a class method map
* This mapping is performed for all the public methods of a class and stored.</p>
* | 0 |
File conf = folder1.newFile("accumulo.properties");
out.append("general.classpaths=\n");
out.append("general.vfs.classpaths=\n");
File conf = folder1.newFile("accumulo.properties");
out.append("general.classpaths=\n");
out.append(
"general.vfs.classpaths=" + new File(folder1.getRoot(), "... | 0 |
if (!tls.extent.getTableId().equals(tableId)) {
break;
}
if (pr != null && (tls.extent.getPrevEndRow() == null || !tls.extent.getPrevEndRow().equals(pr)))
if (tls.extent.getPrevEndRow() != null && extent.getEndRow() != null && tls.extent.getPrevEndRow().compareTo(extent.getEndRow()) > 0)... | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 1 |
SimpleRequestProducer.create(request, null),
SimpleResponseConsumer.create(), | 0 |
Cache<String,Long> fileLenCache = tabletResources.getTabletServerResourceManager()
.getFileLenCache();
getTabletServer().getFileSystem(), tableConfiguration, sc, ic, fileLenCache, context); | 0 |
protected boolean encodeCharacters = true;
if (isCdataElement(local)) {
this.encodeCharacters = false;
}
if (isCdataElement(local)) {
this.encodeCharacters = true;
}
/**
* script and style are CDATA sections by default, so no encoding
... | 0 |
// GCSUtil.expand() should not fail for non-existent single files or directories, since GCS file
// listing is only eventually consistent.
@Test
public void testNonExistent() throws IOException {
GcsOptions pipelineOptions = PipelineOptionsFactory.as(GcsOptions.class);
pipelineOptions.setGcpCredential(... | 0 |
Map<String, Set<String>> overriddenProperties = new HashMap<String, Set<String>>();
if (property.getValue() == null) {
continue;
}
// if (clusterConfigs == null || (!clusterConfigs.getProperties().containsKey(property.getName()) && property.getPropertyAmbariUpgr... | 0 |
// this setting only works for DOM, so no JDOM tests :|
protected JXPathContext createContext(String model) {
return context;
}
protected void doTest(String xpath, String model, String expected) {
assertXPathValue(createContext(model), xpath, expected);
doTest("/ElementA/B:E... | 0 |
import org.apache.http.client.RoutedRequest;
import org.apache.http.conn.HttpRoute;
final HttpRoute route = new HttpRoute(target, null, false);
final RoutedRequest roureq = new RoutedRequest.Impl(req, route);
HttpResponse rsp = client.execute(roureq, null); | 0 |
* This implementation for the <code>ScriptSecurity</code> interface. | 0 |
import org.apache.beam.vendor.grpc.v1_13_1.com.google.protobuf.ByteString; | 0 |
* @version $Id$
init(cr, bounds, cm, sm,
cr.getTileGridXOffset(), cr.getTileGridYOffset(),
| 0 |
import org.apache.felix.dm.annotation.api.ServiceDependency; | 0 |
* @author William Farner | 0 |
package org.apache.xml.security.stax.impl.algorithms;
import org.apache.xml.security.stax.ext.XMLSecurityException; | 0 |
System.out.println("\"" + methodName + "\" callback not found on component instances "
m_logger.log(LogService.LOG_ERROR, "\"" + methodName + "\" callback not found on component instances " | 0 |
import com.google.common.collect.Iterables;
import java.util.Objects;
ImmutableList.<TaggedPValue>builder()
.add(Iterables.getOnlyElement(pc.expand()))
ImmutableList.Builder<TaggedPValue> builder = ImmutableList.builder();
builder.addAll(pcollections);
builder.add(Iterables.getOnlyElem... | 0 |
pmtCount = currentPmtCount; | 0 |
@Override
public ComparisonPredicate<T> copy(String propertyId) {
return new EqualsPredicate<T>(propertyId, getValue());
} | 0 |
Map<String, Object> map = new TreeMap<>(); | 1 |
chooseMaximumNumberOfThreads(options), THREAD_EXPIRATION_TIME_SEC, TimeUnit.SECONDS,
private static int chooseMaximumNumberOfThreads(DataflowWorkerHarnessOptions pipelineOptions) {
if (pipelineOptions.getNumberOfWorkerHarnessThreads() != 0) {
return pipelineOptions.getNumberOfWorkerHarnessThreads();... | 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 |
/*
* 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.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
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.Lists;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.util... | 0 |
import org.apache.sshd.util.test.JUnitTestSupport;
public class NoCloseWriterTest extends JUnitTestSupport { | 0 |
package org.apache.beam.sdk.extensions.euphoria.beam.testkit;
import org.apache.beam.sdk.extensions.euphoria.operator.test.FlatMapTest;
import org.apache.beam.sdk.extensions.euphoria.operator.test.UnionTest;
import org.apache.beam.sdk.extensions.euphoria.operator.test.junit.ExecutorProvider;
import org.apache.beam.sdk.... | 0 |
// Implementation methods | 0 |
import java.util.Map;
protected ExecutionScheduleManager executionScheduleManager;
* @param properties
protected abstract void doWork(Map<String, Object> properties) throws
AmbariException;
doWork(context.getMergedJobDataMap().getWrappedMap());
| 0 |
* this iterator. For example, if this method returns ROW_COLFAM, then {@link #transformKeys()} may be changing the column qualifier, column visibility, or | 0 |
setupTestEnv();
ensureNames.add("InMemoryDataTree");
+ ",name1=replica." + i + ",name2=");
ensureNames.add("name0=ReplicatedServer_id" + i);
| 0 |
private static final String MAVEN_SYMBOLICNAME = "maven-symbolicname";
properties.put( MAVEN_SYMBOLICNAME, bsn ); | 0 |
package org.apache.felix.ipojo.test.scenarios.lifecycle.callback;
import org.apache.felix.ipojo.test.scenarios.lifecycle.callback.service.CheckService;
fooProvider = Utils.getComponentInstance(context, "LFCB-FooProviderType-1", p2);
instance = Utils.getComponentInstance(context, "LFCB-ParentCallbackCheckService", p... | 0 |
item -> Protos.Parameter.newBuilder().setKey(item.getName())
.setValue(item.getValue()).build()); | 0 |
@Override
java.util.Scanner file = null;
try {
file = new java.util.Scanner(new File(f), UTF_8.name());
while (file.hasNextLine()) {
line = file.nextLine();
if (!line.isEmpty()) {
splits.add(decode ? new Text(Base64.decodeBase64(line.getBytes(UTF_8))) : new ... | 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 junit.framework.Assert;
| 0 |
* or if the connection was aborted
throws HttpException, IOException | 0 |
public abstract FileBasedReader<T> createSingleFileReader(PipelineOptions options,
ExecutionContext executionContext);
public final Reader<T> createReader(PipelineOptions options,
ExecutionContext executionContext) thr... | 0 |
/*
* Copyright (c) OSGi Alliance (2010, 2015). All Rights Reserved.
*
* 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 re... | 0 |
super(SftpConstants.EXT_CHECK_FILE_HANDLE, client, raw, extras); | 1 |
import org.apache.accumulo.server.fs.VolumeManager.FileType;
private String metaReference; // something like ../2/d-00000/A00001.rf
private Path fullReference; // something like hdfs://nn:9001/accumulo/tables/2/d-00000/A00001.rf
private Path suffix;
this(key.getColumnQualifier().toString(), fs.getFullPath(key... | 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 |
public abstract class AbstractNamespaceURIBasedRulesModule
public AbstractNamespaceURIBasedRulesModule( /* @Nullable */String namespaceURI ) | 0 |
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
CopyOnAccessInMemoryStateInternals stateInternals = stepContext.stateInternals();
Iterable<WindowedValue<V>> dropExpiredWindows(
return StreamSupport.stream(elements.spliterator(), false)
.flatMap(wv -> StreamSupport.st... | 0 |
else if (componentName.equals("STORM_REST_API"))
return "8745"; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/TypedSortedBag.java,v 1.3 2003/08/31 12:56:23 scolebourne Exp $
* a specified <code>Class</code>. If an object cannot be added to the
* @version $Revision: 1.3 $... | 0 |
import org.apache.commons.lang.ArrayUtils;
public String getThreadsStacktraces(Collection<Long> ids) {
errBuilder.append(getThreadsStacktraces(Arrays.asList(ArrayUtils.toObject(ids))));
boolean hasRunning = false;
State state = monTh.getState();
if (state != State.TERMINATED && ... | 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 |
/**
* TODO Add javadoc
*
* @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a>
* @version $Rev$, $Date$
*/ | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/event/Attic/StandardModificationHandler.java,v 1.3 2003/08/31 21:09:49 scolebourne Exp $
* @version $Revision: 1.3 $ $Date: 2003/08/31 21:09:49 $
public synchronized Object[] ... | 0 |
import org.apache.hadoop.metrics2.sink.timeline.ContainerMetric;
public TimelinePutResponse putContainerMetrics(List<ContainerMetric> metrics)
throws SQLException, IOException {
return new TimelinePutResponse();
}
@Override | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/core/ChooseTag.java,v 1.7 2002/10/30 19:16:20 jstrachan Exp $
* $Revision: 1.7 $
* $Date: 2002/10/30 19:16:20 $
* Copyright (c) 2002 The Apache Software Foundation. All rights
* $Id:... | 0 |
case OpCode.createTTL:
return "createTtl"; | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList; | 0 |
import java.io.File;
| 0 |
public RequestStatus deleteResources(Request request, Predicate predicate) | 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 |
Method removeAlertDuplicates = UpgradeCatalog250.class.getDeclaredMethod("removeAlertDuplicates");
.addMockedMethod(removeAlertDuplicates)
upgradeCatalog250.removeAlertDuplicates();
expectLastCall().once();
| 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 |
StackId stackId = null;
if (null != cluster) {
stackId = cluster.getDesiredStackVersion();
}
ExecuteCommandJson jsons = customCommandExecutionHelper.getCommandJson(actionExecContext, cluster, stackId); | 0 |
import org.apache.beam.sdk.runners.TransformHierarchy;
public CompositeBehavior enterCompositeTransform(TransformHierarchy.Node node) {
public void leaveCompositeTransform(TransformHierarchy.Node node) {}
public void visitPrimitiveTransform(TransformHierarchy.Node node) {
public void visitValue(PValue value, Tr... | 0 |
* Autogenerated by Thrift Compiler (0.12.0)
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)")
@org.apache.thrift.annotation.Nullable
@org.apache.thrift.annotation.Nullable
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
... | 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 |
stateManager.insertPendingTasks(storeProvider, task, instanceIds);
storage.write(new Storage.MutateWork.NoResult.Quiet() {
@Override
protected void execute(Storage.MutableStoreProvider storeProvider) {
for (String taskId : deferredLaunch.get().activeTaskIds) {
stateManage... | 0 |
import org.apache.accumulo.core.util.shell.Token; | 0 |
AccumuloInputFormat.setZooKeeperInstance(job.getConfiguration(), args[0], args[1]);
AccumuloInputFormat.setInputInfo(job.getConfiguration(), args[2], args[3].getBytes(), args[4], new Authorizations());
AccumuloInputFormat.addIterator(job.getConfiguration(), regex); | 0 |
fail();
assertFalse(iter.hasTop());
assertEquals(expectedSample, readAll(iter));
assertEquals(expectedSample, readAll(dc));
assertEquals(expectedAll, readAll(iter)); | 0 |
import java.io.IOException;
import org.apache.felix.webconsole.json.JSONWriter;
void mergeWithMetaType( Dictionary props, ObjectClassDefinition ocd, JSONWriter json, Set ignoreAttrIds )
throws IOException | 0 |
conf.clear(); | 0 |
* @version $Revision: 1.4 $ $Date: 2003/02/21 13:08:59 $ | 0 |
import org.apache.beam.sdk.transforms.SerializableFunctions;
return pinput
.getPipeline()
.begin()
.apply(Create.of(rows))
.setSchema(schema, SerializableFunctions.identity(), SerializableFunctions.identity()); | 0 |
@Test
public void testContextPath() throws Exception {
ViewInstanceDefinition viewInstanceDefinition = getViewInstanceDefinition();
Assert.assertEquals(ViewInstanceDefinition.VIEWS_CONTEXT_PATH_PREFIX + "MY_VIEW/INSTANCE1",
viewInstanceDefinition.getContextPath());
}
| 0 |
public void testDecode() { | 0 |
public final class TransformType{ | 0 |
package org.apache.jute.compiler.generated;
import org.apache.jute.compiler.*; | 0 |
import org.apache.felix.sigil.model.ModelElementFactory;
import org.apache.felix.sigil.model.osgi.IRequiredBundle;
IRequiredBundle bundle = ModelElementFactory.getInstance().newModelElement(IRequiredBundle.class); | 0 |
import com.google.cloud.dataflow.sdk.coders.CoderRegistry;
import com.google.cloud.dataflow.sdk.coders.KvCoder;
CoderRegistry registry = new CoderRegistry();
registry.registerStandardCoders();
AppliedCombineFn<String, Long, ?, Long> appliedCombineFn = AppliedCombineFn.withInputCoder(
combineFn.asKe... | 0 |
public void encode(T value, OutputStream outStream) throws IOException {
throws IOException {
public T decode(InputStream inStream) throws IOException {
public T decode(InputStream inStream, Context context) throws IOException {
CloseIgnoringInputStream(InputStream in) {
CloseIgnoringOutputStream(Ou... | 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 may not use ... | 1 |
private List<String> m_warnings = new ArrayList<String>();
private List<String> m_errors = new ArrayList<String>();
return m_errors;
return m_warnings; | 0 |
new HashSet<>(Arrays.asList(new String[]{
COMPONENT_CLUSTER_NAME_PROPERTY_ID,
COMPONENT_SERVICE_NAME_PROPERTY_ID,
COMPONENT_COMPONENT_NAME_PROPERTY_ID}));
Set<Resource> resources = new HashSet<>();
final Set<ServiceComponentHostRequest> requests = new HashSet<>();
Map<String,List<Servi... | 1 |
* 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 |
})).setWindowingStrategyInternal(outputStrategy).setCoder(input.getCoder()); | 0 |
* @param leftPos The position of the character in the code, counting from left to right
* @param rightPos The positionof the character in the code, counting from right to left
protected int weightedValue(int charValue, int leftPos, int rightPos) {
boolean oddPosition = (rightPos % 2 == 1); | 0 |
@Override
@Override
@Override
@Override | 0 |
public int hashCode() {
// uncomment when JDK 1.4 is required
// assert false : "hashCode not designed";
return 45;
} | 0 |
* Autogenerated by Thrift Compiler (0.9.3) | 0 |
import org.apache.commons.vfs.Capability;
* @version $Revision: 1.2 $ $Date: 2002/11/23 00:32:12 $
FileObject getBaseTestFolder( FileSystemManager manager ) throws Exception;
* Returns the expected file system capabilities.
//Capability[] getExpectedCapabilities(); | 0 |
* @version $Revision: 1.5 $ $Date: 2004/05/17 20:13:19 $
public class NullFilesCache extends AbstractFilesCache
public void close()
super.close(); | 0 |
*
* This class is immutable and thread-safe. | 0 |
public ExportedPackage[] getExportedPackages(String name)
{
return m_felix.getExportedPackages(name);
}
| 0 |
package org.apache.aurora.scheduler.preemptor;
import org.apache.aurora.scheduler.offers.OfferManager;
import org.apache.aurora.scheduler.preemptor.Preemptor.PreemptorImpl;
import static org.apache.aurora.scheduler.preemptor.PreemptorMetrics.slotValidationStatName;
import static org.apache.aurora.scheduler.preemptor.Pr... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.