Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
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 |
static final class MethodCache {
} catch (Exception xio) {
// this really cant make an error...
return null;
* @param parm a may-be primitive type class
* @return the equivalent object class
static Class<?> primitiveClass(Class<?> parm) {
* The method cache.
* <p>
* </p>
* Map of methods that are searchable according to method parameters to find a match.
* @throws MethodMap.AmbiguousException if method resolution is ambiguous
static final class MethodKey {
private final String method;
private final Class<?>[] params;
/** Creates a MethodKey from a method.
* @param aMethod the method to build the key from
MethodKey(Method aMethod) {
this(aMethod.getName(), aMethod.getParameterTypes());
* @param aMethod the method name
// CSOFF: InnerAssignment
// CSON: InnerAssignment
* @param aMethod the method name
// CSOFF: InnerAssignment
// CSON: InnerAssignment
/**
* Gets this key's method name.
* @return the method name
*/
String getMethod() {
return method;
}
/**
* Gets this key's method parameter classes.
* @return the parameters
*/
Class<?>[] getParameters() {
return params;
}
| 0 |
import org.apache.http.conn.routing.HttpRoute; | 0 |
for (ServiceOsSpecific.Package aPackage : packagesForService) {
if (! aPackage.getSkipUpgrade()) {
packages.add(aPackage);
}
} | 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. | 0 |
return matchSyncs;
case OpCode.createSession:
case OpCode.closeSession:
return !request.isLocalSession(); | 0 |
public Map<String, HostLevelParamsCluster> getHostLevelParamsClusters() {
return hostLevelParamsClusters;
}
| 0 |
* @throws XPathExpressionException
NodeList nodes =
* Tests node-set as input. See bug 37708.
Canonicalizer20010315ExclOmitComments c14n =
* Method test24excl - a testcase for SANTUARIO-263
Node root =
byte[] reference =
* Method test24Aexcl - a testcase for SANTUARIO-263
byte[] reference = | 1 |
import org.apache.http.nio.protocol.HttpAsyncService;
HttpAsyncService serviceHandler = new HttpAsyncService( | 0 |
if (!ignoreWhitespaces && ignoreEventsCount == 0) {
if (this.recorderStack.empty()) {
Object serializedXML; | 0 |
import org.apache.zookeeper.KeeperException.NotEmptyException;
try {
ZooReaderWriter.getInstance().delete(lockPath, -1);
} catch (NotEmptyException ex) {
// race condition: tserver created the lock after our last check; we'll see it at the next check
} | 0 |
return new TraceRepo<>(result); | 1 |
/**
* Abstract push response consumer that processes response body data as an octet stream.
*
* @since 5.0
*/
/**
* Triggered to signal the beginning of response processing.
*
* @param response the response message head
* @param contentType the content type of the response body,
* or {@code null} if the response does not enclose a response entity.
*/
start(promise, response, contentType != null ? contentType : ContentType.DEFAULT_BINARY); | 0 |
package org.apache.zookeeper.jmx.server;
import org.apache.zookeeper.jmx.MBeanRegistry;
import org.apache.zookeeper.jmx.ZKMBeanInfo;
import org.apache.zookeeper.server.ServerCnxn;
import org.apache.zookeeper.server.ZooKeeperServer; | 0 |
public Service createBundleAdapterService(int bundleStateMask, String bundleFilter, boolean propagate) {
return m_manager.createBundleAdapterService(bundleStateMask, bundleFilter, propagate); | 0 |
JobKey jobKey,
return schedulerController.updateShards(jobKey, shards, updateToken, session);
JobKey jobKey,
return schedulerController.rollbackShards(jobKey, shards, updateToken, session);
JobKey jobKey,
return schedulerController.finishUpdate(jobKey, updateResult, updateToken, session); | 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.
package examples; | 0 |
import com.google.common.collect.ImmutableMap;
static final Map<String, String> masterToSlaveMappingForDecom = ImmutableMap.<String, String>builder()
.put("NAMENODE", "DATANODE")
.put("RESOURCEMANAGER", "NODEMANAGER")
.put("HBASE_MASTER", "HBASE_REGIONSERVER")
.put("JOBTRACKER", "TASKTRACKER")
.build(); | 0 |
import aQute.bnd.osgi.Analyzer;
import aQute.bnd.osgi.Processor; | 0 |
* @author <a href="mailto:[email protected]">deweese</a> | 1 |
masterStatus.addSortableColumn("# Online<br />Tablet Servers", new PreciseNumberType((int) (slaves.size() * 0.8 + 1.0), slaves.size(),
masterStatus.addSortableColumn("# Total<br />Tablet Servers", new PreciseNumberType(), "The total number of tablet servers configured"); | 0 |
* Tests copying nodes from one configuration to another one.
*/
public void testAddNodesCopy()
{
HierarchicalConfiguration configDest = new HierarchicalConfiguration();
configDest.addProperty("test", "TEST");
Collection nodes = config.getRootNode().getChildren();
assertEquals("Wrong number of children", 1, nodes.size());
configDest.addNodes("newNodes", nodes);
for (int i = 0; i < tables.length; i++)
{
String keyTab = "newNodes.tables.table(" + i + ").";
assertEquals("Table " + i + " not found", tables[i], configDest
.getString(keyTab + "name"));
for (int j = 0; j < fields[i].length; j++)
{
assertEquals("Invalid field " + j + " in table " + i,
fields[i][j], configDest.getString(keyTab
+ "fields.field(" + j + ").name"));
}
}
}
/** | 0 |
RequestContextV1.get().setUser(TestUtilsV2.TEST_USER, null); | 0 |
tabletServer.recover(this.getTabletServer().getFileSystem(), extent, logEntries, absPaths,
new MutationReceiver() {
DataFileValue minorCompact(InMemoryMap memTable, FileRef tmpDatafile, FileRef newDatafile,
FileRef mergeFile, boolean hasQueueTime, long queued, CommitSession commitSession,
long flushId, MinorCompactionReason mincReason) {
timer.updateTime(Operation.MINOR, start, failed);
public synchronized void abortCommit(CommitSession commitSession) { | 0 |
/**
* Copyright 2013 Apache Software Foundation | 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.
*/
| 0 |
public class AlertUpdateEvent extends AmbariUpdateEvent {
super(Type.ALERT); | 0 |
package org.apache.ambari.logsearch.config.json.model.inputconfig.impl; | 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 |
/*
* Copyright (C) MX4J.
* All rights reserved.
*
* This software is distributed under the terms of the MX4J License version 1.0.
* See the terms of the MX4J License in the documentation provided with this software.*
*
*
*/
/*
* Copyright 2005 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.felix.mosgi.jmx.registry.mx4j.tools.naming;
/**
* Management interface for the NamingService MBean.
* @author <a href="mailto:[email protected]">Simone Bordet</a>
* @version $Revision: 1.3 $
*/
public interface NamingServiceMBean
{
/**
* Sets the port on which rmiregistry listens for incoming connections.
* @see #getPort
*/
public void setPort(int port);
/**
* Returns the port on which rmiregistry listens for incoming connections
* @see #setPort
*/
public int getPort();
/**
* Returns whether this MBean has been started and not yet stopped.
* @see #start
*/
public boolean isRunning();
} | 0 |
* Cookie {@code domain} attribute handler.
@Contract(threading = ThreadingBehavior.STATELESS) | 0 |
/** Execute the 'onload' scripts flag */
protected boolean executeOnload = false;
/**
* Sets whether or not scripts attached to the DOM using 'onload'
* event attribute must be executed before rasterizing.
*
* @param b true means scripts will be executed
*/
public void setExecuteOnload(boolean b){
this.executeOnload = b;
}
/**
* Returns true if the scripts attached to the DOM using 'onload'
* event attribute is going to be executed before rasterizing,
* false otherwise.
*/
public boolean getExecuteOnload(){
return executeOnload;
}
// Set onload
map.put(ImageTranscoder.KEY_EXECUTE_ONLOAD, new Boolean(executeOnload)); | 0 |
public void setup() throws Exception { | 0 |
import org.apache.commons.jelly.xpath.XPathSource; | 0 |
/*
* @author <a href="mailto:[email protected]">Felix Project Team</a>
*/ | 0 |
import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
return new UpdateErrors(new HashMap<TKeyExtent,Long>(), new ArrayList<TConstraintViolationSummary>(), new HashMap<TKeyExtent, SecurityErrorCode>()); | 0 |
import org.apache.accumulo.server.security.SecurityOperationImpl;
private static SecurityOperation security = SecurityOperationImpl.getInstance(); | 0 |
import org.apache.atlas.authorize.AtlasAdminAccessRequest;
import org.apache.atlas.authorize.AtlasEntityAccessRequest;
import org.apache.atlas.authorize.AtlasPrivilege;
import org.apache.atlas.authorize.AtlasAuthorizationUtils;
import org.apache.atlas.type.AtlasTypeRegistry;
private final AtlasTypeRegistry typeRegistry;
ExportService exportService, ImportService importService,
SearchTracker activeSearches, AtlasTypeRegistry typeRegistry) {
this.typeRegistry = typeRegistry;
isEntityUpdateAccessAllowed = AtlasAuthorizationUtils.isAccessAllowed(new AtlasEntityAccessRequest(typeRegistry, AtlasPrivilege.ENTITY_UPDATE));
isEntityCreateAccessAllowed = AtlasAuthorizationUtils.isAccessAllowed(new AtlasEntityAccessRequest(typeRegistry, AtlasPrivilege.ENTITY_CREATE));
AtlasAuthorizationUtils.verifyAccess(new AtlasAdminAccessRequest(AtlasPrivilege.ADMIN_EXPORT), "export");
AtlasAuthorizationUtils.verifyAccess(new AtlasAdminAccessRequest(AtlasPrivilege.ADMIN_IMPORT), "importData");
AtlasAuthorizationUtils.verifyAccess(new AtlasAdminAccessRequest(AtlasPrivilege.ADMIN_IMPORT), "importFile");
| 0 |
import com.google.common.collect.ImmutableMap;
import java.io.Serializable;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable; | 0 |
public SuffixFileFilter(List<String> suffixes) {
public SuffixFileFilter(List<String> suffixes, IOCase caseSensitivity) {
this.suffixes = suffixes.toArray(new String[suffixes.size()]); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/fmt/src/java/org/apache/commons/jelly/tags/fmt/SetBundleTag.java,v 1.2 2003/01/26 02:02:08 morgand Exp $
* $Revision: 1.2 $
* $Date: 2003/01/26 02:02:08 $
* $Id: SetBundleTag.java,v 1.2 2003/01/26 02:02:08 morgand Exp $
import org.apache.commons.jelly.JellyTagException;
* @version $Revision: 1.2 $
public void doTag(XMLOutput output) throws JellyTagException { | 0 |
import org.apache.beam.sdk.extensions.euphoria.core.client.type.TypeAwareUnaryFunction;
import org.apache.beam.sdk.extensions.euphoria.core.client.type.TypeHint;
@Override
public <K> WindowingBuilder<InputT, K> keyBy(
UnaryFunction<InputT, K> keyExtractor, TypeHint<K> typeHint) {
return keyBy(TypeAwareUnaryFunction.of(keyExtractor, typeHint));
} | 0 |
Form.remove(cocoon.getEnvironment().getObjectModel(), id); | 0 |
/*
* Copyright 2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.cocoon.portal.wsrp.consumer;
import org.apache.wsrp4j.consumer.ConsumerEnvironment;
/**
* This interface marks a component if the component needs a reference to consumer environment.
*
* @version $Id$
*/
public interface RequiresConsumerEnvironment {
void setConsumerEnvironment(ConsumerEnvironment env);
} | 0 |
Assert.assertTrue(check.getFailedDetail().isEmpty());
Assert.assertTrue(check.getFailedDetail().isEmpty());
Assert.assertTrue(check.getFailedDetail().isEmpty());
Assert.assertFalse(check.getFailedDetail().isEmpty());
Assert.assertTrue(check.getFailedDetail().isEmpty());
Assert.assertFalse(check.getFailedDetail().isEmpty());
Assert.assertTrue(check.getFailedDetail().isEmpty());
Assert.assertFalse(check.getFailedDetail().isEmpty());
Assert.assertFalse(check.getFailedDetail().isEmpty()); | 0 |
* @since 1.4
* @since 1.4 | 0 |
when(mockGcsUtil.expand(any(GcsPath.class))).then(invocation -> ImmutableList.of((GcsPath) invocation.getArguments()[0])); | 0 |
if ( getState() == STATE_REGISTERED )
{
synchronized ( this )
{
if ( getState() == STATE_REGISTERED )
{
changeState( Active.getInstance() );
}
}
} | 0 |
this.auditLog = new ArrayList<>();
return new ArrayList<>(this.auditLog); | 0 |
Iterator<?> xi = xd.getContent().iterator();
List<?> content = ((X509Data)xmlStructure).getContent(); | 0 |
* @version CVS $Id: I18nTransformer.java,v 1.22 2004/01/14 00:51:15 joerg Exp $
* elements (without keys only).
// when doing in-place translation within i18n:choose
// Translated text. Inside i18n:translate, collects character events.
// Param count when not using i18n:param name="..."
* Implementation of Configurable interface.
//-- Dictionary handling routines | 0 |
return checkNotNull(inputWatermarkTime); | 0 |
private String message = "This is a message coming from a Spring bean."; | 0 |
import java.util.stream.Stream;
import org.apache.felix.systemready.CheckStatus.State;
private State state;
public SystemStatus(Collection<CheckStatus> checkStates) {
Stream<State> states = checkStates.stream()
.map(status -> status.getState());
this.state = CheckStatus.State.worstOf(states);
public CheckStatus.State getState() {
return this.state; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/TestCommon.java,v 1.4 2003/10/05 16:41:09 dgraham Exp $
* $Revision: 1.4 $
* $Date: 2003/10/05 16:41:09 $
import junit.framework.TestCase;
import org.xml.sax.SAXException; | 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. | 0 |
* @throws IllegalArgumentException if the initial capacity is negative
* @throws IllegalArgumentException if the initial capacity is negative | 0 |
import static com.google.common.base.Charsets.UTF_8;
return nm(row, cf, cq, new Value(value.getBytes(UTF_8))); | 0 |
/*
* Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.cocoon.template.script.event;
import org.apache.cocoon.template.expression.Substitutions;
/**
* @version SVN $Id$
*/
public class SubstituteAttribute extends AttributeEvent {
public SubstituteAttribute(String namespaceURI, String localName,
String raw, String type, Substitutions substs) {
super(namespaceURI, localName, raw, type);
this.substitutions = substs;
}
public Substitutions getSubstitutions() {
return substitutions;
}
private final Substitutions substitutions;
} | 0 |
* which reside as files in a single directory available to the
public CertsInFilesystemDirectoryResolver(String directoryName)
} | 1 |
import org.apache.ambari.annotations.Experimental;
import org.apache.ambari.annotations.ExperimentalFeature;
import org.apache.ambari.server.state.stack.upgrade.RepositoryVersionHelper;
protected static final String INSTALL_PACKAGES_FULL_NAME = "Install Version";
@Inject
private static RepositoryVersionHelper repoVersionHelper;
Map<String, String> roleParams = repoVersionHelper.buildRoleParams(managementController, repoVersion,
osFamily, servicesOnHost);
roleParams);
repoVersionHelper.addCommandRepository(actionContext, osFamily, repoVersion, repoInfo);
@Experimental(feature=ExperimentalFeature.PATCH_UPGRADES) | 0 |
import org.apache.accumulo.server.test.continuous.ContinuousIngest.BaseOpts;
import com.beust.jcommander.Parameter;
public static class Opts extends BaseOpts {
@Parameter(names="--sleep", description="the time to wait between queries", converter=TimeConverter.class)
long sleepTime = 100;
}
Opts opts = new Opts();
opts.parseArgs(ContinuousQuery.class.getName(), args);
Connector conn = opts.getConnector();
Scanner scanner = conn.createScanner(opts.tableName, opts.auths);
scanner.setBatchSize(opts.scanBatchSize);
byte[] row = ContinuousIngest.genRow(opts.min, opts.max, r);
if (opts.sleepTime > 0)
Thread.sleep(opts.sleepTime); | 0 |
@NamedQuery(name = "repositoryVersionByVersion", query = "SELECT repoversion FROM RepositoryVersionEntity repoversion WHERE repoversion.version=:version"),
| 0 |
import java.util.List;
* Retrieves repository version by stack.
/**
* Retrieves repository version by stack.
*
* @param stack stack with major version (like HDP-2.2)
* @return null if there is no suitable repository version
*/
@RequiresSession
public List<RepositoryVersionEntity> findByStack(String stack) {
final TypedQuery<RepositoryVersionEntity> query = entityManagerProvider.get().createNamedQuery("repositoryVersionByStack", RepositoryVersionEntity.class);
query.setParameter("stack", stack);
return daoUtils.selectList(query);
} | 0 |
params.getCipherSuite(), params.getKeyLength(), params.getRandomNumberGenerator(), params.getRandomNumberGeneratorProvider(),
Cipher cipher = DefaultCryptoModuleUtils.getCipher(params.getCipherSuite());
cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(params.getPlaintextKey(), params.getKeyAlgorithmName()), params.getSecureRandom());
cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(params.getPlaintextKey(), params.getKeyAlgorithmName()),
allIsWell = validateNotEmpty(params.getCipherSuite(), allIsWell, errorBuf, "No cipher suite was specified.");
if (allIsWell && params.getCipherSuite().equals("NullCipher")) {
allIsWell = validateNotEmpty(params.getKeyAlgorithmName(), allIsWell, errorBuf, "No key algorithm name was specified.");
if (params.getCipherSuite().equals("NullCipher")) {
dataOut.writeUTF(params.getCipherSuite());
dataOut.writeUTF(params.getKeyAlgorithmName());
params.setCipherSuite(cipherSuiteFromFile);
params.setKeyAlgorithmName(algorithmNameFromFile);
Cipher cipher = DefaultCryptoModuleUtils.getCipher(params.getCipherSuite());
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(params.getPlaintextKey(), params.getKeyAlgorithmName()),
log.trace("Initialized cipher input stream with transformation [{}]", params.getCipherSuite()); | 0 |
import org.apache.hc.core5.http.config.Http1Config;
private final Http1Config http1Config;
final Http1Config http1Config,
super(ioSession, http1Config, charCodingConfig, incomingMessageParser, outgoingMessageWriter, incomingContentStrategy, outgoingContentStrategy);
this.http1Config = http1Config != null ? http1Config : Http1Config.DEFAULT;
return new ChunkDecoder(channel, buffer, http1Config, metrics);
final int chunkSizeHint = http1Config.getChunkSizeHint() >= 0 ? http1Config.getChunkSizeHint() : 2048; | 0 |
entity.writeTo(outstream);
outstream.close(); | 0 |
* The maximum size of an incoming stomp text message. Default is 2 MB.
@Markdown(description = "The maximum size of an incoming stomp text message. Default is 2 MB.")
public static final ConfigurationProperty<Integer> STOMP_MAX_INCOMING_MESSAGE_SIZE = new ConfigurationProperty<>(
* The maximum size of a buffer for stomp message sending. Default is 5 MB.
*/
@Markdown(description = "The maximum size of a buffer for stomp message sending. Default is 5 MB.")
public static final ConfigurationProperty<Integer> STOMP_MAX_BUFFER_MESSAGE_SIZE = new ConfigurationProperty<>(
"stomp.max.message.size", 5*1024*1024);
/**
* @return the maximum size of an incoming stomp text message. Default is 2 MB.
*/
public int getStompMaxIncomingMessageSize() {
return Integer.parseInt(getProperty(STOMP_MAX_INCOMING_MESSAGE_SIZE));
}
/**
* @return the maximum size of a buffer for stomp message sending. Default is 5 MB.
public int getStompMaxBufferMessageSize() {
return Integer.parseInt(getProperty(STOMP_MAX_BUFFER_MESSAGE_SIZE)); | 0 |
* Holds the data for more URLs.
protected final static String HTTP_USER_AGENT_HEADER = "User-Agent";
protected final static String HTTP_ACCEPT_HEADER = "Accept";
protected final static String HTTP_ACCEPT_LANGUAGE_HEADER = "Accept-Language";
protected final static String HTTP_ACCEPT_ENCODING_HEADER = "Accept-Encoding";
public boolean hasBeenOpened = false;
// For some URLs path and ref can get fairly long | 0 |
* Copyright (c) 2004 The Apache Software Foundation. All rights | 0 |
private final Random r = new Random(); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestHashMap.java,v 1.4 2002/02/22 22:01:48 morgand Exp $
* $Revision: 1.4 $
* $Date: 2002/02/22 22:01:48 $
* @version $Id: TestHashMap.java,v 1.4 2002/02/22 22:01:48 morgand Exp $
/**
* We don't need to test compatibility for JVM collections. Override in
* subclasses.
*/
public void testEmptyMapCompatibility() {
}
/**
* We don't need to test compatibility for JVM collections. Override in
* subclasses.
*/
public void testFullMapCompatibility() {
} | 0 |
interval = PropertyResolverUtils.getLongProperty(
options, SshClientConfigFileReader.CLIENT_LIVECHECK_REPLIES_WAIT, SshClientConfigFileReader.DEFAULT_LIVECHECK_REPLY_WAIT);
if (interval > 0L) {
PropertyResolverUtils.updateProperty(
client, ClientFactoryManager.HEARTBEAT_REPLY_WAIT, TimeUnit.SECONDS.toMillis(interval));
stdout.println("Expecting heartbeat reply within at most " + interval + " seconds");
} | 0 |
Range range = new Range(first, false, null, true);
KeyExtent prevExtent = null;
if (prevExtent == null) {
// this is the first tablet observed, it must be offline and its prev row must be less than the start of the merge range
if (tls.extent.getPrevEndRow() != null && tls.extent.getPrevEndRow().compareTo(start) > 0) {
return false;
}
if (tls.getState(master.onlineTabletServers()) != TabletState.UNASSIGNED)
return false;
} else if (!tls.extent.isPreviousExtent(prevExtent)) {
}
prevExtent = tls.extent;
verify.update(tls.extent, tls.getState(master.onlineTabletServers()), tls.chopped); | 0 |
unlimitedRetry =
Retry.builder().infiniteRetries().retryAfter(INITIAL_WAIT, MS).incrementBy(WAIT_INC, MS)
.maxWait(MAX_RETRIES * WAIT_INC, MS).logInterval(LOG_INTERVAL, MS).createRetry();
NeedsMaxWait builder =
Retry.builder().maxRetries(10).retryAfter(15, MILLISECONDS).incrementBy(10, MILLISECONDS);
RetryFactory factory =
Retry.builder().infiniteRetries().retryAfter(startWait, MS).incrementBy(waitIncrement, MS)
.maxWait(maxWait, MS).logInterval(logInterval, MS).createFactory(); | 0 |
import com.google.common.base.MoreObjects;
return MoreObjects.toStringHelper(this).add("serviceName", serviceName).add("componentName", | 0 |
} else { // event is not an auction, nor a bid, so it is a person | 0 |
context = (ClientContext) accumuloClient; | 0 |
import static org.junit.Assert.assertTrue;
} | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(ArtifactResourceProvider.class);
| 0 |
protected final List<Interface> interfaces = new ArrayList<Interface>();
public List<Interface> getInterfaces() {
final Iterator<Interface> i = this.getInterfaces().iterator();
final Interface current = i.next();
public void validate(List<String> issues, List<String> warnings)
for(final Interface interf : this.getInterfaces()) { | 0 |
import cz.seznam.euphoria.flink.accumulators.FlinkNativeAccumulators;
// TODO should use some local test implementation of counters
// that is queryable in assertions
executor.setAccumulatorProvider(FlinkNativeAccumulators.getFactory()); | 0 |
import org.apache.accumulo.core.security.thrift.TCredentials;
private TCredentials credentials;
public ScannerImpl(Instance instance, TCredentials credentials, String table, Authorizations authorizations) { | 1 |
private Thread m_thread = null;
m_thread = new Thread(this, "FelixPackageAdmin");
m_thread.setDaemon(true);
m_thread.start();
* Stops the FelixPackageAdmin thread on system shutdown. Shutting down the
* thread explicitly is required in the embedded case, where Felix may be
* stopped without the Java VM being stopped. In this case the
* FelixPackageAdmin thread must be stopped explicitly.
* <p>
* This method is called by the
* {@link PackageAdminActivator#stop(BundleContext)} method.
*/
synchronized void stop()
{
if (m_thread != null)
{
// Null thread variable to signal to the thread that
// we want it to exit.
m_thread = null;
// Wake up the thread, if it is currently in the wait() state
// for more work.
notifyAll();
}
}
/**
// Terminate the thread if requested to do so (see stop()).
if (m_thread == null)
{
return;
}
| 0 |
import org.apache.sshd.common.ForwardingAcceptorFactory;
/**
* Retrieve the IoAcceptor factory to be used to accept incoming connections
* to port forwards.
*
* @return A <code>ForwardNioAcceptorFactory</code>
*/
ForwardingAcceptorFactory getTcpipForwardingAcceptorFactory(); | 0 |
* Copyright 2004-2005 The Apache Software Foundation.
package org.apache.cocoon.portal.coplets.basket.events;
import org.apache.cocoon.portal.coplets.basket.Briefcase;
* Clean all briefcases or a single one
* @version CVS $Id: CleanBasketEvent.java 30941 2004-07-29 19:56:58Z vgritsenko $
public class CleanBriefcaseEvent extends ContentStoreEvent {
public CleanBriefcaseEvent() {
// nothing to do here
* One briefcase will be cleaned
* @param briefcaseId The briefcase
public CleanBriefcaseEvent(Briefcase briefcase) {
super(briefcase); | 0 |
private static final long serialVersionUID = -2241740228269641540L;
| 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.
*/ | 0 |
import org.apache.hadoop.mapreduce.InputFormat;
* This class allows MapReduce jobs to use Accumulo as the source of data. This {@link InputFormat} provides keys and values of type {@link Key} and
* {@link Value} to the Map function.
* The user must specify the following via static configurator methods:
* <li>{@link AccumuloInputFormat#setInputInfo(org.apache.hadoop.mapreduce.Job, String, byte[], String, org.apache.accumulo.core.security.Authorizations)}
* <li>{@link AccumuloInputFormat#setZooKeeperInstance(org.apache.hadoop.mapreduce.Job, String, String)}
* Other static methods are optional.
log.setLevel(getLogLevel(context)); | 0 |
* Autogenerated by Thrift Compiler (0.9.3) | 0 |
* A base class for <code>Redirector</code>s that handle forward redirects, i.e. internal
* <p>
* Concrete subclasses have to define the <code>cocoonRedirect()</code> method.
* @version CVS $Id: ForwardRedirector.java,v 1.12 2004/01/19 10:50:57 sylvain Exp $
public abstract class ForwardRedirector extends AbstractLogEnabled implements Redirector, PermanentRedirector {
protected abstract void cocoonRedirect(String uri) throws IOException, ProcessingException; | 0 |
*
*
*
*
*
* | 0 |
storage.write((Storage.MutateWork.NoResult.Quiet) storeProvider -> { | 0 |
public <R, P> R accept( NodeVisitor<? extends R, ? super P> visitor, P data )
throws OgnlException | 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. | 0 |
* @version $Id$ | 0 |
final HadoopSink<Text, LongWritable> sink = SequenceFileSink.of(Text.class, LongWritable.class)
.outputPath(outputDir)
.withCompression(DeflateCodec.class, SequenceFile.CompressionType.BLOCK)
.build(); | 0 |
protected abstract void validate(Set<SelectionKey> keys);
private void processEvents(final Set<SelectionKey> selectedKeys) {
for (Iterator<SelectionKey> it = selectedKeys.iterator(); it.hasNext(); ) {
SelectionKey key = it.next();
for (Iterator<IOSession> it = this.sessions.iterator(); it.hasNext(); ) {
IOSession session = it.next();
Set<SelectionKey> keys = this.selector.keys();
for (Iterator<SelectionKey> it = keys.iterator(); it.hasNext(); ) {
SelectionKey key = it.next(); | 0 |
tableScanIterators = new ArrayList<>();
final HashSet<OptionGroup> groups = new HashSet<>(); | 0 |
this(httpProcessor, responseFactory, connStrategy, HeapByteBufferAllocator.INSTANCE, params); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.