Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.beam.sdk.util.CloudObject;
/**
* Generated data to check that the wire format has not changed. To regenerate, see
* {@link org.apache.beam.sdk.coders.PrintBase64Encodings}.
*/
private static final List<String> TEST_ENCODINGS = ImmutableList.of(
"AwoLDA",
"Ag0D",
"Ag0O",
... | 0 |
acceptStatement(child, null);
// the last line
TemplateExpression te = getPrintStatement(child);
if (te != null) {
newJxltLine();
return visit(te, data);
} else {
return super.acceptStatement(child, data);
private TemplateExpres... | 0 |
* @version CVS $Id: XMLDBSource.java,v 1.17 2004/05/16 16:13:25 cziegeler Exp $
public static final String PREFIX = "db"; | 0 |
*
* @version $Id$ | 0 |
viewInstanceDefinition.putProperty("p8", null);
Assert.assertEquals(8, properties.size());
Assert.assertNull(properties.get("p8"));
Assert.assertEquals(8, properties.size());
Assert.assertNull(properties.get("p8")); | 0 |
public TriggerResult onElement(TriggerContext<W> c, OnElementEvent<W> e) throws Exception {
BitSet firedSet = c.lookup(SUBTRIGGERS_FIRED_SET_TAG, e.window());
SubTriggerExecutor subExecutor = subExecutor(c, e.window());
if (subExecutor.onElement(c, i, e).isFire()) {
return wrapResult(c, e.window(), ... | 0 |
/*
* $Header: $
* $Revision$
* $Date$
*
* ====================================================================
*
* 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.
* Yo... | 0 |
import org.apache.accumulo.core.security.Authorizations;
mdScanner = connector.createBatchScanner(Constants.METADATA_TABLE_NAME, Authorizations.EMPTY, 8);
@Override
}
} | 0 |
import java.util.HashSet;
import java.util.Set;
| 0 |
handleRequest(connState, conn);
final NHttpServerConnection conn) throws HttpException, IOException {
HttpContext context = conn.getContext();
HttpRequest request = connState.getRequest(); | 0 |
* Allows the tailer to complete its current loop and return.
public void stop() { | 0 |
private FileSystemProviderContext context;
return context;
this.context = context; | 0 |
class DoFnForTestSimpleTimerIdNamedDoFn extends DoFn<KV<String, Integer>, Long> {
@TimerId("foo")
private final TimerSpec bizzle = TimerSpecs.timer(TimeDomain.EVENT_TIME);
@ProcessElement
public void foo(ProcessContext context) {}
@OnTimer("foo")
public void onFoo() {}
}
... | 0 |
List<SignatureProperty> list = new Vector<SignatureProperty>();
// use raw List type to test for invalid SignatureProperty types
List invalidList = new Vector();
addEntryToRawList(invalidList, strEntry);
@SuppressWarnings("unchecked")
SignatureProperties props2 = ... | 0 |
/*
Copyright 2006 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 l... | 0 |
/**
* @todo need to implement the daystart bits
*/
/**
* @todo need to implement the daystart bits
*/
/**
* @todo needs to handle +5 for > 5 and -5 for < 5.
* @todo Also needs to handle k, m, g, as suffixes.
*/ | 0 |
KV<String, BeamFnApi.Target> inputLocation,
KV<String, BeamFnApi.Target> outputLocation, | 0 |
import org.apache.felix.sigil.common.model.IModelElement; | 0 |
package org.apache.ambari.logfeeder.loglevelfilter;
String logId = (String) jsonObj.get(LogFeederConstants.SOLR_COMPONENT);
if (StringUtils.isNotBlank(hostName) && StringUtils.isNotBlank(logId) && StringUtils.isNotBlank(level)) {
return LogLevelFilterHandler.isAllowed(hostName, logId, level);
} else { | 0 |
import org.apache.thrift.TException;
import org.apache.thrift.TSerializer;
private final TSerializer serializer = new TSerializer();
ConcreteTaskDescription concreteTaskDescription = trackedTask.getTask();
if (ConfigurationManager.satisfied(concreteTaskDescription, offer)) {
LOG.info("Offer is bei... | 0 |
ElasticsearchIOTestUtils.deleteIndex(connectionConfiguration, restClient); | 0 |
Iterable<TabletMetadata> tmi = MetadataScanner.builder().from(ctx).scanMetadataTable()
return MetadataScanner.builder().from(ctx).scanMetadataTable()
.overRange(tableId, startRow, endRow).fetchFiles().fetchPrev().build().stream()
.mapToInt(tm -> tm.getFiles().size()).sum(); | 0 |
public class ScriptingEnvironment extends BaseScriptingEnvironment {
protected Timer timer = new Timer(true);
* @param ctx the bridge context
public ScriptingEnvironment(BridgeContext ctx) {
super(ctx);
updateManager = ctx.getUpdateManager();
updateRunnableQueue = updateManager.getU... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/TestBean.java,v 1.9 2002/07/16 02:41:08 craigmcc Exp $
* $Revision: 1.9 $
* $Date: 2002/07/16 02:41:08 $
import java.util.Map;
* @version $Revision: 1.9 $ $Date: 2002/07/16 02:41:08... | 0 |
assertEquals(3, ds.getConnectionProperties().size());
assertEquals("value1", ds.getConnectionProperties().getProperty("name1"));
assertEquals("value2", ds.getConnectionProperties().getProperty("name2"));
assertEquals("value3", ds.getConnectionProperties().getProperty("name3"));
a... | 0 |
this.nonDefaultColumnFamilies = new HashSet<>();
HashMap<ByteSequence,MutableLong> map = new HashMap<>();
private ConcurrentSkipListMap<Key,Value> map = new ConcurrentSkipListMap<>(new MemKeyComparator());
HashSet<ByteSequence> allfams = new HashSet<>(); | 1 |
package org.apache.ambari.server.stack.upgrade.orchestrate;
import org.apache.ambari.server.stack.upgrade.ExecuteHostType;
import org.apache.ambari.server.stack.upgrade.ExecuteTask;
import org.apache.ambari.server.stack.upgrade.Task; | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
if ( cachedResponse.getContentType() != null ) {
environment.setContentType(cachedResponse.getContentType());
} else {
this.setMimeTypeForSerializer(environment);
}
this.setMimeTypeForSerializ... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/bidimap/TreeBidiMap.java,v 1.8 2004/01/08 22:26:08 scolebourne Exp $
* @version $Revision: 1.8 $ $Date: 2004/01/08 22:26:08 $
* @return negative value if o1 < o2; 0 if o1 ... | 0 |
import org.apache.beam.runners.core.construction.SerializablePipelineOptions;
private final SerializablePipelineOptions serializableOptions;
this.serializableOptions = new SerializablePipelineOptions(options);
public SerializablePipelineOptions getSerializableOptions() {
return serializableOptions;
retu... | 0 |
random.nextBytes(buff); | 0 |
import org.apache.commons.jelly.*;
protected void addCustomTagLib(JellyContext context) {
context.registerTagLibrary(TJTagLibrary.NS, TJTagLibrary.class.getName());
}
| 0 |
// No action required
// Expected result
// Expected result
// Expected result
// Expected result
// Expected result
// Expected result
// Expected result
// Expected result
// Expected result
... | 0 |
import cz.seznam.euphoria.core.client.dataset.windowing.Count;
.windowBy(Count.of(2))
.windowBy(Count.of(8)) | 0 |
package org.apache.commons.digester3.xmlrules;
final class XmlRulesModule | 0 |
assertEquals("instance", read.getBigtableConfig().getInstanceId());
assertEquals("project", read.getBigtableConfig().getProjectId());
assertEquals(PORT_CONFIGURATOR, read.getBigtableConfig().getBigtableOptionsConfigurator());
.withProjectId("project");
assertEquals("table", write.getBigtable... | 0 |
import org.easymock.EasyMock;
expect(factory.getRootServiceHostComponent((RootServiceHostComponentRequest) anyObject(), EasyMock.<Set<HostResponse>>anyObject())). | 0 |
@SuppressWarnings("deprecation") // most of the static methods are deprecated
@SuppressWarnings("deprecation") // most of the static methods are deprecated
@SuppressWarnings("deprecation") // most of the static methods are deprecated
@SuppressWarnings("deprecation") // most of the static methods are dep... | 0 |
* @version CVS $Id: MatchNode.java,v 1.6 2004/07/16 12:36:45 sylvain Exp $
Matcher matcher = (Matcher)getComponent();
try {
objectModel,
matcher,
resolvedPattern,
resolvedParams);
} finally {
releaseC... | 0 |
NamespacedBox namespacedBox = d.peek();
namespacedBox.setNamespaces(namespaces); | 0 |
return new XPathExpression(attributeValue, xpath, tagScript);
return new XPathPatternExpression(attributeValue, pattern); | 0 |
import java.util.List;
List<String> childs =
zk.getChildren("/hammers", false); | 0 |
public boolean deploy(Block[] blocks, String serverArtifact, File[] libraries, Logger log, boolean transactional); | 0 |
protected String initialConfig;
initialConfig = config.getInitialConfig(); | 0 |
* Returns the size of a px CSS unit in millimeters.
*/
public float getPixelUnitToMillimeter() {
SVGContext ctx = ((SVGOMElement)element).getSVGContext();
return ctx.getPixelUnitToMillimeter();
}
/**
* Returns th... | 0 |
public ObjectGraphIterator(final E root, final Transformer<? super E, ? extends E> transformer) {
public ObjectGraphIterator(final Iterator<? extends E> rootIterator) {
protected void findNext(final E value) {
protected void findNextByIterator(final Iterator<? extends E> iterator) {
final E resu... | 0 |
put(BatchRequestJob.BATCH_REQUEST_FAILED_TASKS_IN_CURRENT_BATCH_KEY, 0); | 0 |
String inAttr = filterElement.getAttributeNS(null, SVG_IN_ATTRIBUTE); | 0 |
ITypedReferenceableInstance cached = RequestContext.get().getInstance(guid);
if(cached != null) {
return cached;
} | 0 |
try (BatchWriter b = accumuloClient.createBatchWriter(tableName)) {
// populate
for (int i = 0; i < N; i++) {
Mutation m = new Mutation(new Text(String.format("%05d", i)));
m.put(new Text("col" + Integer.toString((i % 3) + 1)), new Text("qual"),
new Value("junk".g... | 0 |
private static Integer numberOfTextLines; | 0 |
* A default implementation that can be used for writing own generators.
*
* @deprecated Use the {@link ServiceableGenerator} instead.
* @version CVS $Id: ComposerGenerator.java,v 1.2 2003/09/03 15:00:56 cziegeler Exp $
protected ComponentManager manager; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/EvalContext.java,v 1.19 2002/11/26 01:20:06 dmitri Exp $
* $Revision: 1.19 $
* $Date: 2002/11/26 01:20:06 $
import org.apache.commons.jxpath.ExpressionContext;
import org.apache.commons... | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList; | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
protected final Logger log = LoggerFactory.getLogger(this.getClass()); | 0 |
import com.google.common.collect.Maps;
public class MemSchedulerStore implements SchedulerStore.Mutable.Transactioned {
private static final String FRAMEWORK_ID_KEY = "framework_id";
private final TransactionalMap<String, String> entries =
TransactionalMap.wrap(Maps.<String, String>newHashMap());
@Overrid... | 0 |
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken; | 0 |
import org.apache.accumulo.core.client.AccumuloClient;
InstanceOperations iops = getAccumuloClient().instanceOperations();
InstanceOperations iops = getAccumuloClient().instanceOperations();
final AccumuloClient c = getAccumuloClient();
private long batchScan(AccumuloClient c, String tableName, List<Range... | 0 |
/** Thread that requested this connection. */
private final Thread executionThread;
super();
executionThread = Thread.currentThread();
// Usually #abortConnection() is expected to be called from
// a helper thread in order to unblock the main execution thread
... | 0 |
package org.apache.beam.runners.spark.translation;
import org.apache.beam.runners.spark.SparkPipelineRunner; | 0 |
@Override
public final boolean isRepeatable() {
return false;
}
| 0 |
Assert.assertEquals(15, resources.size()); | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables; | 0 |
this.supported = Constants.NONE.equals(factoryName) || Cipher.checkSupported(this.transformation, this.keysize);
return NamedResource.findByName(name, String.CASE_INSENSITIVE_ORDER, VALUES); | 0 |
element.setAttributeNS(SVG_NAMESPACE_URI, ATTR_TRANSFORM, transform);
if(element.getAttributeNS(SVG_NAMESPACE_URI, attrName).length() == 0)
element.setAttributeNS(SVG_NAMESPACE_URI, attrName, (String)attrMap.get(attrName));
rect.setAttributeNS(SVG_NAMESPACE_URI, A... | 0 |
* 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 |
import org.apache.accumulo.core.trace.TraceUtil;
stats = client.getMasterStats(TraceUtil.traceInfo(), context.rpcCreds()); | 0 |
.apply(name + ".Rekey",
ParDo.of(new DoFn<Bid, KV<Long, Void>>() {
@ProcessElement
.apply(name + ".ToResult",
ParDo.of(new DoFn<KV<Long, Long>, BidsPerSession>() {
@ProcessElement | 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 ... | 1 |
boolean compile(Project project, Collection<File> sources, Collection<Container> buildpath, File bin)
throws Exception; | 0 |
import java.util.Comparator;
/**
* Set the comparator.
* The indicated class must implement {@link Comparator}
*/
Class comparator() default Comparator.class; | 0 |
import org.apache.batik.anim.dom.AnimatableElement;
import org.apache.batik.anim.dom.AnimatedLiveAttributeValue;
import org.apache.batik.anim.dom.AnimationTarget;
import org.apache.batik.anim.dom.AnimationTargetListener;
import org.apache.batik.anim.dom.SVGOMElement; | 0 |
import org.apache.beam.sdk.values.ShardedKey; | 0 |
import javax.servlet.ServletConfig;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.context.ContextException;
import org.apache.avalon.framework.context.Contextualizable;
import org.apache.cocoon.servlet.CocoonServlet;
* @version CVS $Id: PortletWindowAspect.java,v 1.2 2004/02/06... | 0 |
import com.google.cloud.dataflow.sdk.coders.VarLongCoder;
import com.google.cloud.dataflow.sdk.transforms.Sum;
import com.google.cloud.dataflow.sdk.util.state.CombiningValueState;
import com.google.cloud.dataflow.sdk.util.state.StateContents;
import com.google.cloud.dataflow.sdk.util.state.StateTag;
import com.google.c... | 0 |
fireGraphicsNodeChangeStarted();
fireGraphicsNodeChangeCompleted();
fireGraphicsNodeChangeStarted();
fireGraphicsNodeChangeCompleted(); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestDoubleListList.java,v 1.3 2003/10/02 22:14:31 scolebourne Exp $
import org.apache.commons.collections.AbstractTestList;
* @version $Revision: 1.3 $ $... | 0 |
import org.apache.ambari.server.state.PropertyInfo.PropertyType;
Set<String> userSet = configHelper.getPropertyValuesWithPropertyType(stackId, PropertyType.USER, cluster);
String userList = gson.toJson(userSet);
hostLevelParams.put(USER_LIST, userList);
Set<String> groupSet = conf... | 0 |
import java.io.FileOutputStream;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerConfigurationExce... | 0 |
protected String[] flatten(Options options, String[] arguments,
boolean stopAtNonOption) | 0 |
import javax.servlet.ServletContext;
import org.apache.cocoon.portal.util.AbstractBean;
public class PortalStartup
extends AbstractBean | 0 |
* @return true if the map changed as a result of this operation
* @return true if the map changed as a result of this operation | 0 |
import org.apache.cocoon.util.location.Location;
} catch(Exception e) {
// Wrap with our location
throw ProcessingException.throwLocated("Sitemap: error when calling sub-sitemap", e, getLocation());
| 0 |
@Deprecated
public static DateFormat getDateFormatter() {
return THREAD_LOCAL_DATE_FORMAT.get();
}
private static final ThreadLocal<DateFormat> THREAD_LOCAL_DATE_FORMAT = new ThreadLocal<DateFormat>() {
@Override
public DateFormat initialValue() {
DateFormat ret = ... | 0 |
ConfigurableListableBeanFactory createBeanFactory(ClassLoader classLoader,
Logger sitemapLogger,
Configuration config,
Context sitemapContext,
SourceResolver resolver,
Settings settings) | 0 |
assertEquals("option missing an argument", "b", e.getOption().getOpt()); | 0 |
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* permission of the Apache Software Foundation. | 0 |
package org.apache.cocoon.template.jxtg.instructions;
import org.apache.cocoon.template.jxtg.script.event.StartElement;
import org.apache.cocoon.template.jxtg.script.event.StartInstruction; | 0 |
import org.apache.xml.security.exceptions.XMLSecurityException;
import org.apache.xml.security.utils.ElementProxy;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList; | 0 |
sideInputs.put(view.getTagInternal().getId(), ParDoTranslation.translateView(view)); | 0 |
CommandRepository commandRepository = executionCommand.getRepositoryFile();
if (null == commandRepository && null != host && null != serviceName) {
commandRepository = repoVersionHelper.getCommandRepository(cluster, cluster.getService(serviceName), host, executionCommand.getComponentName());
... | 0 |
/* FALL THRU */ | 0 |
* Return the current web application context or if the attributes are null, the parent context.
// return the root context
return WebApplicationContextUtils.getRequiredWebApplicationContext(ServletContextFactoryBean.getServletContext()); | 0 |
return BATIK_12_NAMESPACE_URI; | 0 |
Copyright 2000 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 or... | 0 |
/** Accept the visitor. */ | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.MoreObjects;
import org.apache.beam.vendor.guava.v2... | 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.zookeeper.CreateMode;
zk.create("/" + i, null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.