Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
1
|
---|---|
import org.apache.beam.model.pipeline.v1.RunnerApi; | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.io.ByteStreams; | 0 |
* The comma separated list of tokens to exclude when processing sources.
* All entries should be relative to the project directory
*
* @parameter alias="excludes"
*/
private String sourceExcludes;
/**
this.project,
this.sourceExcludes); | 0 |
package cz.seznam.euphoria.operator.test.junit;
import cz.seznam.euphoria.guava.shaded.com.google.common.base.Preconditions;
import cz.seznam.euphoria.operator.test.junit.Processing.Type;
DataSource<I> dataSource = inputData.asListDataSource(bounded);
public ListDataSource<T> asListDataSource(boolean bounded) {
return ListDataSource.of(bounded, data)
.withReadDelay(readDelay)
.withFinalDelay(finalDelay);
}
Preconditions.checkNotNull(executor);
Preconditions.checkNotNull(processing);
assertEquals(1, processing.asList().size());
for (Processing.Type proc: processing.asList()) { | 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.
*/
@Version("2.0.0")
package org.apache.felix.hc.api.execution;
import org.osgi.annotation.versioning.Version; | 0 |
protected final Object id;
public BufferedIoOutputStream(Object id, IoOutputStream out) {
this.id = id;
}
public Object getId() {
return id;
IoWriteFutureImpl future = new IoWriteFutureImpl(getId(), buffer);
IoWriteFutureImpl future = writes.peek();
if (future == null) {
return;
}
if (!currentWrite.compareAndSet(null, future)) {
return;
out.writePacket(future.getBuffer()).addListener(new SshFutureListener<IoWriteFuture>() {
@Override
public void operationComplete(IoWriteFuture f) {
if (f.isWritten()) {
future.setValue(Boolean.TRUE);
} else {
future.setValue(f.getException());
}
finishWrite();
}
@SuppressWarnings("synthetic-access")
private void finishWrite() {
writes.remove(future);
currentWrite.compareAndSet(future, null);
try {
startWriting();
} catch (IOException e) {
log.error("finishWrite({}) failed ({}) re-start writing", out, e.getClass().getSimpleName());
}
}
});
.when(getId(), writes) | 0 |
public RequestStatus deleteResourcesAuthorized(Request request, Predicate predicate) | 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/text/CharacterIterator.java,v 1.6 2006/03/14 01:20:30 hargrave Exp $
*
* (C) Copyright 2001 Sun Microsystems, Inc.
* Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved.
*
* 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 java.text;
public abstract interface CharacterIterator extends java.lang.Cloneable {
public abstract java.lang.Object clone();
public abstract char current();
public abstract char first();
public abstract int getBeginIndex();
public abstract int getEndIndex();
public abstract int getIndex();
public abstract char last();
public abstract char next();
public abstract char previous();
public abstract char setIndex(int var0);
public final static char DONE = 65535;
}
| 0 |
package org.apache.commons.digester3; | 1 |
private final SimpleFunction<Row, String> myValueTranslate = new SimpleFunction<Row, String>() { | 0 |
createNoMessagesStreamManager().commit(ImmutableList.of());
streamManager.commit(ImmutableList.of(saveFrameworkId, deleteJob));
streamManager.commit(ImmutableList.of(saveFrameworkId)); | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger log = LoggerFactory.getLogger(UtilWaitThread.class); | 0 |
out.println(" BundleId Component Name Default State");
out.println(" Component Id State PIDs (Factory PID)");
out.println( String.format( " [%1$4d] %2$s %3$s", desc.bundle.id, desc.name, desc.defaultEnabled ? "enabled" : "disabled" ) );
Collections.sort( configs, CONFIGURATION_COMP);
for ( final ComponentConfigurationDTO component : configs )
final Object servicePid = component.properties.get(Constants.SERVICE_PID);
final String factoryPid = (String)component.properties.get("service.factoryPid");
final StringBuilder pid = new StringBuilder();
if ( servicePid != null ) {
pid.append(servicePid);
}
if ( factoryPid != null ) {
pid.append(" (");
pid.append(factoryPid);
pid.append(" )");
out.println( String.format( " [%1$4d] [%2$s] %3$s", component.id,
toStateString( component.state ),
pid.toString()) ); | 0 |
public Integer createPrincipal(String principal, String password, boolean serivce) throws KerberosOperationException{
public boolean removePrincipal(String principal) throws KerberosOperationException { | 0 |
import org.apache.accumulo.server.cli.ClientOpts;
import com.beust.jcommander.Parameter;
static class Opts extends ClientOpts {
@Parameter(names="--readonly", description="read only")
boolean readonly = false;
@Parameter(names="--tables", description="number of tables to create")
int tables = 5;
@Parameter(names="--count", description="number of entries to create")
int count = 10000;
private static void readBack(Opts opts, Connector conn) throws Exception {
Scanner scanner = conn.createScanner(table, opts.auths);
scanner.setBatchSize(opts.scanBatchSize);
if (!elt.getKey().getRow().toString().equals(expected))
throw new RuntimeException("entry " + elt + " does not match expected " + expected + " in table " + table);
Opts opts = new Opts();
opts.parseArgs(TestMultiTableIngest.class.getName(), args);
connector = opts.getConnector();
for (int i = 0; i < opts.tables; i++) {
if (!opts.readonly) {
b = connector.createMultiTableBatchWriter(opts.getBatchWriterConfig());
for (int i = 0; i < opts.count; i++) {
readBack(opts, connector); | 0 |
} catch (Throwable e) {
} catch (Throwable t) {
if (e instanceof IOException) {
throw (IOException) e;
} else if (e instanceof RuntimeException) {
throw (RuntimeException) e;
} else {
throw new IOException("Failed (" + e.getClass().getSimpleName() + ") to notify channel " + this + " initialization: " + e.getMessage(), e);
}
} catch (Throwable t) {
if (log.isTraceEnabled()) {
Throwable[] suppressed = e.getSuppressed();
if (GenericUtils.length(suppressed) > 0) {
for (Throwable s : suppressed) {
log.trace("preClose(" + this + ") suppressed closed channel signalling failure", s);
}
}
} | 0 |
import org.apache.hc.core5.http.ClassicHttpRequest;
import org.apache.hc.core5.http.ClassicHttpResponse;
import org.apache.hc.core5.http.impl.HttpProcessors;
import org.apache.hc.core5.http.io.entity.ByteArrayEntity;
import org.apache.hc.core5.http.io.entity.ContentType;
import org.apache.hc.core5.http.io.entity.EntityUtils;
import org.apache.hc.core5.http.io.entity.InputStreamEntity;
import org.apache.hc.core5.http.io.entity.StringEntity;
HttpProcessor httpproc = HttpProcessors.client(); | 1 |
/**
* TODO Add javadoc
*
* @author <a href="mailto:[email protected]">Apache MINA SSHD Project</a>
* @version $Rev$, $Date$
*/ | 0 |
import org.apache.accumulo.core.client.Accumulo;
try (AccumuloClient c = Accumulo.newClient().from(getClientProperties()).build()) { | 0 |
* @since Commons IO 2.0
* @since Commons IO 2.0
* @since Commons IO 2.0 | 0 |
import org.apache.ambari.server.scheduler.ExecutionScheduler;
import org.apache.ambari.server.scheduler.ExecutionSchedulerImpl;
import org.apache.ambari.server.state.scheduler.RequestExecution;
import org.apache.ambari.server.state.scheduler.RequestExecutionFactory;
import org.apache.ambari.server.state.scheduler.RequestExecutionImpl;
bind(ExecutionScheduler.class).to(ExecutionSchedulerImpl.class);
install(new FactoryModuleBuilder().implement(RequestExecution.class,
RequestExecutionImpl.class).build(RequestExecutionFactory.class)); | 0 |
import org.apache.cocoon.AbstractTestCase;
public abstract class ContainerTestCase extends AbstractTestCase {
super.setUp();
* @see org.apache.cocoon.AbstractTestCase#createBeanFactory()
*/
protected void createBeanFactory()
throws Exception {
super.createBeanFactory();
this.prepare();
}
/**
aep.createComponents(null, rolesInfo, (BeanDefinitionRegistry) this.getBeanFactory(), null, new DefaultResourceLoader());
postProcessor.setBeanFactory(this.getBeanFactory());
this.getBeanFactory().addBeanPostProcessor(postProcessor);
}
/**
* @see org.apache.cocoon.AbstractTestCase#initBeanFactory()
*/
protected void initBeanFactory() {
super.initBeanFactory();
this.manager = (ServiceManager)this.getBeanFactory().getBean(ServiceManager.class.getName());
this.context = (Context)this.getBeanFactory().getBean(AvalonUtils.CONTEXT_ROLE); | 0 |
private static void expEqual(final Object o1, final Object o2)
private static void expNE(final Object o1, final Object o2)
final DefaultExpressionEngineSymbols s2 =
final DefaultExpressionEngineSymbols s1 =
final DefaultExpressionEngineSymbols symbols = builder().create();
final String s = symbols.toString(); | 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.atlas.AtlasConfiguration;
public static final String ATLAS_HOOK_TOPIC = AtlasConfiguration.NOTIFICATION_HOOK_TOPIC_NAME.getString();
public static final String ATLAS_ENTITIES_TOPIC = AtlasConfiguration.NOTIFICATION_ENTITIES_TOPIC_NAME.getString(); | 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 |
* Executor based on {@link BeamSqlExpression} and {@link BeamSqlPrimitive}. {@code
* BeamSqlFnExecutor} converts a {@link BeamRelNode} to a {@link BeamSqlExpression}, which can be
* evaluated against the {@link Row}.
* {@link #buildExpression(RexNode)} visits the operands of {@link RexNode} recursively, and
* represent each {@link SqlOperator} with a corresponding {@link BeamSqlExpression}.
if (SqlTypeName.CHAR_TYPES.contains(type) && node.getValue() instanceof NlsString) {
throw new IllegalStateException(
"type/realType mismatch: " + type + " VS " + realType);
ret =
new BeamSqlFieldAccessExpression(referenceExpression, nestedFieldIndex, nestedFieldType);
// logical operators
// arithmetic operators
// string operators
// date functions
// array functions
// map functions
switch (subExps.get(0).getOutputType()) {
case MAP:
return new BeamSqlMapItemExpression(subExps, node.type.getSqlTypeName());
case ARRAY:
return new BeamSqlArrayItemExpression(subExps, node.type.getSqlTypeName());
default:
throw new UnsupportedOperationException(
"Operator: " + opName + " is not supported yet");
}
// collections functions
//DEFAULT keyword for UDF with optional parameter
ret =
new BeamSqlUdfExpression(
fn.method, subExps, ((RexCall) rexNode).type.getSqlTypeName());
throw new IllegalStateException(
ret.getClass().getSimpleName() + " does not accept the operands.(" + rexNode + ")");
return (type == SqlTypeName.DATE || type == SqlTypeName.TIMESTAMP) && value instanceof Calendar;
public void prepare() {}
public void close() {} | 0 |
import org.apache.xml.security.exceptions.XMLSecurityException; | 0 |
byte[] bytes = content.getBytes("US-ASCII"); | 0 |
channel.waitFor(EnumSet.of(ClientChannel.ClientChannelEvent.CLOSED), TimeUnit.SECONDS.toMillis(35L)); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/Variables.java,v 1.3 2002/05/08 23:02:42 dmitri Exp $
* $Revision: 1.3 $
* $Date: 2002/05/08 23:02:42 $
* XPath can reference variables using the <code>"$varname"</code> syntax.
* To use a custom implementation of this interface, pass it to
* {@link JXPathContext#setVariables JXPathContext.setVariables()}
* @version $Revision: 1.3 $ $Date: 2002/05/08 23:02:42 $
* the value of an existing variable.
* May throw UnsupportedOperationException.
/**
* Removes an existing variable. May throw UnsupportedOperationException.
*
* @param varName is a variable name without the "$" sign
*/
void undeclareVariable(String varName); | 0 |
* Copyright (C) 2015 Google Inc. | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList; | 0 |
private transient Object rootNode;
return name.toUpperCase(Locale.ENGLISH).startsWith(lang.toUpperCase(Locale.ENGLISH)); | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Predicates.notNull;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.FluentIterable; | 0 |
package org.apache.felix.dm.lambda.callbacks;
import java.util.Objects;
import org.apache.felix.dm.Component;
import org.osgi.framework.ServiceReference;
/**
* Represents a callback(Component, ServiceReference, Service, ServiceReference, Service) that is invoked on a Component implementation class.
* The type of the class on which the callback is invoked on is represented by the T generic parameter.
*
* @author <a href="mailto:[email protected]">Felix Project Team</a>
*/
@FunctionalInterface
public interface CbTypeComponentRefServiceRefService<T, S> extends SerializableLambda {
/**
* Handles the given arguments.
* @param instance the Component implementation instance on which the callback is invoked on.
* @param c first callback param
* @param oldRef second callback param
* @param old third callback param
* @param replaceRef fourth callback param
* @param replace fifth callback param
*/
void accept(T instance, Component c, ServiceReference<S> oldRef, S old, ServiceReference<S> replaceRef, S replace);
default CbTypeComponentRefServiceRefService<T, S> andThen(CbTypeComponentRefServiceRefService<? super T, S> after) {
Objects.requireNonNull(after);
return (T instance, Component c, ServiceReference<S> oldRef, S old, ServiceReference<S> replaceRef,
S replace) -> {
accept(instance, c, oldRef, old, replaceRef, replace);
after.accept(instance, c, oldRef, old, replaceRef, replace);
};
}
} | 0 |
import org.apache.commons.lang.StringUtils;
import static org.apache.commons.lang.StringUtils.defaultString;
@javax.persistence.Table(name = "servicecomponentdesiredstate")
@Column(name = "cluster_id", nullable = false, insertable = false, updatable = false, length = 10)
@Id
@Column(name = "service_name", nullable = false, insertable = false, updatable = false)
private String serviceName;
@Column(name = "component_name", nullable = false, insertable = true, updatable = true)
@Id
private String componentName;
@Column(name = "desired_state", nullable = false, insertable = true, updatable = true)
@Enumerated(EnumType.STRING)
private State desiredState = State.INIT;
@Column(name = "desired_stack_version", insertable = true, updatable = true)
@Basic
private String desiredStackVersion = "";
@ManyToOne
@JoinColumns({@javax.persistence.JoinColumn(name = "cluster_id", referencedColumnName = "cluster_id", nullable = false), @JoinColumn(name = "service_name", referencedColumnName = "service_name", nullable = false)})
private ClusterServiceEntity clusterServiceEntity;
@OneToMany(mappedBy = "serviceComponentDesiredStateEntity")
private Collection<HostComponentStateEntity> hostComponentStateEntities;
@OneToMany(mappedBy = "serviceComponentDesiredStateEntity")
private Collection<HostComponentDesiredStateEntity> hostComponentDesiredStateEntities;
@OneToMany(mappedBy = "serviceComponentDesiredStateEntity", cascade = CascadeType.ALL)
private Collection<ComponentConfigMappingEntity> configMappingEntities;
return defaultString(desiredStackVersion); | 0 |
/**
* type of conditional dependency
*/
protected String type = this.getClass().getSimpleName();
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
| 0 |
values.put(CSSConstants.CSS_VISIBLE_VALUE,
values.put(CSSConstants.CSS_HIDDEN_VALUE,
values.put(CSSConstants.CSS_COLLAPSE_VALUE,
return true;
return CSSConstants.CSS_VISIBILITY_PROPERTY; | 1 |
public AtlasRelationship getOrCreate(AtlasRelationship relationship) throws AtlasBaseException {
if (LOG.isDebugEnabled()) {
LOG.debug("==> getOrCreate({})", relationship);
}
validateRelationship(relationship);
AtlasVertex end1Vertex = getVertexFromEndPoint(relationship.getEnd1());
AtlasVertex end2Vertex = getVertexFromEndPoint(relationship.getEnd2());
AtlasRelationship ret;
// check if relationship exists
AtlasEdge relationshipEdge = getRelationshipEdge(end1Vertex, end2Vertex, relationship);
ret = (relationshipEdge != null) ? mapEdgeToAtlasRelationship(relationshipEdge) : create(relationship);
if (LOG.isDebugEnabled()) {
LOG.debug("<== getOrCreate({}): {}", relationship, ret);
}
return ret;
}
@Override
@GraphTransaction | 0 |
if (!builder.isSetExecutorConfig()) { | 0 |
public JSErrorReporter(Logger logger) { | 0 |
import java.util.List;
public List createHandlerTasks(final Event event)
private void handleEvent(List managers,
if (managers != null && managers.size() > 0 ) | 0 |
* Factory for {@link Request} instances.
/**
* Create a request instance.
*
* @param headers http headers
* @param uriInfo uri information
* @param requestType http request type
* @param resourceDefinition associated resource definition
* @return a new Request instance
*/
public Request createRequest(HttpHeaders headers, UriInfo uriInfo, Request.Type requestType, | 1 |
import org.apache.cocoon.el.objectmodel.ObjectModel; | 0 |
* @version $Id$ | 0 |
checkCredentialProviders(conf, new HashMap<>()); | 0 |
import static org.apache.ambari.server.upgrade.UpgradeCatalog270.REQUEST_USER_NAME_COLUMN;
// updateRequestTable
Capture<DBAccessor.DBColumnInfo> updateRequestTableCapture = newCapture(CaptureType.ALL);
dbAccessor.addColumn(eq(REQUEST_TABLE), capture(updateRequestTableCapture));
expectLastCall().once();
// Validate updateRequestTableCapture
Assert.assertTrue(updateRequestTableCapture.hasCaptured());
validateColumns(updateRequestTableCapture.getValues(),
Arrays.asList(new DBAccessor.DBColumnInfo(REQUEST_USER_NAME_COLUMN, String.class, 255))
);
| 0 |
package org.apache.ambari.view.commons.exceptions; | 0 |
import org.apache.felix.dm.DependencyManager;
mavenBundle().groupId("org.osgi").artifactId("org.osgi.compendium").version(Base.OSGI_SPEC_VERSION), | 0 |
* {@link CredentialHelper#asBase64String(TCredentials)}.
* the path to a file in the configured file system, containing the serialized, base-64 encoded {@link AuthenticationToken} with the user's
* authentication
* @see #setConnectorInfo(Job, String, AuthenticationToken)
* @see #setConnectorInfo(Job, String, AuthenticationToken)
* @deprecated since 1.5.0; Use {@link #setConnectorInfo(Job, String, AuthenticationToken)}, {@link #setInputTableName(Job, String)}, and | 0 |
handleGlobalsBackwardsCompability(request, propertiesAttributes);
Config config = createConfig(cluster, request.getType(), request.getProperties(),
request.getVersionTag(), propertiesAttributes);
return new ConfigurationResponse(cluster.getClusterName(), config.getType(), config.getTag(), config.getVersion(),
config.getProperties(), config.getPropertiesAttributes());
}
private void handleGlobalsBackwardsCompability(ConfigurationRequest request,
Map<String, Map<String, String>> propertiesAttributes) throws AmbariException {
Cluster cluster = clusters.getCluster(request.getClusterName());
if(request.getType().equals(Configuration.GLOBAL_CONFIG_TAG)) {
Map<String, Map<String, String>> configTypes = new HashMap<String, Map<String, String>>();
configTypes.put(Configuration.GLOBAL_CONFIG_TAG, request.getProperties());
configHelper.moveDeprecatedGlobals(cluster.getCurrentStackVersion(), configTypes);
for(Map.Entry<String, Map<String, String>> configType : configTypes.entrySet()) {
String configTypeName = configType.getKey();
Map<String, String> properties = configType.getValue();
if(configTypeName.equals(Configuration.GLOBAL_CONFIG_TAG))
continue;
String tag;
if(cluster.getConfigsByType(configTypeName) == null) {
tag = "version1";
} else {
tag = "version" + System.currentTimeMillis();
}
createConfig(cluster, configTypeName, properties, tag, propertiesAttributes);
}
}
}
private Config createConfig(Cluster cluster, String type, Map<String, String> properties,
String versionTag, Map<String, Map<String, String>> propertiesAttributes) {
Config config = configFactory.createNew (cluster, type,
properties, propertiesAttributes);
if (!StringUtils.isEmpty(versionTag)) {
config.setTag(versionTag);
return config; | 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.
*/
/**
* MATH functions/operators.
*/
package org.apache.beam.dsls.sql.interpreter.operator.math; | 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* 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.atlas.omrs.auditlog.store.file;
import org.apache.atlas.omrs.auditlog.store.OMRSAuditLogStoreProviderBase;
/**
* FileBasedRegistryStoreProvider is the OCF connector provider for the file based cohort registry store.
*/
public class FileBasedAuditLogStoreProvider extends OMRSAuditLogStoreProviderBase
{
/**
* Constructor used to initialize the ConnectorProviderBase with the Java class name of the specific
* audit log store implementation.
*/
public FileBasedAuditLogStoreProvider()
{
Class connectorClass = FileBasedAuditLogStoreConnector.class;
super.setConnectorClassName(connectorClass.getName());
}
} | 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 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/DynaClass.java,v 1.3 2001/12/28 00:33:56 craigmcc Exp $
* $Revision: 1.3 $
* $Date: 2001/12/28 00:33:56 $
* @author Paulo Gaspar
* @version $Revision: 1.3 $ $Date: 2001/12/28 00:33:56 $
public PropertyDescriptor getPropertyDescriptor(String name); | 0 |
public SessionInputBufferImpl(
final HttpTransportMetricsImpl metrics,
final int buffersize) {
this(metrics, buffersize, buffersize, null, null);
}
| 0 |
@NamedQuery(name = "HostRoleCommandEntity.findTaskIdsByRequestStageIds", query = "SELECT command.taskId FROM HostRoleCommandEntity command WHERE command.stageId = :stageId AND command.requestId = :requestId"),
@NamedQuery(name = "HostRoleCommandEntity.removeByTaskIds", query = "DELETE FROM HostRoleCommandEntity command WHERE command.taskId IN :taskIds"),
@NamedQuery(name = "HostRoleCommandEntity.findHostsByCommandStatus", query = "SELECT DISTINCT(host.hostName) FROM HostRoleCommandEntity command, HostEntity host WHERE (command.requestId >= :iLowestRequestIdInProgress AND command.requestId <= :iHighestRequestIdInProgress) AND command.status IN :statuses AND command.hostId = host.hostId AND host.hostName IS NOT NULL"),
@NamedQuery(name = "HostRoleCommandEntity.getBlockingHostsForRequest", query = "SELECT DISTINCT(host.hostName) FROM HostRoleCommandEntity command, HostEntity host WHERE command.requestId >= :lowerRequestIdInclusive AND command.requestId < :upperRequestIdExclusive AND command.status IN :statuses AND command.isBackgroundCommand=0 AND command.hostId = host.hostId AND host.hostName IS NOT NULL") | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Lists;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.reflect.Invokable;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.reflect.Parameter;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.reflect.TypeResolver;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.reflect.TypeToken; | 0 |
protected Class<?> getExpectedType() { | 0 |
* Copyright 2004-2005 The Apache Software Foundation.
package org.apache.cocoon.portal.coplets.basket.events;
import org.apache.cocoon.portal.coplets.basket.ContentStore;
* Remove an item from the content store
* @version CVS $Id: RemoveItemEvent.java 30941 2004-07-29 19:56:58Z vgritsenko $
public class RemoveItemEvent extends ContentStoreEvent {
* @param store The icontent store
* @param item The item to remove
public RemoveItemEvent(ContentStore store, Object item) {
super(store); | 0 |
try {
} catch (FileUploadException expected) { | 0 |
Copyright 2002-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 |
import org.apache.batik.anim.dom.SVGDOMImplementation; | 0 |
* </p>
* </p> | 0 |
/**
* Sets the completed status of this decoder. Normally this is not necessary
* (the decoder will automatically complete when the underlying channel
* returns EOF). It is useful to mark the decoder as completed if you have
* some other means to know all the necessary data has been read and want to
* reuse the underlying connection for more messages.
*/
public void setCompleted(boolean completed) {
this.completed = completed;
} | 0 |
Boolean next(ServerSession session, Buffer buffer) throws Exception; | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap; | 0 |
return new FluentIterable<E>() {
return new FluentIterable<E>() {
return new FluentIterable<E>() {
return new FluentIterable<E>() {
if (IterableUtils.isEmpty(iterable)) {
return new FluentIterable<E>() {
return new FluentIterable<O>() {
return new FluentIterable<E>() { | 0 |
* Copyright 2001-2005 The Apache Software Foundation | 0 |
/** @deprecated Use commons logging */ | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
* @version $Id: ConfigurationKey.java,v 1.7 2004/12/23 18:42:25 oheger Exp $
/** Constant for a property delimiter.*/
public static final char PROPERTY_DELIMITER = '.';
/**
* Checks if this key is an attribute key.
*
* @return a flag if this key is an attribute key
*/
public boolean isAttributeKey()
{
return isAttributeKey(keyBuffer.toString());
} | 0 |
package org.apache.felix.ipojo.runtime.core.test.components;
import foo.Foo;
@Foo(bar="bar")
public class OnlyFoo {
} | 0 |
Copyright 2000-2003 The Apache Software Foundation
String bu= "";
bu = getBaseURI();
String msg = "MalformedURLException:" + ex.getMessage() + ':' + bu;
throw new IllegalArgumentException( msg ); | 0 |
LoggerFactory.getLogger(AmbariActionExecutionHelper.class);
/*
* TODO Execution command field population should be (partially?)
* combined with the same code at createHostAction()
*/ | 0 |
* ./gradlew integrationTest -p sdks/java/io/elasticsearch -DintegrationTestPipelineOptions='[
* "--elasticsearchServer=1.2.3.4",
* "--elasticsearchHttpPort=9200"]'
* --tests org.apache.beam.sdk.io.elasticsearch.ElasticsearchIOIT
* -DintegrationTestRunner=direct | 0 |
throw new LocalVariableInfoInconsistentException("At bytecode offset '"+offset+
"' a local variable has two different names: '"+getName(offset)+"' and '"+name+"'.");
throw new LocalVariableInfoInconsistentException("At bytecode offset '"+offset+
"' a local variable has two different types: '"+getType(offset)+"' and '"+t+"'."); | 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 |
WindowedValue<Iterable<?>> sideInputValue =
(WindowedValue<Iterable<?>>) unionValue.getValue();
sideInputReader.addSideInputValue(sideInput, sideInputValue);
| 0 |
try (Scanner scan = conn.createScanner(RootTable.NAME, Authorizations.EMPTY)) { | 0 |
* @version $Revision$, $Date$ | 0 |
* A {@link OldDoFn} that does nothing with provided elements. Used for testing
* methods provided by the OldDoFn abstract class.
class NoOpDoFn<InputT, OutputT> extends OldDoFn<InputT, OutputT> {
public void processElement(OldDoFn<InputT, OutputT>.ProcessContext c) throws Exception {
public OldDoFn<InputT, OutputT>.Context context() {
public OldDoFn<InputT, OutputT>.ProcessContext processContext() {
* A {@link OldDoFn.Context} that does nothing and returns exclusively null.
private class NoOpDoFnContext extends OldDoFn<InputT, OutputT>.Context {
* A {@link OldDoFn.ProcessContext} that does nothing and returns exclusively
private class NoOpDoFnProcessContext extends OldDoFn<InputT, OutputT>.ProcessContext { | 0 |
import org.apache.http.HttpEntity;
import org.apache.http.nio.entity.EntityAsyncContentProducer;
import org.apache.http.nio.entity.HttpAsyncContentProducer;
private final HttpEntity entity;
private final HttpAsyncContentProducer contentProducer;
final HttpEntity entity,
if (entity instanceof HttpAsyncContentProducer) {
this.contentProducer = (HttpAsyncContentProducer) entity;
} else {
this.contentProducer = new EntityAsyncContentProducer(entity);
}
this.contentProducer.produceContent(encoder, ioctrl);
this.contentProducer.close(); | 0 |
MockScannerBase.MockIteratorEnvironment env =
new MockScannerBase.MockIteratorEnvironment(Authorizations.EMPTY); | 0 |
import org.apache.beam.runners.direct.DirectRunner.CommittedBundle;
import org.apache.beam.runners.direct.DirectRunner.UncommittedBundle; | 0 |
return new DefaultKeyValue<>(null, null);
return new DefaultKeyValue<>(key, value);
DefaultKeyValue<K, V> kv = new DefaultKeyValue<>();
kv = new DefaultKeyValue<>((K) key, (V) value);
final DefaultKeyValue<K, V> kv2 = new DefaultKeyValue<>(kv);
final Map<K, V> map = new HashMap<>();
kv = new DefaultKeyValue<>(entry);
final Map<K, V> map = new HashMap<>(); | 1 |
} catch (IllegalArgumentException ex) {
throw new MalformedPathException(ex.getMessage()); | 0 |
setAttributeNS(XMLSupport.XML_NAMESPACE_URI,
XMLSupport.XML_LANG_ATTRIBUTE,
lang);
setAttributeNS(XMLSupport.XML_NAMESPACE_URI,
XMLSupport.XML_SPACE_ATTRIBUTE,
space); | 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.
*/
/**
* The DefaultPackageClass is just present for the
* {@link org.apache.felix.scr.impl.ReflectionHelperTest} to be able to test
* the <code>ReflectionHelper.getPackageName</code> method.
*/
public class DefaultPackageClass
{
} | 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 |
active(ComponentConfigurationDTO.ACTIVE, true, true, true);
/**
* Set the activation failure reason
* @param e The exception which caused the activation to fail
*/
final StringWriter sw = new StringWriter();
final PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
pw.flush();
this.failureReason = sw.toString();
void setState(final State previousState, final State newState)
if ( newState == State.active || newState == State.unsatisfiedReference ) | 0 |
ViewConfig viewConfig = archiveUtility.getViewConfigFromExtractedArchive(extractedArchiveDirPath,
configuration.isViewValidationEnabled()); | 0 |
* @version $Id$ | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/test/org/apache/commons/digester/RuleTestCase.java,v 1.5 2001/10/11 00:28:42 craigmcc Exp $
* $Revision: 1.5 $
* $Date: 2001/10/11 00:28:42 $
* @version $Revision: 1.5 $ $Date: 2001/10/11 00:28:42 $
* It should be possible to parse the same input twice, and get trees
* of objects that are isomorphic but not be identical object instances.
*/
public void testRepeatedParse() {
// Configure the digester as required
digester.addObjectCreate("employee",
"org.apache.commons.digester.Employee");
digester.addSetProperties("employee");
digester.addObjectCreate("employee/address",
"org.apache.commons.digester.Address");
digester.addSetProperties("employee/address");
digester.addSetNext("employee/address",
"addAddress");
// Parse our test input the first time
Object root1 = null;
try {
root1 = digester.parse(getInputStream("Test1.xml"));
} catch (Throwable t) {
fail("Digester #1 threw Exception: " + t);
}
validateObjectCreate3(root1);
// Parse our test input the second time
Object root2 = null;
try {
root2 = digester.parse(getInputStream("Test1.xml"));
} catch (Throwable t) {
fail("Digester #2 threw Exception: " + t);
}
validateObjectCreate3(root2);
// Make sure that it was a different root
assertTrue("Different tree instances were returned",
root1 != root2);
}
/** | 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.atlas.glossary.GlossaryService;
import org.apache.atlas.repository.ogm.profiles.AtlasSavedSearchDTO;
import org.apache.atlas.repository.ogm.profiles.AtlasUserProfileDTO;
import org.apache.atlas.repository.ogm.DTORegistry;
import org.apache.atlas.repository.ogm.DataAccess;
import org.apache.atlas.repository.ogm.DataTransferObject;
import org.apache.atlas.repository.ogm.glossary.AtlasGlossaryCategoryDTO;
import org.apache.atlas.repository.ogm.glossary.AtlasGlossaryDTO;
import org.apache.atlas.repository.ogm.glossary.AtlasGlossaryTermDTO;
import org.apache.atlas.repository.store.graph.v1.AtlasTypeDefGraphStoreV1;
// OGM related mappings
Multibinder<DataTransferObject> availableDTOs = Multibinder.newSetBinder(binder(), DataTransferObject.class);
availableDTOs.addBinding().to(AtlasUserProfileDTO.class);
availableDTOs.addBinding().to(AtlasSavedSearchDTO.class);
availableDTOs.addBinding().to(AtlasGlossaryDTO.class);
availableDTOs.addBinding().to(AtlasGlossaryTermDTO.class);
availableDTOs.addBinding().to(AtlasGlossaryCategoryDTO.class);
bind(DTORegistry.class).asEagerSingleton();
bind(DataAccess.class).asEagerSingleton();
// Glossary related bindings
bind(GlossaryService.class).asEagerSingleton();
| 0 |
* @author <a href="mailto:[email protected]">Christophe Jolif</a> | 1 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
import org.apache.accumulo.core.data.NamespaceId;
import org.apache.accumulo.core.data.TableId;
NamespaceId namespaceId = Namespaces.getNamespaceId(shellState.getContext(),
for (TableId tableId : Namespaces.getTableIds(shellState.getContext(), namespaceId)) { | 0 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.