Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
public void process(int cmd, Buffer buffer) throws Exception { | 0 |
* @return the cache entry | 0 |
@Deprecated | 0 |
import org.apache.gearpump.streaming.dsl.javaapi.functions.FlatMapFunction;
private static class AssignWindows<T> extends | 0 |
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* permission of the Apache Software Foundation.
* @version $Revision: 1.3 $ $Date: 2003/10/13 08:45:44 $ | 0 |
checkAdapt(type); | 1 |
import java.util.Properties;
import org.apache.felix.dependencymanager.samples.tpool.executor.ComponentExecutorFactoryImpl;
.setInterface(ComponentExecutorFactory.class.getName(), null)
.setImplementation(ComponentExecutorFactoryImpl.class));
// Create two synchronous components
mgr.add(createComponent().setImplementation(new MyComponent("Component 1")));
mgr.add(createComponent().setImplementation(new MyComponent("Component 2")));
// And two components which will be managed and started concurrently.
Properties properties = new Properties();
properties.put("parallel", "true");
mgr.add(createComponent().setImplementation(new MyComponent("Parallel Component 3")).setServiceProperties(properties));
mgr.add(createComponent().setImplementation(new MyComponent("Parallel Component 4")).setServiceProperties(properties)); | 0 |
pAspect = (PortalManagerAspect) manager.lookup(PortalManagerAspect.class.getName() + '/' + role); | 0 |
* metrics and at-most 1 thread is extracting updates by calling {@link #getUpdates} and {@link
* #commitUpdates}. Outside of this it is still safe. Although races in the update extraction may
* cause updates that don't actually have any changes, it will never lose an update.
/** Create a new {@link MetricsContainerImpl} associated with the given {@code stepName}. */
* Return a {@code CounterCell} named {@code metricName}. If it doesn't exist, create a {@code
* Metric} with the specified name.
* Return a {@code CounterCell} named {@code metricName}. If it doesn't exist, return {@code
* null}.
* Return a {@code DistributionCell} named {@code metricName}. If it doesn't exist, return {@code
* null}.
* Return a {@code GaugeCell} named {@code metricName}. If it doesn't exist, create a {@code
* Metric} with the specified name.
* Return a {@code GaugeCell} named {@code metricName}. If it doesn't exist, return {@code null}.
ImmutableList<MetricUpdate<UpdateT>> extractUpdates(MetricsMap<MetricName, CellT> cells) {
updates.add(
MetricUpdate.create(
MetricKey.create(stepName, cell.getKey()), cell.getValue().getCumulative()));
extractUpdates(counters), extractUpdates(distributions), extractUpdates(gauges));
ImmutableList<MetricUpdate<UpdateT>> extractCumulatives(MetricsMap<MetricName, CellT> cells) {
/** Update values of this {@link MetricsContainerImpl} by merging the value of another cell. */
MetricsMap<MetricName, CounterCell> current, MetricsMap<MetricName, CounterCell> updates) {
MetricsMap<MetricName, GaugeCell> current, MetricsMap<MetricName, GaugeCell> updates) { | 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.
*/
package org.apache.ambari.logsearch.solr.commands;
import org.apache.ambari.logsearch.solr.AmbariSolrCloudClient;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.response.CollectionAdminResponse;
import java.util.List;
public class ListCollectionCommand extends AbstractSolrRetryCommand<CollectionAdminRequest.List, List<String>> {
public ListCollectionCommand(int maxRetries, int interval) {
super(maxRetries, interval);
}
@Override
public List<String> handleResponse(CollectionAdminResponse response, AmbariSolrCloudClient client) throws Exception {
List<String> allCollectionList = (List<String>) response
.getResponse().get("collections");
return allCollectionList;
}
@Override
public CollectionAdminRequest.List createRequest(AmbariSolrCloudClient client) {
return new CollectionAdminRequest.List();
}
@Override
public String errorMessage(AmbariSolrCloudClient client) {
return "Cannot get collections.";
}
} | 0 |
import java.util.concurrent.CountDownLatch;
log.info("Splits added");
log.info("Generated data for {}", tableName);
CountDownLatch latch = new CountDownLatch(NUM_SCANNERS);
ScannerThread st = new ScannerThread(conn, scannerIndex, tableName, latch);
assertTrue("Expected at least " + NUM_SCANNERS + " scanIds, but saw " + scanIds.size(), NUM_SCANNERS <= scanIds.size());
private final CountDownLatch latch;
public ScannerThread(final Connector connector, final int workerIndex, final String tablename, final CountDownLatch latch) {
this.latch = latch;
latch.countDown();
try {
latch.await();
} catch (InterruptedException e) {
log.error("Thread interrupted with id {}", workerIndex);
Thread.currentThread().interrupt();
return;
}
log.debug("Creating scanner in worker thread {}", workerIndex);
log.debug("worker {}, row {}", workerIndex, row.toString()); | 0 |
private Object o;
Test(int i, Object o) {
this.o = o;
& (this.e == tother.e)
& equalObject(tother.o);
private boolean equalObject(Object other) {
if (this.o == null) {
return other == null;
}
return o.equals(other);
}
public void testObject1() throws Exception {
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final ObjectOutputStream oos = new ObjectOutputStream(baos);
final Object input = new Test(123, null);
oos.writeObject(input);
oos.close();
final InputStream bais = new ByteArrayInputStream(baos.toByteArray());
final ClassLoaderObjectInputStream clois =
new ClassLoaderObjectInputStream(getClass().getClassLoader(), bais);
final Object result = clois.readObject();
assertEquals(input, result);
clois.close();
}
public void testObject2() throws Exception {
final Object input = new Test(123, Integer.valueOf(0)); | 0 |
package com.twitter.aurora.scheduler.base;
import com.twitter.aurora.gen.Identity;
import com.twitter.aurora.gen.JobKey;
import com.twitter.aurora.gen.ScheduleStatus;
import com.twitter.aurora.gen.TaskQuery;
* @deprecated Use {@link #jobScoped(com.twitter.aurora.gen.JobKey)}
* @deprecated Use {@link #shardScoped(com.twitter.aurora.gen.JobKey, int, int...)}.
* @deprecated Use {@link #shardScoped(com.twitter.aurora.gen.JobKey, Iterable)}.
* @deprecated Use {@link Builder#byShards(com.twitter.aurora.gen.JobKey, int, int...)}
* @deprecated Use {@link Builder#byShards(com.twitter.aurora.gen.JobKey, Iterable)}
* @see Builder#byShards(com.twitter.aurora.gen.JobKey, int, int...) | 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 SF 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.hc.api.execution;
import java.util.List;
import org.apache.felix.hc.api.HealthCheck;
import org.osgi.annotation.versioning.ProviderType;
/** Executes health checks registered as OSGi services and implementing the interface {@link HealthCheck}. */
@ProviderType
public interface HealthCheckExecutor {
/** Executes all health checks matching the supplied filter options. If no options are supplied, all health checks are executed.
*
* @param selector filter selector
* @return List of results. The list might be empty. */
List<HealthCheckExecutionResult> execute(HealthCheckSelector selector);
/** Executes all health checks with the supplied filter options. If no options are supplied, all health checks are executed.
*
* @param selector filter selector
* @param options options for controlling execution behavior
*
* @return List of results. The list might be empty. */
List<HealthCheckExecutionResult> execute(HealthCheckSelector selector, HealthCheckExecutionOptions options);
} | 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 |
"org.apache.batik.util.resources.Messages"; | 0 |
package org.apache.bcel.generic; | 1 |
* @return The list of file information contained in the given path in
* the format determined by<code> parserKey </code>parameter.
* | 0 |
import org.apache.accumulo.core.util.shell.Token;
scanOptAuths = new Option("s", "scan-authorizations", true, "scan authorizations to set");
clearOptAuths = new Option("c", "clear-authorizations", false, "clear the scan authorizations"); | 0 |
/**
* A {@code WindowFn} wrapper of {@code Windowing}.
*/
windowing
.assignWindowsToElement(
BeamWindowedElement.of(ctx.element(), window, ctx.timestamp().getMillis()))
.spliterator(),
false) | 0 |
if (this.response.getStatusLine().getStatusCode() >= HttpStatus.SC_SUCCESS) { | 0 |
private AnnotationEntry[] annotation_table; // TODO could this be final?
this.annotation_table = annotation_table; | 0 |
* @version CVS $Id: AuthenticationProfileManager.java,v 1.12 2003/11/07 13:36:51 cziegeler Exp $
final Configuration appConf = state.getApplicationConfiguration().getConfiguration("portal");
if ( appConf == null ) {
throw new ProcessingException("Configuration for portal not found in application configuration.");
}
final Configuration config = appConf.getChild("profiles"); | 0 |
final ByteBuffer in = ByteBuffer.wrap(this.contentBuf.array(), 0, binaryLen); | 0 |
* Tests that a load() operation with a file path overrides a URL which
* might have been set.
*/
@Test
public void testLoadFromFilePathWithURLDefined()
throws ConfigurationException
{
File file = createTestFile();
FileBasedTestImpl content = new FileBasedTestImpl();
FileHandler handler = new FileHandler(content);
handler.setURL(ConfigurationAssert.getTestURL("test.xml"));
handler.load(file.getAbsolutePath());
assertEquals("Wrong content", CONTENT, content.getContent());
}
/** | 0 |
return TServerUtils.startTServer(result, processor, this.getClass().getSimpleName(), "GC Monitor Service", 2,
conf.getCount(Property.GENERAL_SIMPLETIMER_THREADPOOL_SIZE), 1000, maxMessageSize, SslConnectionParams.forServer(conf), 0).address; | 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 | 0 |
import org.apache.hc.core5.http.ContentType; | 0 |
import org.apache.hc.core5.http.ContentType; | 0 |
import org.apache.accumulo.minicluster.MemoryUnit;
import org.apache.accumulo.minicluster.ServerType;
cfg.setMemory(ServerType.TABLET_SERVER, cfg.getMemory(ServerType.TABLET_SERVER) * 3, MemoryUnit.BYTE); | 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: DefaultMediaManager.java,v 1.3 2004/03/05 13:02:22 bdelacretaz Exp $ | 1 |
import java.util.Locale;
final String ucDomain = domain.toUpperCase(Locale.ENGLISH); | 0 |
import java.time.Duration;
Windowing.Time<String> windowing = Windowing.Time.of(Duration.ofHours(1));
.windowBy(Windowing.Time.of(Duration.ofHours(1))) | 0 |
* Copyright 2001-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 |
DataStream<StreamingWindowedElement> input =
(DataStream<StreamingWindowedElement>) context.getSingleInputStream(operator); | 0 |
/**
* Enabled for auto start or not.
*/
private boolean recoveryEnabled;
recoveryEnabled = component.isRecoveryEnabled();
/**
* Get whether auto start is enabled.
*
* @return True or false.
*/
public boolean isRecoveryEnabled() {
return recoveryEnabled;
}
/**
* Set whether auto start is enabled.
*
* @param recoveryEnabled True or false.
*/
public void setRecoveryEnabled(boolean recoveryEnabled) {
this.recoveryEnabled = recoveryEnabled;
}
| 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(ProviderRegistry.class); | 0 |
public void processTaskResponse(String hostname, List<CommandReport> reports) { | 0 |
import static org.apache.ambari.server.state.ConfigMergeHelper.ThreeWayValue;
import static org.easymock.EasyMock.anyString;
import static org.easymock.EasyMock.createNiceMock;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import com.google.inject.Binder;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
import com.google.inject.persist.PersistService;
import com.google.inject.util.Modules; | 0 |
throw new HttpException("Unable to establish route: " +
"planned = " + route + "; current = " + fact);
throw new IllegalStateException("Unknown step indicator "
+ step + " from RouteDirector.");
}
throw new HttpException("Proxy chains are not supported."); | 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 |
* limitations under the License. | 0 |
* @param now
* Right now in time
if (!entry.getResource().isValid()) {
return false;
}
* @param request The current httpRequest being made
* @param request The current httpRequest being made
* @param entry the cache entry
* @param now right NOW in time
boolean etagValidatorMatches = (hasEtagValidator) && etagValidatorMatches(request, entry);
boolean lastModifiedValidatorMatches = (hasLastModifiedValidator) && lastModifiedValidatorMatches(request, entry, now);
}
if (hasLastModifiedValidator && !lastModifiedValidatorMatches) {
* @param request The current httpRequest being made
* @param entry the cache entry
* @return boolean does the etag validator match
* @param request The current httpRequest being made
* @param entry the cache entry
* @param now right NOW in time
* @return boolean Does the last modified header match | 0 |
import org.apache.sshd.common.PropertyResolver;
public interface Channel extends ChannelListenerManager, PropertyResolver, Closeable { | 0 |
.apply("Collect start time metrics", ParDo.of(runtimeMonitor));
input = applyWindowing(input);
input.apply(
"Total bytes monitor", ParDo.of(new ByteMonitor(METRICS_NAMESPACE, "totalBytes.count"))); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/IntCollection.java,v 1.5 2003/01/13 21:52:28 rwaldhoff Exp $
* @version $Revision: 1.5 $ $Date: 2003/01/13 21:52:28 $
* iff I changed as a result of this call.
* I will be {@link #isEmpty empty} after this
/**
* Removes all of my elements that are contained in the
* specified collection (optional operation).
* The behavior of this method is unspecified if
* the given collection is modified while this method
* is executing. Note that this includes the case
* in which the given collection is this collection,
* and it is not empty.
*
* @param c the collection of elements to remove
* @return <code>true</code> iff I contained the at least one of the
* specified elements, in other words, returns <code>true</code>
* iff I changed as a result of this call
*
* @throws UnsupportedOperationException when this operation is not
* supported
*/
boolean removeAll(IntCollection c);
* (In other words, retains <i>only</i> my elements that are
* contained in the specified collection.)
* The behavior of this method is unspecified if
* the given collection is modified while this method
* is executing.
* The length of the returned array will be equal
* to my {@link #size size}.
* The returned array will be independent of me,
* so that callers may modify that
* When I guarantee the order in which
* elements are returned by an {@link #iterator iterator},
* The returned array will be independent of me,
* so that callers may modify that
* When I guarantee the order in which
* elements are returned by an {@link #iterator iterator}, | 0 |
* <p></p>
* <p></p>
* <p></p> | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/MethodUtils.java,v 1.23 2003/10/05 13:35:38 rdonkin Exp $
* $Revision: 1.23 $
* $Date: 2003/10/05 13:35:38 $
* ====================================================================
*
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* notice, this list of conditions and the following disclaimer.
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgement:
* "This product includes software developed by the
* 4. The names "Apache", "The Jakarta Project", "Commons", and "Apache Software
* from this software without prior written permission. For written
* 5. Products derived from this software may not be called "Apache",
* "Apache" nor may "Apache" appear in their names without prior
* written permission of the Apache Software Foundation.
*/ | 0 |
import java.util.stream.Collectors;
import static java.util.Collections.singleton;
import static java.util.Collections.singletonList;
return singleton(
return singleton(new CountWindow(1));
return actives.stream()
.map(a -> Pair.of((Collection<CountWindow>) singleton(a), a))
.collect(Collectors.toList());
return singletonList(Pair.of(merged, r)); | 0 |
ScannerIterator(ClientContext context, Table.ID tableId, Authorizations authorizations, Range range, int size, int timeOut, ScannerOptions options, | 1 |
*
*
*
/**
/**
/**
/**
/** | 0 |
* A {@link PTransformOverrideFactory} that produces {@link ParDoSingle} instances from {@link
* ParDo.SingleOutput} instances. {@link ParDoSingle} is a primitive {@link PTransform}, to ensure
PCollection<? extends InputT>, PCollection<OutputT>, ParDo.SingleOutput<InputT, OutputT>> {
ParDo.SingleOutput<InputT, OutputT> transform) {
private final ParDo.SingleOutput<InputT, OutputT> original;
private ParDoSingle(ParDo.SingleOutput<InputT, OutputT> original) { | 0 |
*
* @version CVS $Id: WoodyPipelineConfig.java,v 1.3 2003/12/31 04:23:09 antonio Exp $
* <ol><li>Use the provided jxpathExpression (if not null)</li>
* <li>Obtain the form from it's default location in the flow context</li>
* @throws SAXException in any of the following cases:
* <ul><li>The provided jxpathExpression (if not null) not point to a
* {@see Form} instance.</li>
* <li>Both jxpathExpression and 'attribute-name' were not specified AND
Object form = null;
form = this.jxpathContext.getValue(jxpathExpression);
} else if (!(form instanceof Form)) {
form = this.request.getAttribute(this.attributeName);
} else if (!(form instanceof Form)) {
if (form == null) {
return (Form)form;
* This will parse the passed String looking for #{} occurences and then
| 0 |
import org.apache.aurora.scheduler.ResourceSlot;
new ResourceSlot(0.01, Amount.of(256L, Data.MB), Amount.of(0L, Data.MB), 0)) | 0 |
* @version CVS $Id: ExceptionSelector.java,v 1.4 2003/05/07 05:09:38 vgritsenko Exp $
* @see ObjectModelHelper#getThrowable(java.util.Map) | 0 |
import java.util.Map;
import net.sf.ehcache.util.concurrent.ConcurrentHashMap; | 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.accumulo.server.metanalysis; | 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.
*/
package org.apache.cocoon.components.flow.java;
/**
* Marker interface to mark classes, which should be made continuable
* by the ClassLoader.
*
* @author <a href="mailto:tcurdt@apache.org">Torsten Curdt</a>
* @author <a href="mailto:stephan@apache.org">Stephan Michels</a>
* @version CVS $Id: Continuable.java,v 1.1 2004/03/29 17:47:21 stephan Exp $
*/
public interface Continuable {
} | 0 |
public class OperationStatusAuditEvent extends AbstractUserAuditEvent {
public static class OperationStatusAuditEventBuilder extends AbstractUserAuditEventBuilder<OperationStatusAuditEvent, OperationStatusAuditEventBuilder> {
super.buildAuditMessage(builder);
.append(", Operation(") | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
protected static final Logger LOG = LoggerFactory.getLogger(DeserializationPerfTest.class); | 0 |
package org.apache.beam.sdk.options; | 0 |
public BidiAttributedCharacterIterator(AttributedCharacterIterator aci,
FontRenderContext frc) {
as.addAttribute
(GVTAttributedCharacterIterator.TextAttribute.BIDI_LEVEL,
new Integer(tl.getCharacterLevel(i)), i, i+1);
} | 0 |
ParDo.of(new ConstructCoGbkResultFn<>(tupleTags)));
ParDo.of(new ConstructUnionTableFn<>(index))).setCoder(unionTableEncoder); | 0 |
/**
* This class remains here for backwards compatibility.
* @deprecated since 1.4
* @see org.apache.accumulo.core.iterators.user.RowDeletingIterator
public class RowDeletingIterator extends org.apache.accumulo.core.iterators.user.RowDeletingIterator { | 0 |
private final Collection<SftpEventListener> sftpEventListeners =
EventListenerUtils.<SftpEventListener>synchronizedListenersSet(); | 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.composite;
/**
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/
public interface Provider {
} | 0 |
import org.quartz.JobDetail;
import org.quartz.Scheduler;
* Add a trigger to the execution scheduler
* @param trigger
* @throws SchedulerException
/**
* Persist job data
* @param job
* @throws SchedulerException
*/
public void addJob(JobDetail job) throws SchedulerException;
/**
* Delete the identified Job from the Scheduler - and any associated Triggers.
* @param jobKey
* @throws SchedulerException
*/
public void deleteJob(JobKey jobKey) throws SchedulerException; | 0 |
* @throws SCRDescriptorFailureException | 0 |
// System.out.println("Pad SMSz: " + w + "x" + h);
| 0 |
public synchronized SshdSocketAddress startLocalPortForwarding(SshdSocketAddress local, SshdSocketAddress remote) throws IOException {
public synchronized void stopLocalPortForwarding(SshdSocketAddress local) throws IOException {
public synchronized SshdSocketAddress startRemotePortForwarding(SshdSocketAddress remote, SshdSocketAddress local) throws IOException {
public synchronized void stopRemotePortForwarding(SshdSocketAddress remote) throws IOException {
public synchronized SshdSocketAddress localPortForwardingRequested(SshdSocketAddress local) throws IOException {
public synchronized void localPortForwardingCancelled(SshdSocketAddress local) throws IOException { | 0 |
/** A factory that creates {@link UncommittedBundle UncommittedBundles}. */
<K, T> UncommittedBundle<T> createKeyedBundle(StructuralKey<K> key, PCollection<T> output); | 1 |
case THROTTLED: | 0 |
connector.tableOperations().flush(tableName, null, null, true);
connector.tableOperations().offline(tableName, true);
String tableId = connector.tableOperations().tableIdMap().get(tableName);
connector.tableOperations().online(tableName, true);
connector.tableOperations().compact(tableName, null, null, false, true);
Scanner scan = connector.createScanner(tableName, Authorizations.EMPTY); | 0 |
private final Set<String> groupsToBecomeLdap = new HashSet<>();
private final Set<String> groupsToBeCreated = new HashSet<>();
private final Set<String> groupsToBeRemoved = new HashSet<>();
private final Set<String> usersSkipped = new HashSet<>();
private final Set<String> usersToBecomeLdap = new HashSet<>();
private final Set<String> usersToBeCreated = new HashSet<>();
private final Set<String> usersToBeRemoved = new HashSet<>();
private final Set<LdapUserGroupMemberDto> membershipToAdd = new HashSet<>();
private final Set<LdapUserGroupMemberDto> membershipToRemove = new HashSet<>(); | 0 |
import static java.util.Objects.requireNonNull;
public final class Modules {
/**
* Defensively wrap a module in a PrivateModule that only exposes requested keys to ensure that
* we don't depend on surprise extra bindings across different implementations.
*
* @param module Module to wrap.
* @param exposedClasses Keys to expose.
* @return A private module that exposes the requested keys.
*/
public static Module wrapInPrivateModule(
final Module module,
requireNonNull(module);
requireNonNull(exposedClasses);
static Module wrapInPrivateModule(
Class<? extends Module> moduleClass,
final Iterable<Class<?>> exposedClasses) {
return wrapInPrivateModule(instantiateModule(moduleClass), exposedClasses);
}
| 0 |
import org.apache.ambari.view.hive.persistence.IStorageFactory;
public class StorageFactory implements IStorageFactory {
LoggerFactory.getLogger(StorageFactory.class);
* Constructor of storage factory
public StorageFactory(ViewContext context) {
* Creates storage instance
public Storage getStorage() {
String fileName = context.getProperties().get("dataworker.storagePath");
Storage storageInstance;
if (fileName != null) {
LOG.debug("Using local storage in " + fileName + " to store data");
// If specifed, use LocalKeyValueStorage - key-value file based storage
storageInstance = new LocalKeyValueStorage(context);
} else {
LOG.debug("Using Persistence API to store data");
// If not specifed, use ambari-views Persistence API
storageInstance = new DataStoreStorage(context); | 0 |
String suffix = getFileExtension(extension);
* Returns the file extension to be used. If the user did not request a file
* extension then this method returns the empty string. Otherwise this method
* adds a {@code "."} to the beginning of the users extension if one is not present.
*/
private String getFileExtension(String usersExtension) {
if (usersExtension == null || usersExtension.isEmpty()) {
return "";
}
if (usersExtension.startsWith(".")) {
return usersExtension;
}
return "." + usersExtension;
}
/** | 0 |
* as a value of type {@code T} that can be accessed as a side input to a {@link ParDo} transform.
* <p>A {@link PCollectionView} should always be the output of a {@link
* org.apache.beam.sdk.transforms.PTransform}. It is the joint responsibility of this transform and
* each {@link PipelineRunner} to implement the view in a runner-specific manner.
* <p>The most common case is using the {@link View} transforms to prepare a {@link PCollection} for
* use as a side input to {@link ParDo}. See {@link View#asSingleton()}, {@link View#asIterable()},
* and {@link View#asMap()} for more detail on specific views available in the SDK. | 1 |
import org.junit.Rule;
import org.junit.rules.ExpectedException;
@Rule
public ExpectedException thrown = ExpectedException.none();
@Test
public void encodeNullThrowsCoderException() throws Exception {
thrown.expect(CoderException.class);
thrown.expectMessage("cannot encode a null Instant");
CoderUtils.encodeToBase64(TEST_CODER, null);
} | 0 |
final StringBuilder buffer = new StringBuilder(); | 0 |
import java.nio.file.Files;
import java.nio.file.OpenOption;
import java.util.Collections;
import java.util.List;
import org.apache.sshd.common.config.keys.AuthorizedKeyEntry;
import org.apache.sshd.common.config.keys.PublicKeyEntry;
/**
* Standard OpenSSH authorized keys file name
*/
public static final String STD_AUTHORIZED_KEYS_FILENAME = "authorized_keys";
private static final class LazyDefaultAuthorizedKeysFileHolder {
private static final Path KEYS_FILE = PublicKeyEntry.getDefaultKeysFolderPath().resolve(STD_AUTHORIZED_KEYS_FILENAME);
}
/**
* @return The default {@link Path} location of the OpenSSH authorized keys file
*/
@SuppressWarnings("synthetic-access")
public static Path getDefaultAuthorizedKeysFile() {
return LazyDefaultAuthorizedKeysFileHolder.KEYS_FILE;
}
/**
* Reads read the contents of the default OpenSSH <code>authorized_keys</code> file
*
* @param options The {@link OpenOption}s to use when reading the file
* @return A {@link List} of all the {@link AuthorizedKeyEntry}-ies found there -
* or empty if file does not exist
* @throws IOException If failed to read keys from file
*/
public static List<AuthorizedKeyEntry> readDefaultAuthorizedKeys(OpenOption ... options) throws IOException {
Path keysFile = getDefaultAuthorizedKeysFile();
if (Files.exists(keysFile, IoUtils.EMPTY_LINK_OPTIONS)) {
return AuthorizedKeyEntry.readAuthorizedKeys(keysFile);
} else {
return Collections.emptyList();
}
} | 0 |
* Copyright 2001,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: AbstractStreamSource.java,v 1.6 2004/03/05 13:02:40 bdelacretaz Exp $ | 1 |
return true;
return property;
switch (lu.getLexicalUnitType()) {
case LexicalUnit.SAC_INHERIT:
throws DOMException {
if (type != CSSPrimitiveValue.CSS_IDENT) {
}
if (value.equalsIgnoreCase(CSSConstants.CSS_NORMAL_VALUE)) { | 1 |
byte bytes[] = c14nizer.canonicalizeSubtree(doc);
System.out.println(new String(c.canonicalizeXPathNodeSet(nl))); | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
import org.apache.cocoon.forms.validation.ValidationError;
* @version $Id: RangeValidationRule.java,v 1.2 2004/03/09 14:58:45 cziegeler Exp $ | 0 |
* Key for various cache implementations.
* <p>
* </p> | 0 |
boolean usingNativeMap = acuConf.getBoolean(Property.TSERV_NATIVEMAP_ENABLED) && NativeMap.isLoaded(); | 0 |
package org.apache.felix.karaf.shell.obr; | 0 |
.thatSingleton(output.apply("Count", Count.globally())) | 0 |
protected void validate(final Set<SelectionKey> keys) {
for (Iterator<SelectionKey> it = keys.iterator(); it.hasNext();) {
SelectionKey key = it.next();
for (Iterator<IOSession> it = this.bufferingSessions.iterator(); it.hasNext(); ) {
IOSession session = it.next(); | 0 |
import org.apache.http.impl.params.DefaultHttpParams; | 0 |
@Override | 0 |
import org.osgi.util.converter.ConvertingTypeSettings;
private volatile Class<?> sourceAsClass;
private volatile boolean sourceAsJavaBean = false;
public ConvertingTypeSettings source() {
return new ConvertingTypeSettings() {
@Override
public Converting asJavaBean() {
sourceAsJavaBean = true;
return ConvertingImpl.this;
}
@Override
public Converting as(Class<?> type) {
sourceAsClass = type;
return ConvertingImpl.this;
}
};
// @Override
// public Converting sourceType(Class<?> type) {
// sourceAsClass = type;
// return this;
// }
sourceClass = sourceAsClass != null ? sourceAsClass : object.getClass();
return converter.convert(defaultValue).source().as(sourceAsClass).targetType(targetViewClass).to(targetActualClass); | 0 |
Boolean indicator = SftpHelper.indicateEndOfNamesList(reply, getVersion(), session, dh.isDone());
getServerSession(), file, handle, index); | 0 |
this.signatureAlgorithm = Signature.getInstance(algorithmID, provider); | 0 |
/*
* ====================================================================
*
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* notice, this list of conditions and the following disclaimer.
* if any, must include the following acknowledgement:
* "This product includes software developed by the
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* 4. The names "Apache", "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
* "Apache" nor may "Apache" appear in their names without prior
* written permission of the Apache Software Foundation.
*
*/
* @version $Id: StringEncoderComparator.java,v 1.5 2003/10/05 21:34:21 tobrien Exp $ | 0 |
package org.apache.felix.sigil.model; | 0 |
import org.apache.atlas.typesystem.exception.EntityExistsException;
if (e instanceof EntityExistsException) {
return new AtlasBaseException(AtlasErrorCode.INSTANCE_ALREADY_EXISTS, e.getMessage());
}
return new AtlasBaseException(AtlasErrorCode.INSTANCE_NOT_FOUND, e.getMessage());
return new AtlasBaseException(AtlasErrorCode.TYPE_NAME_NOT_FOUND, e.getMessage());
return new AtlasBaseException(AtlasErrorCode.BAD_REQUEST, e.getMessage()); | 0 |
/*
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "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.commons.ognl.performance.objects;
import java.util.List;
/**
*
*/
public interface IContentProvider
{
public List getElements();
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.