Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
{ // DOS-style tests
{ // Unix-style tests
{ // DOS-style tests
{ // Unix-style tests | 0 |
accumulo.getZooKeepers();
ZooLock zl = new ZooLock(accumulo.getZooKeepers(), 30000, "digest", "secret".getBytes(), parent);
ZooReaderWriter zk = ZooReaderWriter.getInstance(accumulo.getZooKeepers(), 30000, "digest", "secret".getBytes());
accumulo.getZooKeepers();
ZooLock zl = new ZooLock(accumulo.ge... | 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 |
/*
* 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 org.apache.beam.sdk.io.gcp.pubsub.PubsubOptions; | 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 |
package org.apache.accumulo.core.crypto.streams; | 0 |
public PoolableConnectionFactory(final ConnectionFactory connFactory,
final ObjectName dataSourceJmxName) {
public void setValidationQuery(final String validationQuery) {
public void setValidationQueryTimeout(final int timeout) {
public void setConnectionInitSql(final Collection<String> conn... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/converters/ShortConverter.java,v 1.5 2003/01/15 21:59:40 rdonkin Exp $
* $Revision: 1.5 $
* $Date: 2003/01/15 21:59:40 $
* Copyright (c) 1999-2003 The Apache Software Foundation. A... | 0 |
WidgetDefinition classDefinition = null;
// we found a form definition to ask
if( formDefinition != null ) {
classDefinition = formDefinition.getWidgetDefinition(getId());
if (classDefinition == null) // not found in local form, try library
classDefinitio... | 0 |
import org.apache.accumulo.core.clientImpl.AcceptableThriftTableOperationException;
import org.apache.accumulo.core.clientImpl.thrift.TableOperation;
import org.apache.accumulo.core.clientImpl.thrift.TableOperationExceptionType; | 0 |
ClusterInformation clusterInformation = new ClusterInformation("cluster", false, null, null, null); | 0 |
private final String databaseName;
private final String tableName;
public AnalyzeTableQueryGenerator(String databaseName, String tableName, Boolean shouldAnalyzeColumns) {
this.databaseName = databaseName;
this.tableName = tableName;
return Optional.of("ANALYZE TABLE " + "`" + databaseName + "`.`" + t... | 0 |
import com.google.common.collect.Iterables;
import java.util.List;
import org.apache.beam.runners.core.SplittableParDo;
import org.apache.beam.runners.core.construction.ReplacementOutputs;
import org.apache.beam.sdk.transforms.ParDo;
import org.apache.beam.sdk.values.PCollection;
import org.apache.beam.sdk.values.PColl... | 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 |
schemaUpgradeHelper.executeDMLUpdates(upgradeCatalogs, "test"); | 0 |
public static final String PROPERTY_METRICS_SERVER_HOSTNAME = "site.global.metric_collector_host";
public static final String PROPERTY_METRICS_SERVER_PORT = "site.global.metric_collector_port";
public static final String PROPERTY_METRICS_LIBRARY_PATH = "site.global.metric_collector_lib"; | 0 |
import java.util.Collections;
import java.util.Iterator;
import org.apache.avalon.framework.parameters.ParameterException;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.cocoon.portal.aspect.impl.DefaultAspectDescription;
* @version CVS $Id: FrameAspect.java,v 1.6 2003/06/15 19:44:58 czie... | 0 |
import org.apache.commons.lang3.ArrayUtils;
private String[] defaultTags;
this.defaultTags = configuration.defaultTags();
if(ArrayUtils.isEmpty(selector.tags())) {
logger.debug("Using default tags");
selector.withTags(defaultTags);
}
final Servic... | 0 |
private InstructionList instructionList;
private Code code; | 0 |
* The repo version id to use
*/
public static final String REPO_VERSION_ID_PROPERTY = "repository_version_id";
/**
private Long repoVersionId;
if (properties.containsKey(REPO_VERSION_ID_PROPERTY)) {
repoVersionId = Long.parseLong(properties.get(REPO_VERSION_ID_PROPERTY).toString());
}
* ... | 0 |
package org.apache.beam.sdk.extensions.euphoria.core.client.operator.base;
import java.util.Optional;
import org.apache.beam.sdk.transforms.windowing.Window;
/**
* Operator aware of windows.
*
* @param <T> the type of windowed element
*/
public interface WindowAware<T> {
/**
* Get configured window.
*
* ... | 0 |
ParDoEvaluator<Object> underlying = mock(ParDoEvaluator.class);
ParDoEvaluator<Object> underlying = mock(ParDoEvaluator.class);
ParDoEvaluator<Object> underlying = mock(ParDoEvaluator.class);
ParDoEvaluator<Object> underlying = mock(ParDoEvaluator.class); | 0 |
if (TextUtils.isBlank(mimeType)) {
return null;
}
public static ContentType parse(final CharSequence s) throws UnsupportedCharsetException {
if (TextUtils.isBlank(s)) {
return null;
}
final HeaderElement[] elements = BasicHeaderValueParser.INSTANCE.par... | 0 |
public class SCRDescriptorException extends Exception {
public SCRDescriptorException( final String message, final Throwable cause )
this( message, null, -1, cause ); | 0 |
package org.apache.felix.webconsole.internal.compendium;
import org.apache.felix.webconsole.Action; | 0 |
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; | 0 |
return v.intValue();
this.maxPerRoute.put(route, Integer.valueOf(max)); | 0 |
import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException; | 1 |
* 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 ap... | 1 |
import com.google.common.collect.ImmutableMap;
import com.twitter.common.base.MorePreconditions;
public synchronized TaskDescription offer(final String slaveId, final String slaveHost,
Map<String, String> offerParams) throws ScheduleException {
MorePreconditions.checkNotBlank(slaveId);
MorePreconditions... | 0 |
checkArgument(
!(options.getSSECustomerKey() != null && options.getSSEAlgorithm() != null),
"Either SSECustomerKey (SSE-C) or SSEAlgorithm (SSE-S3) must not be set at the same time.");
if (options.getSSEAlgorithm() != null) {
objectMetadata.setSSEAlgorithm(options.getSSEAlgorithm());
} | 0 |
import static org.junit.Assert.*;
public class ReferenceListTest { | 0 |
import org.apache.accumulo.core.conf.AccumuloConfiguration;
final long maxFrameSize = AccumuloConfiguration.getMemoryInBytes(properties.getProperty("maxFrameSize", "16M"));
if (maxFrameSize > Integer.MAX_VALUE)
throw new RuntimeException(maxFrameSize + " is larger than MAX_INT");
args.transportFactory... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/SetNextRule.java,v 1.17 2003/10/05 15:06:50 rdonkin Exp $
* $Revision: 1.17 $
* $Date: 2003/10/05 15:06:50 $
*
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
... | 0 |
* Copyright 2003-2006 The Apache Software Foundation
* A mutable <code>KeyValue</code> pair that does not implement
* {@link java.util.Map.Entry Map.Entry}.
* Constructs a new pair from the specified <code>KeyValue</code>.
* Constructs a new pair from the specified <code>Map.Entry</code>.
* Compares ... | 0 |
import org.apache.avalon.framework.thread.ThreadSafe;
public class RequestAttributeOutputModule extends AbstractOutputModule implements OutputModule, ThreadSafe { | 0 |
@Override
@Override | 0 |
// Load 50K 100 byte entries
final String[] args = {"-i", info.getInstanceName(), "-z", info.getZooKeepers(), "-u", "root",
"-p", ROOT_PASSWORD, "--table", tableName, "--num", Long.toString(50 * 1000)}; | 0 |
assertTrue(client.tableOperations().listSplits(tableName).size() > 0); | 0 |
import org.apache.accumulo.test.functional.ConfigurableMacBase;
public class WaitForBalanceIT extends ConfigurableMacBase { | 0 |
public class TestParser3 extends AbstractParserTest
Context c = new Context();
c.addCommand("echo", this);
assertEquals("10d", c.execute("echo %(2*(3+2))d"));
assertEquals(3l, c.execute("%(1+2)"));
c.set("a", 2l);
assertEquals(3l, c.execute("%(a+=1)"));
assertEqua... | 0 |
import org.apache.felix.upnp.basedriver.Activator;
import org.apache.felix.upnp.basedriver.util.Converter; | 0 |
public Header getContentType() { | 0 |
import org.apache.beam.sdk.values.PCollectionList;
* @param <InputT> the type of input
* @param <OutputT> the type of output
public interface OperatorTranslator<InputT, OutputT, OperatorT extends Operator> {
* @param inputs list of inputs
PCollection<OutputT> translate(OperatorT operator, PCollectionList<InputT>... | 0 |
bw.addMutation(nm(
new byte[] {(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff}));
Text max = conn.tableOperations().getMaxRow(tableName, Authorizations.EMPTY, null, true,
rows.get(i), false);
max = conn.tableOperations().getMaxRow(tableName, Authorizations... | 0 |
put("test.password.empty", "");
if(resp.getConfigs().containsKey("test.password.empty")) {
assertEquals(resp.getConfigs().get("test.password.empty"), "");
} | 0 |
* Copyright 2016-2017 Seznam.cz, a.s. | 0 |
trigger,
true,
mode,
modeSpecified,
allowedLateness,
allowedLatenessSpecified,
timestampCombiner,
timestampCombinerSpecified,
trigger,
triggerSpecified,
mode,
true,
allowedLateness,
allowedLatenessSpecified,
... | 0 |
assertEquals(f.getName(), "abc(test)123.pdf");
}
public void testNoSpacesBeforeFileSize() {
FTPFile f = getParser().parseFTPEntry("drwxr-x---+1464 chrism chrism 41472 Feb 25 13:17 20090225");
assertNotNull(f);
assertEquals(f.getSize(), 41472);
assertEquals(f.getType(), FTPFile.DIRECTORY_TYPE);
ass... | 0 |
package org.apache.beam.sdk.extensions.euphoria.beam.common; | 0 |
package org.apache.commons.ognl;
* http://www.apache.org/licenses/LICENSE-2.0
import java.util.Enumeration;
import java.util.Map; | 0 |
* @version $Id$
public abstract class AbstractBidiMapTest<K, V> extends AbstractTestIterableMap<K, V> {
public AbstractBidiMapTest(String testName) {
public AbstractBidiMapTest() {
AbstractBidiMapTest.this.getConfirmed().remove(key1);
assertEquals(true, AbstractBidiMapTest.this.getMap()... | 0 |
" select distinct" +
" from " + USERS_TABLE + " u inner join" +
" group by lower(" + USERS_USER_NAME_COLUMN + ")) t" +
" select " +
" from " + MEMBERS_TABLE + " m inner join" +
" ) t on (lower(t." + USERS_USER_NAME_COLUMN + ") = lower(iu." + USERS_USER_... | 0 |
Dictionary properties;
this.properties = properties;
}
public Dictionary getProperties() {
return properties;
}
public void start() {
super.start(); | 0 |
p.apply(Create.of(Arrays.asList(TABLE)).withCoder(
KvCoder.of(StringUtf8Coder.of(), BigEndianIntegerCoder.of())));
p.apply(Create.of(Arrays.asList(EMPTY_TABLE)).withCoder(
KvCoder.of(StringUtf8Coder.of(), BigEndianIntegerCoder.of()))); | 0 |
import org.apache.beam.runners.core.metrics.MetricsContainerStepMap; | 0 |
// children = EMPTY_FILE_ARRAY; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestMap.java,v 1.26 2003/08/31 17:28:43 scolebourne Exp $
* $Revision: 1.26 $
* $Date: 2003/08/31 17:28:43 $
* any, must include the following acknowledgement:
* Al... | 0 |
@OneToMany(mappedBy = "clusterServiceEntity", cascade = CascadeType.ALL) | 0 |
for (int i = 0; i < entries.length && crl == null; i++) {
if (purpose != KeySelector.Purpose.VERIFY &&
crl != null &&
int high = (value >> 4) & 0x0f; | 0 |
try (AccumuloClient c = getAccumuloClient()) {
String tableName = getUniqueNames(1)[0];
c.tableOperations().create(tableName);
Map<String,Set<Text>> groups = new HashMap<>();
groups.put("lg1", Collections.singleton(new Text("foo")));
groups.put("dg", Collections.emptySet());
c.ta... | 0 |
* prepare the instance.
*/
void setup();
/**
/**
* cleanup resources of the instance.
*/
void teardown(); | 0 |
Copyright 2001-2004,2006 The Apache Software Foundation
import org.apache.batik.dom.svg.AnimatedLiveAttributeValue;
import org.apache.batik.dom.svg.LiveAttributeException;
import org.apache.batik.dom.svg.SVGOMPolygonElement;
import org.w3c.dom.svg.SVGPoint;
import org.w3c.dom.svg.SVGPointList;
try {
... | 1 |
* @version CVS $Id: EnumConvertor.java,v 1.4 2004/05/06 14:59:44 bruno Exp $
public ConversionResult convertFromString(String value,
return new ConversionResult(method.invoke(null, new Object[] { value, locale}));
return new ConversionResult(field.get(null)); | 0 |
zoo = "yes but requires restart of the " + prop.getKey().split("[.]")[0]; | 0 |
} catch (VisibilityParseException | BadArgumentException e) { | 0 |
Set<KeyExtent> migrationKeys = new HashSet<KeyExtent>();
synchronized (migrations) {
migrationKeys.addAll(migrations.keySet());
}
return migrationKeys; | 0 |
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.UniqueConstraint;
@Table(
name = "servicecomponentdesiredsta... | 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 org.apache.beam.runners.core.StateInternals; | 0 |
import java.util.stream.Collectors;
return splits
.stream()
.map(input -> new BoundedToUnboundedSourceAdapter<>(input))
.collect(Collectors.toList()); | 0 |
// N.B. do not use a constant array here as that can be changed externally by accident or design | 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 ap... | 1 |
if (repoInfo.isEmpty()){
LOG.error(String.format("Repository list is empty. Ambari may not be managing the repositories for %s", osFamily));
} | 0 |
@Override
@Override
@Parameter(names = "--logdir", description = "directory containing the log files", required = true)
Opts() {
super("ci");
}
| 0 |
* $HeadURL$
* $Revision$
* $Date$ | 0 |
this.validate(exception, cause, "message");
}
/**
* Tests the {@link CausedIOException#CausedIOException(Throwable)} constructor.
*/
public void testIOExceptionThrowable() {
Throwable cause = new IllegalArgumentException("cause");
CausedIOException exception = new CausedIO... | 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 |
import org.junit.Test;
import static org.junit.Assert.assertEquals;
@Test
public void simpleString() throws Exception {
assertEquals( "abc\r\n", roundtrip( "abc" ) );
}
@Test
public void inTheMiddleOfTheLine() throws Exception {
assertEquals( "a\r\nbc\r\n", roundtrip( "a\r\nbc" ) );
... | 0 |
import org.apache.http.client.cache.HeaderConstants;
import org.apache.http.client.cache.HttpCacheEntry;
private final CacheValidityPolicy validityStrategy;
CachedHttpResponseGenerator(final CacheValidityPolicy validityStrategy) {
super();
this.validityStrategy = validityStrategy;
}
Ca... | 0 |
package org.apache.beam.examples.complete.game.injector; | 0 |
* @param id the id. | 1 |
* @version CVS $Id: AbstractProcessingPipeline.java,v 1.2 2003/05/03 18:34:41 gianugo Exp $
if (this.checkIfModified( environment, this.reader.getLastModified() )) {
protected boolean checkIfModified(Environment environment,
long lastModified)
if(!environ... | 0 |
for (final E element : list2) { | 0 |
import java.util.function.Predicate;
/**
* @since 4.4
*/
@Override
public boolean removeIf(Predicate<? super E> filter) {
throw new UnsupportedOperationException();
}
| 0 |
Copyright 2001,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 |
import com.google.cloud.dataflow.sdk.util.state.WatermarkHoldState;
if (storage instanceof WatermarkHoldState) {
Instant hold = ((WatermarkHoldState<BoundedWindow>) storage).read(); | 0 |
public PInput buildPInput(Pipeline pipeline, Map<Integer, PCollection<Row>> cache) {
return BeamSqlRelUtils.toPCollection(pipeline, leftRelNode, cache);
return BeamRelNode.super.buildPInput(pipeline, cache); | 0 |
* @param <K> the type of the keys in the map
* @param <V> the type of the values in the map
*
public interface OrderedBidiMap<K, V> extends BidiMap<K, V>, OrderedMap<K, V> {
public OrderedBidiMap<V, K> inverseBidiMap();
| 0 |
protected static final AttributeInitializer attributeInitializer;
| 1 |
Utils.checkTableDoesNotExist(master, tableInfo.tableName, tableInfo.tableId, | 0 |
if (options.getDiskSourceImage() != null) {
workerPool.setDiskSourceImage(options.getDiskSourceImage());
} | 0 |
package com.twitter.nexus.scheduler;
import com.google.common.collect.Maps;
import com.twitter.nexus.gen.CronCollisionPolicy;
import com.twitter.nexus.gen.JobConfiguration;
import com.twitter.nexus.gen.ScheduleStatus;
import com.twitter.nexus.gen.TaskQuery;
import com.twitter.nexus.gen.TrackedTask;
import com.twitter.n... | 0 |
import junit.framework.TestSuite;
import org.apache.commons.net.ftp.ftp2.FTPFileEntryParser;
* @version $Id: OS2FTPEntryParserTest.java,v 1.2 2002/08/06 20:32:04 brekke Exp $
super(name);
protected String[] getGoodListing()
return(goodsamples);
protected String[] getBadListing()
... | 0 |
package com.twitter.nexus.scheduler;
import com.twitter.nexus.gen.*;
import com.twitter.nexus.scheduler.configuration.ConfigurationManager;
* Nexus scheduler thrift server implementation.
* Interfaces between nexus users and the scheduler core to perform cluster administration tasks.
class SchedulerThriftInterface ex... | 0 |
import java.util.ArrayList;
import org.apache.ambari.server.agent.RecoveryConfigComponent;
import com.google.common.collect.Lists;
public void testServiceComponentInstalled() throws Exception {
assertEquals(Lists.newArrayList(
new RecoveryConfigComponent(DATANODE, HDFS, State.INIT)
), recoveryConfig.... | 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 org.apache.beam.dsls.sql.schema.BeamSQLRow;
import org.apache.beam.sdk.values.PCollection;
* The core component to handle through a SQL statement, from explain execution plan,
* to generate a Beam pipeline.
* {@code compileBeamPipeline} translate a SQL statement to executed as Beam data flow,
* which is ... | 0 |
/** Internal implementation of the Beam runner for Apache Flink. */ | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.