Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
/*
* Copyright 2004-2005 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... | 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.beam.runners.core.SplittableParDoViaKeyedWorkItems;
import org.apache.beam.runners.core.construction.ElementAndRestriction;
SplittableParDoViaKeyedWorkItems.ProcessElements.class,
new SplittableProcessElementsStreamingTranslator());
SplittableParDoViaKeyedWorkItems.GBKIntoKeyed... | 0 |
/** A graph node which contains some pipeline element. */
/** A {@link PipelineNode} which contains a {@link PCollection}. */
@Override
public abstract String getId();
/** A {@link PipelineNode} which contains a {@link PTransform}. */
@Override
public abstract String getId();
| 1 |
import org.apache.xml.security.stax.securityEvent.DefaultTokenSecurityEvent;
TestSecurityEventListener securityEventListener = new TestSecurityEventListener();
XMLStreamReader securityStreamReader =
inboundXMLSec.processInMessage(xmlStreamReader, null, securityEventListener);
// Com... | 0 |
import org.apache.commons.lang3.ArrayUtils;
@UDF(
funcName = "REVERSE",
parameterArray = {TypeName.STRING},
returnType = TypeName.STRING
)
public String reverse(String str) {
return new StringBuilder(str).reverse().toString();
}
@UDF(
funcName = "REVERSE",
parameterArray = {TypeName.... | 0 |
* @throws Exception | 0 |
package org.apache.beam.sdk.io;
import org.apache.beam.sdk.coders.Coder;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.values.PCollection; | 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 |
if(pendingSyncs.containsKey(zxid)){
sendSync(syncHandler.get(pendingSyncs.get(zxid).sessionId), pendingSyncs.get(zxid));
syncHandler.remove(pendingSyncs.get(zxid));
pendingSyncs.remove(zxid);
... | 0 |
String prefix = Util.getPrefix(cls);
f = cls.getDeclaredField(Util.mangleName(prefix, entry.getKey().toString()));
} catch (NoSuchFieldException | NullPointerException e) {
f = cls.getField(Util.mangleName(prefix, entry.getKey().toString()));
... | 0 |
for (final Iterator<String> it = config.getKeys(); it.hasNext();)
final String key = it.next();
final String key = config.getKeys().next(); | 0 |
* The <code>Metrics</code> is a utility class for producing various kinds of metrics for reporting
* properties of an executing pipeline.
*
/** Create a metric that records various statistics about the distribution of reported values. */
/** Create a metric that records various statistics about the distribution ... | 1 |
protected String userAgent = DEFAULT_USER_AGENT;
protected String accept = DEFAULT_ACCEPT;
// Get parameters, headers, deparameterized URI and path from URI
final TreeMap headers = new TreeMap();
headers.put("user-agent", userAgent);
headers.put("accept", accept);
get... | 0 |
* @version $Revision$ | 0 |
* Copyright 2004,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 |
import com.twitter.common.application.ShutdownRegistry;
ScheduledExecutorSchedulingService(ShutdownRegistry shutdownRegistry,
ShutdownRegistry shutdownRegistry, | 0 |
Entity entity = getEntityByType(sortedHiveOutputs, Type.TABLE);
if (entity != null) {
Table outTable = entity.getTable();
//refresh table
outTable = dgiBridge.hiveClient.getTable(outTable.getDbName(), outTable.getTableName());
retu... | 0 |
import javax.inject.Inject; | 0 |
if (v.getId() == i) {
if (leader == v.getId()) {
long id = votes[0].getId();
if (votes[i].getId() != id) {
if (allowOneBadLeader && votes[i].getId() == i) {
Assert.fail("Thread " + i + " got " + votes[i].getId() + " expe... | 0 |
final HttpContext context = new BasicHttpContext();
final SchemeRegistry registry = SchemeRegistryFactory.createDefault();
final HttpParams params = getParams();
final String className = (String) params.getParameter(
final Class<?> clazz = Class.forName(className);
... | 0 |
public String testAddChild(final String badParameter) {
public String testAddChild2(final String ignore, final String badParameter) {
public String testAddChild(final Child child) {
public String testAddChild2(final String ignore, final Child child) { | 0 |
return this.dynaClass;
return !eof;
return this; | 0 |
import org.apache.commons.collections.iterators.SingletonIterator; | 0 |
* @since 5.0
private final static String FORM_SUBTYPE = "form-data";
private final static String MIXED_SUBTYPE = "mixed";
private List<MultipartPart> multipartParts = null;
public MultipartEntityBuilder addPart(final MultipartPart multipartPart) {
if (multipartPart == null) {
if (this.m... | 0 |
package org.apache.ambari.server.topology.validators;
/*
* 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
* distributed under the License is distributed on an "AS IS" BASIS,
import org.apac... | 0 |
* @return the versions service
@Path("{viewName}/versions")
public ViewVersionService getInstanceHandler(@PathParam("viewName") String viewName) {
return new ViewVersionService(viewName); | 0 |
for (final ColumnHandler handler : columns) {
for (final PropertyHandler handler : properties) {
for (final ColumnHandler handler : columns) {
for (final PropertyHandler handler : properties) { | 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 |
mgmt.addIndexKey(graphIndex, mgmt.makePropertyKey("guid").dataType(String.class).make());
Configuration indexConfig = getConfiguration("indexer.properties", INDEXER_PREFIX);
// Properties are formatted: prop_name:type;prop_name:type | 0 |
String getSqlState();
void setSqlState(String sqlState);
String getStatusMessage();
void setStatusMessage(String message); | 0 |
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
private ScheduledExecutorService executor;
executor = createMock(ScheduledExecutorService.class);
expect(executor.schedule(
EasyMock.capture(capture),
eq(expireIn.as(Time.MILLISECONDS).longValue()),
... | 0 |
* Returns the original file name in the client's file system, as provided by
* @return The original file name in the client's file system. | 0 |
final Collection<? extends FileLocationStrategy> subs)
public URL locate(final FileSystem fileSystem, final FileLocator locator)
for (final FileLocationStrategy sub : getSubStrategies())
final URL url = sub.locate(fileSystem, locator); | 0 |
mergePropWithRandomPort(Property.GC_PORT.getKey()); | 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.Objects;
accessTime = Objects.requireNonNull(atime, "No access time");
createTime = Objects.requireNonNull(ctime, "No create time");
modifyTime = Objects.requireNonNull(mtime, "No modify time");
this.acl = Objects.requireNonNull(acl, "No ACLs");
... | 0 |
thrown.expectMessage(
containsString("Building a Coder using a registered CoderFactory failed"));
thrown.expectMessage(
containsString("Building a Coder from the @DefaultCoder annotation failed"));
thrown.expectMessage(
containsString("Building a Coder from the fallback CoderProvider... | 0 |
import org.apache.accumulo.hadoopImpl.mapreduce.lib.OutputConfigurator;
import org.apache.hadoop.conf.Configuration;
private final Class<?> callingClass;
public OutputFormatBuilderImpl(Class<?> callingClass) {
this.callingClass = callingClass;
}
_store(job.getConfiguration());
private void _store(Confi... | 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 org.apache.zookeeper.AsyncCallback.StringCallback;
import org.apache.zookeeper.ZKUtil;
options.addOption("R", false, "recurse");
super("ls", "[-s] [-w] [-R] path");
boolean recursive = cl.hasOption("R");
if (recursive) {
ZKUtil.visitSubTreeDFS(zk, path, watch,... | 0 |
import org.apache.beam.sdk.options.DataflowPipelineOptions;
import org.apache.beam.sdk.options.Default;
import org.apache.beam.sdk.options.DefaultValueFactory;
import org.apache.beam.sdk.options.Description;
import org.apache.beam.sdk.options.PipelineOptions; | 0 |
RECOMMEND_CONFIGURATION_DEPENDENCIES("recommend-configuration-dependencies"),
| 0 |
clazz = Thread.currentThread().getContextClassLoader().loadClass(src); | 0 |
import java.util.Collection;
import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger;
private final Collection<ServiceReference> added = new ArrayList<ServiceReference>();
added.add( ref );
synchronized (added)
{
... | 0 |
throw io;
throw io; | 0 |
import org.apache.beam.sdk.transforms.windowing.IntervalWindow;
import org.apache.beam.sdk.util.WindowedValue;
public void testTableRowInfoCoderSerializable() {
CoderProperties.coderSerializable(BigQueryIO.TableRowInfoCoder.of());
}
@Test
public void testComplexCoderSerializable() {
CoderProperties.cod... | 0 |
if (hd == null)
return 0;
if (o1.count < o2.count)
return -1;
if (o1.count > o2.count)
return 1; | 1 |
import org.apache.felix.scr.impl.logger.ComponentLogger;
* Return type for {@link FieldUtils#searchField(Class, String, ComponentLogger)}
public static final class FieldSearchResult
final ComponentLogger logger )
logger.log( LogService.LOG_DEBUG,
"Locating field {0} in class {1... | 0 |
import com.google.cloud.dataflow.sdk.transforms.windowing.GlobalWindows;
import com.google.cloud.dataflow.sdk.transforms.windowing.Window;
return
new IterableAssert<>(inGlobalWindows(actual).apply(View.<T>asIterable()))
return new IterableAssert<>(inGlobalWindows(actual).apply(View.<Iterable<T>>asSingle... | 0 |
* A lexicoder for preserving the native Java sort order of Double values.
* | 0 |
assertEquals(42L, memFunc.apply("42").longValue());
assertEquals(42L, memFunc.apply("42b").longValue());
assertEquals(42L, memFunc.apply("42B").longValue());
assertEquals(42L * 1024L, memFunc.apply("42K").longValue());
assertEquals(42L * 1024L, memFunc.apply("42k").long... | 0 |
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
import org.apache.accumulo.server.util.NamingThreadFactory;
import org.apache.accumulo.server.zookeeper.DistributedWorkQueue;
private DistributedWorkQueue bulkFailedCopyQ;
ThreadPoolExecutor distWorkQThreadPool = (ThreadPool... | 0 |
public Comparator<ScanInfo> createComparator(CreateParameters params) {
Preconditions.checkArgument(params.getOptions().isEmpty()); | 0 |
public class SoftRefFilesCacheTests extends AbstractFilesCacheTestsBase | 0 |
public void setSocketTimeoutMillis(final int timeout) {
public int getSocketTimeoutMillis() { | 0 |
Document doc, EncryptionMethod encryptionMethod, KeyInfo keyInfo, CipherData cipherData, EncryptionProperties encryptionProperties, String Id, String Type)
Document doc, String encryptionMethod, EncryptionMethodParams encryptionMethodParams, KeyInfo keyInfo, EncryptionProperties encryptionProperti... | 0 |
return this.convert.toMap(rs); | 0 |
}
public ParentClass(final StringBuffer n) {
name = n.toString(); | 0 |
import com.google.common.base.Optional;
return;
Optional<TaskQuery> activeQuery = Optional.absent();
Optional<TaskQuery> completedQuery = Optional.absent();
if (Tasks.isActive(statusFilter)) {
activeQuery = Optional.of(query);
} else {
completedQue... | 0 |
public static final String HOST_COMPONENT_CLUSTER_NAME_PROPERTY_ID
public static final String HOST_COMPONENT_SERVICE_NAME_PROPERTY_ID
public static final String HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID
public static final String HOST_COMPONENT_DISPLAY_NAME_PROPERTY_ID
public static final String HOST_COMPONEN... | 1 |
if (uri.isOpaque() && uri.getSchemeSpecificPart() != null)
{
// blueprint:file:/tmp/foo/baa.jar -> file:/tmp/foo/baa.jar
// blueprint:mvn:foo.baa/baa/0.0.1 -> mvn:foo.baa/baa/0.0.1
// wrap:file:/tmp/foo/baa-1.0.jar$Symbolic-Name... | 0 |
* @since 3.0
* @since 3.1
* @since 3.1 | 0 |
expect(user.getGroups()).andReturn(Collections.emptyList()).anyTimes(); | 0 |
ApiSurface::classesInPackage;
.anyMatch(classMatcher::matches);
final Function<Class<?>, List<Class<?>>> toExposure = checkedApiSurface::getAnyExposurePath;
Maps.<Class<?>, Collection<Class<?>>>newHashMap(), Sets::newHashSet); | 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 |
package org.apache.felix.karaf.jaas.boot;
public static final String PROPERTY_MODULE = "org.apache.felix.karaf.jaas.module";
public static final String PROPERTY_BUNDLE = "org.apache.felix.karaf.jaas.bundle"; | 0 |
* @deprecated The wrap goal is no longer supported and may be removed in a future release
@Deprecated
getLog().warn( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" );
getLog().warn( "! The wrap goal is no longer supported and may be removed in a future release !" );
... | 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 |
import org.apache.accumulo.core.client.ClientInfo;
ClientInfo info = ClientInfo.from(c.properties());
final String args[] = {"-i", info.getInstanceName(), "-z", info.getZooKeepers(), "-u", "root",
"-p", ROOT_PASSWORD, "--batchThreads", "2", "--table", tableName, "--num", | 0 |
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.security.cert.X509Certificate;
import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.xml.security.keys.KeyInfo;
import org.apache.xml.security.signature.XMLSignature;
import org.apache.xml.security.util... | 0 |
import org.apache.commons.pool2.ObjectPool;
import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
import org.apache.commons.pool2.impl.GenericKeyedObjectPoolFactory;
import org.apache.commons.pool2.impl.GenericObjectPool; | 1 |
this.interpreterSelector = (ServiceSelector) manager.lookup(Interpreter.ROLE + "Selector"); | 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 testSearchByDSLReturnsEntity() throws Exception {
//Assert that entity state is set in the result entities
String entityState = rows.getJSONObject(0).getJSONObject("$id$").getString("state");
Assert.assertEquals(entityState, Id.EntityState.ACTIVE.name()); | 0 |
*
* @return explicit parallelism of the runner or -1 if default | 0 |
import org.apache.beam.sdk.transforms.windowing.Triggers;
TriggerStateMachines.stateMachineForTrigger(
Triggers.toProto(strategy.getTrigger()))), | 0 |
protected static final Collection<Capability> capabilities =
Collections.unmodifiableCollection(Arrays.asList(new Capability[] | 0 |
package cz.seznam.euphoria.core.client.operator.state;
/**
* State storage for single value.
*/
public interface ValueStateStorage<T> extends StateStorage<T> {
/** Set the value in this state. */
void set(T value);
/** Retrieve the value. */
T get();
} | 0 |
import org.apache.hc.core5.http2.frame.RawFrame;
final RawFrame frame = new RawFrame(FrameType.DATA.getValue(), 0, 1,
final RawFrame frame2 = inbuffer.read(inputStream);
final ByteBuffer payload2 = frame2.getPayloadContent();
final RawFrame frame1 = inbuffer.read(inputStream);
As... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/pointers/Attic/DOMAttributePointer.java,v 1.2 2001/09/21 23:22:45 dmitri Exp $
* $Revision: 1.2 $
* $Date: 2001/09/21 23:22:45 $
* @version $Revision: 1.2 $ $Date: 2001/09/21 23:22:45 ... | 0 |
import java.awt.geom.Point2D;
Point2D offset, | 0 |
void setStackId(StackId stackId);
| 0 |
tableNamespaceOpt = new Option(Shell.tableNamespaceOption, "table-namespace", true, "table namespace to display/set/delete properties for"); | 0 |
/**
* @param opts The FileSystemOptions.
* @return The encoding.
* @since 2.0
* */ | 0 |
import org.apache.beam.sdk.transforms.DoFn;
public DoFn<InputT, OutputT> getFn() {
return delegate.getFn();
}
@Override | 0 |
public BundleContext getBundleContext();
| 0 |
return new DefaultHttpRoutePlanner
(getConnectionManager().getSchemeRegistry()); | 0 |
BlueprintResourceProvider.init(injector.getInstance(BlueprintDAO.class), injector.getInstance(Gson.class)); | 0 |
* <p>The source is a wrapper over the {@code BigQueryTableRowIterator} class, which issues a | 0 |
private String stackRevision; | 0 |
@Mock(type = MockType.NICE)
private ClusterTopology clusterTopologyMock;
requestStatusResponse, executor, persistedState, clusterTopologyMock, mockFuture, settingDAO);
requestStatusResponse, executor, persistedState, clusterTopologyMock, mockFuture, settingDAO);
public void testAddKerberosClientA... | 0 |
if (serviceName != null) {
try {
Service service = cluster.getService(serviceName);
stackId = service.getDesiredStackId();
} catch (AmbariException e) {
LOG.debug("Could not load service {}, skipping topology check", serviceName);
}
if (stackId == null) ... | 1 |
import cz.seznam.euphoria.core.annotation.audience.Audience;
@Audience(Audience.Type.INTERNAL)
| 0 |
auths = new ArrayList<>();
ArrayList<Value> values = new ArrayList<>(); | 0 |
package org.apache.accumulo.monitor.util.celltypes;
import org.apache.accumulo.core.master.thrift.BulkImportState;
public class BulkImportStateType extends CellType<BulkImportState> {
private static final long serialVersionUID = 1L;
@Override
public String alignment() {
return "left";
}
@Override
p... | 1 |
BookieServer server = new BookieServer(initialPort + 3, HOSTPORT, tmpDirs.get(3), new File[] { tmpDirs.get(3)}); | 0 |
return new ZooArbitrator(ServerContext.getInstance()); | 0 |
LinkOption[] options = IoUtils.getLinkOptions(true); | 0 |
package org.apache.hc.core5.reactor; | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.