Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.atlas.TestModules;
@Guice(modules = TestModules.TestOnlyModule.class) | 0 |
* Autogenerated by Thrift Compiler (0.9.3)
import javax.annotation.Generated;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2015-12-16")
public class IteratorConfig implements org.apache.thrift.TBase<IteratorConfig, Itera... | 0 |
put("timeline.metrics.service.default.result.limit", String.valueOf(5760));
put("timeline.metrics.cluster.aggregator.minute.interval", String.valueOf(1000));
put("timeline.metrics.host.aggregator.minute.interval", String.valueOf(1000));
put("timeline.metrics.service.default.result.limit"... | 0 |
// Save the prefix of the log file paths
hostObject.setPrefix(register.getPrefix());
| 1 |
oldContentHandler = digester.getCustomContentHandler();
getDigester().setCustomContentHandler(oldContentHandler);
* When this method fires, the digester is told to forward all SAX
* ContentHandler events to the builder object, resulting in a DOM being
* handler is restored... | 0 |
/**
* The component manager given by the upper level
* (root manager or parent concrete processor)
*/
protected ServiceManager manager;
enableLogging(parent.getLogger());
this.manager = parent.concreteProcessor.getComponentInfo().getServiceManager();
this.resolver = (Sourc... | 0 |
Object condition = node.jjtGetChild(0).jjtAccept(this, data);
Object lhs = node.jjtGetChild(0).jjtAccept(this, data);
&& !(context.has(name))) {
if (object == null) { | 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 applica... | 0 |
// Implementation methods | 0 |
package org.apache.ambari.logsearch.model.response;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel
@JsonIgnoreProperties(ignoreUnknown = true)
public class CountData {
@ApiModelProperty
private String na... | 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 ... | 0 |
@SuppressWarnings("serial") | 0 |
@Override
public void visit(State state, Properties props) throws Exception {
Connector conn = state.getConnector();
Random rand = (Random) state.get("rand");
@SuppressWarnings("unchecked")
List<String> tableNames = (List<String>) state.get("tables");
String tableName = tableNames.g... | 1 |
/* ====================================================================
* Copyright (c) 2003-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.4 $ $Date: 2004/01/14 21:34:34 $ | 0 |
import org.apache.http.annotation.Immutable; | 0 |
public static final String CONSUMER_RETRY_INTERVAL="atlas.notification.consumer.retry.interval";
private final int consumerRetryInterval;
consumerRetryInterval = applicationProperties.getInt(CONSUMER_RETRY_INTERVAL, 500);
LOG.warn("Error handling message" + e.getMessage());
... | 0 |
try (final CloseableHttpAsyncClient client = HttpAsyncClients.custom() | 0 |
GroupReducer reducer = new GroupReducer<>(
FlinkElement::new, | 0 |
*/
private final Map<InstructionContext, Frame> outFrames; // key: the last-executed JSR
* The 'execution predecessors' - a list of type InstructionContext
*/
// new inFrame is already merged in, see above.
// default case: Fall through.
/**
/**
} | 0 |
* In ASCII mode, if convertCRtoCRLF is true (currently always true), any CR is converted to CRLF.
* Also a bare LF is converted to CRLF and a bare CR is converted to CR\0
case '\n':
if (!__lastWasCR) { // convert LF to CRLF
__client._sendByte('\r');
... | 0 |
@Test
public void testGetRequestsByStatus() throws AmbariException {
List<Long> requestIds = new ArrayList<Long>();
requestIds.add(requestId + 1);
requestIds.add(requestId);
populateActionDB(db, hostName, requestId, stageId);
clusters.addHost("host2");
clusters.getHost("host2").persist();
... | 0 |
* @version CVS $Id: EmptySelectionList.java,v 1.2 2004/03/09 13:08:46 cziegeler Exp $
contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, Constants.EMPTY_ATTRS);
contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.... | 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 ... | 0 |
if (!(e instanceof CSSStylableElement))
return false; // Can't match an unstylable element. | 0 |
import com.sun.jersey.core.util.MultivaluedMapImpl;
import javax.ws.rs.core.MultivaluedMap;
import java.util.Collections;
import static org.testng.Assert.*;
MultivaluedMap<String, String> filterParams = new MultivaluedMapImpl();
filterParams.add(SearchFilter.PARAM_TYPE, "ENTITY");
MultivaluedMap... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/decorators/Attic/TestPredicatedBag.java,v 1.3 2003/09/20 17:05:36 scolebourne Exp $
import java.util.Set;
import org.apache.commons.collections.TestBag;
* @version $Revision: 1.3... | 0 |
* Copyright 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 ap... | 0 |
// Add sequence for hostcomponentstate id
addSequence("hostcomponentstate_id_seq", id.get(), false);
| 0 |
* @version CVS $Id: JavascriptLanguage.java,v 1.2 2003/10/07 15:13:20 tcurdt Exp $
return XSLTExtension.escapeJavaString(constant); | 0 |
script.execute(new MapContext(payload));
public static class Foo245 {
private Object bar = null;
void setBar(Object bar) {
this.bar = bar;
}
public Object getBar() {
return bar;
}
}
@Test
public void test245() throws Exc... | 0 |
public enum HttpAuthenticationMechanism {
/**
* No security.
*/
NONE,
Arg.create(HttpAuthenticationMechanism.NONE);
private final HttpAuthenticationMechanism mechanism;
this(HTTP_AUTHENTICATION_MECHANISM.get(), SHIRO_REALM_MODULE.get());
this(HttpAuthenticationMechanism.BASIC, Immut... | 0 |
import org.apache.accumulo.core.iterators.system.InterruptibleIterator;
import org.apache.accumulo.core.iterators.system.LocalityGroupIterator;
import org.apache.accumulo.core.iterators.system.LocalityGroupIterator.LocalityGroup;
import org.apache.accumulo.core.util.MutableByteSequence;
import org.apache.commons.lang.m... | 0 |
import org.apache.flink.test.util.AbstractTestBase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class TopWikipediaSessionsTest extends AbstractTestBase implements Serializable {
@Before
public void preSubmit() throws Exception {
@After
public void postSubmit() throws Exception... | 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 u... | 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... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/bidimap/TestAll.java,v 1.4 2003/12/30 21:56:17 scolebourne Exp $
* @version $Revision: 1.4 $ $Date: 2003/12/30 21:56:17 $
suite.addTest(TestAbstractOrderedBidiMapDecorator... | 0 |
* @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a> | 0 |
import org.apache.accumulo.core.client.Instance;
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.TestName;
private Connector conn;
@Rule
public TestName test = new TestName();
@Before
public void setupInstance() throws Exception {
Instance instance = new org.apache.accumulo.core.c... | 0 |
/**
* 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
* distribu... | 0 |
* Gets the system info. e.g. Available schemes, provider configuration builder, ...
SystemInfo getSystemInfo();
* The class to use to determine the content-type (mime-type)
*
* @return
FileContentInfoFactory getFileContentInfoFactory(); | 0 |
import org.apache.commons.digester3.binder.SetTopBuilder;
protected void bindRule( LinkedRuleBuilder linkedRuleBuilder, String methodName, String paramType )
SetTopBuilder builder = linkedRuleBuilder.setTop( methodName );
if ( paramType != null && paramType.length() > 0 )
{
buil... | 0 |
private static final long serialVersionUID = -9135052498044877965L;
| 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 u... | 0 |
builder.append(node.isSafe() ? "?." : ".");
if (node.isExpression()) {
builder.append('`');
builder.append(image.replace("`", "\\`"));
builder.append('`');
} else if (needQuotes(image)) {
builder.append('\'');
builder.append(image.repla... | 1 |
final TlsStrategy tlsStrategy) {
super(ioReactorConfig, eventHandlerFactory, connPool, tlsStrategy); | 0 |
import org.apache.commons.beanutils.DynaProperty; | 0 |
*
* @version $Id: AbstractDatatypeWidgetDefinitionBuilder.java,v 1.6 2004/02/11 10:43:30 antonio Exp $ | 0 |
import org.apache.accumulo.cloudtrace.instrument.Tracer;
mmi = client.getMasterStats(Tracer.traceInfo(), SecurityConstants.getSystemCredentials());
GCMonitorService.Client client = ThriftUtil.getClient(new GCMonitorService.Client.Factory(), address, config.getConfiguration());
result =... | 1 |
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.apache.ambari.server.api.resources.ResourceInstance;
import org.apache.ambari.server.controller.spi.Resource;
import org.apache.ambari.server.orm.entities.ViewEntity;
import org.apache.ambari.server.orm.entities.ViewInstanceEntity; | 0 |
/**
* Copyright 2013 Apache Software Foundation | 0 |
TreeSet<FTPFile> sorted = new TreeSet<FTPFile>(new Comparator<Object>() { | 0 |
import org.apache.accumulo.core.metadata.MetadataTable;
import org.apache.accumulo.core.metadata.RootTable;
/**
* current version reflects the addition of a separate root table (ACCUMULO-1481)
*/
public static final int DATA_VERSION = 6;
public static final int PREV_DATA_VERSION = 5;
return prefix(ge... | 1 |
import org.apache.beam.runners.spark.translation.streaming.utils.TestPipelineOptionsForStreaming;
public TestPipelineOptionsForStreaming pipelineOptions = new TestPipelineOptionsForStreaming();
SparkPipelineOptions options = pipelineOptions.withTmpCheckpointDir(checkpointParentDir); | 0 |
import static com.google.common.base.Preconditions.checkNotNull;
this.logFactory = checkNotNull(logFactory);
this.readerFactory = checkNotNull(readerFactory);
this.readTimeout = checkNotNull(readTimeout);
this.writerFactory = checkNotNull(writerFactory);
this.writeTimeout = checkNotNull(writeTimeou... | 0 |
* @param opts
*
*
*
* @param opts
*
| 0 |
public void setUp() throws Exception {
initServer();
initClient();
public void tearDown() throws Exception {
shutDownClient();
shutDownServer(); | 0 |
import org.apache.sshd.client.session.ClientConnectionService;
import org.apache.sshd.client.session.ClientUserAuthService;
if (getServiceFactories() == null) {
setServiceFactories(Arrays.asList(
new ClientUserAuthService.Factory(),
new ClientConnectionService... | 0 |
import javax.servlet.http.HttpServlet;
/** Endpoint service registration property from RFC 189 */
private static final String REG_PROPERTY_ENDPOINTS = "osgi.http.service.endpoints";
/** Framework property containing the endpoint registration information (optional). */
private static final String FELI... | 0 |
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JComboBox;
import javax.swing.JDesktopPane;
import javax.swing.JEditorPane;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JInternalFrame;
import jav... | 0 |
try {
channel.close();
} catch (final IOException ignore) {} | 0 |
result = dummySource.<WindowedValue<T>>flatMap((s, collector) -> {
// never return anything
result = result.filter(tWindowedValue -> true).name("UnionFixFilter"); | 0 |
@SuppressWarnings("deprecation")
conf.set(Property.INSTANCE_DFS_URI, "file:///");
conf.set(Property.INSTANCE_DFS_DIR, "/"); | 0 |
import com.twitter.common.util.BuildInfo;
import com.twitter.mesos.gen.comm.ExecutorStatus;
import java.util.Properties;
import java.util.Queue; | 0 |
public class HttpResources {
GuicedProcess.registerHttpResource(binder, "/js/mootools-core.js", HttpResources.class,
GuicedProcess.registerHttpResource(binder, "/js/mootools-more.js", HttpResources.class,
GuicedProcess.registerHttpResource(binder, "/js/tit.js", HttpResources.class,
GuicedProcess.registe... | 0 |
if (isAdmin(session)) {
LOG.info("Granting kill query to admin user: " + query);
} else {
try {
validateSessionKeyForTasks(session, new Query(query));
} catch (AuthFailedException e) {
response.setResponseCode(AUTH_FAILED).setMessage(e.getMessage());
return response;
... | 0 |
package org.apache.felix.dm.lambda.callbacks;
import java.util.Objects;
/**
* Represents a callback(Service) on an Object instance.
*
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/
@FunctionalInterface
public interface CbService<S> {
/**
* Handles the given argument.
* @p... | 0 |
public String getCheckedForeignKey(String tableName, String fkName) throws SQLException {
DatabaseMetaData metaData = getDatabaseMetaData();
ResultSet rs = metaData.getImportedKeys(null, null, convertObjectName(tableName));
if (rs != null) {
try {
while (rs.next()) {
if (StringUt... | 0 |
package org.apache.commons.ognl; | 0 |
* The id for the "selection started" event.
*/
public static final int SELECTION_START = 4;
/** | 0 |
String attrName = evt.getAttrName();
if (attrName.equals(SVG_POINTS_ATTRIBUTE)) { | 0 |
* @version CVS $Id: CachedResponse.java,v 1.4 2003/08/06 09:26:44 cziegeler Exp $
* @param validityObject The SourceValidity object
* @param response The cached sax stream or character stream
*/
public CachedResponse(SourceValidity validityObject,
byte[] ... | 0 |
@Override
@Override | 0 |
KeyResolverSpi tmp = cloneIfNeeded();
if (!tmp.engineCanResolve(element, BaseURI, storage))
return null;
return tmp.engineResolvePublicKey(element, BaseURI, storage);
}
private KeyResolverSpi cloneIfNeeded() throws KeyResolverException {
KeyResolverSpi tmp=this;
if (g... | 0 |
for (Method method : methods)
for (ParameterAnnotationEntry parameterAnnotation : parameterAnnotations) | 0 |
import org.apache.accumulo.trace.thrift.RemoteSpan;
*
| 0 |
hdb.insertMetricRecordsWithMetadata(metadataManager, timelineMetrics, true); | 0 |
// set propertyProvider2 as the default provider
VersioningPropertyProvider provider = new VersioningPropertyProvider(clusterVersionsMap, providers,
propertyProvider2, PropertyHelper.getPropertyId("HostRoles", "cluster_name"));
// test resource with no associated cluster ... should go to default p... | 0 |
import java.nio.channels.FileChannel;
FileChannel input = new FileInputStream(srcFile).getChannel();
FileChannel output = new FileOutputStream(destFile).getChannel();
output.transferFrom(input, 0, input.size()); | 1 |
return "scans for and displays a single entry";
timestampOpt = new Option("st", "show-timestamps", false, "enable displaying timestamps");
disablePaginationOpt = new Option("np", "no-pagination", false, "disable pagination of output");
tableOpt = new Option(Shell.tableOption, "tableName", true, "table t... | 0 |
/** {@inheritDoc} */
@Override
public Object structuralValue(Short value) {
return value;
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/locale/converters/DateLocaleConverter.java,v 1.5 2003/03/09 21:25:17 rdonkin Exp $
* $Revision: 1.5 $
* $Date: 2003/03/09 21:25:17 $
import org.apache.commons.logging.LogFactory;
imp... | 0 |
return handleRequest(headers, ui, Request.Type.GET,
return handleRequest(headers, ui, Request.Type.GET, | 1 |
DOMSignatureMethod(AlgorithmParameterSpec params)
if (params != null &&
| 0 |
public NodeUpdateData(final Map<QueryResult<T>, Object> changedValues,
final Collection<Object> newValues,
final Collection<QueryResult<T>> removedNodes, final String key)
private static <K, V> Map<K, V> copyMap(final Map<? extends K, ? extends V> map)
private static <T> Collection<T... | 0 |
import org.apache.ambari.server.controller.spi.Predicate; | 0 |
* @version $Revision: 1.7 $ $Date: 2004/05/10 20:09:52 $
manager.addProvider("sftp", new SftpFileProvider()); | 0 |
/*
* Copyright 2002, 2003,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 requi... | 0 |
protected static final String SCHEMA_IS_NOT_SUPPORTED_MESSAGE =
"Configuration format provided in Blueprint is not supported";
throw new IllegalArgumentException(SCHEMA_IS_NOT_SUPPORTED_MESSAGE); | 0 |
return DigestUtils.shaHex(in); | 0 |
* @throws AccumuloSecurityException
* @since 1.5.0
* @since 1.5.0
* @since 1.5.0
* @since 1.5.0 | 0 |
* Copyright 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 ap... | 0 |
if (response.getStatusLine().getStatusCode() >= HttpStatus.SC_SUCCESS) { | 0 |
private Map<QName, String> attributes = new HashMap<>();
private List<PropertyInfo> properties = new ArrayList<>();
private Set<String> errorSet = new HashSet<>(); | 1 |
import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
import org.apache.maven.project.DefaultProjectBuildingRequest;
import org.apache.maven.project.ProjectBuildingRequest;
ProjectBuildingRequest projectBuilderConfiguration = new DefaultProjectBuildingRequest();
ArtifactRepositoryL... | 0 |
cr.setRoleCommand("INSTALL");
Role.DATANODE, null, RoleCommand.INSTALL);
cr.setRoleCommand("INSTALL");
cr.setRoleCommand("INSTALL");
cr1.setRoleCommand("INSTALL");
cr2.setRoleCommand("INSTALL");
cr1.setRoleCommand("INSTALL");
cr2.setRoleCommand("INSTALL"); | 0 |
JexlContext jc = new MapContext();
JexlContext jc = new MapContext();
JexlContext jc = new MapContext();
jc.set("i", Integer.valueOf(5));
jc.set("k", Integer.valueOf(7));
jc.set("k", "7");
JexlContext jc = new MapContext();
JexlContext jc = new MapContext(... | 0 |
int xVal = (int) (readShort( is ) * xSign * scaleXY);
x1 = (int) (readShort( is ) * xSign * scaleXY);
x2 = (int) (readShort( is ) * xSign * scaleXY);
int xVal = (int) (readShort( is ) * xSign * scaleXY); | 0 |
PublicKey key = keyEntry.resolvePublicKey(
null, Collections.emptyMap(), PublicKeyEntryResolver.FAILING); | 0 |
* @version CVS $Id: AbstractStreamWriteableSource.java,v 1.2 2003/03/16 17:49:10 vgritsenko Exp $ | 0 |
import org.apache.felix.webconsole.WebConsoleUtil;
try
WebConsoleUtil.keyVal( jw, key, value );
}
catch ( JSONException je )
{
// don't care | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.