Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import com.twitter.aurora.scheduler.ResourceSlot;
Set<Veto> filter(ResourceSlot offer, String slaveHost, ITaskConfig task, String taskId); | 0 |
final int connectTimeout,
connectTimeout, socketConfig, context); | 0 |
import org.apache.commons.configuration.ListDelimiterHandler;
assertTrue("Got parameters", paramMap.isEmpty());
* Tests whether the list delimiter handler property can be set.
ListDelimiterHandler handler =
EasyMock.createMock(ListDelimiterHandler.class);
EasyMock.replay(han... | 0 |
import org.apache.felix.dm.PropertyMetaData;
import org.apache.felix.dm.Service;
import org.apache.felix.dm.ServiceStateListener; | 0 |
import org.apache.felix.dm.annotation.api.Component;
@Component | 0 |
import org.apache.beam.sdk.values.ValueInSingleWindow;
long insertAll(TableReference ref, List<ValueInSingleWindow<TableRow>> rowList,
@Nullable List<String> insertIdList,
BackOff backoff, final Sleeper sleeper, InsertRetryPolicy retryPolicy,
List<ValueInSing... | 0 |
final TestOption option = new TestOption("x", true, "");
final TestOption a = new TestOption("a", true, "");
final TestOption b = (TestOption) a.clone();
final Option option = new DefaultOption("f", "file", "myfile.txt");
final Option clone = (Option) option.clone();
fina... | 0 |
import org.apache.ambari.server.state.ConfigFactory;
private ConfigFactory configFactory;
configFactory = injector.getInstance(ConfigFactory.class);
Config config = configFactory.createNew(cluster, "hive-site", configTagVersion1, configTagVersion1Properties, null);
final Config newConfig = configFactory.c... | 0 |
package org.apache.felix.sigil.core.internal.model.osgi;
import org.apache.felix.sigil.model.AbstractModelElement;
import org.apache.felix.sigil.model.eclipse.ISigilBundle;
import org.apache.felix.sigil.model.osgi.IPackageExport; | 0 |
final SftpFileSystemConfigBuilder builder = SftpFileSystemConfigBuilder.getInstance();
File knownHostsFile = builder.getKnownHosts(fileSystemOptions);
File[] identities = builder.getIdentities(fileSystemOptions);
IdentityRepositoryFactory repositoryFactory = builder.getIdentityRepository... | 0 |
* @param silentFlag whether this interpreter runs in silent mode
* @param theParms the array of parameters
* @param theArgs the array of arguments
protected void setArguments(String[] theParms, Object[] theArgs) {
this.parameters = theParms;
this.registers = theArgs;
if (cance... | 0 |
import org.apache.ambari.server.state.State;
import java.util.Collections;
import static org.easymock.EasyMock.expectLastCall;
Capture<DBAccessor.DBColumnInfo> provisioningStateColumnCapture = new Capture<DBAccessor.DBColumnInfo>();
Capture<List<DBAccessor.DBColumnInfo>> operationLevelEntitycolumnCapture = new... | 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.http.conn.SchemeRegistry;
private ClientConnectionOperator connOperator;
* @param schreg the scheme registry, or
* <code>null</code> for the default registry
public ThreadSafeClientConnManager(HttpParams params,
SchemeRegistr... | 0 |
import java.io.IOException;
import java.io.StringWriter;
import org.apache.commons.jelly.util.SafeContentHandler;
import org.dom4j.io.HTMLWriter;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.XMLWriter;
import org.xml.sax.SAXException;
public void testDom4JCData() throws SAXException {
StringW... | 0 |
import java.security.cert.Certificate;
documentCodeSource = new CodeSource
(documentURL, (Certificate[])null); | 0 |
wizard.init(PlatformUI.getWorkbench(), getSelection());
WizardDialog dialog = new WizardDialog(shell, wizard);
notifyResult(res == Window.OK);
catch (CoreException e)
if (window != null)
if (selection instanceof IStructuredSelection)
return... | 0 |
log.info("Recovering file {} by changing permission to readonly", path.toString()); | 0 |
* Represents a protocol version. The "major.minor" numbering
* scheme is used to indicate versions of the protocol.
* </p> | 0 |
return cause; | 0 |
@Inject
private MaintenanceStateHelper maintenanceStateHelper;
maintenanceStateHelper.getMaintenanceHostComponents(clusters, cluster)); | 0 |
ParDo.MultiOutput.class,
new TransformTranslator<ParDo.MultiOutput>() {
public void translate(ParDo.MultiOutput transform, TranslationContext context) {
ParDo.MultiOutput<InputT, OutputT> transform, TranslationContext context) { | 0 |
import org.apache.accumulo.core.data.TableId;
private TableId tableId;
private static final TableId EMPTY_ID = TableId.of("");
public KeyExtent(TableId table, Text endRow, Text prevEndRow) {
this.setTableId(TableId.of(new String(ByteBufferUtil.toBytes(tke.table), UTF_8)));
public void setTableId(TableId tId... | 0 |
public LineIteratorTestCase(String name) {
List<String> lines = createFile(testFile, encoding, 3);
String line = iterator.next();
List<String> lines = createFile(testFile, encoding, 3);
List<String> lines = createFile(testFile, encoding, lineCount);
String lin... | 0 |
assertThat(pipeline.getCoderRegistry().getCoder(output.getTypeDescriptor()),
equalTo(pipeline.getCoderRegistry().getCoder(new TypeDescriptor<String>() {}))); | 0 |
return new DfsLogger(null, conf, filename, null); | 0 |
import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
import org.apache.accumulo.core.replication.thrift.ReplicationCoordinatorErrorCode;
import org.apache.accumulo.core.replication.thrift.ReplicationCoordinatorException;
import org.apache.accumulo.core.security.thrift.TCredentials;
import org.apa... | 0 |
.addResources(Resource.newBuilder().setType(Type.SCALAR).setName(CPUS.getMesosName())
.addResources(Resource.newBuilder().setType(Type.SCALAR).setName(RAM_MB.getMesosName())
.addResources(Resource.newBuilder().setType(Type.SCALAR).setName(DISK_MB.getMesosName())
.addResources(Resource.ne... | 0 |
FileSystem fs = getFileSystem();
final FileObject file = getManager().resolveFile(uri, fs.getFileSystemOptions());
if (getFileSystem().hasCapability(Capability.DIRECTORY_READ_CONTENT)) | 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.client.session.ClientSession; | 0 |
@SuppressWarnings("boxing")
List<String> list = new ArrayList<String>();
Map<Object, Object> map = new HashMap<Object, Object>();
assertEquals(true, map.containsKey(new Integer(list.get(i))));
assertEquals(list.get(i), map.get(new Integer(list.get(i))));
map = new HashMap... | 0 |
throw new SQLException("Error invalidating connection", ex);
throw new SQLException("Error closing connection pool", ex); | 0 |
try (ClientSession session = client.connect(getCurrentTestName(), TEST_LOCALHOST, port).verify(7L, TimeUnit.SECONDS).getSession()) {
return SftpFileSystemProvider.createFileSystemURI(TEST_LOCALHOST, port, username, username); | 0 |
import org.apache.atlas.AtlasClient;
import org.apache.atlas.AtlasServiceException;
} catch(AtlasServiceException e) {
} catch (AtlasServiceException e) {
Assert.assertNotNull(response.get(AtlasClient.REQUEST_ID));
final String definition = response.getString(AtlasClient.DEFINITION);
... | 0 |
import org.apache.beam.sdk.transforms.windowing.AfterPane;
import org.apache.beam.sdk.transforms.windowing.Repeatedly;
// Configure windowing of the input so that it fires every time a new element is generated,
// so that files are written continuously.
Window<Long> window = Window.<Long>into(FixedWindows.o... | 0 |
import org.apache.felix.dm.annotation.api.Start;
@ServiceDependency(filter="(name=Dependency2)")
@Start
void start()
{
System.out.println("Dependency2.start");
}
| 0 |
* @version CVS $Id: CategoryNodeBuilder.java,v 1.4 2004/06/09 11:59:23 cziegeler Exp $
CategoryNode node = new CategoryNode(null); | 0 |
boolean preserveAlpha = false; | 0 |
import org.apache.hc.core5.io.ShutdownType;
requester.shutdown(ShutdownType.GRACEFUL); | 0 |
private List<String> _comments;
_comments = new ArrayList<String>();
_comments = new ArrayList<String>();
_offset = Long.valueOf(xmitTime - _returnTime);
_delay = Long.valueOf(_returnTime - origTime);
_offset = Long.valueOf(rcvTime - origTime);... | 0 |
* @return the hash value
* @return the hash value
* @return the hash value
* @return the hash value
* @return the hash value
* @return the hash value
*
* @return the hash value | 0 |
* An {@link AccumuloConfiguration} which holds a flat copy of properties defined in another
* configuration | 0 |
TGetColumnsResp resp = new HiveCall<TGetColumnsResp>(connection,session) { | 0 |
final StringBuilder buffer = new StringBuilder();
final char rndchar = TEST_CHARS.charAt(RND.nextInt(TEST_CHARS.length() - 1));
final StringBuilder buffer = new StringBuilder(); | 0 |
import org.apache.hc.client5.http.impl.sync.CloseableHttpResponse;
import org.apache.hc.core5.http.ClassicHttpRequest;
import org.apache.hc.core5.http.ClassicHttpResponse;
import org.apache.hc.core5.http.config.H1Config;
import org.apache.hc.core5.http.impl.io.DefaultClassicHttpResponseFactory;
import org.apache.hc.cor... | 0 |
Rectangle2D bounds = node.getGeometryBounds(); | 0 |
* @version $Revision: 1.6 $
private String username;
private String password;
} else {
if ( username != null && !username.equals("") ) {
call.setUsername( username );
call.setPassword( password );
}
} catch (MalformedURLExcept... | 0 |
final class PatternStack
extends Stack<String>
{
public String toString()
{
for ( int i = 0; i < size(); i++ )
{
String elem = get( i );
if ( elem.length() > 0 )
{
if ( str.length() > 0 )
{
str.append( '/... | 0 |
// XXX gradientUnits, gradientTransform should be here too | 0 |
if (i18n) {
} else {
} | 0 |
String port = jmxHostProvider.getPort(clusterName, componentName);
| 0 |
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
* Builds a {@link TreeModelDefinition} based on an Spring bean subclassing {@TreeMode... | 0 |
@SuppressWarnings("deprecation") // test of deprecated code | 0 |
@Override
protected int defaultTimeoutSeconds() {
return 4 * 60;
}
@Test | 0 |
import org.apache.batik.util.ApplicationSecurityEnforcer;
public static final String SQUIGGLE_JAR_NAME
* URL for Squiggle's security policy file
public static final String SQUIGGLE_SECURITY_POLICY
= "org/apache/batik/apps/svgbrowser/resources/svgbrowser.policy";
* Script security enforcement ... | 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 |
LOG.info("Collection '{}' creation request sent.", collection);
LOG.info("Adding new shard to collection request sent ('{}': {})", getCollection(), shardName); | 0 |
Element localRefElement =
(Element)document.importNode(refElement, true, true); | 0 |
* @version CVS $Id$ | 0 |
public List<String> getChildren(String path) throws DistributedStoreException;
public byte[] get(String path) throws DistributedStoreException;
public void put(String path, byte[] bs) throws DistributedStoreException;
public void remove(String path) throws DistributedStoreException;
| 1 |
@Override | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists; | 0 |
import org.apache.accumulo.server.security.SystemCredentials;
MetadataTableUtil.addTablet(extent, Constants.DEFAULT_TABLET_LOCATION, SystemCredentials.get().getAsThrift(), tableInfo.timeType,
MetadataTableUtil.deleteTable(tableInfo.tableId, false, SystemCredentials.get().getAsThrift(), environment.getMasterLock... | 1 |
return "select data,name,owner_id from beeswax_savedquery where name!='My saved query'and owner_id =? AND mtime <= to_date(?, 'YYYY-MM-DD')";
return "select data,name,owner_id from beeswax_savedquery where name!='My saved query'and owner_id =? AND mtime >= to_date(?, 'YYYY-MM-DD')";
return "select data,name... | 0 |
} catch (NamespaceNotFoundException e) {
throw new AssertionError("Shouldn't happen: " + e.getMessage());
throw new AssertionError("Shouldn't happen: " + e.getMessage()); | 0 |
protected final Logger log = Logger.getLogger(this.getClass());
public static class SeqMapClass extends Mapper<Key,Value,Text,Mutation> {
public void map(Key key, Value val, Context output) throws IOException, InterruptedException {
Mutation m = new Mutation(key.getRow());
m.put(key.getColumnFami... | 1 |
import java.util.Comparator;
public static final Comparator<File> NAME_COMPARATOR = new NameFileComparator();
public static final Comparator<File> NAME_REVERSE = new ReverseComparator(NAME_COMPARATOR);
public static final Comparator<File> NAME_INSENSITIVE_COMPARATOR = new NameFileComparator(IOCase.INSENSITI... | 0 |
package org.w3c.dom.svg;
public interface SVGFEImageElement extends
SVGElement,
SVGURIReference,
SVGLangSpace,
SVGExternalResourcesRequired,
SVGStylable,
SVGTransformable,
SVGFilterPrimitiveStandardAttributes {
} | 1 |
/*
* 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 |
class IOSessionImpl implements IOSession { | 0 |
import org.apache.avalon.framework.component.Component;
import org.apache.cocoon.portal.layout.CompositeLayout;
import org.apache.cocoon.portal.layout.LayoutFactory;
* @version CVS $Id: SimpleProfileManager.java,v 1.3 2003/05/19 12:51:00 cziegeler Exp $
protected ComponentManager manager;
this.manager = co... | 0 |
package org.apache.accumulo.shell.commands;
import org.apache.accumulo.shell.Shell;
import org.apache.accumulo.shell.Token;
import org.apache.accumulo.shell.Shell.Command; | 0 |
if ((Frame.getThis() != null) && (!(mg.getClassName().equals(Type.OBJECT.getClassName()))) ) { | 0 |
(int) Byte.MAX_VALUE,
SftpConstants.MIN_CHKFILE_BLOCKSIZE,
IoUtils.DEFAULT_COPY_SIZE,
Byte.SIZE * IoUtils.DEFAULT_COPY_SIZE
0,
SftpConstants.MIN_CHKFILE... | 0 |
package com.twitter.mesos;
import com.twitter.mesos.codec.Codec;
import com.twitter.mesos.codec.ThriftBinaryCodec;
import mesos.FrameworkMessage;
import org.apache.thrift.TBase;
/**
* Codec to handle wrapping/unwrapping and serialization/deserialization of thrift messages from
* the binary payload of a framework me... | 0 |
aggregateMapping.registerAggregate(clusterId.longValue(), | 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 |
import com.google.common.base.Optional;
private final LoadingCache<
PCollectionViewWindow<?>, Optional<? extends Iterable<? extends WindowedValue<?>>>>
viewContents;
this.viewContents = CacheBuilder.newBuilder().build(new CurrentViewContentsLoader());
return viewContents.getUnchecked(PCo... | 0 |
public static void main(String[] args) {
public void testIndexOf() throws Exception {
Object[] keys = getKeys();
int expectedSize = keys.length;
Object[] values = getValues();
for (int i = 0; i < expectedSize; i++) {
labRat.put(keys[i], values[i]);
}
/... | 0 |
* IterableMap<String,Integer> map = new HashedMap<String,Integer>();
* MapIterator<String,Integer> it = map.mapIterator(); | 0 |
dialog.setVisible(true);
dialog.setVisible(true); | 0 |
import com.google.cloud.dataflow.sdk.transforms.windowing.OutputTimeFn;
* Release all holds for windows which have been merged away and incorporate their
* combined values (according to {@link OutputTimeFn#merge}) into the result window hold. | 0 |
package org.apache.felix.ipojo.runtime.core.services;
/**
* An enumeration.
*/
public enum Color {
RED,
GREEN,
BLUE
} | 0 |
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.capture;
import static org.easymock.Ea... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/rss/Attic/Channel.java,v 1.2 2001/09/14 19:22:52 husted Exp $
* $Revision: 1.2 $
* $Date: 2001/09/14 19:22:52 $
* @author Ted Husted
* @version $Revision: 1.2 $ $Date: 2001/09/14 19:... | 0 |
import org.apache.beam.model.pipeline.v1.RunnerApi;
import org.apache.beam.model.pipeline.v1.RunnerApi.FunctionSpec; | 0 |
import com.google.common.base.Optional;
Path newDir = new Path(vm.choose(Optional.of(extent.getTableId().toString()), ServerConstants.getBaseUris()) + Path.SEPARATOR + ServerConstants.TABLE_DIR + Path.SEPARATOR + dir.getParent().getName() | 0 |
import static org.apache.beam.runners.flink.translation.utils.FlinkPipelineTranslatorUtils.instantiateCoder;
| 0 |
int pos = colon + 1;
int len = 0;
for (int i = pos; i < host.length(); i++) {
if (Character.isDigit(host.charAt(i))) {
len++;
} else {
... | 0 |
Copyright 2002 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 a... | 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 |
* @cocoon.sitemap.component.name nekohtml
* @version CVS $Id: NekoHTMLGenerator.java,v 1.2 2004/07/08 12:04:08 upayavira Exp $
/** Neko properties */ | 0 |
* Tests whether the name of the root element is copied when a configuration
* is created using the copy constructor.
*/
public void testCopyRootName() throws ConfigurationException
{
final String rootName = "rootElement";
final String xml = "<" + rootName + "><test>true</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 may... | 0 |
* Copyright (c) 2002, 2003 The Apache Software Foundation. All rights
* @version $Revision: 1.7 $ $Date: 2003/02/12 07:56:16 $ | 0 |
package cz.seznam.euphoria.operator.test;
import cz.seznam.euphoria.core.client.dataset.Dataset;
import cz.seznam.euphoria.core.client.io.DataSource;
import cz.seznam.euphoria.core.client.io.ListDataSource;
import cz.seznam.euphoria.core.client.operator.SumByKey;
import cz.seznam.euphoria.core.client.util.Pair;
impor... | 0 |
* limitations under the License. | 0 |
public NIOHttpDataReceiverMockup(
final ReadableByteChannel channel,
int buffersize,
int linebuffersize) {
initBuffer(buffersize, linebuffersize);
this(bytes, BUFFER_SIZE, BUFFER_SIZE);
public NIOHttpDataReceiverMockup(
final byte[] bytes,
... | 0 |
private final Type type;
public JsonDeserializingImpl(Converter c, Type t) {
type = t;
if (type instanceof Class)
if (m.getClass().isAssignableFrom((Class<?>) type))
return (T) converter.convert(m).to(type); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.