Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
* @version $Revision$ $Date$ | 0 |
private static final Set<RoleAuthorization> REQUIRED_GET_AUTHORIZATIONS = EnumSet.of(RoleAuthorization.CLUSTER_TOGGLE_KERBEROS,
RoleAuthorization.CLUSTER_VIEW_CONFIGS,
RoleAuthorization.HOST_VIEW_CONFIGS,
RoleAuthorization.SERVICE_VIEW_CONFIGS); | 0 |
assertEquals("d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f",
DigestUtils.digest(MessageDigestAlgorithms.SHA_224,StringUtils.getBytesUtf8("")));
DigestUtils.digest(MessageDigestAlgorithms.SHA_224,StringUtils.getBytesUtf8("The quick brown fox jumps over the lazy dog")))... | 0 |
final Constant c = cp.getConstant(super.getIndex());
final StringTokenizer tok = new StringTokenizer(cp.constantToString(c));
final String signature = getSignature(cpg);
final String signature = getSignature(cpg); | 1 |
context.keyedState(),
context.keyedState(),
@Override
public Instant currentProcessingTime() {
throw new UnsupportedOperationException("Streaming doesn't yet support processing time.");
} | 0 |
out.writeObject(decorated());
setCollection((Collection<E>) in.readObject()); | 0 |
import org.apache.accumulo.core.client.Accumulo;
try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) {
try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) {
try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) { | 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 org.apache.ambari.server.state.State;
State.valueOf(service.getDesiredState()), configs)); | 0 |
fs.delete(dir, true);
fs.delete(fail, true);
| 0 |
void setSocketTimeout(int timeout) throws IOException;
int getSocketTimeout() throws IOException;
boolean isStale();
| 0 |
tlsSession.startTls(sslContext, host, sslBufferMode,
TlsSupport.enforceStrongSecurity(initializer), verifier, handshakeTimeout); | 0 |
import org.junit.Assert;
UtilWaitThread.sleep(1000);
verifySomeData(c, tableName, 1000 * 50 + 1);
private void verifySomeData(Connector c, String tableName, int expected) throws Exception {
Scanner scan = c.createScanner(tableName, EMPTY);
int result = Iterators.size(scan.iterator());
scan.close()... | 0 |
if (c.getRoleCommand().equals(RoleCommand.ACTIONEXECUTE)) {
processActionDeath(cluster.getClusterName(), c.getHostname(), roleStr);
}
if (c.getRoleCommand().equals(RoleCommand.ACTIONEXECUTE)) {
processActionDeath(cluster.getClusterName(), c.getHostname(), ro... | 0 |
* Use <code>transformerClosure</code> if you want that. | 0 |
public Enumeration<String> getKeys()
return new CombinedEnumeration<String>( resourceBundle.getKeys(), defaultResourceBundle.getKeys() ); | 0 |
import org.apache.ambari.server.AmbariException;
* Get the Cluster Name
*/
public String getClusterName();
/**
* Add a new host to the cluster
* @throws AmbariException
*/
public void addHost(String host) throws AmbariException;
/**
* Add a new ServiceComponentHost to the cluster
* @param... | 0 |
transform.setSecureValidation(secureValidation); | 0 |
/*
* File LenientNotOKBean.java
* created by mpo
* on Dec 26, 2003 | 4:01:40 PM
*
* (c) 2003 - Outerthought BVBA
*/
package org.apache.cocoon.woody.samples.bindings;
/**
* LenientNotOKBean
*/
public class LenientNotOKBean extends LenientBaseBean{
public LenientNotOKBean(String initVal) {
su... | 0 |
protected HttpResponse createMessage(final CharArrayBuffer buffer) throws HttpException { | 0 |
import javax.annotation.Nonnull;
* Build an array of filter DTOs from a filter handler array
public static @Nonnull FilterDTO[] build(@Nonnull final FilterHandler[] handlers)
array[i] = build(handlers[i], -1);
public static @Nonnull FilterDTO build(@Nonnull final FilterHandler handler, final in... | 0 |
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.inject.Inject;
import org.apache.atlas.repository.graph.AtlasGraphProvider;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
//fo... | 1 |
/*
* Copyright 2009 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 app... | 0 |
* buttons from the content of a resource bundle. <br> | 0 |
/*
* Copyright 2001-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... | 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 o... | 0 |
package org.apache.zookeeper.jmx.server;
import org.apache.jute.BinaryOutputArchive;
import org.apache.zookeeper.jmx.ZKMBeanInfo;
org.apache.zookeeper.server.DataTree dataTree;
public DataTreeBean(org.apache.zookeeper.server.DataTree dataTree){
* @see org.apache.zookeeper.jmx.server.DataTreeMBean#getDataSi... | 0 |
* @version $Revision$ $Date$ | 0 |
import cz.seznam.euphoria.shaded.guava.com.google.common.collect.Iterables; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/example/org/apache/commons/validator/example/ValidateExample.java,v 1.7 2003/05/22 03:12:18 dgraham Exp $
* $Revision: 1.7 $
* $Date: 2003/05/22 03:12:18 $
* @version $Revision: 1.7 $ $Date: 2003/05/22 03:12:18 $
... | 0 |
import org.apache.aurora.scheduler.storage.Storage.MutateWork.NoResult;
storage.write((NoResult.Quiet) (Storage.MutableStoreProvider storeProvider) -> {
for (TaskStatus status : updates) {
ScheduleStatus translatedState = Conversions.convertProtoState(status.getState());
State... | 0 |
import java.nio.charset.StandardCharsets;
md4.update(input.getBytes(StandardCharsets.US_ASCII)); | 0 |
HashMap<String, String> attrs = getPseudoAttributes();
String type = attrs.get("type");
String title = attrs.get("title");
String media = attrs.get("media");
String href = attrs.get("href");
String alternate = attrs.get... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/FloatTest.java,v 1.11 2003/08/23 02:24:07 rleland Exp $
* $Revision: 1.11 $
* $Date: 2003/08/23 02:24:07 $
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* ... | 0 |
import org.apache.http.HttpRequest;
import org.apache.http.nio.NHttpMessageWriterFactory;
* SSLSetupHandler, NHttpMessageParserFactory, NHttpMessageWriterFactory,
* ByteBufferAllocator, ConnectionConfig)}
final NHttpMessageWriterFactory<HttpRequest> requestWriterFactory,
this(new Defau... | 0 |
MASTER_BULK_TIMEOUT("master.bulk.timeout", "5m", PropertyType.TIMEDURATION, "The time to wait for a tablet server to process a bulk import request"),
MASTER_MINTHREADS("master.server.threads.minimum", "20", PropertyType.COUNT, "The minimum number of threads to use to handle incoming requests."),
TSERV_BULK_TIMEOU... | 0 |
p.traverseTopologically(new Pipeline.PipelineVisitor.Defaults() {}); | 0 |
return tableInfo.tableId.canonical(); | 0 |
Assert.assertEquals(3, definitions.size()); | 0 |
public SecurityToken getSecurityToken(KeyInfoType keyInfoType,
SecurityToken.KeyInfoUsage keyInfoUsage,
return getSecurityToken(keyValueType, securityProperties.getCallbackHandler(), securityContext);
securityProperties.getCal... | 0 |
* or more contributor license agreements. See the NOTICE file
* regarding copyright ownership. The ASF licenses this file
* with the License. You may obtain a copy of the License at
* KIND, either express or implied. See the License for the | 0 |
* </p>
| 0 |
switch (type.getInternalType()) { | 0 |
private Trigger<IntervalWindow>.TriggerContext isTriggerContext() { | 0 |
import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
clazz = AccumuloVFSClassLoader.loadClass(cl.getOptionValue(interpreterOpt.getOpt()), ScanInterpreter.class);
clazz = AccumuloVFSClassLoader.loadClass(cl.getOptionValue(formatterInterpeterOpt.getOpt()), ScanInterpreter.class);
... | 0 |
import org.apache.commons.jxpath.JXPathAbstractFactoryException;
throw new JXPathAbstractFactoryException("Factory " + factory
+ " could not create an object for path: " + asPath()); | 0 |
/** {@link org.apache.commons.logging} logging facility */
static org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory.getLog(X509SKIResolver.class.getName());
log.debug("Can I resolve " + element.getTagName() + "?");
log.debug("I can't");
log.debug("Yes ... | 0 |
package org.apache.atlas.repository.store.graph.v2;
public class AtlasEntityDefStoreV2 extends AtlasAbstractDefStoreV2<AtlasEntityDef> {
private static final Logger LOG = LoggerFactory.getLogger(AtlasEntityDefStoreV2.class);
public AtlasEntityDefStoreV2(AtlasTypeDefGraphStoreV2 typeDefStore, AtlasTypeRegistry t... | 1 |
try {
ViewRegistry.getInstance().installViewInstance(toEntity(properties));
} catch (org.apache.ambari.view.SystemException e) {
throw new AmbariException("Caught exception trying to create view instance.", 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 not... | 0 |
* @version $Id$ | 0 |
static List<String> parts(Object... parts) {
List<String> result = new ArrayList<String>();
for (Object obj : parts) {
result.add(obj.toString());
return result;
}
@Test
public void testJoin() {
assertEquals(StringUtil.join(parts(), ","), "");
assertEquals(StringUtil.join(parts("... | 1 |
final String servletPath = "/".equals(getAlias()) ? "" : getAlias(); // XXX handle wildcard aliases!
// See section 9.4 of Servlet 3.0 spec
// Since we're already created this RequestDispatcher for *this* servlet handler, we do not need to
// After a forward has taken pla... | 0 |
@org.junit.Test
@org.junit.Test
@org.junit.Test
@org.junit.Test
@org.junit.Test | 0 |
public void encode(Person value, OutputStream outStream)
LONG_CODER.encode(value.id, outStream);
STRING_CODER.encode(value.name, outStream);
STRING_CODER.encode(value.emailAddress, outStream);
STRING_CODER.encode(value.creditCard, outStream);
STRING_CODER.encode(value.city, outStream);... | 0 |
LOG.debug("I could find a key using the per-KeyInfo key resolvers");
LOG.debug("I couldn't find a key using the per-KeyInfo key resolvers");
LOG.debug("I could find a key using the system-wide key resolvers");
LOG.debug("I couldn't find a key using the system-wide key resolvers")... | 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... | 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 org.apache.sshd.util.BaseTestSupport;
public class PortForwardingTest extends BaseTestSupport {
assertTrue("socket is not connected", socket.isConnected());
assertFalse("socket should not be closed", socket.isClosed());
assertTrue("socket has not closed", socket.isClosed()); | 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... | 0 |
public abstract FileBasedWriteOperation<T> createWriteOperation(); | 0 |
* This is the main, starting class of the Bundle. It initializes and disposes
private BundleActivator statusActivator;
private static final String STATUS_ACTIVATOR = "org.apache.felix.status.impl.Activator";
public void start( final BundleContext bundleContext ) throws Exception
try
{
... | 0 |
import static org.junit.Assert.assertEquals;
assertEquals("Read(NoopNamedSource)", read.getKindString());
assertEquals("Read(AnonymousSource)", read.getKindString()); | 0 |
m_Listener.activate( bundleContext ); | 0 |
public final static String SVG_BROKEN_LINK_DOCUMENT_PROPERTY = | 0 |
* Autogenerated by Thrift Compiler (0.12.0)
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)")
public @org.apache.thrift.annotation.Nullable java.util.List<TIteratorSetting> iterators; // required
@org.apache.thrift.annotation.Nullable
@org.apache.thrift.annotation.Nullable
@o... | 0 |
import org.apache.http.HeaderIterator;
for (HeaderIterator it = message.headerIterator(); it.hasNext(); ) {
Header header = it.nextHeader(); | 0 |
import org.apache.ambari.spi.RepositoryType; | 0 |
* Parses a request line from the given buffer containing one line of text.
* @param buffer a buffer holding a line to parse
RequestLine parseRequestLine(CharArrayBuffer buffer) throws ParseException;
* Parses a status line from the given buffer containing one line of text.
* @param buffer ... | 0 |
public LocalityGroupIterator(LocalityGroup[] groups) { | 0 |
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType; | 0 |
package org.apache.felix.karaf.shell.wrapper;
import org.apache.felix.karaf.shell.console.OsgiCommandSupport; | 0 |
import org.apache.http.Consts;
SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, Consts.ASCII);
SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, Consts.ASCII);
SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128, Consts.ASCII);
SessionO... | 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... | 0 |
return new ArrayList<>();
final List<E> list = new ArrayList<>();
final List<E> list = new ArrayList<>();
final List<E> adds = new ArrayList<>();
final List<Object> originalList = new ArrayList<>(); | 1 |
import org.apache.felix.ipojo.parser.ParseUtils;
* Listened topics.
return EventUtil.matches(topic, ParseUtils.split(m_topics, ","));
* Is the subscriber metadata valid ? This method check only the existence of a callback and a name attribute.
* Create and set the filter. The filter is create fro... | 0 |
package org.apache.accumulo.cloudtrace.thrift; | 0 |
import org.apache.cocoon.util.AbstractLogEnabled;
public class BlockContextSourceFactory extends AbstractLogEnabled
implements SourceFactory, Serviceable, ThreadSafe {
* @see Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
/**
* @see SourceFac... | 0 |
return input.apply(CreatePCollectionView.<T, List<T>>of(PCollectionViews.listView(
input.getPipeline(), input.getWindowingStrategy(), input.getCoder()))); | 0 |
* value zero '\000' in the source byte array.
| 0 |
if (obj == null)
return "-";
if (status.host == null)
return "--Unknown--"; | 1 |
return ImmutableList.of(DataflowPipelineOptions.class);
return ImmutableList.of(DataflowRunner.class, TestDataflowRunner.class); | 0 |
FileSystem(final int maxFileLength, final int maxPathLength, final char[] illegalFileNameChars,
final String[] reservedFileNames) { | 0 |
return "Starts Accumulo proxy"; | 0 |
* "License"); you may not use this file except in compliance
* distributed under the License is distributed on an "AS IS" BASIS, | 0 |
package org.apache.bcel.generic;
public class AnnotationGen
{
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestCollectionUtils.java,v 1.33 2003/12/29 01:18:23 scolebourne Exp $
* @version $Revision: 1.33 $ $Date: 2003/12/29 01:18:23 $ | 0 |
import org.apache.http.entity.ContentType;
protected void onEntityEnclosed(final HttpEntity entity, final ContentType contentType) {
}
@Override | 0 |
import org.apache.commons.jxpath.ri.InfoSetUtil;
if (!(predicates[count - 1] instanceof NameAttributeTest)){
if (!(predicates[count - 1] instanceof NameAttributeTest)){
Object value = predicate.computeValue(context);
return (int)(InfoSetUtil.doubleValue(value) + 0.5) - 1;
... | 0 |
LOG.info("Initialized Ambari DB Metrics Source...");
LOG.info("Started Ambari DB Metrics source..."); | 0 |
Set<SubResourceDefinition> children = new HashSet<>(); | 0 |
package org.apache.hc.core5.reactor; | 1 |
private boolean isValid;
private boolean bufferEvents;
/** Widgets that need to be updated in the client when in AJAX mode */
/** Widgets that have at least one descendant that has to be updated */
/** Optional id which overrides the value from the form definition */
this.listener.phas... | 0 |
* WARNING: Due to human error certain binary incompatibilities were introduced
* @version $Id$
* Use <code>EmptyIterator.INSTANCE</code> for compatibility with Commons Collections 2.1.1.
* Use <code>EmptyListIterator.INSTANCE</code> for compatibility with Commons Collections 2.1.1.
* Use <code>EmptyIte... | 0 |
private final Map<FileName, FileObject> cache = new HashMap<FileName, FileObject>(); | 0 |
Map<String, List<? extends SingularAttribute<?, ?>>> mapping = new HashMap<>(); | 1 |
Set<HostVersionEntity> hostVersionsAllowed = new HashSet<HostVersionEntity>();
hostVersionsAllowed.add(hostVersion);
// May need to first transition to UPGRADED
outSB.append(String.format("Will finalize the upgraded state of host components in %d host(s).\n", hostVersionsAllowed.size()));
... | 0 |
public MinIntegerFn() {
super(Integer.MAX_VALUE);
}
public MinLongFn() {
super(Long.MAX_VALUE);
}
public MinDoubleFn() {
super(Double.POSITIVE_INFINITY);
} | 0 |
import org.apache.beam.sdk.state.BagState;
import org.apache.beam.sdk.state.CombiningState;
import org.apache.beam.sdk.state.GroupingState;
import org.apache.beam.sdk.state.ReadableState;
import org.apache.beam.sdk.state.ValueState; | 0 |
@Description("The path to the gcloud binary. "
+ " Default is to search the system path.")
String getGCloudPath();
void setGCloudPath(String value);
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.