Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import com.google.common.collect.ImmutableList;
taskGroups.taskChangedState(TaskStateChange.transition(copy, oldState));
final IScheduledTask a = makeTask("a", KILLED);
final IScheduledTask b = makeTask("b", PENDING);
store.getUnsafeTaskStore().saveTasks(ImmutableSet.of(a, b, c));
for (IScheduledTask task : ImmutableList.of(a, b, c)) {
taskGroups.taskChangedState(TaskStateChange.initialized(task));
}
taskGroups.taskChangedState(TaskStateChange.transition(makeTask("a", PENDING), INIT));
@Override
protected void execute(MutableStoreProvider storeProvider) { | 0 |
private LONG_Upper() {
public static LONG_Upper theInstance() { | 0 |
private final InstructionFactory _factory;
private final ConstantPoolGen _cp;
private final ClassGen _cg; | 0 |
protected final static int[] IDENTIFIER_START =
{ 0x0, 0x0, 0x7FFFFFE, 0x7FFFFFE };
// { 0x0, 0x0, 0x87FFFFFE, 0x7FFFFFE }; // For use with CSS 2.1 add '_'
protected final static int[] NAME =
{ 0, 0x3FF2000, 0x07FFFFFE, 0x7FFFFFE };
// { 0, 0x3FF2000, 0x87FFFFFE, 0x7FFFFFE };// For use with CSS 2.1 add '_'
protected final static int[] HEXADECIMAL =
{ 0, 0x3FF0000, 0x7E, 0x7E };
protected final static int[] STRING =
{ 0x200, 0xFFFFFF7B, 0xFFFFFFFF, 0x7FFFFFFF };
protected final static int[] URI =
{ 0x0, 0xFFFFFC7A, 0xFFFFFFFF, 0x7FFFFFFF };
return c >= 128 || ((IDENTIFIER_START[c>>5] & (1 << (c &0x1F))) != 0);
return c >= 128 || ((NAME[c >>5] & (1 << (c &0x1F))) != 0);
return c < 128 && ((HEXADECIMAL[c>>5] & (1 << (c&0x1F))) != 0);
return c >= 128 || ((STRING[c>>5] & (1 << (c&0x1F))) != 0);
return c >= 128 || ((URI[c>>5] & (1 << (c&0x1F))) != 0); | 0 |
StringBuilder buf = new StringBuilder();
StringBuilder args = new StringBuilder(); | 0 |
import java.util.HashMap;
import java.util.Map;
private final HashMap<String, String> cleanedDirectives;
private final String filter;
String f = requirement.getDirectives().get(Constants.FILTER_DIRECTIVE);
if (f != null)
{
for (String ns : NamespaceTranslator.getTranslatedOSGiNamespaces())
{
f = f.replaceAll("[(][ ]*" + ns + "[ ]*=",
"(" + NamespaceTranslator.getFelixNamespace(ns) + "=");
}
}
filter = f;
cleanedDirectives = new HashMap<String, String>(requirement.getDirectives());
// Remove directives that are represented as APIs on this class.
cleanedDirectives.remove(Constants.FILTER_DIRECTIVE);
cleanedDirectives.remove(Namespace.REQUIREMENT_CARDINALITY_DIRECTIVE);
cleanedDirectives.remove(Constants.RESOLUTION_DIRECTIVE);
}
public Map<String, Object> getAttributes()
{
return requirement.getAttributes();
}
public Map<String, String> getDirectives()
{
return cleanedDirectives;
return filter; | 0 |
syspkgs = ((pkgextra == null) || (pkgextra.trim().length() == 0))
? syspkgs : syspkgs + "," + pkgextra;
syscaps = ((capextra == null) || (capextra.trim().length() == 0))
? syscaps : syscaps + "," + capextra; | 0 |
* Change the durability for the BatchWriter session. The default durability is "default" which
*
public BatchWriterConfig setDurability(Durability durability) {
return this; | 0 |
return new Value(Long.toString(min).getBytes()); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/locale/LocaleConvertUtils.java,v 1.2 2002/12/07 23:34:41 craigmcc Exp $
* $Revision: 1.2 $
* $Date: 2002/12/07 23:34:41 $
* @return The FastHashMap instance contains the all {@link LocaleConverter} types for
* @return The FastHashMap instance contains the all {@link LocaleConverter} types | 0 |
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Objects;
private static final JsonFactory JSON_FACTORY = Transport.getJsonFactory();
private final FakeDatasetService datasetService;
throws IOException {
throws IOException {
public void startQueryJob(JobReference jobRef, JobConfigurationQuery query) {
throws IOException {
public JobStatistics dryRunQuery(String projectId, JobConfigurationQuery query, String location) {
public Job getJob(JobReference jobRef) {
if (!Objects.equals(partitioning, table.getTimePartitioning())) {
if (!Objects.equals(schema, table.getSchema())) {
try (BufferedReader reader =
Files.newBufferedReader(Paths.get(filename), StandardCharsets.UTF_8)) {
String destinationPattern, int shard) { | 0 |
bind(ClusterState.class).to(ClusterStateImpl.class);
bind(ClusterStateImpl.class).in(Singleton.class); | 0 |
for (int file_to_verify = start; file_to_verify < end; file_to_verify++) {
String filename = filenames[file_to_verify];
//create a namespace context for use in the XPath expression below
//retrieve the signature Element from the document
//Creates a XMLSignature from the element and uses the filename as
//the baseURI. That URI is prepended to all relative URIs.
//Get the KeyInfo object, which might contain some clues as to what
//key was used to create the signature. It might also contain the
//full cert.
//First try to see if it is an X509Cert
//check if the signature is valid using the cert
//Maybe it's a public key
//check if the signature is valid using the public key
//No X509Cert or PublicKey could be found.
//If the signature did not contain any KeyInfo element | 0 |
import static org.junit.Assert.assertEquals;
@Test
public void testFromEndOfWindowToString() {
Trigger trigger = AfterWatermark.pastEndOfWindow();
assertEquals("AfterWatermark.pastEndOfWindow()", trigger.toString());
}
@Test
public void testLateFiringsToString() {
Trigger trigger = AfterWatermark.pastEndOfWindow()
.withLateFirings(StubTrigger.named("t1"))
.buildTrigger();
assertEquals("AfterWatermark.pastEndOfWindow().withLateFirings(t1)", trigger.toString());
}
@Test
public void testEarlyAndLateFiringsToString() {
Trigger trigger = AfterWatermark.pastEndOfWindow()
.withEarlyFirings(StubTrigger.named("t1"))
.withLateFirings(StubTrigger.named("t2"))
.buildTrigger();
assertEquals("AfterWatermark.pastEndOfWindow().withEarlyFirings(t1).withLateFirings(t2)",
trigger.toString());
} | 0 |
if (getSaslParams() != null) { | 0 |
import org.osgi.framework.ServiceRegistration;
private ServiceRegistration mbean_sr=null;
//this.registerToAgent(servicereference);
//this.unRegisterFromAgent();
java.util.Properties p = new java.util.Properties();
p.put(org.apache.felix.mosgi.jmx.agent.Constants.OBJECTNAME, REMOTE_LOGGER_ON_STRING);
this.mbean_sr = this.bc.registerService(LoggerMBean.class.getName(), this, p);
//this.unRegisterFromAgent();
this.mbean_sr.unregister();
this.mbean_sr=null; | 0 |
import org.apache.hc.core5.annotation.Internal;
@Internal | 0 |
package org.apache.ambari.server.agent; | 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.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList; | 0 |
package test;
public class NoValidConstructor {
String m_s;
public NoValidConstructor(String s) {
m_s = s;
}
public String getS() {
return m_s;
}
} | 0 |
final String s = eventType.toString(); | 0 |
}
in.close();
} | 0 |
Packages resourcePkgs = resourcePkgMap.get(resource);
if (resourcePkgs != null)
if (resourcePkgs.m_isCalculated)
{
return;
}
else
{
resourcePkgs.m_isCalculated = true;
}
resourcePkgs = resourcePkgMap.get(resource);
public boolean m_isCalculated = false; | 0 |
private int unnamedRepoId = 0;
private String name;
public String getName() {
return name;
}
String temp = doc.getDocumentElement().getAttribute( "name" );
if ("".equals(temp)) {
name = "repo-" + String.valueOf(unnamedRepoId++);
}
else {
name = temp;
}
if ( uri.toString().startsWith( "bundle" ) ) {
name += "*";
} | 0 |
* @param file | 0 |
zipExtractor.addRule("**legacy/cocoon.xconf", new SingleFileDeployer("WEB-INF/cocoon"));
zipExtractor.addRule("**legacy**.xconf", new SingleFileDeployer("WEB-INF/cocoon/xconf"));
zipExtractor.addRule("**legacy**.xmap", new SingleFileDeployer("WEB-INF/cocoon/sitemap-additions"));
zipExtractor.addRule("**spring/**.xml", new SingleFileDeployer("WEB-INF/cocoon/spring")); | 0 |
* Copyright (c) 2002 The Apache Software Foundation. All rights | 0 |
public void createResources(Request request) {
//To change body of implemented methods use File | Settings | File Templates.
}
@Override
public void updateResources(Request request, Predicate predicate) {
//To change body of implemented methods use File | Settings | File Templates.
}
@Override
public void deleteResources(Predicate predicate) {
//To change body of implemented methods use File | Settings | File Templates.
}
@Override
private static final Map<Resource.Type, PropertyId> keyPropertyIds = new HashMap<Resource.Type, PropertyId>();
keyPropertyIds.put(Resource.Type.Cluster, Properties.getPropertyId("p1", "c1"));
keyPropertyIds.put(Resource.Type.Host, Properties.getPropertyId("p2", "c1"));
keyPropertyIds.put(Resource.Type.Component, Properties.getPropertyId("p3", "c1"));
Schema schema = new SchemaImpl(resourceProvider, propertyProviders, keyPropertyIds);
Schema schema = new SchemaImpl(resourceProvider, propertyProviders, keyPropertyIds);
Schema schema = new SchemaImpl(resourceProvider, propertyProviders, keyPropertyIds);
Schema schema = new SchemaImpl(resourceProvider, propertyProviders, keyPropertyIds); | 0 |
import org.apache.commons.jexl2.Expression;
import org.apache.commons.jexl2.JexlContext;
import org.apache.commons.jexl2.JexlEngine;
import org.apache.commons.jexl2.MapContext;
import org.apache.commons.jexl2.parser.ParserTreeConstants;
import org.apache.hadoop.io.Text;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
if (log.isDebugEnabled()) {
String myRow = "";
if (hasTop()) {
myRow = topKey.getRow().toString();
} else if (currentRow != null) {
myRow = currentRow.toString();
}
log.debug("My row " + myRow + " is less than jump row: " + jumpKey.getRow() + " seeking");
Text cq = jumpKey.getColumnQualifier();
int index = cq.find(NULL_BYTE);
if (0 <= index) {
cq.set(cq.getBytes(), index + 1, cq.getLength() - index - 1);
} else {
log.error("Expected a NULL separator in the column qualifier");
this.topKey = null;
this.topValue = null;
return false;
}
Key startKey = new Key(topKey.getRow(), fName, new Text(fValue + NULL_BYTE + cq)); | 0 |
TreeMap<Key,Value> testData = new TreeMap<>();
TreeMap<Key,Value> expectedData = new TreeMap<>();
TreeMap<Key,Value> filteredData = new TreeMap<>();
TreeMap<Key,Value> testData = new TreeMap<>();
TreeMap<Key,Value> expectedData = new TreeMap<>();
TreeMap<Key,Value> filteredData = new TreeMap<>();
TreeMap<Key,Value> testData = new TreeMap<>();
TreeMap<Key,Value> expectedData = new TreeMap<>();
TreeMap<Key,Value> filteredData = new TreeMap<>();
TreeMap<Key,Value> testData = new TreeMap<>();
TreeMap<Key,Value> compactedData = new TreeMap<>();
TreeMap<Key,Value> expectedData = new TreeMap<>();
TreeMap<Key,Value> filteredData = new TreeMap<>();
HashSet<ByteSequence> colfams = new HashSet<>();
TreeMap<Key,Value> testData = new TreeMap<>();
TreeMap<Key,Value> expectedData = new TreeMap<>();
TreeMap<Key,Value> filteredData = new TreeMap<>(); | 0 |
import com.google.common.collect.ImmutableMap;
QuotaCheckResult quotaCheck = quotaManager.checkQuota(
ImmutableMap.<ITaskConfig, Integer>of(),
task,
instances);
| 0 |
import java.util.Properties;
ClientContext context = new ClientContext(instance, credentials, new Properties()); | 0 |
@Override
@Override
@Override
@Override | 0 |
import java.util.Map;
import org.apache.sshd.common.channel.PtyChannelConfigurationHolder;
public ChannelExec(String command, PtyChannelConfigurationHolder configHolder, Map<String, ?> env) {
super(false, configHolder, env); | 0 |
* A transaction consists of a number of operations. To use, first create a transaction id, and then
* seed the transaction with an initial operation. An executor service can then execute the
* transaction's operation, possibly pushing more operations onto the transaction as each step
* successfully completes. If a step fails, the stack can be unwound, undoing each operation. | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/xmlrules/FromXmlRuleSet.java,v 1.9 2003/10/09 21:09:48 rdonkin Exp $
* $Revision: 1.9 $
* $Date: 2003/10/09 21:09:48 $
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear. | 0 |
import java.util.List;
private WrapFactory wrapFactory = new BatikWrapFactory(this);
* Default Context for scripts. This is used only for efficiency
* reason.
*/
protected Context defaultContext;
/**
* Context vector, to make sure we are not
* setting the security context too many times
*/
protected List contexts = new LinkedList();
/**
Context ctx = Context.enter();
if (ctx == defaultContext)
return ctx;
if (!contexts.contains(ctx)) {
// No class loader so don't try and optmize.
if (rhinoClassLoader == null) {
ctx.setOptimizationLevel(-1);
ctx.setCachingEnabled(false);
}
contexts.add(ctx);
}
defaultContext = ctx;
* For <code>RhinoInterpreter</code> this method flushes the
* Rhino caches to avoid memory leaks.
if (rhinoClassLoader != null) {
Context.setCachingEnabled(false);
Context.setCachingEnabled(true);
}
((WindowWrapper)globalObject).window = (Window)object;
globalObject.put(name, globalObject, jsObject);
void callHandler(Function handler, Object arg)
return new EventTargetWrapper(globalObject, obj, this);
* @param out the new out <code>Writer</code>.
* Returns the current locale or null if the locale currently used is
* the default one.
* Provides a way to the user to specify a locale which override the
* default one. If null is passed to this method, the used locale
* becomes the global one.
* @param locale The locale to set. | 1 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull;
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.Preconditions; | 0 |
* Copyright 2001-2005 The Apache Software Foundation.
* @version $Revision$ $Date$
} else if (index >= 0 && descriptor instanceof IndexedPropertyDescriptor) { | 0 |
* A generic streamed entity being received on a connection.
* | 0 |
SortedSet<Attr> result = new TreeSet<>(COMPARE); | 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.servicemix.kernel.gshell.osgi;
import org.osgi.framework.Bundle;
public class StartBundle extends BundleCommand {
protected void doExecute(Bundle bundle) throws Exception {
bundle.start();
}
} | 0 |
reader = new BufferedReader(new InputStreamReader(_input_, this.getCharsetName())); // Java 1.6 can use getCharset() | 0 |
import org.apache.sshd.common.keyprovider.KeyPairProvider; | 0 |
package org.apache.batik.css.engine;
/**
* An interface for {@link org.w3c.dom.css.CSSStyleDeclaration} objects to
* expose their underlying {@link StyleDeclaration} objects storing the
* properties.
*/
public interface StyleDeclarationProvider {
/**
* Returns the object storing the properties of this style declaration.
*/
StyleDeclaration getStyleDeclaration();
/**
* Sets the object storing the properties of this style declaration.
*/
void setStyleDeclaration(StyleDeclaration sd);
} | 0 |
* Apply options to this arithmetic which eventually may create another instance.
* @see #createWithOptions(boolean, java.math.MathContext, int)
*
* @param context the context that may extend {@link JexlEngine.Options} to use
* @return a new arithmetic instance or this
*/
public JexlArithmetic options(JexlContext context) {
return context instanceof JexlEngine.Options
? options((JexlEngine.Options) context)
: this;
}
/**
BigInteger result = l.mod(r); | 0 |
import org.apache.bcel.Repository;
import org.apache.bcel.classfile.JavaClass;
import org.apache.bcel.classfile.Method;
import org.apache.bcel.generic.ConstantPoolGen;
import org.apache.bcel.generic.InstructionHandle;
import org.apache.bcel.generic.InstructionList;
import org.apache.bcel.generic.InstructionTargeter;
import org.apache.bcel.generic.MethodGen;
import org.apache.bcel.generic.TargetLostException;
import org.apache.bcel.util.InstructionFinder; | 0 |
marshal(context.getParent(), context.getNextSibling(),
DOMUtils.getSignaturePrefix(context), context);
@Override
public int hashCode() {
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}
@Override
public int hashCode() {
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
} | 0 |
import com.google.common.collect.Iterables; | 0 |
public final static String FACTORYSET = "ExtraFactoryServiceProperties.FACTORYSET";
public final static String ENSURE = "ExtraFactoryServiceProperties";
@Component(properties = {@Property(name = "foo", value = "bar")}, factorySet = FACTORYSET)
@ServiceDependency(filter = "(" + Component.FACTORY_NAME + "=" + FACTORYSET + ")")
@ServiceDependency(filter = "(name=" + ENSURE + ")") | 0 |
import java.util.SortedMap;
getMetadataClusterLevelParams(cl, stackId),
null);
getMetadataAmbariLevelParams(), getMetadataAgentConfigs());
getMetadataClusterLevelParams(cl, stackId),
null);
null, getMetadataAgentConfigs());
getMetadataClusterLevelConfigsParams(cl, stackId),
null);
null, getMetadataAgentConfigs());
new TreeMap<>(),
null);
null, getMetadataAgentConfigs());
new TreeMap<>(),
null);
null, getMetadataAgentConfigs());
new TreeMap<>(),
null);
null, getMetadataAgentConfigs());
public SortedMap<String, SortedMap<String,String>> getMetadataAgentConfigs() {
SortedMap<String, SortedMap<String,String>> agentConfigs = new TreeMap<>();
Map<String, Map<String,String>> agentConfigsMap = configs.getAgentConfigsMap();
for (String key : agentConfigsMap.keySet()) {
agentConfigs.put(key, new TreeMap<String, String>(agentConfigsMap.get(key)));
}
return agentConfigs;
}
| 0 |
/**
* String representation of this file comparator.
*
* @return String representation of this file comparator
*/
public String toString() {
return super.toString() + "[caseSensitivity=" + caseSensitivity + "]";
} | 0 |
* Implements the part usable for all stream-based random access. | 0 |
/**
* Tries to determine whether the given class is part of the framework or not.
* Framework classes include everything in org.apache.felix.framework.* and
* org.osgi.framework.*. We also consider ClassLoader and Class to be internal
* classes, because they are inserted into the stack trace as a result of
* method overloading. Typically, ClassLoader or Class will be mixed in
* between framework classes or will be at the point where the class loading
* request enters the framework class loading mechanism, which will then be
* followed by either bundle or external code, which will then exit our
* attempt to determine if we should boot delegate or not. Other standard
* class loaders, like URLClassLoader, are considered external classes and
* should trigger boot delegation. This means that bundles can create standard
* class loaders to get access to boot packages, but this is the standard
* behavior of class loaders.
* @param clazz the class to determine if it is external or not.
* @return <tt>true</tt> if the class is external, otherwise <tt>false</tt>.
*/ | 0 |
import com.google.common.io.BaseEncoding;
import java.nio.ByteBuffer;
new TableFieldSchema().setName("sound").setType("BYTES").setMode("NULLABLE"),
// Test type conversion for TIMESTAMP, INTEGER, BOOLEAN, BYTES, and FLOAT.
byte[] soundBytes = "chirp,chirp".getBytes();
ByteBuffer soundByteBuffer = ByteBuffer.allocate(soundBytes.length).put(soundBytes);
soundByteBuffer.rewind();
record.put("sound", soundByteBuffer);
.set("flighted", Boolean.TRUE)
.set("sound", BaseEncoding.base64().encode(soundBytes));
@Nullable ByteBuffer sound; | 0 |
@Property(name= "foo") | 0 |
CacheConfiguration cacheConfiguration = createCacheConfiguration();
Cache cache = new Cache(cacheConfiguration);
// Decorate with UpdatingSelfPopulatingCache
timelineMetricsCache = new TimelineMetricCache(cache, cacheEntryFactory);
LOG.info("Registering metrics cache with provider: name = " +
cache.getName() + ", guid: " + cache.getGuid());
manager.addCache(timelineMetricsCache);
isCacheInitialized = true;
}
// Having this as a separate public method for testing/mocking purposes
public CacheConfiguration createCacheConfiguration() {
return cacheConfiguration; | 0 |
* @version $Id$ | 0 |
* the shard table (created by {@link Index}) using the {@link IntersectingIterator}.
* See docs/examples/README.shard for instructions.
| 0 |
final ClassLoader origContextClassLoader = Thread.currentThread().getContextClassLoader();
final WeakReference<ClassLoader> ref = new WeakReference<ClassLoader>(componentLoader);
final ClassLoader origContextClassLoader = Thread.currentThread().getContextClassLoader();
final ClassLoader componentLoader2 = new ClassLoader() {};
final Converter origFloatConverter = ConvertUtils.lookup(Float.TYPE);
final Converter floatConverter1 = new FloatConverter();
final WeakReference<ClassLoader> weakRefToComponent1 = new WeakReference<ClassLoader>(componentLoader1);
final ClassLoader origContextClassLoader = Thread.currentThread().getContextClassLoader();
final Class<?> newFloatConverterClass = componentLoader.reload(FloatConverter.class);
final Converter componentConverter = ConvertUtils.lookup(Float.TYPE);
final Converter sharedConverter = ConvertUtils.lookup(Float.TYPE);
final Converter componentConverter = ConvertUtils.lookup(Float.TYPE);
final WeakReference<ClassLoader> weakRefToComponent = new WeakReference<ClassLoader>(componentLoader);
private void forceGarbageCollection(final WeakReference<?> target) {
final
} catch(final OutOfMemoryError e) { | 0 |
package org.apache.accumulo.shell.commands;
import org.apache.accumulo.shell.Shell; | 0 |
// Compare module capabilities.
// Compare package capabilities.
else if ((c == 0) && cap1.getNamespace().equals(Capability.PACKAGE_NAMESPACE)) | 0 |
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
*
* @deprecated Use the OSGi annotations from org.osgi.service.component.annotations.*
@Deprecated | 0 |
private Map<String, HostGroup> hostGroups = new HashMap<>();
Collection<String> services = new HashSet<>();
Collection<String> components = new HashSet<>();
Collection<HostGroup> resultGroups = new HashSet<>();
Collection<HostGroup> resultGroups = new HashSet<>();
Map<String, Map<String, String>> properties = new HashMap<>();
Map<String, Set<HashMap<String, String>>> properties = new HashMap<>();
new HashMap<>();
Collection<HostGroupEntity> entities = new ArrayList<>();
Map<String, HostGroupConfigEntity> configEntityMap = new HashMap<>();
Collection<HostGroupComponentEntity> componentEntities = new HashSet<>();
Map<String, BlueprintConfigEntity> configEntityMap = new HashMap<>(); | 1 |
import org.apache.beam.runners.core.construction.ReadTranslation;
abstract static class UnboundedSourceShard<T, CheckpointT extends CheckpointMark>
implements SourceShard<T> {
@Override
public abstract UnboundedSource<T, CheckpointT> getSource();
static class InputProvider<T>
implements RootInputProvider<T, UnboundedSourceShard<T, ?>, PBegin> {
public Collection<CommittedBundle<UnboundedSourceShard<T, ?>>> getInitialInputs(
AppliedPTransform<PBegin, PCollection<T>, PTransform<PBegin, PCollection<T>>>
transform,
UnboundedSource<T, ?> source = ReadTranslation.unboundedSourceFromTransform(transform);
List<? extends UnboundedSource<T, ?>> splits =
ImmutableList.Builder<CommittedBundle<UnboundedSourceShard<T, ?>>> initialShards =
for (UnboundedSource<T, ?> split : splits) {
UnboundedSourceShard<T, ?> shard =
.<UnboundedSourceShard<T, ?>>createRootBundle()
.add(WindowedValue.<UnboundedSourceShard<T, ?>>valueInGlobalWindow(shard)) | 0 |
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.expect;
| 0 |
import java.lang.reflect.InvocationTargetException;
import org.apache.commons.jelly.JellyTagException;
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
try {
Class theClass = getClassLoader().loadClass( className );
Object object = null;
if(paramTypes.size() == 0) {
object = theClass.newInstance();
} else {
Object[] values = paramValues.toArray();
Class[] types = (Class[])(paramTypes.toArray(new Class[paramTypes.size()]));
object = ConstructorUtils.invokeConstructor(theClass,values,types);
paramTypes.clear();
paramValues.clear();
}
if(null != var) {
context.setVariable(var, object);
} else {
parentArg.setValue(object);
}
}
catch (ClassNotFoundException e) {
throw new JellyTagException(e);
}
catch (InstantiationException e) {
throw new JellyTagException(e);
}
catch (NoSuchMethodException e) {
throw new JellyTagException(e);
catch (IllegalAccessException e) {
throw new JellyTagException(e);
}
catch (InvocationTargetException e) {
throw new JellyTagException(e); | 0 |
package org.apache.atlas; | 0 |
if (m_conditionInfos == null)
{
return true;
} | 0 |
@Override
public void unableToMonitorLockNode(Throwable e) {
System.exit(-1);
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/Field.java,v 1.18 2003/06/08 06:03:16 dgraham Exp $
* $Revision: 1.18 $
* $Date: 2003/06/08 06:03:16 $
* @version $Revision: 1.18 $ $Date: 2003/06/08 06:03:16 $
* @return The default Arg or null if not found.
* Gets the default <code>Arg</code> object at the given position. If the key
* finds a <code>null</code> value then the default value will try to be retrieved.
* @param key The name the Arg is stored under. If not found, the default Arg for
* the given position (if any) will be retrieved.
* @param position The Arg number to find.
* @return The Arg with the given name and position or null if not found.
if ((position >= this.args.length) || (this.args[position] == null)) {
return null;
}
Arg arg = (Arg) args[position].get(key);
// Didn't find default arg so exit, otherwise we would get into infinite recursion
if ((arg == null) && key.equals(DEFAULT_ARG)) {
return null;
}
return (arg == null) ? this.getArg(position) : arg; | 0 |
* @version CVS $Id$ | 0 |
List<AlertCurrentEntity> currentAlerts = new ArrayList<>(); | 1 |
* @version $Id$ | 0 |
*
hdfs.getServiceComponent(DATANODE).addServiceComponentHost(DummyHostname1);
hdfs.getServiceComponent(NAMENODE).addServiceComponentHost(DummyHostname1);
hdfs.getServiceComponent(DATANODE).addServiceComponentHost(DummyHostname1);
hdfs.getServiceComponent(NAMENODE).addServiceComponentHost(DummyHostname1);
hdfs.getServiceComponent(DATANODE).addServiceComponentHost(DummyHostname1);
hdfs.getServiceComponent(DATANODE).addServiceComponentHost(DummyHostname1);
hdfs.getServiceComponent(NAMENODE).addServiceComponentHost(DummyHostname1);
hdfs.getServiceComponent(DATANODE).addServiceComponentHost(DummyHostname1);
hdfs.getServiceComponent(DATANODE).addServiceComponentHost("Host1");
hdfs.getServiceComponent(DATANODE).addServiceComponentHost("Host2"); | 0 |
import org.apache.sshd.common.Channel;
import org.apache.sshd.common.RequestHandler;
addRequestHandler(new ExitStatusChannelRequestHandler());
addRequestHandler(new ExitSignalChannelRequestHandler());
public Integer getExitStatus() {
return exitStatus;
}
private class ExitStatusChannelRequestHandler implements RequestHandler<Channel> {
public Result process(Channel channel, String request, boolean wantReply, Buffer buffer) throws Exception {
if (request.equals("exit-status")) {
exitStatus = buffer.getInt();
notifyStateChanged();
return Result.ReplySuccess;
}
return Result.Unsupported;
private class ExitSignalChannelRequestHandler implements RequestHandler<Channel> {
public Result process(Channel channel, String request, boolean wantReply, Buffer buffer) throws Exception {
if (request.equals("exit-signal")) {
exitSignal = buffer.getString();
notifyStateChanged();
return Result.ReplySuccess;
}
return Result.Unsupported;
}
| 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/map/TestFixedSizeSortedMap.java,v 1.1 2003/11/16 00:05:46 scolebourne Exp $
package org.apache.commons.collections.map;
* @version $Revision: 1.1 $ $Date: 2003/11/16 00:05:46 $ | 0 |
// Non Rolling Upgrades require a group with name "UPDATE_DESIRED_REPOSITORY_ID".
The Upgrade Pack is responsible for calling {@link org.apache.ambari.server.serveraction.upgrades.UpdateDesiredRepositoryAction} | 0 |
* Copyright 1999-2005 The Apache Software Foundation.
// Dispose the old processor, if any
if (oldProcessor != null) {
oldProcessor.markForDisposal();
}
| 0 |
public void setContentLengthLong(long len)
{
throw new UnsupportedOperationException();
}
| 0 |
List<Path> paths = new ArrayList<>(files.size()); | 0 |
* serialVersionUID format is YYYYMMDD for the data of the last binary change.
*/
private static final long serialVersionUID = 20101208L;
/** | 0 |
import java.util.Iterator;
/**
* Returns an iterator over the list.
*/
public Iterator iterator() {
return list.iterator();
} | 0 |
for (Capability cap : m_host.getCapabilities(namespace))
for (Capability cap : fragment.getCapabilities(namespace)) | 0 |
import org.apache.atlas.utils.AtlasEntityUtil;
for (String attrName : entityType.getRelationshipAttributes().keySet()) {
Object attrVal = entity.getRelationshipAttribute(attrName);
String relationshipType = AtlasEntityUtil.getRelationshipType(attrVal);
AtlasAttribute attribute = entityType.getRelationshipAttribute(attrName, relationshipType);
visitAttribute(attribute.getAttributeType(), attrVal);
Object attrVal = entity.getAttribute(attrName);
String relationshipType = AtlasEntityUtil.getRelationshipType(attrVal);
AtlasAttribute attribute = entityType.getRelationshipAttribute(attrName, relationshipType);
visitAttribute(attribute.getAttributeType(), attrVal); | 0 |
private static Set<String> pkPropertyIds = new HashSet<>(
Arrays.asList(ALERT_ID, ALERT_DEFINITION_NAME));
private static final Set<String> PROPERTY_IDS = new HashSet<>();
private static final Map<Resource.Type, String> KEY_PROPERTY_IDS = new HashMap<>();
Set<Resource> results = new LinkedHashSet<>(); | 1 |
* a known prefix to the results of another {@code KeyHashingScheme}. | 0 |
import java.io.InputStream;
* @version CVS $Id$
/* (non-Javadoc)
* @see org.apache.cocoon.environment.Request#getInputStream()
*/
public InputStream getInputStream() throws UnsupportedOperationException {
throw new UnsupportedOperationException();
} | 0 |
return ((hosts != null) && (hosts.size() > 0))
? hosts.toArray(new Bundle[hosts.size()]) : null; | 0 |
* Returns total capacity of the buffer
*
* @return total capacity
*/
int capacity();
/**
* Returns available space in the buffer.
*
* @return available space.
*/
int available();
/** | 0 |
public int isNodeInclude(Node n) {
if ((n==exclude))
return -1;
if ((n==exclude) || XMLUtils.isDescendantOrSelf(exclude,n))
return -1;
return 1;
//return !XMLUtils.isDescendantOrSelf(exclude,n); | 0 |
private CacheKeyGenerator extractor;
extractor = new CacheKeyGenerator(); | 0 |
public boolean accept(final File file) {
public boolean accept(final File dir, final String name) { | 1 |
private final int proxyPort; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/log/src/java/org/apache/commons/jelly/tags/log/WarnTag.java,v 1.2 2003/01/25 18:02:25 morgand Exp $
* $Revision: 1.2 $
* $Date: 2003/01/25 18:02:25 $
* $Id: WarnTag.java,v 1.2 2003/01/25 18:02:25 morgand Exp $
import org.apache.commons.jelly.JellyTagException;
* @version $Revision: 1.2 $
public void doTag(XMLOutput output) throws JellyTagException { | 0 |
package aQute.libg.xslt;
import java.io.*;
import java.net.*;
import java.util.*;
import java.util.concurrent.*;
import javax.xml.transform.*;
import javax.xml.transform.stream.*;
public class Transform {
static TransformerFactory transformerFactory = TransformerFactory
.newInstance();
static Map<URL, Templates> cache = new ConcurrentHashMap<URL, Templates>();
public static void transform(TransformerFactory transformerFactory, URL xslt, InputStream in, OutputStream out)
throws Exception {
if ( xslt == null )
throw new IllegalArgumentException("No source template specified");
Templates templates = cache.get(xslt);
if (templates == null) {
InputStream xsltIn = xslt.openStream();
try {
templates = transformerFactory
.newTemplates(new StreamSource(xsltIn));
cache.put(xslt, templates);
} finally {
in.close();
}
}
Result xmlResult = new StreamResult(out);
Source xmlSource = new StreamSource(in);
Transformer t = templates.newTransformer();
t.transform(xmlSource, xmlResult);
out.flush();
}
public static void transform(URL xslt, InputStream in, OutputStream out) throws Exception {
transform(transformerFactory,xslt, in, out);
}
} | 0 |
public TemporaryFolder tmpDir =
new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
EasyMock.expect(mockService.<Integer>submit(EasyMock.anyObject(Callable.class)))
EasyMock.expect(mockService.shutdownNow()).andReturn(Collections.<Runnable>emptyList()).once(); | 0 |
import org.apache.ambari.server.controller.RootComponent;
import org.apache.ambari.server.controller.RootService;
: RootComponent.AMBARI_SERVER.name();
null, KerberosHelper.AMBARI_SERVER_HOST_NAME, ambariServerHostID(), RootService.AMBARI.name(), componentName, kerberosConfigurations, currentConfigurations,
kerberosHelper.createResolvedKeytab(keytab); | 0 |
.append(": ").println(e.getMessage()); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.