Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.ambari.server.controller.predicate.ArrayPredicate;
import org.apache.ambari.server.controller.predicate.EqualsPredicate;
* Extracting given query_parameter value from the predicate
* @param queryParameterId query parameter id
* @param predicate predicate
* @return the query parame... | 0 |
import org.apache.hc.client5.http.ClientProtocolException;
import org.apache.hc.client5.http.NonRepeatableRequestException;
import org.apache.hc.client5.http.classic.methods.HttpGet;
import org.apache.hc.client5.http.classic.methods.HttpPost;
import org.apache.hc.client5.http.classic.methods.HttpPut;
import org.apache.... | 0 |
import org.apache.commons.vfs2.FileSystemException;
| 0 |
if (serviceName != null) {
Service svc = cluster.getService(serviceName);
ServiceComponent svcComp = svc.getServiceComponent(componentName);
ServiceComponentHost svcCompHost =
svcComp.getServiceComponentHost(hostname);
svcCompHost.handleEvent(failedEvent);
} e... | 0 |
import org.apache.xml.security.exceptions.XMLSecurityException; | 0 |
@Override
@Override
@Override
@Override
@Override
@Override | 0 |
private final Library library;
private WidgetDefinition superDefinition;
public WidgetDefinitionBuilderContext(Library library) {
this.library = library;
/**
* Create context which inherits library from parent context.
*
* @param parent context to borrow library from
*/
... | 0 |
new SiteConfiguration()) { | 0 |
return URIUtil.encodePath(decodedPath); | 0 |
private String contentEncoding = null;
public void setContentType(final String contentType) {
this.contentType = contentType;
}
public String getContentEncoding() {
return this.contentEncoding;
}
public void setContentEncoding(final String contentEncoding) {
this.conten... | 0 |
import org.apache.accumulo.core.client.Durability;
private Option durabilityOption;
final BatchWriterConfig cfg = new BatchWriterConfig().setMaxMemory(Math.max(m.estimatedMemoryUsed(), 1024)).setMaxWriteThreads(1).setTimeout(getTimeout(cl), TimeUnit.MILLISECONDS);
if (cl.hasOption(durabilityOption.getOpt())) ... | 1 |
import com.google.common.collect.ListMultimap;
import com.google.inject.persist.Transactional;
import org.apache.ambari.server.state.fsm.InvalidStateTransitionException;
/**
* Bulk handle service component host events
*
* @param eventMap serviceName - event mapping
* @return list of failed events
*/
... | 1 |
} else {
this.getLogger().debug("Serching for role=" + role + " in blockId=" + blockId + " that isn't setup.");
} else {
this.getLogger().debug("Serching for role=" + role + " in blockId=" + superId + " that isn't setup."); | 0 |
// The queue is full. We need to wait before adding any more data to it. Hopefully the stream owner
// will consume some data soon!
else
{
// We've been asked to add another character to the queue, but it is already full and there's
... | 0 |
import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException; | 1 |
public ArrayHandler(final RowProcessor convert) {
public Object[] handle(final ResultSet rs) throws SQLException { | 0 |
if (event.getPath() != null) {
try {
if (ZooReaderWriter.getInstance().exists(event.getPath(), this))
return;
} catch (Exception ex) {
log.error(ex, ex);
}
log.warn("Trace server unable to reset watch on zookeeper registration");
server.stop(); | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Supplier; | 0 |
public ConstantInvokeDynamic getInvokeDynamic( ConstantPoolGen cpg ) {
public ConstantNameAndType getNameAndType( ConstantPoolGen cpg ) {
| 0 |
import java.util.List;
private List m_listeners = new ArrayList(); // ListenerInfo List
private List m_regs = new ArrayList();
* @param arg0 : the service listener to remove
// Iterate on the service listener list to notify service listener
List refs = new ArrayList();
... | 0 |
package org.apache.ambari.metrics.core.timeline.source.cache; | 0 |
zkConnectionErrorsTotal =
registry.newGauge(TOTAL_ZK_CONN_ERRORS, "Total ZK Connection Errors", 0L); | 0 |
import cz.seznam.euphoria.core.client.functional.ReduceFunctor;
assertEquals(1L, (long) collectSingle(
producer.getReducer(), Arrays.asList("blah")));
assertEquals(1L, (long) collectSingle(
producer.getReducer(), Arrays.asList("blah")));
private <IN, OUT> OUT collectSingle(
ReduceFunctor... | 0 |
import org.apache.felix.sigil.eclipse.job.ResolveProjectsJob;
//import org.eclipse.core.runtime.IProgressMonitor;
//import org.eclipse.core.runtime.IStatus;
//import org.eclipse.core.runtime.Status;
//import org.eclipse.core.runtime.jobs.Job;
case IResourceChangeEvent.PRE_REFRESH:
ha... | 0 |
public static final DefaultHttpRequestParserFactory INSTANCE = new DefaultHttpRequestParserFactory(); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/util/src/java/org/apache/commons/jelly/tags/util/LoadTextTag.java,v 1.3 2003/10/09 21:21:26 rdonkin Exp $
* $Revision: 1.3 $
* $Date: 2003/10/09 21:21:26 $
* any, must include the following acknowledgement:
*... | 0 |
* @see #getPixelUnitToMillimeter() | 0 |
/** Symmetric Key Wrap - OPTIONAL SEED-128 KeyWrap */
public static final String ALGO_ID_KEYWRAP_SEED128 =
"http://www.w3.org/2007/05/xmldsig-more#kw-seed128";
| 1 |
import org.apache.ambari.server.stack.upgrade.UpgradePack; | 0 |
import org.apache.batik.gvt.filter.Filter;
Filter filter = CSSUtilities.convertFilter(element, gn, ctx);
gn.setFilter(filter); | 0 |
private static final RamFileSystemConfigBuilder singleton = new RamFileSystemConfigBuilder(); | 0 |
public void paint(AttributedCharacterIterator aci, Point2D location,
TextNode.Anchor anchor, Graphics2D g2d) {
TextLayout layout = new TextLayout(aci, fontRenderContext); | 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... | 0 |
bundleCap.getDirectives(),
// TODO: OSGi R4.4 - Eventually we will have an identity capability from OBR
// that we can use instead of this custom singleton capability.
value = (value == null) ? "0.0.0" : value; | 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 |
* @version $Id$ | 0 |
import static org.apache.beam.sdk.io.UnboundedSource.CheckpointMark.NOOP_CHECKPOINT_MARK;
return NOOP_CHECKPOINT_MARK; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/BeanificationTestCase.java,v 1.4 2003/10/09 20:40:07 rdonkin Exp $
* $Revision: 1.4 $
* $Date: 2003/10/09 20:40:07 $
* Alternately, this acknowledgement may appear in the softwar... | 0 |
if (Namespace.ACCUMULO.name().equals(qualifiedName.getFirst())) { | 0 |
import static com.google.common.base.Charsets.UTF_8;
m.put("cf", "cq" + j, new Value(String.format("%016x", val).getBytes(UTF_8))); | 0 |
* @since 2.0 | 1 |
Buffer buffer = new ByteArrayBuffer(path.length() + Long.SIZE);
Buffer buffer = new ByteArrayBuffer(path.length() + Long.SIZE);
Buffer buffer = new ByteArrayBuffer(path.length() + Long.SIZE); | 0 |
for (final String ignored_package : ignored_packages) {
final byte[] bytes = clazz.getBytes();
final int index = class_name.indexOf(BCEL_TOKEN);
final String real_name = class_name.substring(index + BCEL_TOKEN.length());
final byte[] bytes = Utility.decode(rea... | 1 |
* /home/cvs/jakarta-commons/jelly/jelly-tags/junit/src/test/org/apache/commons/jelly/tags/junit/TestJUnit.java,v 1.1 2003/01/21 15:49:29 jstrachan Exp
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party... | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.MoreObjects.toStringHelper; | 0 |
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
impor... | 0 |
/** True if the stream is closed. */
private boolean closed = false;
if (this.closed) {
throw new IOException("Attempted write to closed stream.");
}
write(b, 0, b.length);
if (this.closed) {
throw new IOException("Attempted write to closed stream.");... | 0 |
* Copyright 2001-2004,2006 The Apache Software Foundation
// ifClosure
public void testIfClosure() {
MockClosure b = null;
ClosureUtils.ifClosure(PredicateUtils.truePredicate(), a).execute(null);
assertEquals(1, a.count);
a = new MockClosure();
ClosureUtils.ifClosure(P... | 0 |
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import java.util.Arrays; | 0 |
Element Notaries = doc.createElementNS(null, "Notaries"); | 0 |
import org.apache.accumulo.fate.zookeeper.ZooCache; | 1 |
package org.apache.accumulo.master.recovery;
import org.apache.accumulo.master.Master;
import org.apache.accumulo.server.master.recovery.HadoopLogCloser;
import org.apache.accumulo.server.master.recovery.LogCloser;
long time = closer.close(master.getConfiguration().getConfiguration(), master.getFileSyste... | 1 |
import javax.annotation.Nullable;
@Nullable String message = null;
if (status.hasMessage()) {
message = status.getMessage();
} else if (status.hasData()) {
// TODO(William Farner): Once thermos executor has full deployment, this may be removed.
message = status.getData().toStringUtf8();
... | 0 |
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import java.util.Date;
private CacheEntry newCacheEntry() throws UnsupportedEncodingException {
CacheEntry cacheEntry = new CacheEntry... | 0 |
import org.apache.aurora.common.quantity.Amount;
import org.apache.aurora.common.quantity.Time;
import org.apache.aurora.common.testing.easymock.EasyMockTest; | 0 |
package org.apache.beam.runners.core;
import org.apache.beam.runners.core.GroupAlsoByWindowsProperties.GroupAlsoByWindowsDoFnFactory;
import org.apache.beam.sdk.util.WindowingStrategy;
GroupAlsoByWindowsDoFn<K, InputT, Iterable<InputT>, W> forStrategy( | 0 |
// if no instance of given typeName is found, try to find an instance of type's sub-type
if (vertex == null && !entityType.getAllSubTypes().isEmpty()) { | 0 |
/* $Id: CallMethodRule.java,v 1.35 2004/05/10 06:30:06 skitching Exp $
* | 0 |
.apply(GroupByKey.create()) | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; | 0 |
public BeamSqlPrimitive<T> evaluate(BeamSqlRow inputRow) { | 0 |
String retValue = "";
retValue = new String(get(), Constants.VALUE_ENCODING);
return retValue; | 0 |
import org.apache.hc.core5.annotation.Contract;
import org.apache.hc.core5.annotation.ThreadingBehavior;
@Contract(threading = ThreadingBehavior.STATELESS) | 0 |
*
* @version $Id: AssertValidationRule.java,v 1.4 2004/02/11 09:53:44 antonio Exp $ | 0 |
@SuppressWarnings("unchecked") | 0 |
c.printHelp(shellState, numColumns); | 0 |
package org.apache.beam.sdk.runners.inprocess;
import org.apache.beam.sdk.options.DefaultValueFactory;
import org.apache.beam.sdk.options.PipelineOptions; | 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 |
import ${package}.WordCount;
import com.google.cloud.dataflow.sdk.options.Default;
import com.google.cloud.dataflow.sdk.options.Description;
/**
* Options supported by {@link DebuggingWordCount}.
*
* <p>Inherits standard configuration options and all options defined in
* {@link WordCount.WordCountOptio... | 0 |
import org.apache.sshd.common.util.buffer.Buffer; | 0 |
boolean enhanced = DomHelper.getAttributeAsBoolean(repeaterElement, "enhanced", false);
int pageSize = Integer.MAX_VALUE;
String customPageId = null;
enhanced = true;
initialPage = DomHelper.getAttributeAsInteger(pagesElement, "initial", 1) - 1;
customPageId =... | 0 |
Exception lastException;
} catch (IOException e) {
LOG.info("BigQuery job " + jobRef + " already exists, will not retry inserting it:", e);
LOG.info("Failed to insert job " + jobRef + ", will retry:", e);
LOG.info("BigQuery job {} completed in state DONE", jobRef);
... | 0 |
* Creates the default set of HttpParams by invoking {@link DefaultHttpClient#setDefaultHttpParams(HttpParams)}
*
* @return a new instance of {@link SyncBasicHttpParams} with the defaults applied to it.
*/
@Override
protected HttpParams createHttpParams() {
HttpParams params = new Sy... | 0 |
} else {
conn.requestOutput(); | 0 |
import java.util.HashMap;
static final Map<String, String> DEFAULT_KERBEROS_ENV_MAP;
static {
Map<String, String> map = new HashMap<>();
map.put(KerberosOperationHandler.KERBEROS_ENV_ENCRYPTION_TYPES, "aes des3-cbc-sha1 rc4 des-cbc-md5");
map.put(IPAKerberosOperationHandler.KERBEROS_ENV_KDC_HOSTS, "loc... | 0 |
import static org.junit.Assert.assertEquals;
@Test
public void testFireDeadline() throws Exception {
BoundedWindow window = new IntervalWindow(new Instant(0), new Instant(10));
assertEquals(new Instant(9),
AfterFirst.of(AfterWatermark.pastEndOfWindow(),
AfterWatermark.pastEn... | 0 |
import cz.seznam.euphoria.flink.FlinkElement;
DataSet<FlinkElement<Window, Pair>> tuples;
FlatMapOperator<Object, FlinkElement<Window, Pair>> wAssigned =
FlinkElement wel = (FlinkElement) i;
c.collect(new FlinkElement<>(
wid, stamp, Pair.of(udfKey.apply(el), udf... | 0 |
import org.apache.cocoon.core.container.spring.avalon.AvalonUtils;
this.manager = (ServiceManager)treeBuilder.getContainer().getBeanFactory().getBean(AvalonUtils.SERVICE_MANAGER_ROLE); | 0 |
import mesos.SlaveOffer; | 0 |
// register as listener for configurations | 0 |
* The AuthFuture that is being used by the current auth request. This encodes the state.
// Set up the next round of authentication. Each round gets a new lock. | 0 |
OpAdapter.adapt((Op<String, T, Void>) (inputElement, emitter) -> {})); | 0 |
private static final String USAGE = "Usage: ZooKeeperServerMain port datadir";
try {
ServerConfig.parse(args);
} catch(Exception e) {
LOG.fatal("Error in config", e);
LOG.info(USAGE);
System.exit(2);
} | 0 |
ClientContext context = opts.getServerContext();
final String zTServerRoot = getTServersZkPath(context);
* @param context
* ClientContext
static String getTServersZkPath(ClientContext context) {
requireNonNull(context);
return context.getZooKeeperRoot() + Constants.ZTSERVERS; | 0 |
* <br/>
* <b>WARNING:</b> This interface includes methods for building hierarchies of
* parameters. These methods are clearly marked as <i>not part of the API</i>.
* The handling of default parameters is currently subject to discussions and
* may be changed signifcantly, or removed. Do not try to evaluate, build o... | 0 |
* <p>Using this trigger will only produce output when the watermark passes the end of the {@link
* BoundedWindow window} plus the {@link Window#withAllowedLateness allowed lateness}.
/** The actual trigger class for {@link Never} triggers. */ | 1 |
* @version $Id: ConfigurationFactory.java,v 1.16 2004/09/22 17:17:30 ebourg Exp $
public class ConfigurationFactory
url = ConfigurationUtils.locate(implicitBasePath, getConfigurationFileName());
new FileConfigurationFactory(PropertiesConfiguration.class),
new FileConfigurationFa... | 0 |
* @version $Revision$ $Date$ | 0 |
if (!security.canScan(credentials, new String(textent.getTable()), range, columns, ssiList, ssio, authorizations))
if (!security.canScan(credentials, table, tbatch, tcolumns, ssiList, ssio, authorizations)) | 0 |
* This interface defines some useful constants for describing the various possible numeric types of OGNL.
*
// Order does matter here... see the getNumericType methods in ognl.g.
/** Type tag meaning boolean. */
int BOOL = 0;
/** Type tag meaning byte. */
int BYTE = 1;
/** Type tag meaning... | 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 |
final ContentLengthOutputStream in = new ContentLengthOutputStream(
new SessionOutputBufferMock(), 10L);
in.close(); | 0 |
* <p/>
* This method will also be invoked when an input operation causes an
* IOException to be thrown to make sure the input stream gets shut down. | 0 |
import com.twitter.mesos.scheduler.storage.backup.StorageBackup.StorageBackupImpl.BackupConfig;
storageBackup =
new StorageBackupImpl(snapshotStore, clock, new BackupConfig(backupDir, 5, INTERVAL)); | 0 |
* Tests whether the content of another list can be added.
*/
@Test
public void testAddAll()
{
EventListener<EventBase> l1 = new ListenerTestImpl();
EventListener<EventBase> l2 = new ListenerTestImpl();
EventListener<EventBase> l3 = new ListenerTestImpl();
list.addEv... | 0 |
public static final int NUMB_THREADS = 1000;
@Test
public void testMultiThreaded() throws Exception {
final PersistKeyValueImpl impl = injector.getInstance(PersistKeyValueImpl.class);
Thread[] threads = new Thread[NUMB_THREADS];
for ( int i = 0; i < NUMB_THREADS; ++i ) {
threads[i] = new Thr... | 0 |
import static org.hamcrest.Matchers.emptyIterable;
* impulse -> .out -> mystery -> .out
* \
* -> enigma -> .out
* becomes all runner-executed
*/
@Test
public void unknownTransformsNoEnvironmentBecomeRunnerExecuted() {
Components components =
partialCompone... | 0 |
* The Class BatchInputSplit. Encapsulates a set of Accumulo ranges on a single tablet for use in Map Reduce jobs. Can contain several Ranges per split.
rangeProgress[i] = SplitUtils.getProgress(range.getStartKey().getColumnFamilyData(), range.getEndKey().getColumnFamilyData(),
currentKe... | 0 |
import org.apache.zookeeper.Watcher.Event.EventType;
import org.apache.zookeeper.Watcher.Event.KeeperState;
import org.apache.zookeeper.WatchedEvent;
LinkedBlockingQueue<WatchedEvent> events =
new LinkedBlockingQueue<WatchedEvent>();
public void process(WatchedEvent event) {
if (... | 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 ... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.