Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
// return a deep copy, since the plugins may tamper with the array
// and collection elements, which should not modify the internal data
Dictionary props = cfg.getProperties( true ); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestMultiHashMap.java,v 1.12 2003/10/02 23:01:10 scolebourne Exp $
* $Revision: 1.12 $
* $Date: 2003/10/02 23:01:10 $
public class TestMultiHashMap extends AbstractTestMap
pr... | 0 |
import javax.servlet.http.HttpServletRequest;
HttpServletRequest request = processInfoProvider.getRequest();
if (!"POST".equals(request)) throw new MalformedURLException("Cannot create consumer source for request that is not POST.");
return new ServletServiceConsumerSource(request); | 0 |
*
*
*
public void doTag(XMLOutput output) throws JellyTagException {
Document expectedDocument = parseBody();
AssertDocumentsEqualTag assertTag =
(AssertDocumentsEqualTag) findAncestorWithClass(AssertDocumentsEqualTag
.class);
assertTag.setExpected(expectedDocu... | 0 |
package org.apache.commons.io.input;
* @version $Revision: 1.1 $ $Date: 2002/11/11 19:34:02 $ | 0 |
try (BatchScanner s = new TabletServerBatchReader(context, Table.ID.of("foo"), expected, 1)) {
new TabletServerBatchReader(context, Table.ID.of("foo"), null, 1); | 1 |
final ArrayList<String> output = new ArrayList<>(); | 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 concrete implementation is provided for binary compatibility with 1.6; it can be removed
// in 2.0. See ACCUMULO-3789.
protected BigInteger decodeUnchecked(byte[] b, int offset, int origLen)
throws ValueFormatException { | 0 |
public static <K, V> Trie<K, V> unmodifiableTrie(final Trie<K, ? extends V> trie) { | 0 |
m_log.log(LogService.LOG_WARNING, "ProviderParticipant2.start()");
}
@Override
public String toString() {
return "ProviderParticipant2"; | 0 |
import org.junit.Test;
import static org.junit.Assert.*;
public class IteratorEnumerationTest {
@Test | 0 |
TestStream.Builder<BeamRecord> values = TestStream.create(beamRecordSqlType.getRecordCoder()); | 0 |
import org.apache.accumulo.core.client.BatchWriterConfig;
BatchWriter writer = getConnector().createBatchWriter(TEST_TABLE, new BatchWriterConfig());
writer = test_user_conn.createBatchWriter(TEST_TABLE, new BatchWriterConfig());
writer = test_user_conn.createBatchWriter(TEST_TABLE, new Ba... | 0 |
import java.lang.reflect.Method;
// Try to preload the jrt handler as we need it from the jvm on java > 8
if (getFromCache(m_builtIn, "jrt") == null)
{
try
{
// Try to get it directly from the URL class to if possible
... | 0 |
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import java.util.HashMap;
import java.util.Map;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
import junit.framework.Assert; | 0 |
package org.apache.bcel.classfile;
import org.apache.bcel.Const; | 1 |
import org.apache.sshd.server.channel.ChannelSession;
public Command createShell(ChannelSession channel) {
public synchronized void start(ChannelSession channel, Environment env) throws IOException {
super.start(channel, env); | 0 |
import java.util.Set;
import junit.framework.Assert; | 0 |
* Copyright 2000-2009 The Apache Software Foundation | 0 |
/*
* Copyright 2000-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 applic... | 0 |
import org.xml.sax.SAXException;
public void run(JellyContext context, XMLOutput output) throws JellyException {
try {
startNamespacePrefixes(output);
} catch (SAXException e) {
throw new JellyException("could not start namespace prefixes",e);
}
try {
... | 0 |
schedulerCore.killTasks(activeQuery, CRON_USER); | 0 |
tmp = args[3];
// this is workaround of https://issues.apache.org/jira/browse/SPARK-5928 | 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 |
*
*
* <p>That said, this decorator is compatible with the
* <code>CachingHttpClient</code> in that the two decorators can be added
* in either order and still have cacheable responses be cached.</p>
*
*
DecompressingHttpClient(HttpClient backend,
HttpRequestInterceptor requestInterceptor,
... | 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 |
in.apply("KvSwap", ParDo.of(new DoFn<KV<K, V>, KV<V, K>>() {
@Override
public void processElement(ProcessContext c) {
KV<K, V> e = c.element();
c.output(KV.of(e.getValue(), e.getKey()));
}
})); | 0 |
* <p>Define expected output file checksum to verify WordCount pipeline result
* with customized input. | 0 |
import java.net.HttpURLConnection; | 0 |
policyStr.append("dataStewardPolicy;;testuser:rwud;;DATA_STEWARD:rwu;;type:*,entity:*\n"); | 0 |
import java.io.IOException;
@Override
public void close() throws IOException {
if (entity != null) {
entity.close();
}
}
| 0 |
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>. | 0 |
/*
* Copyright 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 app... | 0 |
private static List<KeyResolver> resolverVector = new CopyOnWriteArrayList<>(); | 0 |
/*
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation and was originally created by
Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache
Software Foundation, please see <http://www.apache.org/>.
| 0 |
* @version $Revision$ | 0 |
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.ByteString; | 0 |
* @version $Revision: 1.15 $ $Date: 2004/03/07 10:54:55 $
} if ("broken".equals(sql)) {
throw new SQLException("broken connection"); | 0 |
// TODO(wfarner): Add the batch_completion flag to JobUpdateSettings and pick correct
// strategy.
rollingForward);
private final boolean rollingForward;
Update(OneWayJobUpdater<Integer, Optional<IScheduledTask>> updater, boolean rollingForward) {
this.rollingForward = rollingForward... | 0 |
if (null == executionStages) {
case CONFIGURE: | 0 |
* The program reads an accumulo table written by {@link Index} and writes out to another table. It writes out a mapping of documents to terms. The document to
* term mapping is used by {@link ContinuousQuery}.
* See docs/examples/README.shard for instructions. | 0 |
final Set<PropertyDescriptor> descSet = new HashSet<>(); | 0 |
import javax.servlet.http.Cookie;
| 0 |
* Creates a new table.
public HashTable() {
table = new Entry[INITIAL_CAPACITY];
}
* @param c The initial capacity.
public HashTable(int c) {
table = new Entry[c];
int len = table.length;
if (count++ >= (len * 3) >>> 2) {
for (int i = 0; i < table.length; i++) {
tab... | 0 |
/*
* Copyright 2000-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 applic... | 0 |
final String table = "TEST-TABLE-DOES-NOT-EXIST";
final String table = "TEST-TABLE-BAD-ELEMENT"; | 0 |
* method. Setting an indexed property is supported, too.</p>
* property delimiter for the wrapped configuration. This is true for most of
* @version $Id$
if (!checkIndexedProperty(name))
throw new IllegalArgumentException("Property '" + name
+ "' is not indexed.");
Li... | 0 |
// the sleep is just to make sure the requests will stay in the queue for some time
Thread.sleep(20);
Assert.assertThat((long)values.get("min_prep_processor_queue_time_ms"), greaterThan(20l)); | 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 |
@SuppressWarnings({"cast", "unchecked", "rawtypes"})
TransformEvaluator<T> evaluator = (TransformEvaluator<T>) createEvaluator(
(AppliedPTransform) application, evaluationContext);
return evaluator; | 0 |
if ( bundle == null ) {
throw SigilCore.newCoreException("No default bundle", null);
}
| 0 |
import org.apache.beam.examples.complete.TfIdf;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.coders.StringDelegateCoder;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
import org.apache.beam.sdk.testing.PAssert;
import org.apache.beam.sdk.transforms.Create;
import org.apache.beam.sdk.tran... | 0 |
public ConstantPool(DataInput input) throws IOException, ClassFormatException { | 0 |
* @version $Revision: 1.6 $
Thread.sleep(100);
Thread.sleep(100);
Thread.sleep(100); | 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 |
expect(clusterTopology.getConfigRecommendationStrategy()).andReturn(ConfigRecommendationStrategy.ONLY_STACK_DEFAULTS_APPLY);
expect(clusterTopology.getConfigRecommendationStrategy()).andReturn(ConfigRecommendationStrategy.ONLY_STACK_DEFAULTS_APPLY); | 0 |
import com.google.cloud.dataflow.sdk.util.WindowedValue;
public class BigQueryReader extends Reader<WindowedValue<TableRow>> {
public ReaderIterator<WindowedValue<TableRow>> iterator() throws IOException {
class BigQueryReaderIterator extends AbstractReaderIterator<WindowedValue<TableRow>> {
public WindowedValu... | 0 |
_parser = new PosixParser(); | 0 |
case INVOKE_WOVEN_CLASS_LISTENER:
((org.osgi.framework.hooks.weaving.WovenClassListener) arg1).modified(
(org.osgi.framework.hooks.weaving.WovenClass) arg2);
return null; | 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. | 0 |
} catch (KeeperException | InterruptedException e) { | 0 |
private Object result = interpreter; | 0 |
public static String appendTimestampSuffix(String text) {
return String.format("%s_%s", text, new Date().getTime());
return getHashForRecordCount(lineCount, expectedHashes);
}
public static String getHashForRecordCount(int recordCount, Map<Integer, String> hashes) {
String hash = hashes.get(recordCou... | 0 |
import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer;
* Push a mutation into a table. If table is null, the defaultTable will be used. If {@link AccumuloOutputFormat#canCreateTables(JobConf)} is set, the table
* will be created if it does not exist. The tabl... | 0 |
package org.apache.felix.dependencymanager.tracker; | 0 |
if (value != null)
return (getDefaultLookup() != null) ? getDefaultLookup() : StrLookup.noneLookup();
globalLookups.put(PREFIX_SYSPROPERTIES, StrLookup.systemPropertiesLookup()); | 0 |
final Set<String> pids = new HashSet<>(services.keySet()); | 0 |
ImmutableSet.of(task.getAssignedTask()),
eq(ImmutableSet.of(taskA.getAssignedTask())), | 0 |
*
Assert
.assertEquals("viewfs:/a/tables/t-00000/C000.rf", VolumeUtil.switchVolume("hdfs://nn1/accumulo/tables/t-00000/C000.rf", FileType.TABLE, replacements));
Assert
.assertEquals("viewfs:/b/tables/t-00000/C000.rf", VolumeUtil.switchVolume("hdfs://nn2/accumulo/tables/t-00000/C000.rf", FileTyp... | 0 |
import org.apache.ambari.server.controller.spi.SystemException;
String repoInfo;
try {
repoInfo = repoVersionHelper.getRepoInfoString(cluster, component, host);
} catch (SystemException e) {
throw new RuntimeException(e);
}
CommandRepository commandRepository;
try {
commandRepo... | 0 |
/**
* LDAP support information
*/
@XmlElements(@XmlElement(name = "ldap"))
private ServiceLdapInfo ldapInfo;
/**
* Gets a new value for LDAP integration support
*/
public ServiceLdapInfo getLdapInfo() {
return ldapInfo;
}
/**
* Sets a new value for LDAP integration support
*
... | 0 |
put("tag", configTagVersion1);
}).times(3);
}).times(2);
}).times(2); | 0 |
private volatile ComponentContext m_decoratorComponent;
public abstract Component createService(Object[] properties) throws Exception;
m_decoratorComponent = (ComponentContext) c;
public void updateService(Object[] properties) throws Exception {
throw new NoSuchMethodException("Method updat... | 0 |
Copyright 2002-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 |
log.info(e.getKey().toStringNoTruncate() + " " + TextFormat.shortDebugString(Status.parseFrom(e.getValue().get())));
log.info("");
log.info(""); | 0 |
import org.apache.felix.service.command.CommandSession;
import org.apache.felix.service.command.Function; | 0 |
import org.apache.sshd.server.x11.X11ForwardSupport;
String display = ((ServerSession) session).createX11Display(buffer.getBoolean(), buffer.getString(),
buffer.getString(), buffer.getInt());
if (display == null) {
if (wantR... | 0 |
if (num >= 2) {
} else {
}
if (num == 1) {
} else if (num == 2) {
} else {
}
if (num == 1) {
} else if (num == 2) {
} else {
}
if (num == 1) {
} else if (num == 2) {
} else {
}
if (num == 1) {... | 1 |
* @version $Revision: 1.7 $ $Date: 2004/06/03 22:02:13 $
/** Serialization version */
private static final long serialVersionUID = -5259182142076705162L;
| 0 |
/** {@link org.apache.commons.logging} logging facility */
static org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory.getLog(PGPData.class.getName()); | 0 |
final String recursiveTest = "DualTreeBidiMap2Test.bulkTestInverseMap.bulkTestInverseMap"; | 0 |
import org.apache.ambari.server.controller.spi.Resource;
| 0 |
* A family of combiners that treat values as BigDecimals, encoding and decoding using the built-in
* BigDecimal String input/output functions.
public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
IteratorEnvironment env) throws IOException {
// This concrete implementat... | 0 |
public static final String VIEWURL_TABLE = "viewurl";
public static final String URL_ID_COLUMN = "url_id";
createViewUrlTableDDL();
}
private void createViewUrlTableDDL() throws SQLException {
List<DBColumnInfo> columns = new ArrayList<>();
// Add setting table
LOG.info("Creating " + VIEWURL_... | 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 |
/**
* 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 |
// org.apache.batik.anim.timing.Trace.enter(this, "addAnimation", new Object[] { target, new Short[type], ns, an, anim } ); try {
// } finally { org.apache.batik.anim.timing.Trace.exit(); }
// org.apache.batik.anim.timing.Trace.enter(this, "removeAnimation", new Object[] { anim } ); try {
... | 0 |
public static int getAddressCacheNegativeTtl(UnknownHostException originalException) { | 0 |
import org.apache.batik.w3c.dom.Location; | 0 |
import org.apache.ambari.server.state.PropertyDependencyInfo;
public Map<String, ConfigProperty> getConfigurationPropertiesWithMetadata(String service, String type) {
return serviceConfigurations.get(service).get(type);
}
private Set<PropertyDependencyInfo> dependsOnProperties =
Collections.emptySet(... | 0 |
/*
* @version $Rev: 538123 $, $Date$
if (this.getInstance() != null) {
Activator.trace("DelayedComponentServiceFactory.getService()", this.getComponentMetadata());
if (this.getInstance() == null) {
if (this.getState() == STATE_REGISTERED)
this.setState( STATE_AC... | 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 applic... | 1 |
* Copyright (C) 2015 Google Inc. | 0 |
import static org.junit.Assert.assertTrue;
} | 0 |
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Example import for consumers using the API in this package: <blockquote>
* | 0 |
* Tests whether a configuration can be saved that contains section keys
* with delimiter characters. This test is related to CONFIGURATION-409.
*/
public void testSaveKeysWithDelimiters() throws ConfigurationException
{
HierarchicalINIConfiguration conf = new HierarchicalINIConfiguration(... | 0 |
* Copyright 2000-2009 The Apache Software Foundation | 0 |
* Test for fix to ACCUMULO-1604: ColumnAgeOffFilter was throwing an error when using negate Test
* case for when "negate" is an actual column name
SortedKeyValueIterator<Key,Value> a = ColumnQualifierFilter.wrap(new SortedMapIterator(tm),
hsc);
Key k = new Key(new Text(String.format("%03d", i)),... | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.