Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
put(AmbariUpdateEvent.Type.ALERT_DEFINITIONS, "/alert_definitions");
put(AmbariUpdateEvent.Type.UI_ALERT_DEFINITIONS, "/events/alert_definitions"); | 0 |
package org.apache.commons.ognl;
* $Id$
public <R, P> R accept( NodeVisitor<? extends R, ? super P> visitor, P data )
return visitor.visit( this, data ); | 0 |
public static final String SOLR_KEY_LOG_MESSAGE = "key_log_message";
public static final String LIST_SEPARATOR = ",";
public static final String SORT = "sort";
public static final String FL = "fl";
//Facet Constant
public static final String FACET_FIELD = "facet.field";
public static final String FACET_MINCOUNT = "facet.mincount";
public static final String FACET_JSON_FIELD = "json.facet";
public static final String FACET_PIVOT = "facet.pivot";
public static final String FACET_PIVOT_MINCOUNT = "facet.pivot.mincount";
public static final String FACET_DATE = "facet.date";
public static final String FACET_DATE_START = "facet.date.start";
public static final String FACET_DATE_END = "facet.date.end";
public static final String FACET_DATE_GAP = "facet.date.gap";
public static final String FACET_RANGE = "facet.range";
public static final String FACET_RANGE_START = "facet.range.start";
public static final String FACET_RANGE_END = "facet.range.end";
public static final String FACET_RANGE_GAP = "facet.range.gap";
public static final String FACET_GROUP = "group";
public static final String FACET_GROUP_MAIN = "group.main";
public static final String FACET_GROUP_FIELD = "group.field";
public static final String FACET_LIMIT = "facet.limit";
| 0 |
package org.apache.hc.client5.http.classic.methods; | 0 |
boolean isActivatorActive()
{
BundleComponentActivator activator = getActivator();
return activator != null && activator.isActive();
}
if ( !acm.isActivatorActive() )
{
acm.log( LogService.LOG_DEBUG, "Bundle's component activator is not active; not enabling component",
null );
return;
}
if ( !acm.isActivatorActive() )
{
acm.log( LogService.LOG_DEBUG, "Bundle's component activator is not active; not activating component",
null );
return;
}
| 0 |
@Override
@Override
@Override
@Override | 0 |
RELATIONSHIP_SEARCH,
RELATIONSHIP_SEARCH_ASCENDING_SORT,
RELATIONSHIP_SEARCH_DESCENDING_SORT,
COMPARE_CONTAINS | 0 |
PCollection<Row> result = input.apply("testAggregationWithoutWindow", SqlTransform.query(sql));
.apply("testAggregationFunctions", SqlTransform.query(sql));
boundedInput3.apply("testAggregationWithDecimalValue", SqlTransform.query(sql));
PCollection<Row> result = input.apply("testDistinct", SqlTransform.query(sql));
.apply("testTumbleWindow", SqlTransform.query(sql));
.apply("Windowed Query", SqlTransform.query(sql));
PCollection<Row> result = input.apply("testHopWindow", SqlTransform.query(sql));
.apply("testSessionWindow", SqlTransform.query(sql));
.apply("testWindowOnNonTimestampField", SqlTransform.query(sql));
boundedInput1.apply("testUnsupportedDistinct", SqlTransform.query(sql));
input.apply("testUnsupportedGlobalWindows", SqlTransform.query(sql));
PCollection<Row> result = input.apply("sql", SqlTransform.query(sql));
PCollection<Row> result = input.apply("sql", SqlTransform.query(sql)); | 0 |
zipExtractor.addRule("**WEB-INF/classes/**", new SingleFileDeployer("WEB-INF/classes"));
zipExtractor.addRule("**WEB-INF/db/**", new SingleFileDeployer("WEB-INF/db")); | 0 |
public UsageGroup usageGroup() {
return UsageGroup.PROCESS;
}
@Override | 0 |
* A map only job that reads a table created by continuous ingest and creates doubly linked list. This map reduce job tests the ability of a map only job to
* read and write to accumulo at the same time. This map reduce job mutates the table in such a way that it should not create any undefined nodes.
@Override
@Override
.toArray(), random, true);
@Parameter(names = "--maxColF", description = "maximum column family value to use")
@Parameter(names = "--maxColQ", description = "maximum column qualifier value to use")
@Parameter(names = "--maxMappers", description = "the maximum number of mappers to use", required = true, validateWith = PositiveInteger.class)
AccumuloInputFormat.setRanges(job, ranges);
AccumuloInputFormat.setAutoAdjustRanges(job, false);
AccumuloOutputFormat.setBatchWriterOptions(job, bwOpts.getBatchWriterConfig()); | 1 |
/** Category tag for validation tests which utilize {@link MapState}. */ | 1 |
import org.apache.hc.client5.http.entity.mime.MIME; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/DefaultMapBag.java,v 1.14 2004/01/08 22:26:07 scolebourne Exp $
* @version $Revision: 1.14 $ $Date: 2004/01/08 22:26:07 $
boolean contains = getCount(current) >= other.getCount(current); | 0 |
package org.apache.beam.sdk.extensions.sql.interpreter.operator.logical;
import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlExpression; | 0 |
package org.apache.felix.sigil.eclipse.internal.adapter;
import org.apache.felix.sigil.eclipse.SigilCore;
import org.apache.felix.sigil.eclipse.model.project.ISigilProjectModel; | 0 |
public void addTests(final Class<?> testClass) throws Exception
@SuppressWarnings("unchecked")
final Enumeration<Test> tests = testSuite.tests();
final Test test = tests.nextElement();
List<Thread> diff = new ArrayList<Thread>(10);
for (int iterStart = 0; iterStart < startThreadSnapshot.length; iterStart++) | 0 |
/*
* Copyright 2000-2009 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 agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.bcel.verifier.exc;
/**
* Instances of this class are thrown by BCEL's class file verifier "JustIce"
* when a class file to verify does not pass the verification pass 2 as described
* in the Java Virtual Machine specification, 2nd edition.
*
* @version $Id$
* @author Enver Haase
*/
public class ClassConstraintException extends VerificationException{
/**
* Constructs a new ClassConstraintException with null as its error message string.
*/
public ClassConstraintException(){
super();
}
/**
* Constructs a new ClassConstraintException with the specified error message.
*/
public ClassConstraintException(String message){
super (message);
}
/**
* Constructs a new ClassConstraintException with the specified error message and cause
*/
public ClassConstraintException(String message, Throwable initCause){
super(message, initCause);
}
} | 0 |
* Copyright 2016 Seznam.cz, a.s. | 0 |
IJobUpdateKey key = update.getSummary().getKey();
jobKeyMapper.merge(key.getJob().newBuilder()); | 0 |
Runnable cmSupport;
final Map<ServiceReference, ArtifactListener> listeners = new TreeMap<ServiceReference, ArtifactListener>();
final BundleTransformer bundleTransformer = new BundleTransformer();
boolean initialized;
final Object barrier = new Object();
watcher = new DirectoryWatcher(this, properties, context);
List<ArtifactListener> getListeners() | 0 |
* @deprecated (3.3) Use {@link #_openDataConnection_(FTPCmd, String)} instead
* @since 3.3
* @since 3.3
*/
* @since 3.3
* @since 3.3
* @since 3.3 | 0 |
import org.apache.mesos.Protos.Resource.Ranges;
import com.twitter.mesos.scheduler.Resources.InsufficientResourcesException;
import static org.junit.Assert.fail;
Resource portsResource = createPortRanges(Pair.of(1, 5));
public void testOnePortAvailable() {
Resource portsResource = createPortRanges(Pair.of(3, 3));
Set<Integer> ports = Resources.getPorts(createOffer(portsResource), 1);
assertEquals(1, ports.size());
}
@Test
Resource portsResource = createPortRanges(Pair.of(1, 10));
@Test
public void testPortRange_exhaust() {
Resource portsResource = createPortRanges(Pair.of(1, 2), Pair.of(10, 15));
Set<Integer> ports = Resources.getPorts(createOffer(portsResource), 7);
assertEquals(7, ports.size());
ports = Resources.getPorts(createOffer(portsResource), 8);
assertEquals(8, ports.size());
try {
ports = Resources.getPorts(createOffer(portsResource), 9);
fail("Ports should not have been sufficient");
} catch (InsufficientResourcesException e) {
// Expected.
}
}
Resource portsResource = createPortRanges(Pair.of(1, 2));
private Resource createPortRanges(Pair<Integer, Integer>... ports) {
Ranges.Builder ranges = Ranges.newBuilder();
for (Pair<Integer, Integer> range : ports) {
ranges.addRange(Range.newBuilder().setBegin(range.getFirst()).setEnd(range.getSecond()));
}
return Resource.newBuilder()
.setName(Resources.PORTS)
.setType(Type.RANGES)
.setRanges(ranges)
.build(); | 0 |
private boolean setInstanceId;
private String instanceId;
setInstanceId = Boolean.valueOf(configuration.getProperty(SET_INSTANCE_ID_PROPERTY));
instanceId = configuration.getProperty(INSTANCE_ID_PROPERTY);
if (setInstanceId) {
timelineMetric.setInstanceId(instanceId);
} | 0 |
import org.apache.accumulo.server.ServerContext;
private ServerContext context;
TabletMemory(Tablet tablet) {
this.context = tablet.getContext();
memTable = new InMemoryMap(tablet.getTableConfiguration(), context);
memTable = new InMemoryMap(tablet.getTableConfiguration(), context);
public ServerContext getContext() {
return context;
}
| 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/DefaultMapBag.java,v 1.4 2002/06/16 18:56:19 mas Exp $
* $Revision: 1.4 $
* $Date: 2002/06/16 18:56:19 $
/**
* Implement a toString() method suitable for debugging
**/
public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("[");
Iterator i = uniqueSet().iterator();
while(i.hasNext()) {
Object current = i.next();
int count = getCount(current);
buf.append(count);
buf.append(":");
buf.append(current);
if(i.hasNext()) {
buf.append(",");
}
}
buf.append("]");
return buf.toString();
} | 0 |
* @param handler The servlet handler
public void addServlet(@Nonnull final ServletHandler handler)
this.servletRegistry.addServlet(handler);
this.errorPageRegistry.addServlet(handler);
public void addFilter(@Nonnull final FilterHandler handler)
this.filterRegistry.addFilter(handler);
public ContextRuntime getRuntime(final FailureRuntime.Builder failureRuntimeBuilder)
null,
null,
this.serviceId); | 0 |
import java.util.*;
Set<Map<PropertyId, Object>> setResourceProperties = new HashSet<Map<PropertyId, Object>>();
expect(request.getHttpBodyProperties()).andReturn(setResourceProperties);
expect(pm.persist(resource, setResourceProperties)).andReturn(status);
Set<Map<PropertyId, Object>> setResourceProperties = new HashSet<Map<PropertyId, Object>>();
expect(request.getHttpBodyProperties()).andReturn(setResourceProperties);
expect(pm.persist(resource, setResourceProperties)).andReturn(status); | 0 |
double nextDouble();
int nextInt(int n);
class SystemRandom implements Random {
class Util { | 0 |
package org.apache.commons.digester3.annotations;
import org.apache.commons.digester3.annotations.internal.DefaultAnnotationRuleProviderFactory;
import org.apache.commons.digester3.annotations.internal.DefaultDigesterLoaderHandlerFactory;
import org.apache.commons.digester3.annotations.spi.AnnotationRuleProviderFactory;
import org.apache.commons.digester3.annotations.spi.DigesterLoaderHandlerFactory; | 1 |
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> | 0 |
String[] serviceClassNames;
serviceClassNames = configuration.getStringArray("application.services");
for (String serviceClassName : serviceClassNames) { | 0 |
THREADLOCAL_FORMATS = new ThreadLocal<>();
Map<String, SimpleDateFormat> formats = ref == null ? null : ref.get(); | 0 |
int i = name.charAt(0) - '0';
if (i > 0)
return parms.get(i - 1); | 0 |
* path is normalized, so that <code>.</code> and <code>..</code> elements
* path is normalized, so that <code>.</code> and <code>..</code> elements | 0 |
toJsonString(new TableSchema().setFields(
toJsonString(
equalTo(0));
String tableJson = toJsonString(tempTable); | 0 |
* CVS $Id: ContainerDefinition.java,v 1.2 2003/12/29 17:52:12 stefano Exp $ | 0 |
import org.apache.felix.schematizer.Schematizing;
private boolean asDTO = false;
if(converter instanceof Schematizing) {
Schematizing s = (Schematizing)converter;
schema = s.getSchema();
asDTO = s.isDTOType();
}
if (asDTO)
return converter.convert(m).targetAsDTO().to(clazz);
else
return converter.convert(m).to(clazz);
if (val == null)
continue;
c.add(converter.convert(o).to(type));
if (DTO.class.isAssignableFrom(Util.rawClassOf(type)))
if (collectionClass == null)
return (V)new ArrayList<V>(); | 0 |
package com.twitter.mesos.scheduler.persistence; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/decorators/Attic/TestTransformedSortedMap.java,v 1.2 2003/08/31 17:28:42 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* @version $Revision: 1.2 $ $Date: 2003/08/31 17:28:42 $ | 0 |
import static org.junit.Assert.assertEquals;
import java.io.File;
@Test
public void testRawDefaultValues() {
AccumuloConfiguration conf = AccumuloConfiguration.getDefaultConfiguration();
assertEquals("${java.io.tmpdir}" + File.separator + "accumulo-vfs-cache-${user.name}", Property.VFS_CLASSLOADER_CACHE_DIR.getRawDefaultValue());
assertEquals(new File(System.getProperty("java.io.tmpdir"), "accumulo-vfs-cache-" + System.getProperty("user.name")).getAbsolutePath(),
conf.get(Property.VFS_CLASSLOADER_CACHE_DIR));
} | 0 |
import java.util.EnumSet;
import javax.servlet.DispatcherType;
/**
* Dispatcher types for webAppContext.addFilter.
*/
public static final EnumSet<DispatcherType> DISPATCHER_TYPES = EnumSet.of(DispatcherType.REQUEST);
root.addFilter(new FilterHolder(injector.getInstance(AmbariPersistFilter.class)), "/api/*", DISPATCHER_TYPES);
root.addFilter(new FilterHolder(injector.getInstance(AmbariPersistFilter.class)), "/proxy/*", DISPATCHER_TYPES);
root.addFilter(new FilterHolder(new MethodOverrideFilter()), "/api/*", DISPATCHER_TYPES);
root.addFilter(new FilterHolder(new MethodOverrideFilter()), "/proxy/*", DISPATCHER_TYPES);
agentroot.addFilter(new FilterHolder(injector.getInstance(AmbariPersistFilter.class)), "/agent/*", DISPATCHER_TYPES);
agentroot.addFilter(SecurityFilter.class, "/*", DISPATCHER_TYPES);
root.addFilter(new FilterHolder(springSecurityFilter), "/api/*", DISPATCHER_TYPES);
root.addFilter(new FilterHolder(springSecurityFilter), "/proxy/*", DISPATCHER_TYPES);
sessionManager.getSessionCookieConfig().setName("AMBARISESSIONID");
sessionManager.getSessionCookieConfig().setHttpOnly(true);
if (configs.getApiSSLAuthentication()) {
sessionManager.getSessionCookieConfig().setSecure(true);
} | 0 |
* Copyright 2016-2017 Seznam.cz, a.s. | 0 |
SdkComponents sdkComponents = SdkComponents.create(p.getOptions()); | 0 |
* @return the service dependency
* @return the service filter
* @return the default implementation class
* @return the required flag
* @return the add callback
* @return the change callback
* @return the remove callback
* Notice that the changed/removed callbacks are not used when the timeout parameter is greater than -1.
* Sample Code:
* @return the wait time when the dependency is unavailable
* @return the dependency name used to dynamically configure the filter and required flag from the init callback. | 0 |
import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef;
AtlasMapType mapType, AtlasAttributeDef attributeDef, | 0 |
"TRACE",
"CONNECT" | 0 |
return AbstractResourceProvider.getResourceProvider(type, PropertyHelper.getPropertyIds(type),
PropertyHelper.getKeyPropertyIds(type), managementController); | 0 |
import static java.util.Objects.requireNonNull;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.net.URISyntaxException;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.mapreduce.Job;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
public static void addCacheFile(String path, String fragment, Configuration conf) {
org.apache.hadoop.filecache.DistributedCache.addCacheFile(getUri(path, fragment), conf);
public static void addCacheFile(Job job, String path, String fragment) {
job.addCacheFile(getUri(path, fragment));
@SuppressFBWarnings(value = "PATH_TRAVERSAL_IN",
justification = "arbitrary path provided by user, through MapReduce APIs")
public static InputStream openCachedFile(String path, String fragment, Configuration conf) {
// try to get it from the local copy provided by the distributed cache
File tempFile = new File(fragment);
if (tempFile.exists()) {
try {
return new FileInputStream(tempFile);
} catch (FileNotFoundException e) {
throw new AssertionError("FileNotFoundException after verifying file exists", e);
}
} else {
// try to get token directly from HDFS path, without using the distributed cache
try {
return FileSystem.get(conf).open(new Path(path));
} catch (IOException e) {
throw new IllegalArgumentException("Unable to read file at DFS Path " + path, e);
}
}
}
private static URI getUri(String path, String fragment) {
String uriString = requireNonNull(path) + "#" + requireNonNull(fragment);
if (path.contains("#")) {
throw new IllegalArgumentException("Path to cache cannot contain a URI fragment");
}
try {
return new URI(uriString);
} catch (URISyntaxException e) {
throw new IllegalArgumentException("Invalid URI for item to cache", e);
}
}
| 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/parser/DefaultNamespaceFilter.java,v 1.2 2002/10/14 19:46:22 morgand Exp $
* $Revision: 1.2 $
* $Date: 2002/10/14 19:46:22 $
* $Id: DefaultNamespaceFilter.java,v 1.2 2002/10/14 19:46:22 morgand Exp $
this.uriDefault = defaultNamespace;
super.startPrefixMapping(prefix,this.uriDefault);
super.startElement(this.uriDefault,localName,qName,atts);
super.endElement(this.uriDefault,localName,qName); | 0 |
public static <T> List<T> unmodifiableList(T... values) {
public static <T> List<T> asList(T... values) {
public static <T> Set<T> asSet(T... values) {
public static <V extends Comparable<V>> SortedSet<V> asSortedSet(V... values) {
public static <V> SortedSet<V> asSortedSet(Comparator<? super V> comp, V... values) {
Function<? super V, ? extends K> keyMapper, Supplier<? extends Map<K, V>> mapCreator, V... values) {
public static <T> T findFirstMatchingMember(Predicate<? super T> acceptor, T... values) {
public static <T> List<T> selectMatchingMembers(Predicate<? super T> acceptor, T... values) { | 0 |
/**
* Copyright 2013 Apache Software Foundation | 0 |
package org.apache.batik.gvt.filter; | 0 |
public void validateCreatePayload(Request request) throws InvalidPayloadException {
super.validateCreatePayload(request);
if (String.valueOf(request.getQueryProperties().get("name")).contains(".")) { | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestArrayList.java,v 1.7 2003/08/31 17:28:43 scolebourne Exp $
* $Revision: 1.7 $
* $Date: 2003/08/31 17:28:43 $
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* @version $Id: TestArrayList.java,v 1.7 2003/08/31 17:28:43 scolebourne Exp $ | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
return evaluator.finishBundle(); | 0 |
/*
* Copyright 2003-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 applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.cocoon.portal.pluto.om.common;
import java.util.Locale;
/**
*
* @version $Id$
*/
public class TagDefinitionSet extends AbstractSupportSet
implements java.io.Serializable, Support {
// DescriptionSet implemenation.
public TagDefinition get(Locale locale) {
return null;
}
/**
* @see org.apache.cocoon.portal.pluto.om.common.Support#postBuild(java.lang.Object)
*/
public void postBuild(Object parameter) throws Exception {
// nothing to do
}
/**
* @see org.apache.cocoon.portal.pluto.om.common.Support#postLoad(java.lang.Object)
*/
public void postLoad(Object parameter) throws Exception {
// nothing to do
}
/**
* @see org.apache.cocoon.portal.pluto.om.common.Support#postStore(java.lang.Object)
*/
public void postStore(Object parameter) throws Exception {
// nothing to do
}
/**
* @see org.apache.cocoon.portal.pluto.om.common.Support#preBuild(java.lang.Object)
*/
public void preBuild(Object parameter) throws Exception {
// nothing to do
}
/**
* @see org.apache.cocoon.portal.pluto.om.common.Support#preStore(java.lang.Object)
*/
public void preStore(Object parameter) throws Exception {
// nothing to do
}
} | 0 |
* @see org.apache.cocoon.forms.datatype.FlowJXPathSelectionListBuilder
* @version CVS $Id: FlowJXPathSelectionList.java,v 1.2 2004/03/09 11:31:11 joerg Exp $
* @see org.apache.cocoon.forms.formmodel.Field#setSelectionList(Object model, String valuePath, String labelPath) | 0 |
import net.jcip.annotations.Immutable;
@Immutable | 0 |
import java.io.InputStream;
final HttpEntity entity = this.response.getEntity();
final InputStream content = entity.getContent();
if (content != null) {
content.close();
}
final ByteArrayEntity byteArrayEntity = new ByteArrayEntity(
EntityUtils.toByteArray(entity));
final ContentType contentType = ContentType.getOrDefault(entity);
byteArrayEntity.setContentType(contentType.toString());
this.response.setEntity(byteArrayEntity); | 0 |
private boolean strict;
@SuppressWarnings("unchecked") // OK because of instanceof check above
@SuppressWarnings("unchecked") // OK because of instanceof check above | 0 |
if (!query.getShardIds().contains(config.getInstanceId())) { | 0 |
return connRequest.get(0, TimeUnit.MILLISECONDS); | 0 |
properties.setSignatureKeyIdentifier(SecurityTokenConstants.KeyIdentifier_SkiKeyIdentifier);
properties.setSignatureKeyIdentifier(SecurityTokenConstants.KeyIdentifier_X509KeyIdentifier); | 0 |
storage.readOp(new Work.Quiet<Iterable<JobConfiguration>>() {
storage.writeOp(new MutateWork.NoResult.Quiet() {
return storage.readOp(new Work.Quiet<Iterable<JobConfiguration>>() {
return storage.readOp(new Work.Quiet<JobConfiguration>() {
storage.writeOp(new MutateWork.NoResult.Quiet() { | 0 |
private static final long serialVersionUID = 0; | 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 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package demo;
public class MyBean {
public String message = "This is a message coming from a Spring bean!";
public void setMessage(String message) {
this.message = message;
}
public String getMessage() {
return this.message;
}
} | 0 |
package org.apache.felix.dependencymanager.tracker; | 0 |
@Override
public long getTimeInState() {
// TODO Auto-generated method stub
return 0;
}
| 0 |
import org.apache.batik.util.DoublyIndexedTable; | 0 |
Graphics2D g2d); | 0 |
import static org.hamcrest.Matchers.isA;
import org.apache.beam.sdk.testing.NeedsRunner;
import org.junit.experimental.categories.Category;
@Category(NeedsRunner.class)
@Category(NeedsRunner.class)
@Category(NeedsRunner.class) | 0 |
closeSocket(); | 0 |
import static org.hamcrest.Matchers.hasItems;
Set<Class<? extends Coder>> knownCoderClasses =
ModelCoderRegistrar.BEAM_MODEL_CODER_URNS.keySet();
Set<Class<? extends Coder>> knownCoderTests = new HashSet<>();
for (Coder<?> coder : KNOWN_CODERS) {
Set<Class<? extends Coder>> missingKnownCoders = new HashSet<>(knownCoderClasses);
"Every Model Coder must have a Translator",
ModelCoderRegistrar.BEAM_MODEL_CODER_URNS.keySet(),
equalTo(ModelCoderRegistrar.BEAM_MODEL_CODERS.keySet()));
assertThat(
"All Model Coders should be registered",
CoderTranslation.KNOWN_TRANSLATORS.keySet(),
hasItems(ModelCoderRegistrar.BEAM_MODEL_CODERS.keySet().toArray(new Class[0]))); | 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 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 distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.dm.test.bundle.annotation.adapter;
import org.apache.felix.dm.annotation.api.AdapterService;
import org.apache.felix.dm.annotation.api.Param;
import org.apache.felix.dm.annotation.api.ServiceDependency;
import org.apache.felix.dm.test.bundle.annotation.sequencer.Sequencer;
@AdapterService(adapteeService = ServiceInterface.class, adapterProperties={@Param(name="param2", value="value2")})
public class ServiceProviderAdapter implements ServiceInterface3
{
// This is the adapted service
protected ServiceInterface m_adaptee;
@ServiceDependency
protected Sequencer m_sequencer;
public void run3()
{
m_adaptee.run();
m_sequencer.step(3);
}
} | 0 |
* Copyright 2002,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 applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. | 0 |
import org.apache.ambari.server.controller.internal.ProvisionClusterRequest;
import org.apache.ambari.server.controller.internal.ProvisionClusterRequest.ProvisionAction;
/**
* Set request provision action : INSTALL vs INSTALL_AND_START
* @param provisionAction @ProvisionAction
*/
public void setProvisionAction(ProvisionAction provisionAction);
public ProvisionAction getProvisionAction();
| 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 this file except in compliance with
* the License. You may obtain a copy of the License at | 0 |
/**
* Get configuration dependencies which are specific for a specific service configuration property
* @param requests
* @return
*/
Set<StackConfigurationDependencyResponse> getStackConfigurationDependencies(Set<StackConfigurationDependencyRequest> requests) throws AmbariException; | 0 |
* {@link DirectPipelineRunner}. If Write is used on
* {@link com.google.cloud.dataflow.sdk.runners.DataflowPipelineRunner}, | 0 |
getForm().addWidgetUpdate(this);
| 0 |
package org.apache.commons.net.bsd;
* invoke {@link org.apache.commons.net.bsd.RExecClient#disconnect disconnect() }
* to clean up properly.
* {@link org.apache.commons.net.bsd.RExecClient#getInputStream getInputStream() }
* . However, it is
* returned by {@link org.apache.commons.net.bsd.RExecClient#getErrorStream getErrorStream() }
* . You
* {@link org.apache.commons.net.bsd.RExecClient#getOutputStream getOutputSream() }
* .
* {@link org.apache.commons.net.bsd.RExecClient#setRemoteVerificationEnabled setRemoteVerificationEnabled()}
* . | 0 |
*
* http://www.apache.org/licenses/LICENSE-2.0
* | 0 |
* with a timeout. That is, the Test annotation can make the timing tighter but will not be able | 0 |
*
interface PCollectionViewWriter<ElemT, ViewT> { | 0 |
* entry, i.e. an <code>AD</code> element, is generated. If a property
* should not be available for display in a configuration user interface,
* this parameter should be set to <code>true</code>. For properties names
* <code>service.ranking</code> the <code>AD</code> element is not created
* by default, which can be overwritten by stating
* <code>propertyPrivate=false</code>. For the predefined properties
* <code>service.id</code>, <code>service.vendor</code>,
* <code>service.bundlelocation</code> and <code>service.factoryPid</code>
* an <code>AD</code> element will never be created and the
* <code>propertyPrivate</code> attribute has no effect. | 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 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ambari.server.actionmanager;
import org.apache.ambari.server.orm.entities.HostRoleCommandEntity;
public interface HostRoleCommandFactory {
HostRoleCommand createExisting(HostRoleCommandEntity hostRoleCommandEntity);
} | 1 |
/**
* 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 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
| 0 |
import org.apache.commons.vfs.test.AbstractProviderTestCase;
* @version $Revision: 1.2 $ $Date: 2002/11/21 04:31:37 $
extends AbstractProviderTestCase | 0 |
import org.apache.beam.fn.harness.control.BundleSplitListener;
Consumer<ThrowingRunnable> addFinishFunction,
BundleSplitListener splitListener) throws IOException { | 0 |
when(instanceConverter.toAtlasEntities(anyList())).thenReturn(mockEntity); | 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 applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* @version CVS $Id: DirectoryGenerator.java,v 1.10 2004/03/05 13:02:55 bdelacretaz Exp $ | 1 |
import org.apache.aurora.scheduler.storage.entities.ITaskEvent;
import static org.apache.aurora.gen.ScheduleStatus.SANDBOX_DELETED;
// Note: SANDBOX_DELETED can be issued for both FINISHED and FAILED states.
// Adding a post-processing filtering to place it into the right bucket may be needed.
.put(FINISHED, EnumSet.of(KILLED, FINISHED, SANDBOX_DELETED))
ITaskEvent statusEvent = Tasks.getLatestEvent(scheduledTask);
if (scheduledTask.getStatus() == SANDBOX_DELETED) {
// Avoid displaying SANDBOX_DELETED as completed status.
statusEvent = Tasks.getSecondToLatestEvent(scheduledTask);
builder.put("hideExecutorUri", true);
} else if (scheduledTask.getStatus() == PENDING) {
builder.put("status", statusEvent.getStatus());
builder.put("statusTimestamp", statusEvent.getTimestamp());
| 0 |
import com.google.cloud.dataflow.sdk.testing.FastNanoClockAndSleeper;
@Rule public FastNanoClockAndSleeper fastNanoClockAndSleeper = new FastNanoClockAndSleeper();
public void testThatWeRetryIfTaskExecutionFailAgainAndAgain() throws Exception {
int numWorkers = Math.max(Runtime.getRuntime().availableProcessors(), 1);
DataflowWorkerHarness.processWork(
pipelineOptions, mockDataflowWorker, fastNanoClockAndSleeper);
// Test that the backoff mechanism will retry the BACKOFF_MAX_ATTEMPTS number of times.
verify(mockDataflowWorker, times(numWorkers * DataflowWorkerHarness.BACKOFF_MAX_ATTEMPTS))
.getAndPerformWork(); | 0 |
Activator.log(LogService.LOG_DEBUG, null, "LocationChanged event, same targetedPID {0}, location now {1}",
new Object[] {targetedPid, configInfo.getBundleLocation()},
null);
Activator.log(LogService.LOG_DEBUG, null, "LocationChanged event, better targetedPID {0} compared to {1}, location now {2}",
new Object[] {targetedPid, oldTargetedPID, configInfo.getBundleLocation()},
null);
else
{
Activator.log(LogService.LOG_DEBUG, null, "LocationChanged event, worse targetedPID {0} compared to {1}, do nothing",
new Object[] {targetedPid, oldTargetedPID},
null);
} | 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 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 distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.dependencymanager.samples.tpool;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import org.apache.felix.dm.Component;
import org.apache.felix.dm.ComponentExecutorFactory;
/**
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/
public class ComponentExecutorFactoryImpl implements ComponentExecutorFactory {
final static int SIZE = Runtime.getRuntime().availableProcessors();
final static Executor m_threadPool = Executors.newFixedThreadPool(SIZE);
@Override
public Executor getExecutorFor(Component component) {
return m_threadPool;
}
} | 0 |
/* ====================================================================
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.13 $ $Date: 2004/01/14 21:43:18 $ | 0 |
final int chunkSizeHint = h1Config.getChunkSizeHint() >= 0 ? h1Config.getChunkSizeHint() : 2048;
return new LengthDelimitedEncoder(channel, buffer, metrics, len, chunkSizeHint);
return new IdentityEncoder(channel, buffer, metrics, chunkSizeHint); | 0 |
package org.apache.beam.runners.core;
import org.apache.beam.sdk.util.TimeDomain;
import org.apache.beam.sdk.util.WindowedValue; | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.