Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
* TODO(maxim): Implement external configuration support: AURORA-1443. | 0 |
Copyright 2001,2003, 2006 The Apache Software Foundation
import java.util.ArrayList;
// myBounds= myBounds.union(newBound);
myBounds.add( newBound );
if (myBounds == null)
List vec = new ArrayList( srcs.size() );
// For arithmetic make sure they ar... | 0 |
* </p> | 0 |
import java.io.DataInput;
ConstantLong(DataInput file) throws IOException { | 0 |
package org.apache.beam.sdk.runners.inprocess;
import org.apache.beam.sdk.runners.inprocess.InProcessExecutionContext.InProcessStepContext;
import org.apache.beam.sdk.runners.inprocess.InProcessPipelineRunner.UncommittedBundle;
import org.apache.beam.sdk.transforms.AppliedPTransform;
import org.apache.beam.sdk.util.DoF... | 0 |
public static <E> void forEach(final Iterable<E> iterable, final Closure<? super E> closure) {
IteratorUtils.forEach(emptyIteratorIfNull(iterable), closure);
public static <E> E forEachButLast(final Iterable<E> iterable, final Closure<? super E> closure) {
return IteratorUtils.forEachButLast(emp... | 0 |
// TODO(ksweeney): Consider adding a Map<JobKey, JobConfiguration> to complement this.
// TODO(ksweeney): Refactor to take a JobKey
// TODO(ksweeney): Refactor to take a JobKey | 0 |
private final EvaluationContext context;
public EvaluatorKey(AppliedPTransform<?, ?, ?> transform, EvaluationContext context) { | 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
... | 0 |
Iterable<Window> assigned = windowing.assignWindowsToElement(wel); | 0 |
entity.setSourceType(source.getType()); | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger log = LoggerFactory.getLogger(CompactRange.class); | 0 |
package org.apache.beam.sdk.extensions.euphoria.operator.test.accumulators; | 0 |
if ( ! outputDir.exists() ) {
if ( ! outputDir.isDirectory() ) { | 0 |
/**
* 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 in writing, software
* distribu... | 0 |
* @param schedulingFilter Filter to identify whether tasks may reside on given slaves.
private static final Function<IAssignedTask, String> TASK_TO_SLAVE_ID =
new Function<IAssignedTask, String>() {
@Override public String apply(IAssignedTask input) {
return input.getSlaveId();
}
... | 0 |
/**
* @since 4.3
*/
protected void onLease(final E entry) {
}
/**
* @since 4.3
*/
protected void onRelease(final E entry) {
}
onRelease(entry);
onLease(entry); | 0 |
private final FileObject containerFile;
public TestEntityResolver(final FileObject containerFile, FileObject sourceFile) {
this.containerFile = containerFile;
// System.out.println("resolving publicId=" + publicId + ", systemId=" + systemId);
if (/* fileName.equals("person.xsd") || */fil... | 0 |
import static com.google.common.base.Charsets.UTF_8;
return Long.parseLong(new String(ZooReaderWriter.getRetryingInstance().getData(zTablePath, null), UTF_8));
return Long.parseLong(new String(ZooReaderWriter.getRetryingInstance().getData(zTablePath, null), UTF_8));
String[] tokens = new String(ZooRe... | 0 |
import org.apache.accumulo.harness.AccumuloClusterHarness;
public class VisibilityIT extends AccumuloClusterHarness { | 0 |
public void testPositiveEmbedDependency() throws Exception
instructions.put( DependencyEmbedder.EMBED_DEPENDENCY, "*;classifier=;type=jar;scope=compile,"
+ "*;classifier=;type=jar;scope=runtime" );
assertEquals( ".,compile-1.0.jar,b-1.0.jar,runtime-1.0.jar", bcp );
assertEquals( ... | 0 |
* limitations under the License. | 0 |
InputStream read(String path, EnumSet<OpenMode> mode) throws IOException;
OutputStream write(String path, EnumSet<OpenMode> mode) throws IOException;
| 0 |
@Deprecated
@Deprecated
| 0 |
if (null != parserKey) {
// if a parser key was supplied in the parameters,
// use that to create the paraser
__entryParser =
__parserFactory.createFileEntryParser(parserKey);
} else {
// if no parserKe... | 0 |
public <T extends Mutation> void binMutations(ClientContext context, List<T> mutations,
Map<String,TabletServerMutations<T>> binnedMutations, List<T> failures)
public List<Range> binRanges(ClientContext context, List<Range> ranges,
Map<String,Map<KeyExtent,List<Range>>> binnedRanges)
throws Accumu... | 0 |
import org.apache.sshd.common.session.impl.AbstractConnectionServiceRequestHandler; | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(ConnectionInfo.class); | 1 |
return BasicLineFormatter.INSTANCE.formatRequestLine(null, this).toString(); | 0 |
// If the BouncyCastle provider is not installed, then try to load it
| 1 |
* @version CVS $Id$
* The version of the JVM for wich the code was written.
* i.e: 130 = Java 1.3, 140 = Java 1.4 and 150 = Java 1.5
*/
protected int compilerComplianceLevel;
/**
* Set the version of the java source code to be compiled
*
* @param sourceCodeVersion The version of ... | 0 |
for(final OCD ocd : metaData.getOCDs()) {
generateXML(ocd, contentHandler);
}
for(final Designate d : metaData.getDesignates()) {
generateXML(d, contentHandler);
final Iterator<AttributeDefinition> i = ocd.getProperties().iterator();
final Att... | 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.ambari.server.ldap.domain.AmbariLdapConfigurationKeys;
return AmbariLdapConfigurationKeys.GROUP_MEMBER_ATTRIBUTE.key(); | 0 |
import org.apache.ambari.server.security.SecurityHelper;
import org.springframework.security.core.GrantedAuthority;
import java.util.Collection;
import java.util.Collections;
TestSecurityHelper securityHelper = new TestSecurityHelper("user1");
ViewInstanceEntity viewInstanceDefinition = getViewInstanceEntity(se... | 0 |
import java.util.Iterator;
/**
* Tests converting a configuration into a hierarchical one.
*/
public void testConvertToHierarchical()
{
Configuration conf = new BaseConfiguration();
for (int i = 0; i < 10; i++)
{
conf.addProperty("test" + i, "value" + i);
... | 0 |
package org.apache.accumulo.monitor.rest.api.xml;
import org.apache.accumulo.monitor.rest.api.master.MasterResource;
import org.apache.accumulo.monitor.rest.api.table.TablesResource;
import org.apache.accumulo.monitor.rest.api.tserver.TabletServer;
/**
*
* Responsible for generating an XML summary of the Monitor
*
... | 0 |
import java.io.Serializable;
* @version CVS $Id: FragmentExtractorGenerator.java,v 1.6 2004/03/28 05:29:04 antonio Exp $
public Serializable getKey() {
if (getLogger().isDebugEnabled()) {
getLogger().debug("Could not lookup for component.", ce);
} | 0 |
* Map of PooledConnections for which close events are ignored.
* Connections are muted when they are being validated.
private Map validatingMap = new HashMap();
* @param validationQuery a query to use to {*link #validateObject validate} {*link Connection}s.
* Should return at least one row. May ... | 0 |
collectorUri = "http://" + configuration.getProperty(COLLECTOR_HOST_PROPERTY) + ":" + configuration.getProperty(COLLECTOR_PORT_PROPERTY) + "/ws/v1/timeline/metrics";
Servers.parse(configuration.getProperty(configuration.getProperty(COLLECTOR_HOST_PROPERTY)), Integer.valueOf(configuration.getProperty(COLLECT... | 0 |
(host.getPort() > 0 ? Integer.valueOf(host.getPort()) : uri.startsWith("https") ? "443" : "80") + "\n");
(totalBytesSent > 0 ? nf2.format(totalBytesSent/1000/totalTimeSec) : Integer.valueOf(-1)) + " kb/s sent"); | 0 |
import org.apache.batik.ext.awt.g2d.GraphicContext;
import org.apache.batik.ext.awt.g2d.TransformType;
import org.apache.batik.ext.awt.g2d.TransformStackElement;
| 0 |
import org.apache.beam.sdk.schemas.Schema.LogicalType;
if (fieldType.getTypeName() == TypeName.LOGICAL_TYPE) {
return deepEquals(a, b, fieldType.getLogicalType().getBaseType());
} else if (fieldType.getTypeName() == Schema.TypeName.BYTES) {
if (fieldType.getTypeName() == TypeName.LOGICAL_TYPE)... | 0 |
public static final Long DEFAULT_PAGE_SIZE = new Long (20);
public static final Long DEFAULT_PAGE = new Long (0);
public static final String SCORE_FIELD = "_lucene-score_";
public static final String INDEX_FIELD = "_lucene-index_"; | 0 |
expect(infoMock.getQuota()).andReturn(QUOTA); | 0 |
public class H2StreamResetException extends IOException {
public H2StreamResetException(final H2Error error, final String message) {
public H2StreamResetException(final int code, final String message) { | 0 |
/**
* An optional class that substitutes values in attributes and body text. This may be null and so a null check is
* always required before use.
*/ | 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
* "Lice... | 0 |
private Id tableId;
tableId = createInstance(tableInstance);
final String guid = tableId._getId();
final String guid = tableId._getId();
Id dbInstance = createInstance(databaseInstance);
String dbId = dbInstance._getId();
final String guid = tableId._getId();
... | 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.collect.Iterables;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Ordering; | 0 |
import org.apache.beam.sdk.transforms.ParDo.MultiOutput;
final MultiOutput<Long, Long> replacementParDo =
final MultiOutput<Long, Long> replacementParDo = | 0 |
import org.apache.cocoon.template.expression.Subst;
Subst expr = (Subst) subst; | 0 |
this.manager.removeServlet(service, ref); | 0 |
import com.google.inject.Inject;
wrappersLoaded = true;
skippable = false;
for (String host: commandsToSend.keySet()) {
for (ExecutionCommandWrapper wrapper : commandsToSend.get(host)) {
cmd.setRequestAndStage(requestId, stageId);
cmd.setRequestAndStage(requestId, stageId);
Map<String,... | 0 |
* @version CVS $Id: DefaultCopletFactory.java,v 1.5 2003/06/06 11:33:38 cziegeler Exp $
String id = null;
if ( copletDescription.createId() ) {
// TODO - create unique id
id = name + '-' + System.currentTimeMillis();
}
instanceDesc.setCreateId(co... | 0 |
if (event.getType() == AbstractFileConfiguration.EVENT_RELOAD)
needsReloading = true;
if (null == envConfig)
envConfig = new EnvironmentConfiguration();
if (null == sysConfig)
sysConfig = new SystemConfiguration();
if (null == config || needsReloading)
synchronized (lock) {
... | 1 |
/**
* This bean is used to replicate a reasonably complex use case whose behaviour has changed from Digester 1.3 to 1.4.
*
public class ParamBean
{
public ParamBean()
{
}
public boolean isCool()
{
public void setCool( boolean cool )
{
public String getThis()
{
public S... | 1 |
* Wraps a <code>ResultSet</code> in an <code>Iterator<Object[]></code>. This is useful | 0 |
* Represents a file name. File names are immutable, and work correctly as
* keys in hash tables. | 0 |
* in which case it will be inferred using {@link FileBasedSource#getMaxEndOffset}. | 0 |
import org.apache.beam.sdk.transforms.PTransform; | 0 |
import org.apache.storm.metric.api.IMetricsConsumer; | 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 |
private static final Logger log = Logger.getLogger(ConfigurationDocGen.class); | 0 |
SimpleTestBean bean = digester.parse(xmlTestReader());
SimpleTestBean bean = digester.parse(
SimpleTestBean bean = digester.parse(
SimpleTestBean bean = digester.parse(
SimpleTestBean bean = digester.parse(
SimpleTestBean bean = digester.parse(reader);
Sim... | 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.beam.vendor.grpc.v1_13_1.io.grpc.stub.CallStreamObserver;
import org.apache.beam.vendor.grpc.v1_13_1.io.grpc.stub.StreamObserver; | 0 |
if (iface.isAssignableFrom(getClass())) {
return true;
} else if (iface.isAssignableFrom(_res.getClass())) {
return true;
} else {
return _res.isWrapperFor(iface);
} | 0 |
import com.google.common.collect.ImmutableSet;
@Option(name = "scheduler_address", required = true,
usage = "Thrift service address for the scheduler.")
public InetSocketAddress schedulerAddress;
@Inject Coordinator updateCoordinator;
try {
updateCoordinator.run();
} catch (Exception e)... | 0 |
import static org.junit.Assert.*;
public class CanonicalizationMethodTest { | 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 |
*
*
*
*
* @version CVS $Id: XMLFileModule.java,v 1.17 2004/06/16 14:57:54 vgritsenko Exp $
/* (non-Javadoc)
* @see org.apache.avalon.framework.activity.Disposable#dispose()
*/
public void dispose() {
super.dispose();
if (this.manager != null) {
this.manager.release(this... | 0 |
static class DoFnProcessContext<InputT, OutputT>
@Override
public WindowingInternals.KeyedState keyedState() {
return context.stepContext;
} | 0 |
import static org.hamcrest.Matchers.instanceOf;
import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
thrown.expectMessage("duplicate");
public void testWindowParamOnTimer() throws Exception {
final String timerId = "some-timer-id";
DoFnSignature sig =
DoFnSignatures.INSTANCE.getSignatur... | 0 |
/**
* Return a list of known live collector nodes
* @return [ hostname ]
*/
List<String> getLiveInstances(); | 0 |
* @version $Id: NTFTPEntryParser.java,v 1.17 2004/07/28 05:01:47 dfs Exp $
f.setSize(Long.parseLong(size)); | 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 |
* Imports a table exported via exportTable and copied via hadoop distcp.
*
* @param tableName
* Name of a table to create and import into.
* @param importDir
* Directory that contains the files copied by distcp from exportTable
* @throws TableExistsException
* @throws Accumulo... | 0 |
@Override | 0 |
package org.apache.bcel.generic;
super(org.apache.bcel.Const.ILOAD, org.apache.bcel.Const.ILOAD_0);
super(org.apache.bcel.Const.ILOAD, org.apache.bcel.Const.ILOAD_0, n); | 1 |
import org.apache.http.util.CharArrayBuffer; | 0 |
*
* <p> Concepts: Reading/writing BigQuery; counting a PCollection; user-defined PTransforms
*
* <p> Note: Before running this example, you must create a BigQuery dataset to contain your output
* table.
*
* <p> To execute this pipeline locally, specify general pipeline configuration:
* --project=<PROJECT ... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/AbstractShortArrayList.java,v 1.10 2003/08/31 12:59:57 scolebourne Exp $
* @version $Revision: 1.10 $ $Date: 2003/08/31 12:59:57 $
* @param mincap the mini... | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.util.concurrent.ThreadFactoryBuilder; | 0 |
package org.apache.commons.digester3; | 1 |
@ManyToOne(cascade = {CascadeType.MERGE}) | 0 |
package org.apache.beam.sdk.util; | 0 |
/* ====================================================================
* Copyright (c) 2002-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.6 $ $Date: 2004/01/14 21:43:03 $ | 0 |
* @version CVS $Id: CastorTransformer.java,v 1.8 2004/05/08 01:34:06 joerg Exp $
| 0 |
package org.apache.accumulo.server.rpc; | 1 |
import org.apache.sshd.util.test.NoIoTestCase;
import org.junit.experimental.categories.Category;
@Category({ NoIoTestCase.class }) | 0 |
import org.apache.commons.configuration.builder.FileBasedBuilderParametersImpl;
"org.apache.commons.configuration.builder.FileBasedBuilderParametersImpl";
* Returns the configuration builder with the given name. With this method a
* builder of a child configuration which was given a name in the
... | 0 |
private static final Logger LOG = LoggerFactory.getLogger(ServiceComponentHostTest.class);
LOG.debug("Calling service create, serviceName={}", svc); | 1 |
* @version $Revision$ | 0 |
* Autogenerated by Thrift Compiler (0.9.3)
import javax.annotation.Generated;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-16")
public class TSampleNotPresentException extends TException implements org.apache.thr... | 0 |
import org.apache.ambari.logfeeder.conf.LogEntryCacheConfig;
LogFeederProps logFeederProps = new LogFeederProps();
LogEntryCacheConfig logEntryCacheConfig = new LogEntryCacheConfig();
logEntryCacheConfig.setCacheEnabled(false);
logEntryCacheConfig.setCacheSize(0);
logFeederProps.setLogEntryCacheConf... | 0 |
import java.util.concurrent.atomic.AtomicLong;
import org.apache.accumulo.core.client.IteratorSetting.Column;
import org.apache.accumulo.core.conf.DefaultConfiguration;
import org.apache.hadoop.io.Text;
public static final List<Column> COLNAMES = new ArrayList<Column>();
public static final Text CHECK_COLUMN_FAMILY... | 0 |
* @version CVS $Id$
/* (non-Javadoc)
* @see org.apache.pluto.om.portlet.ContentTypeSet#get(java.lang.String)
*/
public ContentType get(String contentType) {
/* (non-Javadoc)
* @see org.apache.cocoon.portal.pluto.om.common.Support#postLoad(java.lang.Object)
*/
public void postLoad(Ob... | 0 |
if (s.isEmpty()) { | 0 |
import com.google.cloud.dataflow.sdk.io.Read;
* Translator for the {@code Read} {@code PTransform} for the Dataflow back-end.
public class ReadTranslator
implements DataflowPipelineTranslator.TransformTranslator<Read.Bound> {
Read.Bound transform, DataflowPipelineTranslator.TranslationContext context) { | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.