Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
1
|
---|---|
if ((cmd.getRole().equals(Role.HIVE_CLIENT.toString()) ||
cmd.getRole().equals(Role.WEBHCAT_SERVER.toString()) ||
cmd.getRole().equals(Role.HCAT.toString())) && | 0 |
* FIXME - This class can only handle the case if the sitemap is named "sitemap.xmap"!!!
Properties globalVariables,
String sitemapUri) {
buffer.append("\" sitemapUri=\"");
buffer.append(sitemapUri);
getGlobalSitemapVariables(config),
"sitemap.xmap"); | 0 |
try {
request = this.requestFactory.getServletRequest(request);
} catch (Exception e) {
if (getLogger().isErrorEnabled()) {
getLogger().error("Problem in multipart filter. Unable to create request.", e);
}
RequestUtil.manageException(request, response, null, null,
HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
"Problem in creating the Request",
null, null, e, this.servletSettings, getLogger(), this);
filterChain.doFilter(request, response);
| 0 |
store.getUnsafeTaskStore().saveTasks( | 0 |
final Collection<?> param = (Collection<?>) params.getParameter(
final boolean singleHeader = params.getBooleanParameter( | 0 |
import org.apache.sshd.client.config.keys.ClientIdentityLoaderManager;
ClientIdentityLoaderManager, | 0 |
return true;
} | 0 |
DirectPipelineResult result = new DirectPipelineResult(executor, context);
EvaluationContext evaluationContext) { | 0 |
manager = WatermarkManager.create(clock, graph, AppliedPTransform::getFullName);
WatermarkManager.create(clock, graph, AppliedPTransform::getFullName);
new AppliedPTransformInputWatermark("underTest", ImmutableList.of(mockWatermark)); | 0 |
public InvalidCredentialsException(final String message) {
public InvalidCredentialsException(final String message, final Throwable cause) { | 0 |
* @version CVS $Id: QuartzJobExecutor.java,v 1.7 2004/03/22 12:45:32 unico Exp $
boolean release = false;
release = true;
if (release && null != manager) { | 0 |
package org.apache.felix.obrplugin; | 0 |
*/
package org.apache.commons.bcel6.verifier.tests; | 0 |
import java.util.concurrent.TimeUnit;
scanner.setTimeout(getTimeout(cl), TimeUnit.MILLISECONDS);
| 0 |
private boolean validateNotEmpty(String givenValue, boolean allIsWell, StringBuilder buf, String errorMessage) {
private boolean validateNotNull(Object givenValue, boolean allIsWell, StringBuilder buf, String errorMessage) {
private boolean validateNotZero(int givenValue, boolean allIsWell, StringBuilder buf, String errorMessage) {
StringBuilder errorBuf = new StringBuilder(
StringBuilder errorBuf = new StringBuilder( | 0 |
public String component;
public ServerStatus(String component, String serverName, State state) {
this.component = component;
public String getComponent() {
return this.component;
}
public void setComponent(String component) {
this.component = component;
}
| 0 |
public Variant(final String cacheKey, final HttpCacheEntry entry) { | 0 |
filter = clipedNode.getGraphicsNodeRable(true); | 0 |
* Data transmitter based on sockets and <code>java.nio</code>.
*
*
* <!-- empty lines above to avoid 'svn diff' context problems --> | 0 |
import org.apache.ambari.server.utils.StageUtils;
import java.util.ArrayList;
import java.util.HashMap;
String actionName, String serviceName, String componentName,
List<String> hosts, Map<String, String> parameters) {
this(clusterName, commandName, serviceName, parameters);
if (hosts != null) {
this.hosts.addAll(hosts);
}
Map<String, String> parameters) {
this.parameters = new HashMap<String, String>();
if (parameters != null) {
this.parameters.putAll(parameters);
}
this.hosts = new ArrayList<String>();
@Override
public synchronized String toString() {
return (new StringBuilder()).
append("isCommand :" + isCommand().toString()).
append(", action :" + actionName).
append(", command :" + commandName).
append(", inputs :" + parameters.toString()).
append(", targetService :" + serviceName).
append(", targetComponent :" + componentName).
append(", targetHosts :" + hosts.toString()).
append(", clusterName :" + clusterName).toString();
} | 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.zookeeper.common;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.InetSocketAddress;
/**
* This class contains common utilities for netstuff. Like printing IPv6 literals correctly
*/
public class NetUtils {
public static String formatInetAddr(InetSocketAddress addr) {
InetAddress ia = addr.getAddress();
if (ia == null) {
return String.format("%s:%s", addr.getHostString(), addr.getPort());
}
if (ia instanceof Inet6Address) {
return String.format("[%s]:%s", ia.getHostAddress(), addr.getPort());
} else {
return String.format("%s:%s", ia.getHostAddress(), addr.getPort());
}
}
} | 0 |
Buffer buf = session.createBuffer(SshConstants.SSH_MSG_GLOBAL_REQUEST); | 0 |
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.ByteString;
import org.apache.beam.vendor.grpc.v1p13p1.io.grpc.ManagedChannel;
import org.apache.beam.vendor.grpc.v1p13p1.io.grpc.inprocess.InProcessChannelBuilder;
import org.apache.beam.vendor.grpc.v1p13p1.io.grpc.stub.StreamObserver; | 0 |
import org.apache.felix.scr.impl.ComponentCommands;
private ComponentCommands scrCommand;
public void setScrCommand(ComponentCommands scrCommand)
scrCommand.updateProvideScrInfoService(infoAsService());
scrCommand.updateProvideScrInfoService( infoAsService() );
@Override | 0 |
* @param <K> the type of the keys in this map
* @param <V> the type of the values in this map | 0 |
import org.apache.accumulo.core.client.impl.Table;
static List<TabletStats> generateFakeTablets(TServerInstance tserver, Table.ID tableId) {
for (int i = 0; i < tableInfo.tableMap.get(tableId.canonicalID()).onlineTablets; i++) {
public DefaultLoadBalancer(Table.ID table) {
public List<TabletStats> getOnlineTabletsForTable(TServerInstance tserver, Table.ID tableId) throws ThriftSecurityException, TException {
protected String getLoadBalancerClassNameForTable(Table.ID table) {
public List<TabletStats> getOnlineTabletsForTable(TServerInstance tserver, Table.ID tableId) throws ThriftSecurityException, TException {
public TableConfiguration getTableConfiguration(Table.ID tableId) {
NamespaceConfiguration dummyConf = new NamespaceConfiguration(null, null, null);
Map<Table.ID,Integer> movedByTable = new HashMap<>();
movedByTable.put(new Table.ID(t1Id), Integer.valueOf(0));
movedByTable.put(new Table.ID(t2Id), Integer.valueOf(0));
movedByTable.put(new Table.ID(t3Id), Integer.valueOf(0));
Table.ID key = migration.tablet.getTableId(); | 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 |
* @version $Revision$ $Date$ | 0 |
String port = getPort(clusterName, componentName, hostName, httpsEnabled);
if (port == null) {
LOG.warn("Unable to get JMX metrics. No port value for " + componentName);
return resource;
}
private String getPort(String clusterName, String componentName, String hostName, boolean httpsEnabled) throws SystemException {
port = jmxHostProvider.getPort(clusterName, componentName, hostName, httpsEnabled); | 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.components.modules.input;
public final class InputModuleNotFoundException extends InputModuleException
{
public InputModuleNotFoundException(String message)
{
super(message, null);
}
public InputModuleNotFoundException(String message, Throwable cause)
{
super(message, cause);
}
} | 0 |
return getEdgeLabel(dataType.getName(), aInfo.name);
}
public String getEdgeLabel(String typeName, String attrName) {
return EDGE_LABEL_PREFIX + typeName + "." + attrName;
}
public String getEdgeLabel(ITypedInstance typedInstance, AttributeInfo aInfo) throws MetadataException {
IDataType dataType = typeSystem.getDataType(IDataType.class, typedInstance.getTypeName());
return getEdgeLabel(dataType, aInfo);
String relationshipLabel = getEdgeLabel(entityTypeName, traitNameToBeDeleted);
String edgeLabel = getEdgeLabel(typedInstance, attributeInfo);
(ITypedStruct) typedInstance.get(attributeInfo.name), attributeInfo, idToVertexMap);
titanGraph, instanceVertex, structInstanceVertex, edgeLabel);
instanceVertex, idToVertexMap, edgeLabel, referenceId);
String relationshipLabel = getEdgeLabel(typedInstanceTypeName, traitName);
String relationshipLabel = getEdgeLabel(typedInstance, attributeInfo);
String relationshipLabel = getEdgeLabel(typedInstance, attributeInfo); | 0 |
* A {@link WindowFn} that windows values into possibly overlapping fixed-size | 0 |
import com.google.common.collect.ImmutableList;
import java.io.IOException;
import java.io.Serializable;
import java.nio.channels.FileChannel;
import java.nio.channels.SeekableByteChannel;
import java.nio.file.Files;
import java.nio.file.StandardOpenOption;
import java.util.Arrays;
import java.util.List; | 0 |
if (portValue != null && !portValue.trim().isEmpty()) { | 0 |
import org.junit.Assert; | 1 |
import org.apache.accumulo.core.client.Accumulo;
import org.apache.accumulo.server.ServerUtil;
accumuloClient = Accumulo.newClient().usingClientInfo(context.getClientInfo())
.usingToken(principal, at).build();
ServerUtil.init(context, app); | 0 |
final RequestLine requestline = new RequestLine("GET", "/stuff", HttpVersion.HTTP_1_1);
final RequestLine requestline = new RequestLine("GET", "/stuff", HttpVersion.HTTP_1_1);
final StatusLine statusline1 = new StatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK");
final StatusLine statusline2 = new StatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, null);
final StatusLine statusline = new StatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK, "OK"); | 0 |
/* $Id$
* | 0 |
import com.esotericsoftware.kryo.serializers.JavaSerializer;
import com.google.common.base.Function;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import java.util.Arrays;
import java.util.Set;
import javax.annotation.Nullable;
import org.apache.beam.sdk.coders.Coder;
import org.apache.beam.sdk.io.Source;
import org.reflections.Reflections;
* Custom {@link KryoRegistrator}s for Beam's Spark runner needs.
for (Class<?> clazz : ClassesForJavaSerialization.getClasses()) {
kryo.register(clazz, new JavaSerializer());
}
}
/**
* Register coders and sources with {@link JavaSerializer} since they aren't guaranteed to be
* Kryo-serializable.
*/
private static class ClassesForJavaSerialization {
private static final Class<?>[] CLASSES_FOR_JAVA_SERIALIZATION = new Class<?>[]{
Coder.class, Source.class
};
private static final Iterable<Class<?>> INSTANCE;
/**
* Find all subclasses of ${@link CLASSES_FOR_JAVA_SERIALIZATION}
*/
static {
final Reflections reflections = new Reflections();
INSTANCE = Iterables.concat(Lists.transform(Arrays.asList(CLASSES_FOR_JAVA_SERIALIZATION),
new Function<Class, Set<Class<?>>>() {
@SuppressWarnings({"unchecked", "ConstantConditions"})
@Nullable
@Override
public Set<Class<?>> apply(@Nullable Class clazz) {
return reflections.getSubTypesOf(clazz);
}
}));
}
static Iterable<Class<?>> getClasses() {
return INSTANCE;
} | 0 |
ZooKeeperInstance instance = new ZooKeeperInstance(accumuloCluster.getConfig().getInstanceName(), accumuloCluster.getConfig().getZooKeepers());
| 0 |
@Override
@Override
@Override
@Override | 0 |
import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience; | 0 |
import org.apache.cocoon.forms.FormsConstants;
import org.apache.cocoon.forms.util.I18nMessage; | 0 |
public void testSetIterator() throws Exception {
public void testAddIterator() throws Exception {
public void testGetIteratorSettings() throws Exception {
public void testSetRegex() throws Exception {
public void testEmptyColumnFamily() throws Exception { | 0 |
package org.apache.beam.sdk.util;
import org.apache.beam.sdk.options.GcsOptions;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
import org.apache.beam.sdk.testing.FastNanoClockAndSleeper;
import org.apache.beam.sdk.util.gcsfs.GcsPath;
| 0 |
final byte[] inputBytes = input.getBytes(); | 1 |
this.rethrow(e, sql, (Object[])params);
public void fillStatement(PreparedStatement stmt, Object... params)
String... propertyNames) throws SQLException {
* @deprecated Use {@link #query(Connection,String,ResultSetHandler<T>,Object...)} instead
public <T> T query(Connection conn, String sql, Object param,
ResultSetHandler<T> rsh) throws SQLException {
* @deprecated Use {@link #query(Connection,String,ResultSetHandler<T>,Object...)} instead
public <T> T query(Connection conn, String sql, Object[] params,
ResultSetHandler<T> rsh) throws SQLException {
public <T> T query(Connection conn, String sql, ResultSetHandler<T> rsh,
Object... params) throws SQLException {
T result = null;
public <T> T query(Connection conn, String sql, ResultSetHandler<T> rsh)
* @deprecated Use {@link #query(String, ResultSetHandler, Object...)}
public <T> T query(String sql, Object param, ResultSetHandler<T> rsh)
* @deprecated Use {@link #query(String, ResultSetHandler, Object...)}
public <T> T query(String sql, Object[] params, ResultSetHandler<T> rsh)
public <T> T query(String sql, ResultSetHandler<T> rsh, Object... params)
public <T> T query(String sql, ResultSetHandler<T> rsh) throws SQLException {
protected void rethrow(SQLException cause, String sql, Object... params)
public int update(Connection conn, String sql, Object... params)
public int update(String sql, Object... params) throws SQLException { | 0 |
private static final Pattern MISSING_KEY_PATTERN = Pattern.compile( "^(!)?([a-zA-Z]+=)" );
Map instructions = OSGiHeader.parseHeader( MISSING_KEY_PATTERN.matcher( header ).replaceFirst( "$1*;$2" ) ); | 0 |
* This is the representation of an <CODE>xenc:EncryptionMethod</CODE>
* element. It's additionally the factory for encryption/wrap/transport
* algorithms. | 0 |
import org.apache.commons.collections.AbstractTestCollection;
* @version $Revision: 1.4 $ $Date: 2003/11/02 16:20:36 $ | 0 |
import org.apache.excalibur.source.SourceResolver;
* @version CVS $Id: StandardSessionContextProvider.java,v 1.9 2004/03/19 14:16:55 cziegeler Exp $
/** The Source Resolver */
protected SourceResolver resolver;
context = new SimpleSessionContext(this.xpathProcessor, this.resolver);
this.resolver = (SourceResolver)this.manager.lookup(SourceResolver.ROLE);
this.manager.release(this.resolver);
this.resolver = null; | 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.parser;
import java.io.*;
import org.apache.batik.test.*;
/**
* To test the path parser.
*
* @author <a href="mailto:[email protected]">Stephane Hillion</a>
* @version $Id$
*/
public class PathParserFailureTest extends AbstractTest {
protected String sourcePath;
/**
* Creates a new PathParserFailureTest.
* @param spath The path to parse.
*/
public PathParserFailureTest(String spath) {
sourcePath = spath;
}
public TestReport runImpl() throws Exception {
PathParser pp = new PathParser();
try {
pp.parse(new StringReader(sourcePath));
} catch (Exception e) {
return reportSuccess();
}
DefaultTestReport report = new DefaultTestReport(this);
report.setErrorCode("parse.without.error");
report.addDescriptionEntry("input.text", sourcePath);
report.setPassed(false);
return report;
}
} | 0 |
/** {@link org.apache.commons.logging} logging facility */
static org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory.getLog(X509CertificateResolver.class.getName());
log.debug("Can I resolve " + element.getTagName() + "?");
log.debug("I can't");
log.debug("Yes Sir, I can");
log.debug("I can't");
log.debug("XMLSecurityException", ex); | 0 |
* Copyright 2002-2005 The Apache Software Foundation. | 0 |
import org.apache.bcel.generic.ConstantPoolGen;
import org.apache.bcel.generic.INVOKESTATIC;
import org.apache.bcel.generic.InstructionList;
import org.apache.bcel.generic.MethodGen;
import org.apache.bcel.generic.Type; | 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 | 1 |
* @throws NonDeterministicException a {@link CustomCoder} is presumed nondeterministic.
throw new NonDeterministicException(
this,
+ " or they are presumed nondeterministic."); | 1 |
import org.apache.felix.dm.annotation.api.Component;
@Component | 0 |
* {@code HttpAsyncService} is a fully asynchronous HTTP server side protocol
* {@code HttpAsyncServerProtocolHandler} translates individual events fired
* Upon receiving an incoming request {@code HttpAsyncService} verifies
* {@code HttpAsyncService} relies on {@link HttpProcessor} to generate
* Creates new instance of {@code HttpAsyncServerProtocolHandler}.
* Creates new instance of {@code HttpAsyncServerProtocolHandler}.
* Creates new instance of {@code HttpAsyncServerProtocolHandler}.
* Creates new instance of {@code HttpAsyncServerProtocolHandler}.
* Creates new instance of {@code HttpAsyncServerProtocolHandler}.
* Creates new instance of {@code HttpAsyncServerProtocolHandler}. | 0 |
if (!evictionLock.tryLock())
return;
if (bytesToFree <= 0)
return;
if (this.overflow() == that.overflow())
return 0;
if (cache == null)
break; | 1 |
package org.apache.cocoon.component;
import org.apache.avalon.framework.component.*;
import javax.naming.directory.*;
import java.util.Map;
import org.apache.cocoon.ProcessingException;
/**
* The <code>EntryManager</code> is an Avalon Component for managing the Entries in a Javax Naming Directory.
* This is the interface implemented by {@link org.apache.cocoon.component.LDAPEntryManager LDAPEntryManager}.
* @author Jeremy Quinn <a href="http://apache.org/~jeremy">http://apache.org/~jeremy</a>.
*/
public interface EntryManager extends Component {
String ROLE = EntryManager.class.getName();
int ADD_ATTRIBUTE = DirContext.ADD_ATTRIBUTE;
int REMOVE_ATTRIBUTE = DirContext.REMOVE_ATTRIBUTE;
int REPLACE_ATTRIBUTE = DirContext.REPLACE_ATTRIBUTE;
public void create(String entry_name, Map entity_attributes) throws ProcessingException ;
public Map get(String entry_name) throws ProcessingException;
public Map find(Map match_attributes) throws ProcessingException;
public Map find(String context, Map match_attributes) throws ProcessingException;
public void modify(String entry_name, int mod_operand, Map mod_attributes) throws ProcessingException;
}
| 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.digester3.xmlrules.metaparser;
import org.apache.commons.digester3.RulesBinder;
import org.apache.commons.digester3.rulesbinder.LinkedRuleBuilder;
import org.xml.sax.Attributes;
/**
*
*/
final class ObjectCreateRule extends AbstractXmlRule {
public ObjectCreateRule(RulesBinder targetRulesBinder, PatternStack patternStack) {
super(targetRulesBinder, patternStack);
}
/**
* {@inheritDoc}
*/
@Override
protected void bindRule(LinkedRuleBuilder linkedRuleBuilder, Attributes attributes) throws Exception {
linkedRuleBuilder.createObject()
.ofType(attributes.getValue("classname"))
.ofTypeSpecifiedByAttribute(attributes.getValue("attrname"));
}
} | 0 |
* {@inheritDoc} This implementation returns the configuration's
* {@code NodeModel}. It is guarded by the current {@code Synchronizer}.
*/
@Override
public NodeModel<T> getNodeModel()
{
beginRead(false);
try
{
return getModel();
}
finally
{
endRead();
}
}
/**
* Returns the {@code NodeModel} used by this configuration. This method is
* intended for internal use only. Access to the model is granted without
* any synchronization. This is in contrast to the "official"
* {@code getNodeModel()} method which is guarded by the configuration's
* {@code Synchronizer}.
protected NodeModel<T> getModel() | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables; | 0 |
null); | 0 |
Copyright 2001-2003 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 |
/*
* 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 |
package org.apache.atlas.falcon;
import org.apache.atlas.repository.MetadataRepository;
import org.apache.atlas.typesystem.IReferenceableInstance;
when(client.getEntityList(EntityType.CLUSTER.name(), null, null, null, null, null, null,
null)).thenReturn(getEntityList()); | 1 |
* A composite {@link Trigger} that executes its sub-triggers in order.
* Only one sub-trigger is executing at a time,
* and any time it fires the {@code AfterEach} fires. When the currently executing | 0 |
private Logger logger;
this.logger = logger;
protected final Logger getLogger() {
return this.logger;
}
/**
* Parses and resolves the scheme specific part of a block URI
* with respect to the base URI of the current sitemap. The scheme
* specific part of the block URI has the form
* <code>foo:/bar</code> when refering to another block, in this
* case only an absolute path is allowed. For reference to the own
* block, both absolute <code>/bar</code> and relative
* <code>./foo</code> paths are allowed.
*/
public static URI resolveURI(URI uri, URI base) throws URISyntaxException {
if (uri.getPath() != null && uri.getPath().length() >= 2 &&
uri.getPath().startsWith("./")) {
// self reference relative to the current sitemap, e.g. ./foo
if (uri.isAbsolute())
throw new URISyntaxException(uri.toString(), "When the protocol refers to other blocks the path must be absolute");
URI resolvedURI = base.resolve(uri);
uri = resolvedURI;
}
return uri;
}
this.getLogger().debug("BlockSource: resolving " + uri.toString() + " with scheme " +
uri.getScheme() + " and ssp " + uri.getSchemeSpecificPart());
uri = BlockSource.resolveURI(new URI(uri.getSchemeSpecificPart()),
new URI(null, null, baseURI, null));
this.getLogger().debug("BlockSource: resolved to " + uri.toString() +
" with base URI " + baseURI.toString()); | 0 |
return true; // ACCUMULO-3645 compact for empty files too | 0 |
import org.apache.felix.dm.annotation.api.dependency.ServiceDependency; | 0 |
public FileUtilsCleanSymlinksTestCase(final String name) {
private void setupSymlink(final File res, final File link) throws Exception {
final List<String> args = new ArrayList<String>(); | 1 |
Collections.<AlertHistoryEntity>emptyList()); | 0 |
public class SqlDateConverter implements Converter { | 0 |
thread.setDaemon( true ); | 0 |
formatter.format("%1$016x-%2$08x", Long.valueOf(this.count), Integer.valueOf(rndnum)); | 0 |
@Contract(threading = ThreadingBehavior.SAFE) | 0 |
getClient().tableOperations().create(tableName);
BinaryIT.runTest(getClient(), tableName);
ConcurrencyIT.runTest(getClient(), getUniqueNames(1)[0]);
ShutdownIT.runAdminStopTest(getClient(), getCluster());
BulkIT.runTest(getClient(), getClientInfo(), cluster.getFileSystem(),
MapReduceIT.runTest(getClient(), getCluster()); | 0 |
* ACCUMULO-2907 Remove unnecessary security warning from console message unless its actually appropriate. The warning message should only be displayed when
* the value of <code>instance.security.authenticator</code> differs between the SiteConfiguration and the DefaultConfiguration values. | 0 |
void close(); | 0 |
private static final String DEPL_SERVICE = "org.osgi.service.deploymentadmin.DeploymentAdmin";
catch ( /*Deployment*/ Exception e )
catch ( /*Deployment*/ Exception e ) | 0 |
package org.apache.accumulo.test.randomwalk.unit;
import org.apache.accumulo.test.randomwalk.State;
import org.apache.accumulo.test.randomwalk.Test; | 0 |
private final Configuration stackConfig = new Configuration(new HashMap<>(),
new HashMap<>());
private final Configuration bpConfiguration = new Configuration(new HashMap<>(),
new HashMap<>(), stackConfig);
private final Configuration topoConfiguration = new Configuration(new HashMap<>(),
new HashMap<>(), bpConfiguration);
private final Configuration bpGroup1Config = new Configuration(new HashMap<>(),
new HashMap<>(), bpConfiguration);
private final Configuration bpGroup2Config = new Configuration(new HashMap<>(),
new HashMap<>(), bpConfiguration);
private final Configuration topoGroup1Config = new Configuration(new HashMap<>(),
new HashMap<>(), bpGroup1Config);
private final Configuration topoGroup2Config = new Configuration(new HashMap<>(),
new HashMap<>(), bpGroup2Config);
expect(blueprint.getRepositorySettings()).andReturn(new ArrayList<>()).anyTimes();
expect(stack.getExcludedConfigurationTypes("service1")).andReturn(Collections.emptySet()).anyTimes();
expect(stack.getExcludedConfigurationTypes("service2")).andReturn(Collections.emptySet()).anyTimes();
expect(group1.getComponentNames(ProvisionAction.START_ONLY)).andReturn(Collections.emptyList())
expect(group2.getComponentNames(ProvisionAction.INSTALL_ONLY)).andReturn(Collections.emptyList()).anyTimes();
expect(group2.getComponentNames(ProvisionAction.START_ONLY)).andReturn(Collections.emptyList())
expect(persistedState.getAllRequests()).andReturn(Collections.emptyMap()).once(); | 0 |
public class TestDualTreeBidiMap<K extends Comparable<K>, V extends Comparable<V>> extends AbstractTestSortedBidiMap<K, V> {
/**
* {@inheritDoc}
*/
@Override
public DualTreeBidiMap<K, V> makeObject() {
return new DualTreeBidiMap<K, V>(); | 0 |
package org.apache.felix.ipojo.transaction.test.service;
import javax.transaction.Transaction;
public interface CheckService {
public void doSomethingGood();
public void doSomethingBad() throws NullPointerException;
public void doSomethingBad2() throws UnsupportedOperationException;
public void doSomethingLong();
public int getNumberOfCommit();
public int getNumberOfRollback();
public Transaction getCurrentTransaction();
public Transaction getLastRolledBack();
public Transaction getLastCommitted();
} | 0 |
package org.apache.beam.sdk.extensions.sql.interpreter.operator;
import org.apache.beam.sdk.extensions.sql.schema.BeamSqlRow; | 0 |
firstResponse.setJobMessages(new ArrayList<>());
secondResponse.setJobMessages(new ArrayList<>()); | 0 |
import javax.servlet.http.HttpSession;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.thread.ThreadSafe;
import org.apache.cocoon.environment.ObjectModelHelper;
HttpSession session = ObjectModelHelper.getRequest(objectModel).getSession();
HttpSession session = ObjectModelHelper.getRequest(objectModel).getSession(); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/log/src/java/org/apache/commons/jelly/tags/log/InfoTag.java,v 1.2 2003/01/25 18:02:25 morgand Exp $
* $Revision: 1.2 $
* $Date: 2003/01/25 18:02:25 $
* $Id: InfoTag.java,v 1.2 2003/01/25 18:02:25 morgand Exp $
import org.apache.commons.jelly.JellyTagException;
* @version $Revision: 1.2 $
public void doTag(XMLOutput output) throws JellyTagException { | 0 |
import org.apache.hc.core5.http.ssl.TLS; | 0 |
import java.util.List;
import org.apache.beam.sdk.values.PCollectionView;
import com.datatorrent.api.Operator;
List<PCollectionView<?>> sideInputs = transform.getSideInputs();
doFn, output.getWindowingStrategy(), sideInputs);
if (!sideInputs.isEmpty()) {
Operator.InputPort<?>[] sideInputPorts = {operator.sideInput1};
for (int i=0; i<sideInputs.size(); i++) {
// the number of input ports for side inputs are fixed and each port can only take one input.
// more (optional) ports can be added to give reasonable capacity or an explicit union operation introduced.
if (i == sideInputPorts.length) {
String msg = String.format("Too many side inputs in %s (currently only supporting %s).",
transform.toString(), sideInputPorts.length);
throw new UnsupportedOperationException(msg);
}
context.addStream(context.getViewInput(sideInputs.get(i)), sideInputPorts[i]);
}
} | 0 |
* or more contributor license agreements. See the NOTICE file
* regarding copyright ownership. The ASF licenses this file
* with the License. You may obtain a copy of the License at
* KIND, either express or implied. See the License for the | 0 |
* Discover any resources that match the given requirements.
*
* @param requirements
* @return List of resources matching the filter
*/
Resource[] discoverResources(Requirement[] requirements);
/** | 0 |
* Copyright 2016-2017 Seznam.cz, a.s. | 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.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
import org.apache.ambari.logsearch.model.request.impl.AuditComponentRequest;
import javax.ws.rs.QueryParam;
public class AuditComponentQueryRequest extends BaseLogQueryRequest implements AuditComponentRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
private String userList;
@Override
public String getUserList() {
return userList;
}
public void setUserList(String userList) {
this.userList = userList;
}
} | 0 |
import java.util.AbstractMap.SimpleImmutableEntry;
assertEquals("Check failed", new SimpleImmutableEntry<>(true, expected), KeyUtils.checkFingerPrint(test, key)); | 0 |
import org.apache.commons.jelly.JellyTagException;
import org.jaxen.JaxenException;
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException {
if (stylesheet instanceof JellyStylesheet) {
// dom4j only seems to throw Exception
try {
Object source = getSource();
if (log.isDebugEnabled()) {
log.debug("About to evaluate stylesheet on source: " + source);
}
stylesheet.run(source);
} catch (Exception e) {
throw new JellyTagException(e);
}
protected Object getSource() throws JaxenException { | 0 |
.getPropertyId("Repositories", "mirrors_list"); | 0 |
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
private PipelineOptions options;
options = PipelineOptionsFactory.create();
BigQueryTableInserter inserter = new BigQueryTableInserter(bigquery, options);
BigQueryTableInserter inserter = new BigQueryTableInserter(bigquery, options);
BigQueryTableInserter inserter = new BigQueryTableInserter(bigquery, options);
BigQueryTableInserter inserter = new BigQueryTableInserter(bigquery, options);
BigQueryTableInserter inserter = new BigQueryTableInserter(bigquery, options);
BigQueryTableInserter inserter = new BigQueryTableInserter(bigquery, options); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.