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
*
* 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.
*/
public class RoundRobinPartitioner extends Partitioner<LogFileKey,LogFileValue> {
| 0 |
import com.google.gson.Gson;
| 0 |
if (!dbAccessor.tableExists(CLUSTER_VERSION_TABLE)) {
return null;
} | 0 |
import org.apache.felix.sigil.common.config.IBldProject;
import org.apache.felix.sigil.common.core.BldCore;
import org.apache.felix.sigil.common.model.ICapabilityModelElement;
import org.apache.felix.sigil.common.model.ModelElementFactory;
import org.apache.felix.sigil.common.model.eclipse.ISigilBundle;
import org.apache.felix.sigil.common.repository.IBundleRepository;
import org.apache.felix.sigil.common.repository.IRepositoryManager;
import org.apache.felix.sigil.common.repository.IRepositoryVisitor;
import org.apache.felix.sigil.common.repository.ResolutionConfig; | 0 |
* @since 4.0 | 0 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.rootcause.util;
import static org.ops4j.pax.exam.CoreOptions.streamBundle;
import static org.ops4j.pax.tinybundles.core.TinyBundles.withBnd;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.tinybundles.core.TinyBundle;
/**
* This must be in its own bundle and static to avoid that TinyBundles has to be deployed in OSGi
*/
public class BndDSOptions {
private BndDSOptions() {
}
/**
* Create a bundle with DS support and automatically generated exports and imports
*/
public static Option dsBundle(String symbolicName, TinyBundle bundleDef) {
return streamBundle(bundleDef
.symbolicName(symbolicName)
.build(withBnd()));
}
} | 0 |
import java.util.concurrent.TimeUnit;
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
sleepUninterruptibly(3, TimeUnit.SECONDS); | 1 |
* @version $Revision: 1.4 $ $Date: 2004/03/13 17:17:03 $
/**
* Gets the predicates, do not modify the array.
* @return the predicates
* @since Commons Collections 3.1
*/
public Predicate[] getPredicates() {
return iPredicates;
}
/**
* Gets the closures, do not modify the array.
* @return the closures
* @since Commons Collections 3.1
*/
public Closure[] getClosures() {
return iClosures;
}
/**
* Gets the default closure.
* @return the default closure
* @since Commons Collections 3.1
*/
public Closure getDefaultClosure() {
return iDefault;
}
| 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/DynaProperty.java,v 1.3 2002/03/24 09:15:03 dion Exp $
* $Revision: 1.3 $
* $Date: 2002/03/24 09:15:03 $
* @version $Revision: 1.3 $ $Date: 2002/03/24 09:15:03 $
* Does this property represent an indexed value (ie an array or List)?
* Does this property represent a mapped value (ie a Map)? | 0 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
| 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* version 1.1, a copy of which has been included with this distribution in *
* the LICENSE file. *
*****************************************************************************/
package org.apache.batik.util;
/**
* This class represents a binary semaphore.
*
* @author <a href="mailto:[email protected]">Stephane Hillion</a>
* @version $Id$
*/
public class Lock {
/**
* Whether the lock is locked.
*/
protected boolean locked;
/**
* Takes the lock.
*/
public synchronized void lock() throws InterruptedException {
while (locked) {
wait();
}
locked = true;
}
/**
* Releases the lock.
*/
public synchronized void unlock() {
locked = false;
notify();
}
} | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists; | 0 |
new HttpHost("www.yahoo.com"),
null);
new HttpHost("www.google.ch"),
null);
new HttpHost("www.apache.org"),
null); | 0 |
protected EventDispatcher eventDispatcher;
eventDispatcher =
new ConcreteEventDispatcher(
canvas.getRendererFactory().getRenderContext());
| 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) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* version 1.1, a copy of which has been included with this distribution in *
* the LICENSE file. *
*****************************************************************************/
package org.apache.batik.dom.svg;
import org.apache.batik.dom.AbstractDocument;
import org.w3c.dom.Node;
import org.w3c.dom.svg.SVGAnimateElement;
/**
* This class implements {@link SVGAnimateElement}.
*
* @author <a href="mailto:[email protected]">Stephane Hillion</a>
* @version $Id$
*/
public class SVGOMAnimateElement
extends SVGOMAnimationElement
implements SVGAnimateElement {
/**
* Creates a new SVGOMAnimateElement object.
*/
protected SVGOMAnimateElement() {
}
/**
* Creates a new SVGOMAnimateElement object.
* @param prefix The namespace prefix.
* @param owner The owner document.
*/
public SVGOMAnimateElement(String prefix, AbstractDocument owner) {
super(prefix, owner);
}
/**
* <b>DOM</b>: Implements {@link Node#getLocalName()}.
*/
public String getLocalName() {
return SVG_ANIMATE_TAG;
}
/**
* Returns a new uninitialized instance of this object's class.
*/
protected Node newNode() {
return new SVGOMAnimateElement();
}
} | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
* N.B. implementations must be thread safe. | 0 |
* @see org.apache.cocoon.environment.Request#getLocalAttribute(java.lang.String)
public Object getLocalAttribute(String name) {
return this.delegate.getLocalAttribute(name);
* @see org.apache.cocoon.environment.Request#getLocalAttributeNames()
public Enumeration getLocalAttributeNames() {
return this.delegate.getLocalAttributeNames();
* @see org.apache.cocoon.environment.Request#removeLocalAttribute(java.lang.String)
public void removeLocalAttribute(String name) {
this.delegate.removeLocalAttribute(name);
* @see org.apache.cocoon.environment.Request#setAttribute(java.lang.String, java.lang.Object)
public void setLocalAttribute(String name, Object o) {
this.delegate.setAttribute(name, o); | 0 |
try {
testDownload(TFTP.ASCII_MODE, files[i]);
} catch (IOException e) {
fail("Entry "+i+" Error "+e.toString());
}
| 0 |
import java.net.UnknownHostException;
public static MasterClientService.Iface getConnectionWithRetry(Instance instance) {
if (tte.getCause().getClass().equals(UnknownHostException.class)) {
// do not expect to recover from this
throw new RuntimeException(tte);
} | 0 |
return SVGValueConstants.CSS_STROKE_WIDTH_PROPERTY;
return new CSSOMReadOnlyValue(SVGValueConstants.NUMBER_1); | 0 |
s4.setLearnerType(LearnerType.OBSERVER);
s5.setLearnerType(LearnerType.OBSERVER);
LOG.info("QuorumPeer 1 voting view: " + s1.getVotingView());
LOG.info("QuorumPeer 2 voting view: " + s2.getVotingView());
LOG.info("QuorumPeer 3 voting view: " + s3.getVotingView());
LOG.info("QuorumPeer 4 voting view: " + s4.getVotingView());
LOG.info("QuorumPeer 5 voting view: " + s5.getVotingView());
| 0 |
import org.apache.felix.hc.api.execution.HealthCheckMetadata; | 0 |
void bind(X x, Map<String, Object> props) { | 0 |
serve("/assets", "/assets/*")
serve("/apiclient", "/apiclient/*") | 0 |
this.cache = new Hashtable<>();
* managers. The dictionaries returned are guaranteed to contain the
final List<Dictionary> configs = new ArrayList<>(); | 0 |
private static final List<ECCurveDefinition> ecCurveDefinitions = new ArrayList<>(); | 0 |
this.pkPropertyIds = new HashSet<>(getKeyPropertyIds().values());
Set<ViewInstanceEntity> instanceDefinitions = new HashSet<>();
Set<Resource> results = new HashSet<>();
Set<String> propertyIds = new HashSet<>(getDescriptorMap(clazz).keySet());
Map<String, PropertyDescriptor> descriptorMap = new HashMap<>();
Map<Resource.Type, String> keyPropertyIds = new HashMap<>(); | 0 |
.path("api/metadata/types/submit");
createType(json); | 0 |
package org.apache.beam.sdk.options;
import org.apache.beam.sdk.testing.ResetDateTimeProvider;
import org.apache.beam.sdk.testing.RestoreSystemProperties; | 0 |
* protected methods from AbstractCollectionTest. | 0 |
+ ":" + (PortAssignment.unique()) + ";" + CLIENT_PORT_QP1 + "\n"; | 0 |
* Copyright 1999-2002,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* @version CVS $Id: SessionAspectDataStore.java,v 1.6 2004/03/05 13:02:10 bdelacretaz Exp $ | 1 |
* @author Rey Francois
* @author Gregor Rayman | 0 |
params.put(KeyNames.REPO_VERSION_ID, repoVersion.getId().toString()); | 0 |
* @param <R> The Rule type created by the provider. | 0 |
import org.apache.cocoon.portal.om.Item;
import org.apache.cocoon.portal.om.Layout;
import org.apache.cocoon.portal.om.NamedItem; | 0 |
public BundleContext getBundleContext()
{
return m_context;
} | 0 |
ConfigurationAdmin m_cm;
void bind(ConfigurationAdmin cm) {
m_cm = cm;
} | 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.treeprocessor.sitemap;
import org.apache.cocoon.components.flow.AbstractInterpreter;
import org.apache.cocoon.components.flow.Interpreter;
import org.apache.cocoon.components.treeprocessor.AbstractProcessingNode;
import org.apache.cocoon.components.treeprocessor.InvokeContext;
import org.apache.cocoon.environment.Environment;
/**
* Handler for <map:script> elements in the sitemap. It registers the
*
* @since March 13, 2002
* @version $Id$
*/
public class ScriptNode extends AbstractProcessingNode
{
String source;
public ScriptNode(String source)
{
this.source = source;
}
/**
* This method should never be called by the TreeProcessor, since a
* <map:script> element should not be in an "executable" sitemap
* node.
*
* @param env an <code>Environment</code> value
* @param context an <code>InvokeContext</code> value
* @return a <code>boolean</code> value
* @exception Exception if an error occurs
*/
public boolean invoke(Environment env, InvokeContext context)
throws Exception
{
return true;
}
public void registerScriptWithInterpreter(Interpreter interpreter)
{
if (interpreter instanceof AbstractInterpreter)
((AbstractInterpreter)interpreter).register(source);
}
} | 0 |
* is determined by the value of the {@code Content-Length header}. | 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 |
import static junit.framework.Assert.assertEquals;
import org.junit.Test;
@Test | 0 |
import com.google.common.collect.Sets;
@Test
public void druidProperties() throws Exception {
Map<String, Map<String, String>> properties = new HashMap<>();
Map<String, String> druidCommon = new HashMap<>();
String connectUriKey = "druid.metadata.storage.connector.connectURI";
String metastoreHostnameKey = "metastore_hostname";
String connectUriTemplate = "jdbc:mysql://%s:3306/druid?createDatabaseIfNotExist=true";
druidCommon.put(connectUriKey, String.format(connectUriTemplate, "%HOSTGROUP::group1%"));
druidCommon.put(metastoreHostnameKey, "%HOSTGROUP::group1%");
properties.put("druid-common", druidCommon);
Map<String, Map<String, String>> parentProperties = new HashMap<>();
Configuration parentClusterConfig = new Configuration(parentProperties, Collections.<String, Map<String, Map<String, String>>>emptyMap());
Configuration clusterConfig = new Configuration(properties, Collections.<String, Map<String, Map<String, String>>>emptyMap(), parentClusterConfig);
Collection<String> hgComponents1 = Sets.newHashSet("DRUID_COORDINATOR");
TestHostGroup group1 = new TestHostGroup("group1", hgComponents1, Collections.singleton("host1"));
Collection<String> hgComponents2 = Sets.newHashSet("DRUID_BROKER", "DRUID_OVERLORD", "DRUID_ROUTER");
TestHostGroup group2 = new TestHostGroup("group2", hgComponents2, Collections.singleton("host2"));
Collection<TestHostGroup> hostGroups = Arrays.asList(group1, group2);
ClusterTopology topology = createClusterTopology(bp, clusterConfig, hostGroups);
BlueprintConfigurationProcessor configProcessor = new BlueprintConfigurationProcessor(topology);
configProcessor.doUpdateForClusterCreate();
assertEquals(String.format(connectUriTemplate, "host1"), clusterConfig.getPropertyValue("druid-common", connectUriKey));
assertEquals("host1", clusterConfig.getPropertyValue("druid-common", metastoreHostnameKey));
} | 0 |
package org.w3c.dom.svg;
import org.w3c.dom.DOMException;
public interface SVGTextRotate {
// rotate types
public static final short ROTATE_UNKNOWN = 0;
public static final short ROTATE_AUTO = 1;
public static final short ROTATE_ANGLES = 2;
public short getRotateValueType( );
public void setRotateValueType( short rotateValueType )
throws DOMException;
public SVGList getAngles( );
} | 1 |
import org.apache.beam.runners.direct.DirectRunner.CommittedBundle; | 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 static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.endsWith;
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.expectLastCall;
import static org.easymock.EasyMock.replay;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
ServerConfigurationFactory.clearCachedConfigurations(); | 0 |
import org.junit.Before;
@Before | 0 |
import java.net.URL;
import org.apache.avalon.framework.component.WrapperComponentManager;
import org.apache.cocoon.components.ContextHelper;
import org.apache.cocoon.environment.Redirector;
* @version CVS $Id: FOM_Cocoon.java,v 1.30 2004/02/20 18:48:23 sylvain Exp $
Redirector redirector;
Redirector redirector,
ServiceManager manager,
this.redirector = redirector;
this.serviceManager = manager;
Map objectModel = ContextHelper.getObjectModel(this.avalonContext);
Map objectModel = ContextHelper.getObjectModel(this.avalonContext);
Map objectModel = ContextHelper.getObjectModel(this.avalonContext);
Map objectModel = ContextHelper.getObjectModel(this.avalonContext);
Redirector redirector,
ServiceManager manager,
this.currentCall = new CallContext(currentCall, interp, redirector, manager,
avalonContext,
(OutputStream)unwrap(outputStream));
this.currentCall.redirector.redirect(false, uri);
this.currentCall.redirector.sendStatus(sc);
return getServiceManager().lookup(id);
* @param component a component
this.getServiceManager().release( unwrap(component) );
Script script = getInterpreter().compileScript(cx, filename);
new WrapperComponentManager(this.getServiceManager()),
return ContextHelper.getObjectModel(currentCall.avalonContext);
// public ComponentManager getComponentManager() {
// return currentCall.componentManager;
// }
public ServiceManager getServiceManager() {
this.currentCall.redirector);
getInterpreter().handleContinuation(kontId, list, this.currentCall.redirector);
getServiceManager().lookup(ContinuationsManager.ROLE); | 0 |
else if ( componentMetadata.getDSVersion().isDS11() && m_type.equals( "Char" ) )
else if ( !componentMetadata.getDSVersion().isDS11() && m_type.equals( "Character" ) ) | 0 |
import org.mozilla.javascript.Scriptable;
* Provides the interface between the JavaScript flow controller layer and the
*
* @version CVS $Id: FOM_JavaScriptFlowHelper.java,v 1.3 2004/01/21 14:38:30 vgritsenko Exp $
public static final String FOM_REQUEST =
public static final String FOM_RESPONSE =
public static final String FOM_SESSION =
public static final String FOM_CONTEXT =
public static final String FOM_WEB_CONTINUATION =
/**
/**
/**
/**
public static void setFOM_WebContinuation(Map objectModel, | 0 |
import org.apache.atlas.entitytransform.TransformerContext;
@VisibleForTesting
void setEntityTransformerHandlers(ZipSource source, String transformersJson) throws AtlasBaseException {
if (StringUtils.isEmpty(transformersJson)) {
TransformerContext context = new TransformerContext(typeRegistry, typeDefStore, source.getExportResult().getRequest());
List<BaseEntityHandler> entityHandlers = BaseEntityHandler.fromJson(transformersJson, context);
if (CollectionUtils.isEmpty(entityHandlers)) {
return;
source.setEntityHandlers(entityHandlers); | 0 |
case MAP:
case ARRAY:
} else if (elementType instanceof AtlasArrayType) {
return vertex.getProperty(vertexPropertyName, List.class);
} else if (elementType instanceof AtlasMapType) {
return vertex.getProperty(vertexPropertyName, Map.class); | 0 |
* A {@code SetCoder<T>} encodes any {@code Set<T>}
* as an encoding of an iterable of its elements. The elements
* may not be in a deterministic order, depending on the
* {@code Set} implementation. | 0 |
+ " Examine the log files to identify them.%n");
// TODO Throw exception or return?
// TODO Throw exception or return?
// TODO Throw exception or return? | 0 |
clearReferences(child); | 0 |
implements TransformTranslator<ReadWithIds<?>> {
TranslationContext context) { | 0 |
private final String m_attributeName;
m_attributeName = null;
m_attributeName = null;
}
public AspectImpl(Class serviceInterface, String serviceFilter, int ranking, Object factory, String factoryCreateMethod, String attributeName, Dictionary properties) {
m_serviceInterface = serviceInterface;
m_serviceFilter = serviceFilter;
m_factory = factory;
m_factoryCreateMethod = factoryCreateMethod;
m_attributeName = attributeName;
m_aspectProperties = properties;
m_aspectImplementation = null;
m_ranking = ranking;
if (m_attributeName == null) {
return m_manager.createService()
.setInterface(m_serviceInterface.getName(), props)
.setFactory(m_factory, m_factoryCreateMethod)
.add(dependencies)
.add(m_manager.createServiceDependency()
.setService(m_serviceInterface, createAspectFilter(m_serviceFilter))
.setRequired(true));
}
else {
return m_manager.createService()
.setInterface(m_serviceInterface.getName(), props)
.setFactory(m_factory, m_factoryCreateMethod)
.add(dependencies)
.add(m_manager.createServiceDependency()
.setService(m_serviceInterface, createAspectFilter(m_serviceFilter))
.setAutoConfig(m_attributeName)
.setRequired(true));
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/ConvertUtils.java,v 1.4 2002/01/21 00:44:39 craigmcc Exp $
* $Revision: 1.4 $
* $Date: 2002/01/21 00:44:39 $
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* @version $Revision: 1.4 $ $Date: 2002/01/21 00:44:39 $ | 0 |
this.httpCacheInvalidator != null ? this.httpCacheInvalidator : new DefaultCacheInvalidator(uriExtractor, storageCopy)); | 0 |
timelineMetric.getUnits(),
timelineMetric.getType(), | 0 |
* @since 4.0 | 0 |
package org.apache.hc.client5.testing.sync; | 0 |
if (compactionId.getSecond().getIterators().isEmpty()) {
log.debug("No-op major compaction by USER on 0 input files because no iterators present.");
lastCompactID = compactionId.getFirst();
updateCompactionID = true;
} else {
log.debug("Major compaction by USER on 0 input files with iterators.");
filesToCompact = new HashMap<>();
}
Set<FileRef> droppedFiles = new HashSet<>();
filesToCompact = new HashMap<>(allFiles);
compactionIterators = compactionId.getSecond().getIterators();
// ACCUMULO-3645 run loop at least once, even if filesToCompact.isEmpty()
do {
} while (filesToCompact.size() > 0);
// short-circuit; also handles zero files case
if (filesToCompact.size() <= maxFilesToCompact) {
Set<FileRef> smallestFiles = new HashSet<FileRef>(filesToCompact.keySet());
filesToCompact.clear();
return smallestFiles;
}
CompactionStrategyConfig strategyConfig = compactionConfig.getCompactionStrategy();
CompactionStrategy strategy = createCompactionStrategy(strategyConfig);
MajorCompactionRequest request = new MajorCompactionRequest(extent, MajorCompactionReason.USER, getTabletServer().getFileSystem(), tableConfiguration);
request.setFiles(getDatafileManager().getDatafileSizes());
try {
if (strategy.shouldCompact(request)) {
initiateMajorCompaction(MajorCompactionReason.USER);
} else {
majorCompactionState = CompactionState.IN_PROGRESS;
updateMetadata = true;
lastCompactID = compactionId;
} catch (IOException e) {
throw new RuntimeException(e); | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Lists; | 0 |
import org.apache.cocoon.components.source.SourceUtil;
import org.apache.commons.jelly.Script;
import org.apache.commons.jelly.impl.XMLParser;
* @author <a href="mailto:[email protected]">Carsten Ziegeler</a>
public class JellyGenerator
extends AbstractGenerator {
/** The Jelly Parser */
protected XMLParser jellyParser = new XMLParser();
throws ProcessingException,SAXException,IOException {
public void generate()
throws IOException, SAXException, ProcessingException {
// TODO - Compile the script and cache the compiled version
Script script = this.jellyParser.parse(SourceUtil.getInputSource(scriptSource));
script = script.compile();
script.run(this.jellyContext, xmlOutput);
this.contentHandler.endDocument(); | 0 |
@Override
public Set<String> listBackups() {
@Override
public void stage(String backupName) throws RecoveryException {
@Override
public Set<IScheduledTask> query(Query.Builder query) throws RecoveryException {
@Override
public void deleteTasks(Query.Builder query) throws RecoveryException {
@Override
public void unload() {
@Override
public void commit() throws RecoveryException {
@Override
protected void execute(MutableStoreProvider storeProvider) { | 0 |
errorMessage.append(" Config:").append(configType).append(" Property:").append(propertyName).append("\n"); | 0 |
package org.apache.zookeeper.server.util; | 0 |
import javax.management.JMException;
import org.apache.zookeeper.jmx.ManagedUtil;
ManagedUtil.registerLog4jMBeans();
} catch (JMException e) {
LOG.warn("Unable to register log4j JMX control", e);
}
try {
public static void runStandalone(ZooKeeperServer.Factory serverFactory) {
ZooKeeperServer zk = serverFactory.createServer();
NIOServerCnxn.Factory cnxnFactory =
serverFactory.createConnectionFactory();
cnxnFactory.setZooKeeperServer(zk);
cnxnFactory.join(); | 0 |
super(manager, context, String.format("(&(objectClass=%s)(|(%s=*)(%s=*)(%s=*)))",
HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_NAME, | 0 |
final AtomicReference<Exception> ref = new AtomicReference<>();
List<Thread> threads = new ArrayList<>(); | 0 |
* @version CVS $Id: PartInMemory.java,v 1.4 2003/11/13 14:56:12 sylvain Exp $
if (this.in != null) {
return this.in;
} else {
throw new IllegalStateException("This part has already been disposed.");
}
}
/**
* Clean the byte array content buffer holding part data
*/
public void dispose() {
this.in = null; | 0 |
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override | 1 |
* @since 1.8.0 | 0 |
import org.apache.ambari.server.controller.metrics.MetricPropertyProviderFactory;
* Gets the {@link MetricPropertyProviderFactory} that was injected into this
* class. This is a terrible pattern.
*
* @return the injected {@link MetricPropertyProviderFactory}
*/
MetricPropertyProviderFactory getMetricPropertyProviderFactory();
/** | 0 |
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import org.apache.bcel.Constants; | 0 |
/*
import org.osgi.framework.*;
*
Filter TRUE_FILTER = new Filter()
*
*
*
* A null filter object that does not match any given service reference.
Filter FALSE_FILTER = new Filter()
*
*
*
*
* @return The <tt>Filter</tt> of the filter string or the nullFilter if the
Filter createFilter(final String filter, final Filter nullFilter) | 0 |
SQL_SERVER("sqlserver"),
SQL_ANYWHERE("sqlanywhere");
} else if (dbUrl.contains(DatabaseType.SQL_ANYWHERE.getName())) {
databaseType = DatabaseType.SQL_ANYWHERE; | 0 |
case HOST_SVCCOMP_SERVER_ACTION:
return new ServiceComponentHostServerActionEvent(serviceComponentName, hostName, opTimestamp); | 1 |
@SendNotification(after = Event.DriverDisconnected) | 0 |
volatile Runnable m_runnable;
volatile Sequencer m_sequencer;
volatile BundleContext m_bc;
volatile DependencyManager m_dm;
volatile org.apache.felix.dm.Component m_component; | 0 |
if (paths.keySet().remove(file))
// finishes.... therefore split could propagate load flags for a finished bulk load... there is a special iterator | 0 |
Assert.assertTrue("Setting executable permission failed: " + file, file.setExecutable(true, true));
Assert.assertTrue("Setting executable permission failed: " + file, file.setExecutable(true, false));
Assert.assertTrue("Setting executable permission failed: " + file, file.setExecutable(false, true));
Assert.assertTrue("Setting write permission failed: " + file, file.setWritable(true, true));
Assert.assertTrue("Setting write permission failed: " + file, file.setWritable(true, false));
Assert.assertTrue("Setting write permission failed: " + file, file.setWritable(false, true));
Assert.assertTrue("Setting read permission failed: " + file, file.setReadable(true, true));
Assert.assertTrue("Setting read permission failed: " + file, file.setReadable(true, false));
Assert.assertTrue("Setting read permission failed: " + file, file.setReadable(false, true)); | 0 |
import java.util.Arrays;
import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
if (!acu.users.containsKey(user))
conn.securityOperations().createUser(user, pass, new Authorizations());
else if (!Arrays.equals(acu.users.get(user).password, pass))
throw new AccumuloSecurityException(user, SecurityErrorCode.BAD_CREDENTIALS); | 0 |
public <R, P> R accept( NodeVisitor<? extends R, ? super P> visitor, P data )
throws OgnlException | 0 |
import org.apache.velocity.runtime.RuntimeConstants;
* @version CVS $Id: FlowVelocityGenerator.java,v 1.3 2003/09/24 22:34:53 cziegeler Exp $
result == Scriptable.NOT_FOUND) {
result == Scriptable.NOT_FOUND) {
result == Scriptable.NOT_FOUND) {
result == Scriptable.NOT_FOUND) {
this.tmplEngine.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, this);
tmplEngine.setProperty(RuntimeConstants.RESOURCE_LOADER, buffer.toString());
this.manager.release(parser); | 0 |
* @author <a href="mailto:[email protected]">Tony Collen</a>, December 2, 2002
* @version CVS $Id: WebServiceProxyGenerator.java,v 1.4 2003/09/25 19:59:24 tony Exp $
URI uri = null;
String host = null; | 0 |
import com.google.common.collect.ImmutableList;
import java.util.HashMap;
import java.util.List;
import java.util.Map; | 0 |
protected long getApparentAgeSecs(final HttpCacheEntry entry) {
protected long getApparentAgeSecs(final HttpCacheEntry entry) {
protected long getCorrectedReceivedAgeSecs(final HttpCacheEntry entry) {
protected long getResponseDelaySecs(final HttpCacheEntry entry) {
protected long getCorrectedInitialAgeSecs(final HttpCacheEntry entry) {
protected long getResidentTimeSecs(final HttpCacheEntry entry, final Date d) {
public long getCurrentAgeSecs(final HttpCacheEntry e, final Date d) {
public long getFreshnessLifetimeSecs(final HttpCacheEntry e) {
public long getCurrentAgeSecs(final HttpCacheEntry e, final Date d) {
public long getFreshnessLifetimeSecs(final HttpCacheEntry e) {
public long getCurrentAgeSecs(final HttpCacheEntry e, final Date d) {
public long getFreshnessLifetimeSecs(final HttpCacheEntry e) { | 0 |
* @version $Id: FileCleaner.java,v 1.2 2004/10/24 04:20:06 martinc Exp $
} catch (Exception e) {
* @param queue The queue on to which the tracker will be pushed.
public Tracker(File file, Object marker, ReferenceQueue queue) {
this(file.getPath(), marker, queue);
* @param queue The queue on to which the tracker will be pushed.
public Tracker(String path, Object marker, ReferenceQueue queue) {
super(marker, queue);
} | 1 |
import java.util.concurrent.Callable;
public static final Callable<Integer> callable = new Callable<Integer>() {
public Integer call() {
return 1;
}
};
public static int call() throws Exception {
return callable.call();
}
| 0 |
import java.awt.Color;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.awt.Shape;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.awt.image.ImageObserver;
import java.awt.image.RenderedImage;
import java.awt.image.renderable.RenderableImage; | 0 |
package org.apache.felix.sigil.model; | 0 |
return String.format("%s:%s", obj.getOwnerName(), obj.getName()) ; | 0 |
import org.apache.hc.core5.util.TimeValue;
public SessionRequest requestSession(final HttpHost host, final TimeValue timeout, final SessionRequestCallback callback) {
Args.notNull(timeout, "Timeout");
sessionRequest.setConnectTimeout(timeout.toMillisIntBound()); | 0 |
// TODO the following setup appears to duplicate that in the super class methods | 0 |
searchControls.setReturningObjFlag(true); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.