Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
package org.apache.accumulo.core.file.blockfile;
import java.io.IOException;
/**
*
* Provides a generic interface for a Writer for a BlockBaseFile format.
* Supports the minimal interface required.
*
* Write a metaBlock and a dataBlock.
*
*/
public interface BlockFileWriter{
public ABlockWriter prepareM... | 1 |
* Copyright (C) 2015 Google Inc. | 0 |
import java.util.Iterator;
import org.apache.ambari.server.state.PropertyDependencyInfo;
import org.apache.ambari.server.state.PropertyInfo;
processPropertyDependencies();
* Process <depends-on></depends-on> properties
*/
private void processPropertyDependencies() {
// Stack-definition has 'depends-on'... | 0 |
import org.apache.felix.gogo.commands.Argument; | 0 |
// in the params, and if it has a non-empty system type, use that.
if (null != __configuration && __configuration.getServerSystemKey().length() > 0) {
if (null != __configuration) { // system type must have been empty above
__entryParser = __pa... | 0 |
@FunctionalInterface | 0 |
org.apache.mina.core.future.CloseFuture cf = immediately ? session.closeNow() : session.closeOnFlush();
cf.addListener(new IoFutureListener<IoFuture>() { | 0 |
import org.apache.sshd.common.util.security.SecurityProviderRegistrar;
import org.junit.AfterClass;
import org.junit.BeforeClass;
public static final String BC_NAMED_USAGE_PROP =
SecurityProviderRegistrar.CONFIG_PROP_BASE
+ "." + SecurityUtils.BOUNCY_CASTLE
+ "." + SecurityProviderRe... | 0 |
import org.apache.sshd.util.BaseTestSupport;
public class AbstractSessionTest extends BaseTestSupport {
fail("Unexpected success: " + ident);
fail("Unexpected success: " + ident);
fail("Unexpected success: " + ident);
@Override
// ignored
@Override
// igno... | 0 |
package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.loadsimulator.jmetertest.jmetertest; | 0 |
// recovered 1.4 WALs won't have a server component
if (!walPath.getName().equals(FileType.WAL.getDirectory())) {
// drop server
walPath = walPath.getParent();
} | 0 |
import org.apache.accumulo.core.iterators.system.LocalityGroupIterator.LocalityGroupContext;
import org.apache.accumulo.core.iterators.system.LocalityGroupIterator.LocalityGroupSeekCache;
private final BlockFileReader reader;
private final ArrayList<LocalityGroupMetadata> localityGroups = new ArrayList<>();
... | 0 |
setServerSocketFactory(new FTPSServerSocketFactory(context)); | 0 |
c.trigger().setFinished(false, LATE_INDEX); | 0 |
assertEquals("deflate", dataFileStream.getMetaString("avro.codec"));
assertEquals("null", dataFileStream.getMetaString("avro.codec"));
assertEquals(CodecFactory.deflateCodec(6).toString(), write.getCodec().toString());
assertEquals(SNAPPY_CODEC, write.getCodec().toString());
assertEquals(CodecFactor... | 0 |
import java.io.BufferedOutputStream;
volatile BufferedOutputStream logStream = null;
volatile FileOutputStream fos = null;
* @throws IOException
public void rollLog() throws IOException {
if (logStream != null) {
this.logStream.flush();
this.logStream = null;
... | 0 |
import org.apache.beam.sdk.extensions.sql.impl.utils.CalciteUtils;
import org.apache.calcite.sql.type.SqlTypeName;
.typeDescriptor(FieldTypeDescriptor.of(FieldType.STRING)
.withMetadata(CalciteUtils.typeToMetadata(SqlTypeName.VARCHAR)))
.primaryKey(false) | 0 |
* @version $Revision: 1.1 $ $Date$
assertEquals(((InvocationTargetException) e.getCause()).getTargetException().getClass(), NumberFormatException.class); | 0 |
Filter gnr = comp.getGraphicsNodeRable(true); | 0 |
protected final WindowingStrategy<?, ?> windowingStrategy;
this.windowingStrategy = windowingStrategy; | 0 |
private Set<AbstractCheckDescriptor> m_upgradeChecks = new TreeSet<>(
new PreUpgradeCheckComparator());
return new ArrayList<>(m_upgradeChecks);
List<String> missingChecks = new ArrayList<>();
List<URL> urls = new ArrayList<>();
List<AbstractCheckDescriptor> resultCheckDescriptor = new ArrayList<>... | 1 |
import org.apache.sshd.common.util.buffer.BufferUtils;
import org.apache.sshd.server.session.ServerSession;
ServerSession session = getServerSession();
if (!authenticator.authenticate(getUserName(), key, session)) {
Buffer buf = session.prepareBuffer(SshConstants.SSH_MSG_USERAUTH_PK_OK, Buff... | 0 |
import org.apache.felix.gogo.runtime.Parser.Executable;
Executable executable;
public Pipe(Closure closure, Executable executable)
super("pipe-" + executable);
this.executable = executable;
return "pipe<" + executable + "> out=" + out;
result = closure.execute(executable); | 0 |
* An interface that provides access to the User Agent informations
* needed by the bridge.
* | 0 |
// ZOOKEEPER-558:
// In some cases the server does not close the connection (e.g., closeconn buffer
// was not being queued — ZOOKEEPER-558) properly. This happens, for example,
// when the client closes the connection. The server should still close the session, though.
// Callin... | 0 |
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* permission of the Apache Software Foundation.
* @version $Revision: 1.4 $ $Date: 2003/10/09 21:31:42 $ | 0 |
import org.apache.http.util.Args;
Args.notNull(socket, "Socket");
Args.notNull(params, "HTTP parameters"); | 0 |
return ConfigurationTypeHelper.getClassInstance(context, clazzName, base, defaultInstance);
return ConfigurationTypeHelper.getClassInstance(null, clazzName, base, defaultInstance); | 0 |
* @since 1.0.0 | 0 |
import org.osgi.framework.Constants;
* This service must be registered with a {@link Constants#SERVICE_CHANGECOUNT}
* service property that must be updated each time the SCR DTOs available from
* this service change.
* <p> | 0 |
/**
* Add the given map of attributes to the session for the cluster identified by the given name.
*
* @param name the cluster name
* @param attributes the session attributes
*/
public void addSessionAttributes(String name, Map<String, Object> attributes);
/**
* Get the map of session ... | 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 (baseURL != null) {
userAgent = baseURL.getUserAgent();
} else {
} | 0 |
Security.removeProvider("BC"); | 0 |
package org.apache.commons.fileupload2; | 0 |
import com.google.common.base.MoreObjects;
import java.util.concurrent.ThreadLocalRandom; | 0 |
super.addAttribute(attr);
attr.setParentNode(parent);
}
else
{
throw new IllegalArgumentException("Attribute node must not be null!");
super.addChild(child);
child.setParentNode(parent);
}
else
{
thro... | 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 |
if (m_content != null)
{
m_content.close();
}
| 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 |
bytesRead = readFromChannel(dst, chunk); | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/GenericValidator.java,v 1.20 2003/04/30 22:11:06 rleland Exp $
* $Revision: 1.20 $
* $Date: 2003/04/30 22:11:06 $
* @version $Revision: 1.20 $ $Date: 2003/04/30 22:11:06 $
re... | 0 |
protected Vector groupManagers = new Vector();
protected List genericDefSet = new LinkedList();
protected Element topLevelGroup;
protected SVGGeneratorContext generatorContext;
protected SVGBufferedImageOp filterConverter;
protected List otherDefs;
* @param generatorContext the SVG generato... | 1 |
if (log.isDebugEnabled())
log.debug("Can I resolve " + element.getTagName() + "?");
X509Data x509data = null;
try {
x509data = new X509Data(element, BaseURI);
} catch (XMLSignatureException ex) {
log.debug("I can't");
} catch... | 1 |
@SuppressWarnings("serial") | 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 |
timestamped.apply(ParDo.of(new DoFn<String, KV<String, Instant>>() {
@ProcessElement
public void processElement(ProcessContext c) | 0 |
Schema.Field.nullable("id", Schema.FieldType.INT32), | 0 |
if (!e.hasAttributes() && e.getNamespaceURI() == null) {
if (e.getNamespaceURI() != null) {
String NName = e.getPrefix();
String NValue = e.getNamespaceURI();
String Name;
if (NName == null || NName.equals("")) {
NName = "xmlns";
... | 0 |
import org.apache.batik.bridge.Viewport;
public Viewport getViewport() { | 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 |
} catch (final IOException ex) { | 0 |
return Jdbc41Bridge.getObject(resultSet, columnIndex, type);
return Jdbc41Bridge.getObject(resultSet, columnLabel, type); | 0 |
package org.apache.accumulo.test.randomwalk.bulk;
import org.apache.accumulo.test.randomwalk.State;
import org.apache.accumulo.test.randomwalk.Test; | 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 |
return createDefaultHostParams(cluster, repositoryVersion.getStackId());
}
Map<String, String> createDefaultHostParams(Cluster cluster, StackId stackId) throws AmbariException { | 0 |
final Map<String,String> existingVariants = new HashMap<>(); | 0 |
package aQute.bnd.osgi; | 0 |
import java.lang.ref.Reference;
import java.lang.ref.WeakReference;
private volatile Reference<Introspector> ref;
/** The introspector version. */
private volatile int version;
/** The class loader weak reference; used to recreate the Introspector when necessary. */
private volatile Reference<ClassL... | 1 |
import java.util.Objects;
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
return op == that.op &&
Objects.equals(entity, that.entity);
return Objects.hash(op, entity);
if (this == o) return true;
... | 0 |
import cz.seznam.euphoria.core.client.operator.state.StorageProvider;
import cz.seznam.euphoria.core.util.Settings;
import org.apache.spark.SparkEnv;
static final String CFG_LIST_STORAGE_MAX_MEMORY_ELEMS_KEY = "euphoria.spark.batch.list-storage.max-memory-elements";
static final int CFG_LIST_STORAGE_MAX_MEMORY_ELEM... | 0 |
* @version $Revision$ $Date$ | 0 |
case CompatibleRepositoryVersion:
return new CompatibleRepositoryVersionResourceProvider(managementController); | 0 |
public WindowingStrategy<?, ?> getWindowingStrategyInternal(); | 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 |
import org.apache.batik.util.DoublyIndexedTable; | 0 |
static final List<String> CUSTOM_TRANSFORM_ATTRIBUTES = Arrays.asList(HIVE_DB_NAME_ATTRIBUTE, HIVE_TABLE_NAME_ATTRIBUTE, HIVE_DB_CLUSTER_NAME_ATTRIBUTE, HIVE_STORAGE_DESC_LOCATION_ATTRIBUTE);
case HIVE_STORAGE_DESC_LOCATION_ATTRIBUTE:
return location;
case HIVE_S... | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableMap; | 0 |
// System.out.println("attr added: " + newv); | 0 |
case EPHEMERALONLOCALSESSION:
return new EphemeralOnLocalSessionException();
@Deprecated
public static final int UnknownSession= -12;
@Deprecated
public static final int EphemeralOnLocalSession = -122;
/** Unknown session (internal server use only) *... | 0 |
import org.apache.cocoon.forms.datatype.convertor.ConversionResult;
* @version CVS $Id: MultiValueJXPathBinding.java,v 1.3 2004/05/06 14:59:44 bruno Exp $
ConversionResult conversionResult = convertor.convertFromString((String)value, convertorLocale, null);
if (conversio... | 0 |
public static class TestJMXHostProvider implements JMXHostProvider {
public TestJMXHostProvider(boolean unknownPort) { | 0 |
import org.apache.accumulo.core.file.blockfile.impl.CachableBlockFile.CachableBuilder;
CachableBuilder cb = new CachableBuilder().fsPath(fs, path).conf(conf)
.cryptoService(cryptoService);
try (Reader iter = new RFile.Reader(cb)) { | 0 |
import org.apache.beam.sdk.runners.AppliedPTransform; | 0 |
public int capacity() {
return Integer.MAX_VALUE;
}
@Override | 0 |
public LazySortedMapTest(final String testName) {
final Number i1 = map.get(5);
final Number o = map.get(5);
final SortedMap<String, Number> map = lazySortedMap(new TreeMap<String,Number>(), oneFactory);
final Comparator<?> c = map.comparator();
final Transformer<Object, Inte... | 0 |
//CheckClassAdapter ch = new CheckClassAdapter(cw0);
MethodCreator preprocess = new MethodCreator(cw0, m_fields); | 0 |
MetadataTableUtil.removeBulkLoadInProgressFlag(master,
"/" + bulkDir.getParent().getName() + "/" + bulkDir.getName()); | 0 |
boolean debug = log.isDebugEnabled();
if (debug) {
log.debug("[SetNestedPropertiesRule]{" + digester.match +
if (debug) {
log.debug("[SetNestedPropertiesRule]{" + digester.match +
log.debug("[SetPropertiesRule]{" + digester.mat... | 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 |
this(buffer, true);
}
BufferedHeader(final CharArrayBuffer buffer, final boolean strict) throws ParseException {
if (colon <= 0) {
throw new ParseException("Invalid header: " + buffer.toString());
}
if (strict && TokenParser.isWhitespace(buffer.charAt(colon - 1))) { | 0 |
protected Buffer encode(Buffer buffer) throws IOException {
return buffer; | 0 |
numKeys = countIndexEntries(context, prevEndRow, endRow, mapFiles, true, readers);
tmpDir == null ? useIndex : false, readers);
Collection<String> mapFiles, boolean useIndex, ArrayList<FileSKVIterator> readers)
throws IOException {
long fileSize, List<KeyExtent> extents) throws IOExcep... | 0 |
* @version CVS $Id: ElementValueEvent.java,v 1.2 2003/03/16 18:03:55 vgritsenko Exp $ | 0 |
@VisibleForTesting
static final String STAGED_PIPELINE_METADATA_PROPERTY = "pipeline_url"; | 0 |
private final Map<String, Map<String, String>> importedKeys = new HashMap<>();
Set<Resource> resources = new HashSet<>();
Set<String> tableSet = new HashSet<>();
Map<String, String> importedKeys = new HashMap<>();
Set<String> tables = new HashSet<>(); | 1 |
import java.sql.Types;
String dbType = getDbType();
// 1.6.0 initially shipped with restart_required as a BOOELAN so some
// upgrades might be BOOLEAN but most are probably SMALLINT
if (Configuration.POSTGRES_DB_NAME.equals(dbType)) {
int columnType = dbAccessor.getColumnType("hostcomponentdesire... | 0 |
test.add(2);
test.add(2);
test.add(2);
test.add(2);
assertTrue(test.contains(3));
assertTrue(test.contains(4)); | 0 |
public boolean isHostMappedToCluster(long clusterId, String hostName) {
if (clusterId == cluster.getClusterId()) { | 0 |
import java.net.URL;
URL dtdFile = getClass().getResource("/properties.dtd");
XMLConfiguration config = new XMLConfiguration("testDtd.xml");
factory.registerEntityId(publicId, dtdFile); | 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 |
evaluationContext, | 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 |
/** This holds the color to use when we are off the bottom of the
* gradient */
protected int gradientUnderflow;
/** This holds the color to use when we are off the top of the
* gradient */
protected int gradientOverflow;
gradientUnderflow = colors[0].getRGB();
gradientOverfl... | 0 |
import java.util.Map;
Map<Long,QuorumServer> peers; | 0 |
import java.util.Properties;
private static final String WEB_INF_RCLWRAPPER_PROPERTIES = "/WEB-INF/cocoon/rclwrapper.properties";
if(isReloadingEnabled() && CocoonReloadingListener.isReload()) {
private boolean isReloadingEnabled() throws IOException {
Properties rclProps = ne... | 0 |
import java.net.*;
private static Proxy proxy;
public static void setProxy(Proxy proxy) {
ResolverHttp.proxy = proxy;
}
URL url = tmp.toURL();
HttpURLConnection urlConnection;
if (proxy != null) {
urlConnection = (HttpURLConnection)url.openConnec... | 0 |
import org.apache.sshd.common.GlobalRequestHandler;
import org.apache.sshd.server.global.CancelTcpipForwardHandler;
import org.apache.sshd.server.global.KeepAliveHandler;
import org.apache.sshd.server.global.NoMoreSessionsHandler;
import org.apache.sshd.server.global.TcpipForwardHandler;
sshd.setGlobalRequestHa... | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.