Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
* controllers. For all of them the {@code checkForReloading()}
* method is called, giving them the chance to trigger a reload if
* necessary. If one of these calls returns <b>true</b>, the result of
* this method is <b>true</b>, otherwise <b>false</b>.
boolean result = fa... | 0 |
import org.apache.sshd.server.channel.ChannelSession;
public void start(ChannelSession channel, Environment env) throws IOException {
public void destroy(ChannelSession channel) {
public Command createCommand(ChannelSession channel, String command) { | 0 |
stubPasswords();
private void stubPasswords(){
if(propertiesTypes != null && propertiesTypes.containsKey(PropertyInfo.PropertyType.PASSWORD)) {
for(String pwdPropertyName: propertiesTypes.get(PropertyInfo.PropertyType.PASSWORD)) {
if(configs.containsKey(pwdPropertyName)){
String stub ... | 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 |
// TODO: The id should be associated with the OutgoingMessage so that it is stable
// across retried bundles
@Override
public boolean isEOF() {
return false;
} | 0 |
* @version $Id$ | 1 |
super(org.apache.commons.bcel6.Const.NEW, index); | 0 |
if ( current != desc ) {
iLog.addWarning(" Component " + componentDesc.getName() + " is using the " +
"deprecated inheritance feature and inherits from " + current.getDescribedClass().getName() +
". This feature... | 0 |
newInstance = this.getClass().getDeclaredConstructor().newInstance(); | 0 |
/** The result of a {@link Gauge} metric. */
/** Empty {@link GaugeResult}, representing no values reported. */
private EmptyGaugeResult() {} | 1 |
import java.util.TreeSet;
import org.apache.accumulo.core.client.BatchWriterConfig;
BatchWriter bw = getConnector().createBatchWriter("foo", new BatchWriterConfig()); | 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... | 1 |
import org.apache.cocoon.portal.layout.LayoutException;
import org.apache.cocoon.portal.om.CopletDefinitionFeatures;
import org.apache.cocoon.portal.om.CopletInstance;
import org.apache.cocoon.portal.om.CopletLayout;
import org.apache.cocoon.portal.om.Layout;
* <li>{@link org.apache.cocoon.portal.om.Layout}</li>
* ... | 0 |
* This is a glue object, to convert short file references to long references. The metadata may contain old relative file references. This class keeps track of
* the short file reference, so it can be removed properly from the metadata tables.
return compareTo((FileRef) obj) == 0;
| 0 |
import org.apache.sshd.util.test.JUnitTestSupport;
public class SelectorUtilsTest extends JUnitTestSupport { | 0 |
* </p>
* </p> | 0 |
* Returns an iterator over an accumulo table. This iterator uses the options that are currently set on the scanner for its lifetime. So setting options on a | 0 |
import org.apache.aurora.gen.MaintenanceMode;
Entry entry3 = createMock(Entry.class);
Entry entry4 = createMock(Entry.class);
// This entry lacks a slave ID, and should therefore be discarded.
LogEntry recoveredEntry3 =
createTransaction(Op.saveHostAttributes(new SaveHostAttributes(new HostAttri... | 0 |
protected static final AttributeInitializer attributeInitializer;
| 1 |
import org.apache.commons.vfs.CacheStrategy;
import org.apache.commons.vfs.cache.OnCallRefreshFileObject;
file = decorateFileObject(file);
/**
* resync the file information if requested
*/
if (getFileSystemManager().getCacheStrategy().equals(CacheStrategy.ON_R... | 0 |
public class AgentConfigsUpdateEvent extends STOMPHostEvent implements Hashable { | 1 |
import org.apache.hadoop.metrics2.sink.timeline.TimelineMetricMetadata;
import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.discovery.TimelineMetricMetadataKey;
import java.util.Arrays;
import static org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.TimelineMetricConfi... | 0 |
import org.apache.ambari.server.orm.entities.UserEntity;
UserEntity userEntity;
// Create the admin user
userEntity = users.createUser("admin", "admin", "admin");
users.addLocalAuthentication(userEntity, "admin");
users.grantAdminPrivilege(userEntity);
// Create a normal user
... | 0 |
import java.awt.Cursor;
public class CursorMouseOverListener implements EventListener {
Element currentTarget = (Element)evt.getCurrentTarget();
if (!CSSUtilities.isAutoCursor(currentTarget)) {
Cursor cursor = CSSUtilities.convertCursor(currentTarget, ctx);
i... | 0 |
import org.apache.beam.sdk.extensions.sql.schema.BeamSqlRecordType;
import org.apache.beam.sdk.values.BeamRecord;
extends PTransform<PCollection<String>, PCollection<BeamRecord>>
protected BeamSqlRecordType beamSqlRowType;
public BeamTextCSVTableIOReader(BeamSqlRecordType beamSqlRowType, String filePattern,
p... | 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 |
suite.addTest(TestByteArrayBuffer.suite());
suite.addTest(TestCharArrayBuffer.suite()); | 0 |
Collections.unmodifiableList(new ArrayList<>(references));
List<Reference> refs = new ArrayList<>(); | 0 |
* @since 2.0
* @since 1.3
* @since 1.3 | 1 |
namespaceId = ClientServiceHandler.checkNamespaceId(master.getInstance(), namespace, op);
ClientServiceHandler.checkNamespaceId(master.getInstance(), namespaceId, op); | 0 |
import org.apache.beam.runners.dataflow.worker.fn.data.BeamFnDataGrpcService.DataService;
import org.apache.beam.runners.fnexecution.GrpcFnServer;
import org.apache.beam.runners.fnexecution.state.GrpcStateService;
GrpcFnServer<DataService> grpcDataFnServer,
GrpcFnServer<GrpcStateService> grpcStateFnServer, | 0 |
* @throws IOException if an error occurred when encoding sending the packet
* @throws IOException if an error occurred when encoding sending the packet
* Send a global request and wait for the response. This must only be used when sending
* a {@code SSH_MSG_GLOBAL_REQUEST} with a result expected, el... | 0 |
* nearly-equal responsiveness when scheduling across jobs. In other words, a 1000 instance job
* cannot starve a 1 instance job. | 0 |
* @since 3.3 | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.MoreObjects; | 0 |
.setName(ResourceType.CPUS.getMesosName()) | 0 |
package org.apache.hadoop.metadata.storage.memory;
import org.apache.hadoop.metadata.storage.RepositoryException;
import org.apache.hadoop.metadata.storage.StructInstance;
import org.apache.hadoop.metadata.types.IConstructableType;
import org.apache.hadoop.metadata.types.StructType;
import org.apache.hadoop.metadata.st... | 0 |
* @return | 0 |
import org.apache.beam.runners.core.StateTag.StateBinder; | 0 |
import org.apache.http.client.utils.DateUtils;
final Date entryDate = DateUtils.parseDate(entry.getFirstHeader(HTTP.DATE_HEADER)
.getValue());
final Date responseDate = DateUtils.parseDate(response.getFirstHeader(HTTP.DATE_HEADER)
.getValue());
if (entryDate == nu... | 0 |
return token instanceof KerberosToken || token instanceof DelegationTokenImpl; | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
*
* @version $Id$ | 0 |
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionStage;
* exception on the returned {@link CompletionStage}.
public CompletionStage<MutateRowResponse> writeRecord(
CompletableFuture<MutateRowResponse> result = new CompletableFuture<>();
result.completeExcep... | 0 |
extends RuntimeException | 0 |
import javax.annotation.Nullable;
@Nullable private final T identity;
@Nullable T identity, ComparatorT comparator) { | 0 |
for (Request logicalRequest : topologyManager.getRequests(Collections.emptySet())) { | 0 |
package org.apache.beam.sdk.io.gcp.bigquery; | 0 |
JexlMethod ctor = uberspect.getConstructorMethod(clazz, args, info);
ctor = uberspect.getConstructorMethod(clazz, args, info); | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
import com.google.common.collect.ImmutableSet;
private static final Set<String> EXPECTED_COUNT_SET =
ImmutableSet.of("hi: 5", "there: 1", "sue: 2", "bob: 2"); | 0 |
Collections.unmodifiableSet(EnumSet.allOf(BuiltinCompressions.class));
new TreeMap<>(String.CASE_INSENSITIVE_ORDER); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/IntListList.java,v 1.5 2003/02/28 21:21:51 rwaldhoff Exp $
* @version $Revision: 1.5 $ $Date: 2003/02/28 21:21:51 $
final public class IntListList extend... | 0 |
cm = GraphicsUtil.Linear_sRGB_Unpre;
cm = GraphicsUtil.sRGB_Unpre;
double norm = 0;
int pixel = 0, tmp;
double mult;
mult = (lightColor[0]>lightColor[1])?lightColor[0]:lightColor[1];
mult = (mult>lightColor[2])?mult:lightColor[2];
double ... | 0 |
import org.apache.accumulo.core.client.lexicoder.impl.AbstractLexicoderTest;
import org.apache.accumulo.core.util.TextUtil;
import org.apache.hadoop.io.Text;
public class ListLexicoderTest extends AbstractLexicoderTest {
private List<Long> data1 = new ArrayList<Long>();
private List<Long> data2 = new ArrayList<Lo... | 0 |
// Adds dependencies (except named dependencies, which are managed by the lifecycle handler).
addUnamedDependencies(b, dm, service, srvMeta, depsMeta); | 0 |
package org.apache.beam.sdk.extensions.joinlibrary; | 0 |
import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.server.ServerContext;
public class SimpleGarbageCollector implements Iface {
private ServerContext context;
private Opts opts;
public static void main(String[] args) {
ServerContext context = ServerContext.getInstance();
... | 0 |
public static final String SERVER_TMP_DIR_KEY = "server.tmp.dir";
public static final String SERVER_TMP_DIR_DEFAULT = "/var/lib/ambari-server/tmp";
configsMap.put(SERVER_TMP_DIR_KEY, properties.getProperty(
SERVER_TMP_DIR_KEY, SERVER_TMP_DIR_DEFAULT)); | 0 |
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState) throws Exception {
final String tableName = OptUtil.getTableOpt(cl, shellState);
final ScanInterpreter interpeter = getInterpreter(cl, tableName, shellState);
final Authorizations auths = getAuths(cl, shellState);
... | 0 |
public interface FieldValueGetterFactory extends Factory<List<FieldValueGetter>> {
@Override
List<FieldValueGetter> create(Class<?> targetClass, Schema schema); | 0 |
*
* @since 4.0 | 0 |
* @version $Id: TestHierarchicalXMLConfiguration.java,v 1.5 2004/12/18 16:33:03 oheger Exp $
private static final String TEST_SAVE = "target" + File.separator + TEST_SAVENAME;
config.addProperty("[@topattr]", "available");
config.addProperty("[@topattr]", "successfull");
assertEquals("a... | 0 |
import org.apache.hc.core5.http.ContentType; | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkNotNull;
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState;
import static org.apa... | 0 |
return new JsonDeserializingImpl<T>(converter, ref.getType());
@Override @SuppressWarnings("rawtypes")
return new JsonDeserializingImpl(converter, type); | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkNotNull;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap; | 0 |
@Override | 0 |
import static org.junit.Assert.fail;
import org.apache.beam.sdk.transforms.SerializableFunction;
/** Test reading metadata by reading back the id of a document after writing it. */
void testReadWithMetadata() throws Exception {
if (!useAsITests) {
ElasticSearchIOTestUtils.insertTestDocuments(connectionCon... | 0 |
final String exchangeId = scope.exchangeId;
this.log.debug(exchangeId + ": wait for " + ((double) nextInterval / 1000) + " seconds" ); | 0 |
package com.twitter.common.args.parsers;
import com.google.common.base.Splitter;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Range;
import com.twitter.common.args.ArgParser;
/**
* A parser that handles closed ranges. For the input "4-6", it will capture [4, 5, 6].
*/
@ArgParser... | 0 |
System.out.printf("%20s : %6.2f\n", entry.getKey(), entry.getValue().mean()); | 0 |
private static final byte[] CRLF = new byte[] {HTTP.CR, HTTP.LF};
write(CRLF);
write(CRLF); | 0 |
private Long numFiles;
private Long numRows;
private Long rawDataSize;
private Long totalSize;
public Long getNumFiles() {
public void setNumFiles(Long numFiles) {
public Long getRawDataSize() {
public void setRawDataSize(Long rawDataSize) {
public Long getTotalSize() {
public void setTotalSize(Long... | 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 |
* Tests for {@link Regex}.
public class RegexTest implements Serializable {
.apply(Regex.find("[xyz]"));
.apply(Regex.find("([xyz])", 1));
.apply(Regex.find("[xyz]"));
.apply(Regex.findKV("a (b) (c)", 1, 2));
.apply(Regex.findKV("a (b) (c)", 1, 2));
.apply(Regex.matches(... | 0 |
return new StateAccessorImpl<>(
new MergingStateAccessorImpl<>(activeWindows,
return new OnPremergeContextImpl(new PremergingStateAccessorImpl<>( | 0 |
import org.apache.sshd.server.command.Command; | 0 |
import org.apache.commons.cli.Parser;
* @version $Revision: 1.9 $ | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestFilterListIterator.java,v 1.3 2002/05/13 16:10:37 rwaldhoff Exp $
* $Revision: 1.3 $
* $Date: 2002/05/13 16:10:37 $
* @version $Revision: 1.3 $ $Date: 2002/05/13 16:10... | 0 |
* @version $Revision$ | 0 |
* Autogenerated by Thrift Compiler (0.11.0)
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)") | 0 |
package org.apache.felix.ipojo.runtime.core.test.components.proxy;
import org.apache.felix.ipojo.runtime.core.test.services.CheckService;
import org.apache.felix.ipojo.runtime.core.test.services.FooService;
import org.osgi.framework.BundleContext;
import java.util.Properties;
public class CheckServiceDelegator imple... | 0 |
/*
Copyright 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 l... | 0 |
element = elt;
properties = props; | 0 |
import org.apache.sshd.server.auth.hostbased.HostBasedAuthenticator;
private HostBasedAuthenticator hostBasedAuthenticator;
public HostBasedAuthenticator getHostBasedAuthenticator() {
return resolveEffectiveProvider(HostBasedAuthenticator.class, hostBasedAuthenticator, getFactoryManager().getHostBasedAu... | 0 |
import org.apache.http.impl.client.CloseableHttpClient;
protected CloseableHttpClient httpclient;
this.httpclient.close(); | 0 |
@Override
public int hashCode()
{
return 31 + servletInfo.hashCode();
}
@Override
public boolean equals(final Object obj)
{
if (this == obj)
{
return true;
}
if (obj == null || getClass() != obj.getClass() )
{
return f... | 0 |
import org.w3c.dom.Node;
/**
* Returns a new uninitialized instance of this object's class.
*/
protected Node newNode() {
return new SVGOMFEMergeElement();
} | 0 |
* This class can be used to resolve an instance of
* {@link HttpRequestHandler} matching a particular request URI. Usually the
* resolved request handler will be used to process the request with the
*
* | 0 |
Document doc = XMLUtils.newDocument(false);
importDoc = XMLUtils.parse(is, false);
importDoc = XMLUtils.parse(is, false);
importDoc = XMLUtils.parse(is, false);
importDoc = XMLUtils.parse(is, false);
importDoc = XMLUtils.parse(is, f... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImpl.java,v 1.11 2002/04/24 04:05:40 dmitri Exp $
* $Revision: 1.11 $
* $Date: 2002/04/24 04:05:40 $
import org.apache.commons.jxpath.*;
* @version $Revision: 1.1... | 0 |
import java.util.concurrent.ConcurrentSkipListSet;
private final CompactionWaitInfo compactionWaitInfo = new CompactionWaitInfo();
log.debug("Writing updated status to metadata table for " + logEntry.filename + " " + ProtobufUtil.toString(status));
ReplicationTableUtil.updateFiles(tabletServer... | 1 |
*/
*/
protected List vec = new ArrayList();
public void addElement( JavaClass clazz ) {
vec.add(clazz);
}
public JavaClass elementAt( int index ) {
return (JavaClass) vec.get(index);
}
public void removeElementAt( int index ) {
vec.remove(index);
}
publ... | 0 |
package org.apache.xml.security.stax.test;
import org.apache.xml.security.stax.ext.InputProcessor;
import org.apache.xml.security.stax.ext.InputProcessorChain;
import org.apache.xml.security.stax.ext.XMLSecurityConstants;
import org.apache.xml.security.stax.ext.XMLSecurityException;
import org.apache.xml.security.stax.... | 0 |
package org.apache.aurora.scheduler.http; | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
import static org.junit.Assert.assertNull;
import org.apache.ambari.server.Role;
boolean foundOne = false;
for (HostRoleCommand hrc : commands) {
if (hrc.getRole().equals(Role.AMBARI_SERVER_ACTION)) {
assertEquals(-1L, hrc.getHostId());
assertNull(hrc.getHostName());
foundOne = tru... | 1 |
put("oozie.authentication.kerberos.name.rules", "\n ");
"oozie-site", new HashMap<String, String>(), Collections.singleton("oozie.authentication.kerberos.name.rules"), | 0 |
* Copyright 2001-2006 The Apache Software Foundation
import java.util.Iterator;
* Return an Iterator of the action names contained in this Result.
* @return The set of action names.
*/
public Iterator getActions() {
return Collections.unmodifiableMap(hAction).keySet().iterator();
}
... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.