Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
* @param body the body of the request; may be null public InputStream readFrom(String spec, String requestMethod, String body, Map<String, String> headers) /** * Read from the input stream specified by the given URL spec as the given user. This method sets the * "doAs" user header to impersonate the user over the request. * * @param spec the String to parse as a URL * @param requestMethod the HTTP method (GET,POST,PUT,etc.). * @param body the body of the request; may be null * @param headers the headers of the request; may be null * @param userName the "doAs" user name * * @return the input stream * * @throws IOException if an error occurred connecting to the server */ public InputStream readAs(String spec, String requestMethod, String body, Map<String, String> headers, String userName) throws IOException; /** * Read from the input stream specified by the given URL spec as the current user. This method sets the * "doAs" user header to impersonate the user over the request. * * @param spec the String to parse as a URL * @param requestMethod the HTTP method (GET,POST,PUT,etc.). * @param body the body of the request; may be null * @param headers the headers of the request; may be null * * @return the input stream * * @throws IOException if an error occurred connecting to the server */ public InputStream readAsCurrent(String spec, String requestMethod, String body, Map<String, String> headers) throws IOException;
0
* HTTP entity wrapper whose content is provided by a * {@link ContentInputBuffer}. *
0
GroupAlsoByWindowsDoFn.create(windowingStrategy, combineFn, StringUtf8Coder.of(), BigEndianLongCoder.of());
0
log.debug("handleExtendedData({}) SSH_MSG_CHANNEL_FAILURE - non STDERR type: {}", this, ex); if ((len < 0) || (len > ByteArrayBuffer.MAX_LEN)) { log.trace("handleExtendedData({}) extended data: {}", this, BufferUtils.printHex(buffer.array(), buffer.rpos(), len));
0
String serviceName = null; if (configGroup.getConfigurations() != null) { serviceName = cluster.getServiceForConfigTypes(configGroup.getConfigurations().keySet()); } if (serviceName != null) { cluster.createServiceConfigVersion(serviceName, getManagementController().getAuthName(), null, configGroup); } String serviceName = null; if (configGroup.getConfigurations() != null) { serviceName = cluster.getServiceForConfigTypes(configGroup.getConfigurations().keySet()); } if (serviceName != null) { cluster.createServiceConfigVersion(serviceName, getManagementController().getAuthName(), null, configGroup); }
0
fileInfo = null; children = EMPTY_FTP_FILE_ARRAY; detach(); detach();
0
@Deprecated
0
if (requirement != null) { resource.addRequire(requirement); } String effective = directives.get("effective"); if (effective != null && !effective.equals("resolve")) { return 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
0
/** * Current number of entries in list. */ protected int n = 0; /** * Simple Linked list of listeners. */ protected Entry first = null; /** * Array of listeners retained between calls to getEventListeners if the * list of listeners doesn't change. This needs to be a copy so if the * list of listeners changes during event dispatch it doesn't effect * the inprogress dispatch. */ protected EventListener [] listeners = null; if (first == null) return null; if (listeners != null) return listeners; listeners = new EventListener[n]; listeners = null; // Clear current listener list. if (first == null) return; if (first.listener == listener) { listeners = null; // Clear current listener list. while (e != null) { if (e.listener == listener) { prev.next = e.next; listeners = null; // Clear current listener list. --n; break; } if (listener == e.listener) protected static class Entry { Entry next;
0
String taskId = "fred"; Optional<IScheduledTask> mutated = Optional.of(task("a", ScheduleStatus.STARTING)); expect(storageUtil.taskStore.mutateTask(taskId, mutation)).andReturn(mutated); Op.saveTasks(new SaveTasks(ImmutableSet.of(mutated.get().newBuilder())))) assertEquals(mutated, storeProvider.getUnsafeTaskStore().mutateTask(taskId, mutation)); String taskId = "fred"; Optional<IScheduledTask> mutated = Optional.of(task("a", ScheduleStatus.STARTING)); expect(storageUtil.taskStore.mutateTask(taskId, mutation)).andReturn(mutated); Op.saveTasks(new SaveTasks(ImmutableSet.of(mutated.get().newBuilder()))), assertEquals(mutated, storeProvider.getUnsafeTaskStore().mutateTask(taskId, mutation)); String taskId = "fred"; Optional<IScheduledTask> mutated = Optional.of(task("a", ScheduleStatus.PENDING)); expect(storageUtil.taskStore.mutateTask(taskId, mutation)).andReturn(mutated); new SaveTasks(ImmutableSet.of(mutated.get().newBuilder())))) assertEquals(mutated, storeProvider.getUnsafeTaskStore().mutateTask(taskId, mutation)); String taskId = "fred"; Optional<IScheduledTask> mutated = Optional.of(task("a", ScheduleStatus.PENDING)); expect(storageUtil.taskStore.mutateTask(taskId, mutation)).andReturn(mutated); .add(mutated.get().newBuilder()) assertEquals(mutated, storeProvider.getUnsafeTaskStore().mutateTask(taskId, mutation));
0
import static com.google.common.base.Preconditions.checkArgument; checkArgument(harnessId != null, "harnessId must not be null");
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/IntList.java,v 1.12 2003/01/13 12:59:45 rwaldhoff Exp $ * An ordered collection of <code>int</code> values. * @version $Revision: 1.12 $ $Date: 2003/01/13 12:59:45 $ * Appends the specified element to the end of me * (optional operation). Returns <code>true</code> * if I changed as a result of this call. * <p/> * If a collection refuses to add the specified * element for any reason other than that it already contains * the element, it <i>must</i> throw an exception (rather than * simply returning <tt>false</tt>). This preserves the invariant * that a collection always contains the specified element after * this call returns. * * @param element the value whose presence within me is to be ensured * @return <code>true</code> iff I changed as a result of this call * * @throws UnsupportedOperationException when this operation is not * supported * @throws IllegalArgumentException may be thrown if some aspect of the * specified element prevents it from being added to me */ boolean add(int element); /** * (optional operation). Shifts the element currently * <p /> * <p /> * Returns a * {@link IntListIterator bidirectional iterator} * over all my elements, in the appropriate sequence. * Returns a * {@link IntListIterator bidirectional iterator} * specified <i>index</i> indicates the first * element that would be returned by an initial * call to the * {@link IntListIterator#next next} * method. An initial call to the * {@link IntListIterator#previous previous} * method would return the element with the specified * <i>index</i> minus one.
0
final MockFilterConfig config = new MockFilterConfig(); final ServletFilterConfiguration resultConfig = new ServletFilterConfiguration(config); public String getInitParameter(final String key) public void setInitParameter(final String key, final String value)
0
final boolean fail[] = {false}; }
0
private TypeDescriptor<OutputT> outputType; UnaryFunctor<InputT, OutputT> functor, TypeDescriptor<OutputT> outputType) { Objects.requireNonNull(outputType); casted.outputType = outputType; Sets.newHashSet(outputHints), outputType);
0
return m_felix.loadBundleClass(this, name);
0
* @param useCurator {@code true} to use Apache Curator; otherwise commons/zookeeper is used. public static ZooKeeperConfig create(boolean useCurator, Iterable<InetSocketAddress> servers) { useCurator, private final boolean useCurator; private final Iterable<InetSocketAddress> servers; private final boolean inProcess; private final Amount<Integer, Time> sessionTimeout; private final Optional<String> chrootPath; private final Optional<Credentials> credentials; ZooKeeperConfig( boolean useCurator, this.useCurator = useCurator; useCurator, boolean isUseCurator() { return useCurator; } public Iterable<InetSocketAddress> getServers() { return servers; } boolean isInProcess() { return inProcess; } public Amount<Integer, Time> getSessionTimeout() { return sessionTimeout; } Optional<String> getChrootPath() { return chrootPath; } public Optional<Credentials> getCredentials() { return credentials; }
0
* * @since 4.0
0
public void accept( final Visitor v ) {
0
import org.apache.http.client.utils.URIBuilder; import java.net.URISyntaxException; public String getProxyUrl(String baseUrl, String endPoint, MultivaluedMap<String, String> queryParameters) { URIBuilder builder; try { builder = new URIBuilder(baseUrl + "/" + endPoint); for(String key: keySet) { builder.addParameter(key, queryParameters.getFirst(key)); return builder.build().toString(); } catch (URISyntaxException e) { LOG.error("Failed to build a URL from the baseUrl: {} and endPoint: {}. Exception: {}", baseUrl, endPoint, e); throw new TezWebAppException("Failed to build a URL from the baseUrl:" + baseUrl + "and endPoint: " + endPoint, e);
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. */
1
* @author <a href="mailto:[email protected]">Vincent Hardy</a>
1
import javax.xml.crypto.dsig.XMLSignature; String namespace = childElem.getNamespaceURI(); if (localName.equals("PGPKeyID") && XMLSignature.XMLNS.equals(namespace)) { } else if (localName.equals("PGPKeyPacket") && XMLSignature.XMLNS.equals(namespace)) {
0
String inAttr = filterElement.getAttributeNS(null, SVG_IN_ATTRIBUTE);
0
import com.twitter.common.testing.easymock.EasyMockTest;
0
import org.apache.cocoon.acting.ServiceableAction; * @version CVS $Id: LoginAction.java,v 1.3 2003/10/15 20:47:14 cziegeler Exp $ extends ServiceableAction this.manager.release( authManager);
0
* @version $Id$
0
readWriteLock.writeLock().lock(); ClusterEntity clusterEntity = clusterDAO.findById(cluster.getClusterId()); if (newConfig) { ClusterConfigEntity entity = new ClusterConfigEntity(); entity.setClusterEntity(clusterEntity); entity.setClusterId(cluster.getClusterId()); entity.setType(getType()); entity.setVersion(getVersion()); entity.setTag(getTag()); entity.setTimestamp(new Date().getTime()); entity.setStack(clusterEntity.getDesiredStack()); entity.setData(gson.toJson(getProperties())); if (null != getPropertiesAttributes()) { entity.setAttributes(gson.toJson(getPropertiesAttributes())); } clusterDAO.createConfig(entity); clusterEntity.getClusterConfigEntities().add(entity); // save the entity, forcing a flush to ensure the refresh picks up the // newest data clusterDAO.merge(clusterEntity, true); } else { // only supporting changes to the properties ClusterConfigEntity entity = null; // find the existing configuration to update for (ClusterConfigEntity cfe : clusterEntity.getClusterConfigEntities()) { if (getTag().equals(cfe.getTag()) && getType().equals(cfe.getType()) && getVersion().equals(cfe.getVersion())) { entity = cfe; break; } // if the configuration was found, then update it if (null != entity) { LOG.debug( "Updating {} version {} with new configurations; a new version will not be created", getType(), getVersion()); entity.setData(gson.toJson(getProperties())); readWriteLock.writeLock().unlock(); // re-load the entity associations for the cluster cluster.refresh();
0
* <p> * A file provider may also implement {@link VfsComponent}.
0
/* ==================================================================== * @version $Revision: 1.3 $ $Date: 2004/01/14 21:43:11 $
0
* limitations under the License.
0
try (ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayInputStream bais = new ByteArrayInputStream(in))
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
* Default {@link WindowFn} where all data is in the same window. @Override public GlobalWindow getSideInputWindow(BoundedWindow window) { return GlobalWindow.INSTANCE; }
0
grace(500); } public static void grace(int time) { try { Thread.sleep(time); } catch (InterruptedException e) { // Ignore it. }
0
// Otherwise we failed to load it return hadoopClassesAvailable && null != getProvidersMethod && null != hadoopCredProviderFactory && null != getCredentialEntryMethod && null != getCredentialMethod;
0
import org.junit.Test; import static org.junit.Assert.*; public class DefaultKeyValueTest<K, V> { @Test @Test @Test @Test @Test @Test
0
* @throws IOException If an I/O error occurs while creating the Socket. * @throws UnknownHostException If the hostname cannot be resolved. * @throws IOException If an I/O error occurs while creating the Socket. * @throws IOException If an I/O error occurs while creating the Socket. * @throws UnknownHostException If the hostname cannot be resolved. * @throws IOException If an I/O error occurs while creating the Socket. * @throws IOException If an I/O error occurs while creating the Socket. * @throws IOException If an I/O error occurs while creating * @throws IOException If an I/O error occurs while creating * @throws IOException If an I/O error occurs while creating
0
private int executions = 0; executions++; executions++; executions++; executions++; executions++; executions++; executions++; executions++; public int getExecutions() { return executions; }
0
import org.apache.batik.ext.awt.image.renderable.Filter; import org.apache.batik.ext.awt.image.renderable.PadMode; import org.apache.batik.ext.awt.image.renderable.AffineRable8Bit; import org.apache.batik.ext.awt.image.renderable.PadRable8Bit; import org.apache.batik.ext.awt.image.renderable.RasterRable; filter = new AffineRable8Bit(filter, at); filter = new AffineRable8Bit(filter, scale); filter = new PadRable8Bit(filter,
0
import org.apache.beam.sdk.transforms.CombineWithContext.CombineFnWithContext; return new SparkCombiningState<>(namespace, address, accumCoder, combineFn); bindCombiningValueWithContext( CombineFnWithContext<InputT, AccumT, OutputT> combineFn) { return new SparkCombiningState<>( namespace, address, accumCoder, CombineFnUtil.bindContext(combineFn, c)); private final CombineFn<InputT, AccumT, OutputT> combineFn; CombineFn<InputT, AccumT, OutputT> combineFn) { return combineFn.extractOutput(getAccum()); combineFn.addInput(accum, input); accum = combineFn.createAccumulator(); accum = combineFn.mergeAccumulators(Arrays.asList(getAccum(), accum)); return combineFn.mergeAccumulators(accumulators);
0
final Map<Resource.Type, String> mapIds = new HashMap<>();
0
* Copyright 2016-2017 Seznam.cz, a.s. package cz.seznam.euphoria.benchmarks.model;
0
public Set<String> findConfigTypesByPropertyName(StackId stackId, String propertyName, String clusterName) throws AmbariException { for(Service service : clusters.getCluster(clusterName).getServices().values()) { Set<PropertyInfo> stackProperties = ambariMetaInfo.getProperties(stack.getName(), stack.getVersion(), service.getName()); public void moveDeprecatedGlobals(StackId stackId, Map<String, Map<String, String>> configurations, String clusterName) { newConfigTypes = this.findConfigTypesByPropertyName(stackId, propertyName, clusterName);
0
import org.apache.beam.runners.core.metrics.ExecutionStateTracker;
0
List<String> errorMessages = new ArrayList<>();
0
expectedKeys = new ArrayList<>(initialListSize); expectedValues = new ArrayList<>(initialListSize); expectedPositions = new ArrayList<>(initialListSize);
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 $Revision: 1.3 $ $Date: 2004/02/29 14:17:37 $
0
* @version CVS $Id: ObjectModelAction.java,v 1.3 2003/08/04 03:13:22 joerg Exp $ String[] names = parameters.getNames(); for(int i = 0; i < names.length; i++) { name = names[i]; objectModel.put("cocoon-portal-" + name, parameters.getParameter(name));
0
EasyMock.expect(subControllers[2].checkForReloading(null)).andReturn( Boolean.FALSE); EasyMock.expect(subControllers[1].checkForReloading(null)).andReturn( Boolean.FALSE); EasyMock.expect(subControllers[2].checkForReloading(null)).andReturn( Boolean.FALSE);
0
package org.apache.felix.ipojo.test.scenarios.service.dependency.statics; import org.apache.felix.ipojo.test.scenarios.service.dependency.service.CheckService;
0
throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
1
// TODO for JDK-8 use Comparator.naturalOrder() // TODO for JDK-8 use Comparator.naturalOrder() * @param <V> The element type * @param values The values to be added (ignored if {@code null}) * @param <T> The exception type
0
// Get the value of credential store enabled from the DB Service clusterService = cluster.getService(serviceName); execCmd.setCredentialStoreEnabled(String.valueOf(clusterService.isCredentialStoreEnabled()));
0
extends LayoutEvent implements JXPathEvent { protected final String path; protected final Object value; super( target ); this.path = path; this.value = value; } /** * @see org.apache.cocoon.portal.event.impl.JXPathEvent#getPath() */ public String getPath() { return this.path; } /** * @see org.apache.cocoon.portal.event.impl.JXPathEvent#getValue() */ public Object getValue() { return this.value; * @see org.apache.cocoon.portal.event.impl.JXPathEvent#getObject() public Object getObject() { return this.getTarget();
0
import cz.seznam.euphoria.core.annotation.operator.StateComplexity; @Derived( state = StateComplexity.ZERO, repartitions = 0 )
0
final Set<String> extensionSet = new HashSet<>(); final Set<String> extensionSet = new HashSet<>();
0
package org.apache.felix.karaf.gshell.features.commands; import org.apache.felix.karaf.gshell.features.FeaturesService;
0
public static final String CONFIGURATION_ADMIN = "org.osgi.service.cm.ConfigurationAdmin"; private final ServiceTracker<ConfigurationAdmin, RegionConfigurationSupport> configAdminTracker; public ConfigAdminTracker(final ComponentActivator componentActivator) { //TODO this assumes that there is 0 or 1 ca service visible to the bundle being extended. //Is this sure to be true? configAdminTracker = new ServiceTracker<ConfigurationAdmin, RegionConfigurationSupport>( componentActivator.getBundleContext(), CONFIGURATION_ADMIN, new ServiceTrackerCustomizer<ConfigurationAdmin, RegionConfigurationSupport>() { public RegionConfigurationSupport addingService(ServiceReference<ConfigurationAdmin> reference) { return componentActivator.setRegionConfigurationSupport( reference ); } public void modifiedService(ServiceReference<ConfigurationAdmin> reference, RegionConfigurationSupport service) { } public void removedService(ServiceReference<ConfigurationAdmin> reference, RegionConfigurationSupport rcs) { componentActivator.unsetRegionConfigurationSupport( rcs ); } } ); configAdminTracker.open(); } public void dispose() { configAdminTracker.close(); }
0
import java.util.Arrays; @Override public String toString() { StringBuilder builder = new StringBuilder(super.toString()); builder.append("[cpds="); builder.append(cpds); builder.append(", validationQuery="); builder.append(validationQuery); builder.append(", validationQueryTimeoutSeconds="); builder.append(validationQueryTimeoutSeconds); builder.append(", rollbackAfterValidation="); builder.append(rollbackAfterValidation); builder.append(", pool="); builder.append(pool); builder.append(", userName="); builder.append(userName); builder.append(", maxConnLifetimeMillis="); builder.append(maxConnLifetimeMillis); builder.append(", validatingSet="); builder.append(validatingSet); builder.append(", pcMap="); builder.append(pcMap); builder.append("]"); return builder.toString(); }
0
* @throws FunctorException (runtime) if the closure execution resulted in a
0
buff.set(buff.getBytes(), section.getRowPrefix().length(), buff.getLength() - section.getRowPrefix().length());
0
* Convenience {@link FileAlterationListener} implementation that does nothing. * @see FileAlterationObserver public class FileAlterationListenerAdaptor implements FileAlterationListener { public void onStart(final FileAlterationObserver observer) { public void onStop(final FileAlterationObserver observer) {
0
/* $Id$
0
import static org.apache.beam.runners.spark.translation.TranslationUtils.avoidRddSerialization; import org.apache.spark.storage.StorageLevel; StorageLevel level = StorageLevel.fromString(context.storageLevel()); if (avoidRddSerialization(level)) { // if it is memory only reduce the overhead of moving to bytes all = all.persist(level); } else { // Caching can cause Serialization, we need to code to bytes // more details in https://issues.apache.org/jira/browse/BEAM-2669 Map<TupleTag<?>, Coder<WindowedValue<?>>> coderMap = TranslationUtils.getTupleTagCoders(outputs); all = all .mapToPair(TranslationUtils.getTupleTagEncodeFunction(coderMap)) .persist(level) .mapToPair(TranslationUtils.getTupleTagDecodeFunction(coderMap)); } context.putDataset(output.getValue(), new BoundedDataset<>(values), false); context.putDataset(transform, new BoundedDataset<>(input), true);
0
interpreter.setArguments(script.getParameters(), null); return interpreter.interpret(script); } /** * {@inheritDoc} */ public Object execute(JexlContext context, Object...args) { Interpreter interpreter = jexl.createInterpreter(context); interpreter.setArguments(script.getParameters(), args);
0
* @version $Revision: 1.6 $ $Date: 2004/05/16 11:16:01 $ * Evaluates the predicate returning the result of the decorated predicate * once a null check is performed. * * @param object the input object * @return true if decorated predicate returns true * @throws FunctorException if input is null *
0
import java.util.Objects; super(Objects.requireNonNull(in, "No input stream provided"));
0
import org.apache.excalibur.source.Source; import org.apache.excalibur.source.SourceException; import org.apache.excalibur.source.SourceResolver; import org.apache.excalibur.source.SourceValidity; import org.apache.excalibur.store.Store; import org.apache.cocoon.util.AbstractLogEnabled; import org.xml.sax.SAXException; public final class DefaultIncludeCacheManager extends AbstractLogEnabled implements IncludeCacheManager, ThreadSafe, Serviceable, Disposable, Parameterizable { private SourceResolver resolver; private Store store; private String preemptiveLoaderURI; IncludeCacheStorageProxy proxy = new ModifiableSourceIncludeCacheStorageProxy(this.resolver, source.getURI()); public String load(String uri, IncludeCacheManagerSession session) throws IOException { throws IOException, SAXException { if (getLogger().isDebugEnabled()) { getLogger().debug("Stream " + uri + " for session " + session); if (session.isParallel() && !session.isPreemptive()) { if (object == null) { XMLByteStreamCompiler serializer; this.defaultCacheStorage = new StoreIncludeCacheStorageProxy(this.store); public PreemptiveBooter(final String uri) {
0
import org.apache.beam.sdk.fn.IdGenerators; environmentFactory, dataServer, stateServer, IdGenerators.incrementingLongs());
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/decorators/Attic/TestAll.java,v 1.6 2003/09/03 00:11:28 scolebourne Exp $ * @version $Revision: 1.6 $ $Date: 2003/09/03 00:11:28 $ suite.addTest(TestObservedCollection.suite()); suite.addTest(TestObservedList.suite()); suite.addTest(TestObservedSet.suite());
0
private static final long serialVersionUID = 0; private static final long serialVersionUID = 0; private static final long serialVersionUID = 0;
0
import org.apache.accumulo.harness.AccumuloClusterHarness; public class RecoveryCompactionsAreFlushesIT extends AccumuloClusterHarness {
0
import org.apache.zookeeper.server.DatadirCleanupManager; // Start and schedule the the purge task DatadirCleanupManager purgeMgr = new DatadirCleanupManager(config .getDataDir(), config.getDataLogDir(), config .getSnapRetainCount(), config.getPurgeInterval()); purgeMgr.start();
0
* Copyright 2001-2005 The Apache Software Foundation.
0
import static com.google.common.base.Charsets.UTF_8; this.value = new Value(Integer.toString(count).getBytes(UTF_8));
0
storage.writeOp(new MutateWork.NoResult.Quiet() { storage.writeOp(new MutateWork.NoResult.Quiet() { storage.writeOp(new MutateWork.NoResult.Quiet() {
0
cacheBlock.close(); cacheBlock.close();
0
import org.apache.accumulo.core.client.Accumulo;
0
* The bundle which has created the service dependency. m_bundleContext.ungetService(m_reference);
0
final int chunk = Math.min(bytes, chunkSize);
0
conn.shutdown();
0
private final Parser parser = new PosixParser();
0
if (!"POST".equals(request.getMethod())) throw new MalformedURLException("Cannot create consumer source for request that is not POST.");
0
config.setStackId(cluster.getDesiredStackVersion());
0
import org.apache.sshd.client.channel.ClientChannelEvent; Collection<ClientChannelEvent> result = channel.waitFor(EnumSet.of(ClientChannelEvent.CLOSED), TimeUnit.SECONDS.toMillis(15L)); assertFalse("Timeout while waiting for channel closure", result.contains(ClientChannelEvent.TIMEOUT)); Collection<ClientChannelEvent> mask = EnumSet.of(ClientChannelEvent.CLOSED); Collection<ClientChannelEvent> result = channel.waitFor(mask, TimeUnit.SECONDS.toMillis(15L)); assertFalse("Timeout while waiting for channel closure", result.contains(ClientChannelEvent.TIMEOUT)); Collection<ClientChannelEvent> result = channel.waitFor(EnumSet.of(ClientChannelEvent.CLOSED), TimeUnit.SECONDS.toMillis(15L)); assertFalse("Timeout while waiting on channel close", result.contains(ClientChannelEvent.TIMEOUT)); Collection<ClientChannelEvent> result = channel.waitFor(EnumSet.of(ClientChannelEvent.CLOSED), TimeUnit.SECONDS.toMillis(15L)); assertFalse("Timeout while waiting on channel close", result.contains(ClientChannelEvent.TIMEOUT)); Collection<ClientChannelEvent> result = channel.waitFor(EnumSet.of(ClientChannelEvent.CLOSED), TimeUnit.SECONDS.toMillis(15L)); assertFalse("Timeout while waiting on channel close", result.contains(ClientChannelEvent.TIMEOUT)); Collection<ClientChannelEvent> result = channel.waitFor(EnumSet.of(ClientChannelEvent.CLOSED), TimeUnit.SECONDS.toMillis(35L)); assertFalse("Timeout while waiting on channel close", result.contains(ClientChannelEvent.TIMEOUT));
0
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists; import org.apache.beam.vendor.guava.v20_0.com.google.common.util.concurrent.Uninterruptibles;
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
LOG.info("Got injector: {}", injector);
0
package org.apache.commons.ognl; * http://www.apache.org/licenses/LICENSE-2.0 import java.util.Enumeration; import java.util.Iterator;
0
* @version $Id$
0
private static final String PROPERTY_LOCK_URL = "karaf.lock.jdbc.url"; private static final String PROPERTY_LOCK_JDBC_DRIVER = "karaf.lock.jdbc.driver"; private static final String PROPERTY_LOCK_JDBC_USER = "karaf.lock.jdbc.user"; private static final String PROPERTY_LOCK_JDBC_PASSWORD = "karaf.lock.jdbc.password"; private static final String PROPERTY_LOCK_JDBC_TABLE = "karaf.lock.jdbc.table"; private static final String PROPERTY_LOCK_JDBC_CLUSTERNAME = "karaf.lock.jdbc.clustername"; private static final String PROPERTY_LOCK_JDBC_TIMEOUT = "karaf.lock.jdbc.timeout";
0
import org.apache.hc.client5.http.DnsResolver; import org.apache.hc.core5.annotation.Immutable; import org.apache.hc.core5.http.protocol.HttpContext;
0
package org.apache.felix.ipojo.runtime.core.components; import org.apache.felix.ipojo.runtime.core.services.CheckService; import org.apache.felix.ipojo.runtime.core.services.Service; import java.util.Properties; public class ServiceConsumer implements CheckService { private Service service; private Properties props = new Properties(); public ServiceConsumer() { props.put("1", new Integer(service.count())); props.put("2", new Integer(service.count())); props.put("3", new Integer(service.count())); } public boolean check() { return service.count() > 0; } public Properties getProps() { return props; } }
0
void addMixedIndex(String vertexIndex, AtlasPropertyKey propertyKey);
0
* <p> * As it's name suggests just a simple bean used for testing. public class SimpleTestBean { public String getAlpha() { public void setAlpha( String alpha ) { public String getBeta() { public void setBeta( String beta ) { public String getGamma() { public void setGamma( String gamma ) { public String getDeltaValue() { // Retrieves "write only" value public void setDelta( String delta ) { // "delta" is a write-only property public void setAlphaBeta( String alpha, String beta ) { setAlpha( alpha ); setBeta( beta ); public String toString() { StringBuilder sb = new StringBuilder( "[SimpleTestBean]" ); sb.append( " alpha=" ); sb.append( alpha ); sb.append( " beta=" ); sb.append( beta ); sb.append( " gamma=" ); sb.append( gamma ); sb.append( " delta=" ); sb.append( delta );
1
import org.apache.accumulo.core.client.impl.Namespace; protected Namespace.ID namespaceId = null; public NamespaceConfiguration(Namespace.ID namespaceId, Instance inst, AccumuloConfiguration parent) { PropCacheKey key = new PropCacheKey(inst.getInstanceID(), namespaceId.canonicalID()); protected Namespace.ID getNamespaceId() {
1
* @param rs ResultSet that supplies the array data * @throws SQLException if a database access error occurs * @return the newly created array * @see org.apache.commons.dbutils.BeanProcessor#toBean(java.sql.ResultSet, java.lang.Class) * @param <T> The type of bean to create * @param rs ResultSet that supplies the bean data * @param type Class from which to create the bean instance * @throws SQLException if a database access error occurs * @return the newly created bean * @param <T> The type of bean to create * @param rs ResultSet that supplies the bean data * @param type Class from which to create the bean instance * @throws SQLException if a database access error occurs * @return A <code>List</code> of beans with the given type in the order * they were returned by the <code>ResultSet</code>. * @param rs ResultSet that supplies the map data * @throws SQLException if a database access error occurs * @return the newly created Map /** /** {@inheritDoc} */ /** {@inheritDoc} */ /** {@inheritDoc} */ /** {@inheritDoc} */ /** {@inheritDoc} */
0
import java.util.Queue; * @return authentication auth schemes that can be used for authentication. Can be empty. Queue<AuthOption> select(
0