Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.ambari.server.hooks.HookContextFactory;
import org.apache.ambari.server.hooks.HookService;
bind(HookService.class).toInstance(EasyMock.createMock(HookService.class));
bind(HookContextFactory.class).toInstance(EasyMock.createMock(HookContextFactory.class)); | 0 |
public static final String CLUSTER_PHASE_PROPERTY = "phase";
public static final String CLUSTER_PHASE_INITIAL_INSTALL = "INITIAL_INSTALL";
public static final String CLUSTER_PHASE_INITIAL_START = "INITIAL_START";
if (!hostComponentAlreadyExists(cluster, scHost) && !(CLUSTER_PHASE_INITIAL_INS... | 0 |
import org.apache.commons.io.IOUtils;
IOUtils.closeQuietly(baos); | 0 |
* Copyright 1999-2009 The Apache Software Foundation.
import java.util.NoSuchElementException;
if (this._alreadyReturned) {
throw new NoSuchElementException();
} | 0 |
clsDef.setEnabledServices(splitServices(line.getOptionValue("services"))); | 0 |
/*
* Copyright 1999-2002,2004-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 requ... | 0 |
* Convenience method for creating a query result object.
*
* @param value the value of this result
* @return the result object
*/
private static QueryResult<Object> result(Object value)
{
return QueryResult.createNodeResult(value);
}
/**
Map<QueryResult<Object>,... | 0 |
import org.apache.commons.dbcp.SQLNestedException;
throw new SQLNestedException("Cannot set the pool on this factory", e); | 0 |
import java.awt.RenderingHints;
import java.awt.font.FontRenderContext;
FontRenderContext frc = fontRenderContext;
RenderingHints rh = node.getRenderingHints();
// Check for optimizeSpeed, optimizeLegibility
// in these cases setup hintedFRC
if ((rh != null) &... | 0 |
* @param <E> the type held in the multiset | 0 |
try (AccumuloClient c = createAccumuloClient()) {
try (AccumuloClient client = createAccumuloClient()) {
try (AccumuloClient client = createAccumuloClient()) {
try (AccumuloClient client = createAccumuloClient()) {
try (AccumuloClient client = createAccumuloClient()) {
try (AccumuloClient c = cr... | 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 |
private final Map<String, Set<String>> INSTANCE_HOST_MAP = new ConcurrentHashMap<>();
AtomicBoolean SYNC_HOSTED_INSTANCES_METADATA = new AtomicBoolean(false);
public Map<String, Set<String>> getHostedInstanceCache() {
return INSTANCE_HOST_MAP;
}
public boolean syncHostedInstanceMetadata() {
return SY... | 0 |
public static <E> BoundedCollection<E> unmodifiableBoundedCollection(final BoundedCollection<E> coll) {
private UnmodifiableBoundedCollection(final BoundedCollection<E> coll) {
public boolean add(final E object) {
public boolean addAll(final Collection<? extends E> coll) {
public boolean remove(fina... | 0 |
* <p>
* The format of a Transactional log is as follows:
* <blockquote><pre>
* LogFile:
* FileHeader TxnList ZeroPad
*
* FileHeader: {
* magic 4bytes (ZKLG)
* version 4bytes
* dbid 8bytes
* }
*
* TxnList:
* Txn || Txn TxnList
*
* Txn:
* checksum Txnlen TxnHeader Record ... | 0 |
import org.apache.beam.sdk.transforms.windowing.WindowFn;
import org.apache.beam.sdk.util.SideInputReader;
private final SideInputReader sideInputReader;
SideInputReader sideInputReader,
this.sideInputReader = sideInputReader;
activeWindows,
windowingStrategy.getWindowFn().windowCoder(),
... | 0 |
throw new ServiceException ("DefaultServiceSelector",
"A FlatServiceSelector can only be hosted by a CocoonServiceManager"); | 0 |
class ASTShiftRight
extends NumericExpression
public ASTShiftRight( int id )
{
super( id );
public ASTShiftRight( OgnlParser p, int id )
{
super( p, id );
protected Object getValueBody( OgnlContext context, Object source )
throws OgnlException
public String getExpress... | 0 |
import static java.util.Objects.requireNonNull;
requireNonNull(path); | 0 |
return Collections.unmodifiableMap(new HashMap<>(map));
return Collections.unmodifiableCollection(new ArrayList<>(col)); | 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 |
* {@link ComponentRegistry#serviceChanged(org.osgi.framework.ServiceEvent)} method called when the
* Configuration Admin service is registered calls #configureComponentHolders which calls this method for all
* existing configurations to be able to forward existing configurations to
... | 0 |
import org.apache.felix.dm.DependencyManager;
import org.apache.felix.dm.annotation.api.Inject;
import org.osgi.framework.BundleContext;
// Check auto config injections
@Inject
BundleContext m_bc;
BundleContext m_bcNotInjected;
@Inject
DependencyManager m_dm;
... | 0 |
* @version CVS $Id: SimpleSessionContext.java,v 1.5 2003/05/04 20:19:40 cziegeler Exp $
if (!path.startsWith("/") ) path = "/" + path;
if (path.endsWith("/")) path = path.substring(0, path.length() - 1);
if ( path == null || path.equals("/")) {
data = DOMUtil.createDocument();
... | 0 |
m.add(m.createComponent().setImplementation(this).setInterface(Sequencer.class.getName(), props));
m.add(m.createComponent().setImplementation(this).setInterface(Sequencer.class.getName(), props)); | 0 |
import org.apache.hc.core5.annotation.NotThreadSafe;
import org.apache.hc.core5.util.CharArrayBuffer; | 1 |
this.environment); | 0 |
Copyright 2000-2002,2005 The Apache Software Foundation
protected int n;
* Returns an array containing all event listener entries.
* Returns an array of EventListeners that match the given namespace URI. | 1 |
* The constructor for a parser, it receives a java.io.Reader.
*
* @param reader The reader
* @throws XmlPullParserException
*/
* Parser from the reader provided in the constructor, and call
* the startElement and endElement in a KxmlHandler
*
* @param handler The handl... | 0 |
import org.apache.sshd.common.util.buffer.Buffer;
import org.apache.sshd.common.util.buffer.ByteArrayBuffer;
Buffer rsBuf = new ByteArrayBuffer();
Buffer rsBuf = new ByteArrayBuffer(sig); | 0 |
import org.apache.beam.sdk.schemas.Schema.FieldType;
.addExpr("NULLIF(5, 5)", null, FieldType.INT32) | 0 |
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.impl.client.builder.HttpClientBuilder;
public abstract class AbstractHttpClient extends CloseableHttpClient {
public final CloseableHttpResponse execute(HttpHost target, HttpRequest request,
CloseableHttpResponse out... | 0 |
LOG.debug("{}: getWatermark() : no records have been read yet.", name); | 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 ap... | 1 |
* @version CVS $Id: PortalServiceImpl.java,v 1.4 2003/06/17 19:59:31 cziegeler Exp $ | 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 |
hiveSite.save(); | 0 |
long length = (long) (numEntries * tmp.length());
afterlh.getLastAddConfirmed() == numEntries - 1);
assertTrue("Has not set the length correctly: " + afterlh.getLength() + ", " + length,
afterlh.getLength() == length); | 0 |
import org.apache.ambari.server.state.HostEvent;
import org.apache.ambari.server.state.HostEventType;
| 0 |
package org.apache.batik.extension.svg; | 1 |
* Copyright (c) OSGi Alliance (2000, 2017). All Rights Reserved.
import org.osgi.annotation.versioning.ConsumerType;
* @author $Id: 3c9016c43c6289259f97470eff4c9986b6fb887a $
@ConsumerType
* This implementation returns the result of calling {@code getService}, on
* created, passing the specified {@code ServiceRe... | 1 |
BlockLocation[] fileBlockLocations =
ns.getFileBlockLocations(fileStatus, 0, fileStatus.getLen()); | 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 |
import org.apache.beam.sdk.coders.MapCoder;
import org.apache.beam.sdk.coders.SetCoder;
import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
import org.apache.beam.sdk.transforms.windowing.WindowFn;
import org.apache.beam.sdk.util.state.StateInternals;
import org.apache.beam.sdk.util.state.StateNamespaces;
im... | 0 |
package org.apache.beam.runners.apex.translation;
import org.apache.beam.runners.apex.translation.operators.ApexParDoOperator;
class ParDoBoundTranslator<InputT, OutputT> implements | 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 |
if (type instanceof AtlasMapType) {
type = ((AtlasMapType)type).getValueType();
}
| 0 |
import org.apache.ambari.server.security.TestAuthenticationFactory;
import org.apache.ambari.server.security.authorization.AuthorizationException;
import org.springframework.security.core.context.SecurityContextHolder;
// Set the authenticated user
// TODO: remove this or replace the authenticated user to test... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/impl/TagScript.java,v 1.13 2002/06/27 14:09:15 jstrachan Exp $
* $Revision: 1.13 $
* $Date: 2002/06/27 14:09:15 $
* $Id: TagScript.java,v 1.13 2002/06/27 14:09:15 jstrachan Exp $
* @versio... | 0 |
throws SecurityException {
SiteConfiguration conf = new SiteConfiguration();
conf = new SiteConfiguration((URL) null, | 0 |
private static final Class<AccumuloRowInputFormat> CLASS = AccumuloRowInputFormat.class; | 0 |
import org.apache.beam.sdk.transforms.display.DisplayData;
@Override
public void populateDisplayData(DisplayData.Builder builder) {
combineFn.populateDisplayData(builder);
}
@Override
public void populateDisplayData(DisplayData.Builder builder) {
keyedCombineF... | 0 |
import org.apache.beam.model.pipeline.v1.MetricsApi.MonitoringInfo; | 0 |
private static final String DEFAULT_NAMESPACE_DISPLAY_NAME = "\"\""; | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(SparkMetricsPusherTest.class);
LOG.warn("Exception caught" + e); | 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 |
repoVersion.setResolved(true); | 0 |
/* ====================================================================
* Copyright (c) 2001-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.11 $ $Date: 2004/01/14 21:34:31 $ | 0 |
package org.apache.felix.dm.lambda.callbacks;
import java.util.Objects;
import org.apache.felix.dm.Component;
/**
* Represents a callback(Component, Service) on an Object instance.
*
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/
@FunctionalInterface
public interface CbComponentServic... | 0 |
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
public class CloseShieldInputStreamTest {
@Before
public void setUp() {
@Test | 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 |
/*
* 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 |
private Text colf;
private Text colq;
public ColumnFQ(Text colf, Text colq) {
if (colf == null || colq == null) {
throw new IllegalArgumentException();
this.colf = colf;
this.colq = colq;
}
public ColumnFQ(Key k) {
this(k.getColumnFamily(), k.getColumnQualifier());
}
public ... | 1 |
package org.apache.accumulo.monitor.servlets;
import org.apache.accumulo.monitor.Monitor;
import org.apache.accumulo.monitor.util.celltypes.TServerLinkType;
import org.apache.accumulo.server.util.TableInfoUtil;
TableInfo summary = TableInfoUtil.summarizeTableStats(status); | 1 |
topic.append("STARTING"); | 0 |
package org.apache.ambari.logfeeder.output;
import org.apache.ambari.logfeeder.metrics.MetricCount;
import org.apache.ambari.logfeeder.util.LogFeederUtil; | 0 |
import java.util.Arrays;
import java.util.List; | 0 |
private static volatile int considered = 0;
private static volatile int hits = 0;
private static volatile int skipped = 0;
private static volatile int created = 0;
// Set the size to 0 or below to skip caching entirely
private static final int MAX_CACHED_SIZE = Integer.getInteger("bcel.maxcache... | 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 m... | 0 |
Filter getFilter()
{
return filter;
}
int getRanking()
{
return ranking;
}
String getPattern()
{
return pattern;
}
{
if (httpService instanceof ExtHttpService) { | 0 |
*
* @since 4.0 | 0 |
static void runDebuggingWordCount(WordCountOptions options) {
public static void main(String[] args) {
WordCountOptions options = PipelineOptionsFactory.fromArgs(args).withValidation()
.as(WordCountOptions.class);
runDebuggingWordCount(options);
} | 0 |
Copyright 2001 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... | 0 |
import java.util.Map;
public static final String DISK_MB = "disk";
final double numCpus;
final Amount<Long, Data> disk;
final Amount<Long, Data> ram;
final int numPorts;
Resources(double numCpus, Amount<Long, Data> ram, Amount<Long, Data> disk, int numPorts) {
this.disk = checkNotNull(disk);
.ap... | 0 |
options.getDefaultLabels(), tablet.getTableConfiguration()); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestListUtils.java,v 1.15 2003/11/16 00:05:47 scolebourne Exp $
import org.apache.commons.collections.list.PredicatedList;
* @version $Revision: 1.15 $ $Date: 2003/11/16 00:05:47 ... | 0 |
Element defs = domFactory.createElement(SVG_DEFS_TAG); | 0 |
import org.apache.thrift.protocol.TCompactProtocol;
import org.apache.thrift.transport.TFramedTransport;
proxy = Proxy.createProxyServer(Class.forName("org.apache.accumulo.proxy.thrift.AccumuloProxy"), Class.forName("org.apache.accumulo.proxy.ProxyServer"),
port, TCompactProtocol.Factory.class, TFramedTrans... | 0 |
for(int ii=0; ii<25; ii++) {
System.out.println("Local Option " + ii + ":" + tc.getLocalOptionState(ii) + " Remote Option " + ii + ":" + tc.getRemoteOptionState(ii));
} | 1 |
import org.apache.accumulo.core.file.blockfile.cache.impl.BlockCacheConfiguration;
import org.apache.accumulo.core.file.blockfile.cache.impl.BlockCacheManagerFactory;
cacheManager = BlockCacheManagerFactory.getInstance(acuConf);
cacheManager.start(new BlockCacheConfiguration(acuConf)); | 0 |
* <li>11,2,3:10,20:*</li>
* <li>ENVELOPE</li>
* IMAPExportMbox imaps://username:password@imap.googlemail.com/messages_for_export exported.mbox 1:10,20<br>
* IMAPExportMbox imaps://username:password@imap.googlemail.com/messages_for_export exported.mbox 3 ENVELOPE<br>
* <p>
* Note that the sequence-set and item nam... | 0 |
* Utility methods for invoking callbacks. Lookups of callbacks are accellerated by using a LRU cache.
*
/**
* Invokes a callback method on an instance. The code will search for a callback method with
* the supplied name and any of the supplied signatures in order, invoking the first one it finds.
... | 0 |
* {@link org.apache.commons.ognl.OgnlException OgnlException}.
* Parses and compiles the given expression using the {@link org.apache.commons.ognl.enhance.OgnlExpressionCompiler} returned from
* {@link org.apache.commons.ognl.OgnlRuntime#getCompiler()}.
* @return The node with a compiled accessor set on... | 0 |
return null;
return null;
return null; | 0 |
import org.apache.aurora.scheduler.state.TaskLimitValidator.TaskLimitValidatorImpl;
bind(TaskLimitValidator.class).to(TaskLimitValidatorImpl.class);
bind(TaskLimitValidatorImpl.class).in(Singleton.class); | 0 |
/*
* Copyright 2006 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 ... | 0 |
@OneToOne(cascade = CascadeType.ALL)
@JoinColumns({
@JoinColumn(name = "short_url", referencedColumnName = "url_id", nullable = true)
})
private ViewURLEntity viewUrl;
/**
* Get the view URL associated with the instance
* @return
*/
public ViewURLEntity getViewUrl() {
return viewUrl... | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 1 |
private volatile boolean released;
released = false;
* @deprecated use {@link #assertValid(OperatedClientConnection)}
@Deprecated
if (isReleased()) {
* @since 4.1
* @return value of released flag
*/
protected boolean isReleased() {
return released;
}
... | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
*... | 0 |
class InternalHttpAsyncClient extends InternalAbstractHttpAsyncClient {
super(ioReactor, pushConsumerRegistry, threadFactory, execChain,
cookieSpecRegistry, authSchemeRegistry, cookieStore, credentialsProvider, defaultConfig, closeables);
AsyncExecRuntime crerateAsyncExecRuntime() {
... | 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 |
package org.apache.felix.sigil.model; | 0 |
public static final String EXT_CHKFILE_HANDLE = "check-file-handle";
public static final String EXT_CHKFILE_NAME = "check-file-name";
public static final int MIN_CHKFILE_BLOCKSIZE = 256;
public static final String EXT_CHKFILE_RESPONSE = "check-file"; | 0 |
try (FileInputStream file = new FileInputStream("target/test-classes/Java8Example.class")) {
ClassParser parser = new ClassParser(file, "Java8Example.class");
new Class2HTML(parser.parse(), outputDir.getAbsolutePath() + "/");
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/locale/converters/BigDecimalLocaleConverter.java,v 1.3 2003/01/15 21:59:43 rdonkin Exp $
* $Revision: 1.3 $
* $Date: 2003/01/15 21:59:43 $
* Copyright (c) 1999-2003 The Apache Softw... | 0 |
import org.apache.beam.runners.core.StateNamespaces.WindowNamespace; | 0 |
* $Revision: 1.9 $
* $Date: 2003/12/26 13:17:33 $
* @version $Id: InstanceKeyDataSource.java,v 1.9 2003/12/26 13:17:33 dirkv Exp $
Object ds = ctx.lookup(dataSourceName);
if (ds instanceof ConnectionPoolDataSource) {
cpds = (ConnectionPoolDataSource) ds;
} else {
... | 0 |
* @version CVS $Id: EPLabel.java,v 1.3 2003/09/05 07:31:40 cziegeler Exp $ | 0 |
*
*
*
public void testIncorrectPassword() throws Exception
public void testClosingWithUserName()
Connection[] c = new Connection[10];
// open all the connections
assertEquals("bar", pcds.getConnectionProperties().getProperty("password")); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.