Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
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 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 agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.beam.sdk.util; import com.google.auto.service.AutoService; import org.apache.beam.sdk.options.PipelineOptions; /** * {@link AutoService} registrar for the {@link FileIOChannelFactory}. */ @AutoService(IOChannelFactoryRegistrar.class) public class FileIOChannelFactoryRegistrar implements IOChannelFactoryRegistrar { @Override public IOChannelFactory fromOptions(PipelineOptions options) { return FileIOChannelFactory.fromOptions(options); } @Override public String getScheme() { return "file"; } }
0
import org.apache.accumulo.server.mini.MiniAccumuloCluster;
0
* Copyright 2016-2017 Seznam.cz, a.s.
0
import org.apache.commons.configuration.event.ConfigurationEvent; addConfigurationListener(ConfigurationEvent.ANY, autoSaveListener); removeConfigurationListener(ConfigurationEvent.ANY, autoSaveListener);
0
* Types of timers that are supported. */ public enum TimeDomain { /** * Timers that fire based on the timestamp of events. Once set, the timer will fire when the * system watermark passes the specified time. */ EVENT_TIME, /** * Timers that fire based on the current processing time. Once set, the timer will fire at some * point when the system time is after the specified time. */ PROCESSING_TIME; } /** public void setTimer(W window, Instant timestamp, TimeDomain timeDomain) throws IOException; public void deleteTimer(W window, TimeDomain timeDomain) throws IOException;
0
* Copyright 1999-2006 The Apache Software Foundation
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 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 agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.apache.accumulo.core.security.crypto.impl; import java.io.OutputStream; import java.nio.charset.Charset; import org.apache.accumulo.core.spi.crypto.CryptoService; import org.apache.accumulo.core.spi.crypto.FileEncrypter; public class NoFileEncrypter implements FileEncrypter { @Override public OutputStream encryptStream(OutputStream outputStream) throws CryptoService.CryptoException { return outputStream; } @Override public byte[] getDecryptionParameters() { return NoCryptoService.VERSION.getBytes(Charset.forName("UTF-8")); } }
0
fail( "IllegalArgumentException not caught" );
0
this.start = start; this.end = end;
0
* @version $Id$
0
Method setter = getWriteMethod(target, prop, value); * Get the write method to use when setting {@code value} to the {@code target}. * * @param target Object where the write method will be called. * @param prop BeanUtils information. * @param value The value that will be passed to the write method. * @return The {@link java.lang.reflect.Method} to call on {@code target} to write {@code value} or {@code null} if * there is no suitable write method. */ protected Method getWriteMethod(Object target, PropertyDescriptor prop, Object value) { Method method = prop.getWriteMethod(); return method; } /**
0
* Copyright (c) OSGi Alliance (2000, 2013). All Rights Reserved. import org.osgi.annotation.versioning.ConsumerType; * @author $Id: 97c76c64c6e6595ad445dcc2d8083d52540f73b8 $ @ConsumerType
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 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 agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
0
responseTrigger.submitResponse(new BasicResponseProducer(HttpStatus.SC_OK, "All is well"), context); responseChannel.sendInformation(new BasicHttpResponse(HttpStatus.SC_CONTINUE), context); responseChannel.sendResponse(response, entityProducer, context); // ignore producer.sendResponse(responseChannel, context); new BasicResponseProducer(new StringAsyncEntityProducer("useful stuff")), context); responseTrigger.submitResponse(new BasicResponseProducer(response), context); new StringAsyncEntityProducer("Hello back with some trailers"))), context); responseChannel.sendResponse(new BasicHttpResponse(200), entityProducer, context); // empty
0
* * * * * * * * * * public Writer(FSDataOutputStream fout, String compressionName, Configuration conf, boolean trackDataBlocks, AccumuloConfiguration accumuloConfiguration) throws IOException { * * * * * * * * * * public Reader(CachableBlockFile.Reader cache, FSDataInputStream fin, long fileLength, Configuration conf, AccumuloConfiguration accumuloConfiguration) throws IOException { * * * * * * *
0
import org.apache.beam.sdk.testing.NeedsRunner; import org.junit.experimental.categories.Category; @Category(NeedsRunner.class) @Category(NeedsRunner.class) @Category(NeedsRunner.class)
0
import org.apache.aurora.scheduler.storage.Storage.MutateWork.NoResult; storage.write((NoResult.Quiet) storeProvider -> storeProvider.getCronJobStore().saveAcceptedJob(CRON_JOB)); expectLastCall().andAnswer(() -> { firstExecutionTriggered.countDown(); firstExecutionCompleted.await(); return null; expectLastCall().andAnswer(() -> { secondExecutionTriggered.countDown(); secondExecutionCompleted.await(); return null;
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 applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ * @version CVS $Id: XMLDeserializer.java,v 1.3 2004/03/05 13:02:50 bdelacretaz Exp $
1
private final static Log LOG = LogFactory.getLog(StaticUserAuthenticator.class); if (type == UserAuthenticationData.DOMAIN) { } else if (type == UserAuthenticationData.USERNAME) { } else if (type == UserAuthenticationData.PASSWORD) { } else { if (LOG.isDebugEnabled()) { + " does not support authentication data type '" + type + "'; authentication request for this type ignored."); } }
0
try { featuresService.installFeature(f.getName(), f.getVersion()); } catch (Exception e) { LOGGER.error("Unable to install feature: " + f.getName(), e); } try { featuresService.uninstallFeature(f.getName(), f.getVersion()); } catch (Exception e) { LOGGER.error("Unable to uninstall feature: " + f.getName(), e); }
0
/* * Copyright (c) OSGi Alliance (2016, 2017). All Rights Reserved. * * 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 agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.osgi.service.log; import org.osgi.annotation.versioning.ProviderType; /** * This is a stripped down copy of the LogService 1.4 API (R7). It's * trimmed down to the methods used by the optional support for * R7 logging. */ @ProviderType public interface Logger { boolean isDebugEnabled(); void debug(String message); void debug(String format, Object arg); boolean isInfoEnabled(); void info(String message); void info(String format, Object arg); boolean isWarnEnabled(); void warn(String message); void warn(String format, Object arg); boolean isErrorEnabled(); void error(String message); void error(String format, Object arg); }
0
import cz.seznam.euphoria.core.client.dataset.windowing.TimeInterval; ListDataSink<WindowedPair<TimeInterval, String, HashMap<String, Long>>> output Dataset<WindowedPair<TimeInterval, String, HashMap<String, Long>>> Pair.of(new TimeInterval(0, 10), Pair.of(new TimeInterval(10, 10), Pair.of(new TimeInterval(20, 10), Dataset<WindowedPair<TimeInterval, String, Long>> counted = ReduceByKey.of(distinctByUser) Dataset<WindowedPair<TimeInterval, Long, HashMap<String, Long>>> ListDataSink<WindowedPair<TimeInterval, Long, HashMap<String, Long>>> output = Pair.of(new TimeInterval(0, 5), Pair.of(new TimeInterval(10, 5), Pair.of(new TimeInterval(5, 5), toMap(Pair.of("one", 3L), Pair.of("two", 2L)))),
0
import org.apache.http.entity.ContentLengthStrategy; conn = new BHttpConnectionBase(1024, 1024, null, null, MessageConstraints.DEFAULT); conn.outbuffer.write(0); Mockito.<byte[]>any(), Mockito.anyInt(), Mockito.anyInt()); Mockito.<byte[]>any(), Mockito.anyInt(), Mockito.anyInt()); conn.outbuffer.write(0); public void testCreateEntityLengthDelimited() throws Exception { final HttpEntity entity = conn.createIncomingEntity(message, conn.inbuffer, 10); public void testCreateEntityInputChunked() throws Exception { final HttpEntity entity = conn.createIncomingEntity(message, conn.inbuffer, ContentLengthStrategy.CHUNKED); public void testCreateEntityInputIdentity() throws Exception { final HttpEntity entity = conn.createIncomingEntity(message, conn.inbuffer, ContentLengthStrategy.IDENTITY); public void testCreateEntityInputUndefined() throws Exception { final HttpEntity entity = conn.createIncomingEntity(message, conn.inbuffer, ContentLengthStrategy.UNDEFINED); Assert.assertNotNull(entity); Assert.assertFalse(entity.isChunked()); Assert.assertEquals(-1, entity.getContentLength()); final InputStream instream = entity.getContent(); Assert.assertNotNull(instream); Assert.assertTrue((instream instanceof IdentityInputStream)); conn.inbuffer.read();
0
isMapReduce = true; log.info("Running test {}", className);
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 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 agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.zookeeper.server.quorum; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import java.net.InetSocketAddress; import org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer; import org.junit.Test; public class TestRemotePeerBean { /** * Test case for https://issues.apache.org/jira/browse/ZOOKEEPER-2269 */ @Test public void testGetClientAddressShouldReturnEmptyStringWhenClientAddressIsNull() { InetSocketAddress peerCommunicationAddress = null; // Here peerCommunicationAddress is null, also clientAddr is null QuorumServer peer = new QuorumServer(1, peerCommunicationAddress); RemotePeerBean remotePeerBean = new RemotePeerBean(peer); String clientAddress = remotePeerBean.getClientAddress(); assertNotNull(clientAddress); assertEquals(0, clientAddress.length()); } }
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 applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ * @version $Id: NamedEvent.java,v 1.5 2004/03/05 13:01:56 bdelacretaz Exp $
1
import com.google.common.collect.ImmutableSet; createClassTypeDef("B", ImmutableSet.of("A"), createOptionalAttrDef("b", DataTypes.BOOLEAN_TYPE)); createClassTypeDef("C", ImmutableSet.of("B"), createOptionalAttrDef("c", DataTypes.BYTE_TYPE)); createClassTypeDef("D", ImmutableSet.of("C"), createOptionalAttrDef("d", DataTypes.SHORT_TYPE));
0
/* * Copyright (c) 2003 World Wide Web Consortium, * * (Massachusetts Institute of Technology, European Research Consortium for * Informatics and Mathematics, Keio University). All Rights Reserved. This * work is distributed under the W3C(r) Software License [1] in the hope that * it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 * * Modifications: * February 21, 2005 * - Moved interface to org.apache.batik.dom.dom3.events package. * - Removed methods and constants present in the DOM 2 interface. * * The original version of this file is available at: * http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/java-binding.zip */ package org.apache.batik.dom.dom3.events; /** * Event operations may throw an <code>EventException</code> as specified in * their method descriptions. * <p>See also the <a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>Document Object Model (DOM) Level 3 Events Specification</a>. * @since DOM Level 2 */ public class EventException extends org.w3c.dom.events.EventException { public EventException(short code, String message) { super(code, message); } }
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 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 agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.accumulo.master.upgrade; import org.apache.accumulo.server.ServerConstants; import org.apache.accumulo.server.ServerContext; /** * See {@link ServerConstants#CRYPTO_CHANGES} */ public class Upgrader8to9 implements Upgrader { @Override public void upgradeZookeeper(ServerContext ctx) { // There is no action that needs to be taken for zookeeper } @Override public void upgradeMetadata(ServerContext ctx) { // There is no action that needs to be taken for metadata } }
0
import org.apache.hc.core5.testing.classic.LoggingSupport;
0
dataType = ctor.newInstance(new Object[0]); dataType = ctor.newInstance(new Object[] { getAntProject() });
0
if (configuration.useMetricsCacheCustomSizingEngine()) { // Use custom sizing engine to speed cache sizing calculations System.setProperty("net.sf.ehcache.sizeofengine." + TIMELINE_METRIC_CACHE_MANAGER_NAME, "org.apache.ambari.server.controller.metrics.timeline.cache.TimelineMetricsCacheSizeOfEngine"); }
0
boolean secVal = Utils.secureValidation(context); xi.setSecureValidation(secVal);
0
import java.util.List; private final Map<String, Properties> repos; private final List<String> repositoryPath; private BldRepositoryManager manager; public BldResolver(List<String> repositoryPath, Map<String, Properties> repos) this.repositoryPath = repositoryPath; manager = new BldRepositoryManager(repositoryPath, repos);
0
this(atlasProperties.getString(HIVE_CLUSTER_NAME, DEFAULT_CLUSTER_NAME), Hive.get(hiveConf), atlasClientV2, atlasProperties.getBoolean(HDFS_PATH_CONVERT_TO_LOWER_CASE, false)); ret.setAttribute(ATTRIBUTE_NAME, Path.getPathWithoutSchemeAndAuthority(path).toString());
0
MonitoringUtil.getGcloudCancelCommand(options, job.getJobId()));
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/adapters/Attic/CollectionIntCollection.java,v 1.7 2003/03/01 00:47:28 rwaldhoff Exp $ * @version $Revision: 1.7 $ $Date: 2003/03/01 00:47:28 $
0
* {@link org.apache.http.cookie.CookieSpecProvider} implementation that provides an instance of * {@link org.apache.http.impl.cookie.RFC2109Spec}. The instance returned by this factory * can be shared by multiple threads. private final CookieSpec cookieSpec; this.cookieSpec = new RFC2109Spec(datepatterns, oneHeader); return this.cookieSpec;
0
import java.io.IOException; * Configure the time to wait for ZooKeeper to startup. Calling this method is optional. The default is 20000 milliseconds /** * Informs MAC that it's running against an existing accumulo instance. It is assumed that it's already initialized and hdfs/zookeeper are already running. * * @param accumuloSite * a File representation of the accumulo-site.xml file for the instance being run * @param hadoopConfDir * a File representation of the hadoop configuration directory containing core-site.xml and hdfs-site.xml * * @since 1.6.2 */ public MiniAccumuloConfig useExistingInstance(File accumuloSite, File hadoopConfDir) throws IOException { impl.useExistingInstance(accumuloSite, hadoopConfDir); return this; }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/decorators/Attic/AbstractIteratorDecorator.java,v 1.2 2003/08/31 17:24:46 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * @version $Revision: 1.2 $ $Date: 2003/08/31 17:24:46 $
0
import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE; import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
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.FluentIterable; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterators; import org.apache.beam.vendor.guava.v20_0.com.google.common.io.ByteSource; import org.apache.beam.vendor.guava.v20_0.com.google.common.io.CharSource; import org.apache.beam.vendor.guava.v20_0.com.google.common.io.Closer; import org.apache.beam.vendor.guava.v20_0.com.google.common.io.Files;
0
* @deprecated This block is deprecated and will be removed in future versions.
0
import static com.twitter.mesos.scheduler.configuration.ConfigurationManager.DEDICATED_ATTRIBUTE; import static com.twitter.mesos.scheduler.SchedulingFilterImpl.DEDICATED_HOST_VETO; expectGetHostAttributes(HOST_B); expectGetHostAttributes(HOST_C); assertThat(filterBuilder.filter(DEFAULT_OFFER, Optional.of(HOST_B), makeTask(OWNER_A, JOB_A, DEFAULT_CPUS, DEFAULT_RAM, DEFAULT_DISK)).isEmpty(), assertThat(filterBuilder.filter(DEFAULT_OFFER, Optional.of(HOST_C), makeTask(OWNER_A, JOB_A, DEFAULT_CPUS, DEFAULT_RAM, DEFAULT_DISK)).isEmpty(), expectGetHostAttributes(HOST_A); expectGetHostAttributes(HOST_A).anyTimes(); public void testDedicatedRole() throws Exception { expectGetHostAttributes(HOST_A, dedicated(ROLE_A)); expectGetHostAttributes(HOST_A, dedicated(ROLE_A)); control.replay(); assertThat(defaultFilter.filter(DEFAULT_OFFER, Optional.of(HOST_A), makeTask(OWNER_A, JOB_B, new Constraint(DEDICATED_ATTRIBUTE, TaskConstraint.value( new ValueConstraint(false, ImmutableSet.<String>of(ROLE_A)))))).isEmpty(), is(true)); assertEquals(ImmutableSet.of(DEDICATED_HOST_VETO), defaultFilter.filter(DEFAULT_OFFER, Optional.of(HOST_A), makeTask(OWNER_B, JOB_B))); } @Test expectGetHostAttributes(HOST_A); private Attribute dedicated(String role) { return valueAttribute(DEDICATED_ATTRIBUTE, role); }
0
StringBuilder buffer = new StringBuilder();
0
import java.util.Map.Entry; PipelineOptions clonedOptions; clonedOptions = MAPPER.readValue(MAPPER.writeValueAsBytes(proxy), PipelineOptions.class); for (Class<? extends PipelineOptions> knownIface : knownInterfaces) { clonedOptions.as(knownIface); } return clonedOptions.as(iface);
0
private boolean started; private Map<String, String> env;
0
* @version CVS $Id: HttpProxyGenerator.java,v 1.2 2003/03/16 17:49:06 vgritsenko Exp $
0
* @version CVS $Id: JavaScriptFlowTestCase.java,v 1.2 2004/06/14 14:53:57 stephan Exp $ /*String source = "resource://org/apache/cocoon/components/flow/javascript/calc.js"; callFunction("java", source, "calculator", new ArrayList());*/
0
/* * $Id$ * * 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 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 agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */
0
package org.apache.bcel.generic; super(org.apache.bcel.Const.LUSHR);
1
import org.apache.accumulo.cloudtrace.instrument.Trace;
0
* @version $Id$ setCommonProperties(widgetElement, actionDefinition);
0
public static final Role RANGER_ADMIN = valueOf("RANGER_ADMIN"); public static final Role RANGER_USERSYNC = valueOf("RANGER_USERSYNC"); public static final Role KNOX_GATEWAY = valueOf("KNOX_GATEWAY"); public static final Role KAFKA_BROKER = valueOf("KAFKA_BROKER"); public static final Role NIMBUS = valueOf("NIMBUS"); public static final Role RANGER_KMS_SERVER = valueOf("RANGER_KMS_SERVER");
0
* @version $Id$
0
* Invoked when an MutationEvent of type 'DOMCharacterDataModified' * is fired. */ public void handleDOMCharacterDataModified(MutationEvent evt) { } /** for (Node n = node.getFirstChild(); n!=null; n = n.getNextSibling()) {
0
@Override
0
import org.apache.beam.sdk.testutils.metrics.TimeMonitor; private static final String FILEIOIT_NAMESPACE = TextIOIT.class.getName(); "Collect write start time", "Collect write end time", .apply("Collect read end time", ParDo.of(new TimeMonitor<>(FILEIOIT_NAMESPACE, "endTime")))
0
import org.apache.hc.core5.http.Header; import org.apache.hc.core5.http.HeaderElement; import org.apache.hc.core5.http.HttpHost; import org.apache.hc.core5.http.HttpRequest; import org.apache.hc.core5.http.HttpVersion; import org.apache.hc.core5.http.ProtocolException; import org.apache.hc.core5.http.message.BasicHeader; import org.apache.hc.core5.http.message.BasicHttpRequest; private HttpHost host; host = new HttpHost("foo.example.com", 80); new BasicHttpRequest("GET", "/", HttpVersion.HTTP_1_1), host); final HttpRequestWrapper requestWrapper = HttpRequestWrapper.wrap(basicRequest, host); final HttpRequestWrapper requestWrapper = HttpRequestWrapper.wrap(basicRequest, host); final HttpRequestWrapper requestWrapper = HttpRequestWrapper.wrap(basicRequest, host); final HttpRequestWrapper requestWrapper = HttpRequestWrapper.wrap(basicRequest, host); final HttpRequestWrapper requestWrapper = HttpRequestWrapper.wrap(basicRequest, host); request = HttpRequestWrapper.wrap(new BasicHttpRequest("GET", uri, HttpVersion.HTTP_1_1), host);
0
import org.apache.accumulo.core.client.impl.AuthenticationTokenIdentifier; import org.apache.accumulo.core.client.impl.DelegationTokenImpl; public void testDelegationTokenImpl() throws Exception { final DelegationTokenImpl token = new DelegationTokenImpl(new byte[0], new AuthenticationTokenIdentifier("user", 1, 10l, 20l, "instanceid")); final DelegationTokenImpl delToken1 = new DelegationTokenImpl(new byte[0], new AuthenticationTokenIdentifier("user", 1, 10l, 20l, "instanceid")); final DelegationTokenImpl delToken2 = new DelegationTokenImpl(new byte[0], new AuthenticationTokenIdentifier("user", 1, 10l, 20l, "instanceid"));
1
import org.apache.beam.vendor.grpc.v1_13_1.com.google.protobuf.ByteString;
0
//TODO manage enum annotations. * Visit a 'simple' annotation attribute.
0
* file of your choosing. You may also set {@literal --inputFile} to an empty string, which will
0
// TODO: Move the DataflowWorkerLoggingMDC into wrapper used on the Dataflow worker in // invokeProcessElement
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
0
import org.apache.accumulo.core.client.impl.BaseIteratorEnvironment; env = new MajCIteratorEnvironmentAdapter(); env = new MajCIteratorEnvironmentAdapter(); env = new MajCIteratorEnvironmentAdapter(); private static class MajCIteratorEnvironmentAdapter extends BaseIteratorEnvironment {
1
SimpleTimer.getInstance().schedule(new Runnable() {
0
details.getUpdate().getSummary().getUpdateId()); details.getUpdate().getSummary().getUpdateId());
0
* @param <E> the element type * @param <E> the element type * @return a new list containing the results * @param <E> the element type * @param <E> the element type * @return a new list containing the union of those lists * @param <E> the element type * @param inputCollection the collection to get the input from, may not be null * @param predicate the predicate to use, may be null * @throws NullPointerException if the input list is null * If the input predicate is <code>null</code>, the result is an empty list. * @param <E> the element type * @param inputCollection the collection to get the input from, may not be null * @param predicate the predicate to use, may be null * @throws NullPointerException if the input collection is null * @param <E> the element type * @throws NullPointerException if the list is null * @throws NullPointerException if the list is null * @param <E> the element type * @throws NullPointerException if the List or Predicate is null * @param <E> the element type * @throws NullPointerException if the List or Transformer is null * @param <E> the element type * @throws NullPointerException if the List or Factory is null * @throws NullPointerException if the List is null * @throws NullPointerException if either list is {@code null} * @throws NullPointerException if either list or the equator is {@code null} throw new NullPointerException("List must not be null"); throw new NullPointerException("Equator must not be null"); * @throws NullPointerException if either sequence is {@code null} throw new NullPointerException("CharSequence must not be null"); * @param <T> the element type * @throws NullPointerException if list is null * @throws IllegalArgumentException if size is not strictly positive throw new NullPointerException("List must not be null");
0
import org.apache.http.impl.cookie.RFC2965SpecFactory; registry.register( CookiePolicy.RFC_2965, new RFC2965SpecFactory());
0
@SuppressWarnings("rawtypes") public static final ResettableIterator EMPTY_ITERATOR = EmptyIterator.RESETTABLE_INSTANCE; @SuppressWarnings("rawtypes") public static final ResettableListIterator EMPTY_LIST_ITERATOR = EmptyListIterator.RESETTABLE_INSTANCE; @SuppressWarnings("rawtypes") public static final OrderedIterator EMPTY_ORDERED_ITERATOR = EmptyOrderedIterator.INSTANCE; @SuppressWarnings("rawtypes") public static final MapIterator EMPTY_MAP_ITERATOR = EmptyMapIterator.INSTANCE; @SuppressWarnings("rawtypes") public static final OrderedMapIterator EMPTY_ORDERED_MAP_ITERATOR = EmptyOrderedMapIterator.INSTANCE;
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 use this file except in compliance with * the License. You may obtain a copy of the License at
0
import org.apache.avalon.excalibur.datasource.DataSourceComponent; import org.apache.avalon.framework.activity.Disposable; import org.apache.avalon.framework.component.Component; import org.apache.avalon.framework.service.Serviceable; import org.apache.avalon.framework.thread.ThreadSafe; import java.sql.Connection; import java.sql.SQLException; * OJB ConnectionFactory implemenation to bridge into the Avalon DataSource * connection pooling component defined in the Cocoon configuration. * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a> public class ConnectionFactoryImpl implements Component, ThreadSafe, Serviceable, Disposable, ConnectionFactory { private static ServiceSelector datasources; public void service(ServiceManager manager) throws ServiceException { ConnectionFactoryImpl.manager = manager; ConnectionFactoryImpl.datasources = (ServiceSelector) manager.lookup(DataSourceComponent.ROLE + "Selector"); public void dispose() { if (ConnectionFactoryImpl.manager != null) { ConnectionFactoryImpl.manager.release(ConnectionFactoryImpl.datasources); ConnectionFactoryImpl.datasources = null; ConnectionFactoryImpl.manager = null; if (ConnectionFactoryImpl.manager == null) { throw new LookupException("ConnectionFactoryImpl is not initialized! Please check your cocoon.xconf"); return ((DataSourceComponent) ConnectionFactoryImpl.datasources.select(conDesc.getJcdAlias())).getConnection();
0
final String user = cl.getOptionValue(userOpt.getOpt(), shellState.getAccumuloClient().whoami()); Authorizations auths = shellState.getAccumuloClient().securityOperations() shellState.getAccumuloClient().securityOperations().changeUserAuthorizations(user,
0
hdfsSiteMap.put("dfs.namenode.rpc-address", new SingleHostTopologyUpdater("NAMENODE"));
0
import java.util.function.Predicate; Predicate<String> all = x -> true;
0
package org.apache.beam.dsls.sql.planner; import org.apache.beam.dsls.sql.rel.BeamRelNode; import org.apache.beam.dsls.sql.rule.BeamFilterRule; import org.apache.beam.dsls.sql.rule.BeamIOSinkRule; import org.apache.beam.dsls.sql.rule.BeamIOSourceRule; import org.apache.beam.dsls.sql.rule.BeamProjectRule;
0
import cz.seznam.euphoria.core.client.flow.Flow; import cz.seznam.euphoria.core.client.functional.UnaryFunctor; import cz.seznam.euphoria.core.client.io.Collector; import cz.seznam.euphoria.core.client.util.Sums; .combineBy(Sums.ofLongs()) .combineBy(Sums.ofLongs())
0
public void testBigQueryQuerySourceEstimatedSize() throws Exception { List<TableRow> data = ImmutableList.of( new TableRow().set("name", "A").set("number", 10L), new TableRow().set("name", "B").set("number", 11L), new TableRow().set("name", "C").set("number", 12L)); PipelineOptions options = PipelineOptionsFactory.create(); BigQueryOptions bqOptions = options.as(BigQueryOptions.class); bqOptions.setProject("project"); String stepUuid = "testStepUuid"; String query = FakeBigQueryServices.encodeQuery(data); BigQueryQuerySource<TableRow> bqSource = BigQueryQuerySource.create( stepUuid, ValueProvider.StaticValueProvider.of(query), true /* flattenResults */, true /* useLegacySql */, fakeBqServices, TableRowJsonCoder.of(), BigQueryIO.TableRowParser.INSTANCE, QueryPriority.BATCH, null); fakeJobService.expectDryRunQuery( bqOptions.getProject(), query, new JobStatistics().setQuery( new JobStatistics2().setTotalBytesProcessed(100L))); assertEquals(100, bqSource.getEstimatedSizeBytes(bqOptions)); } @Test
0
"No TransformEvaluator registered for UNBOUNDED transform %s", clazz);
0
private byte[][] values = { public PGPDataTest() throws Exception { } pd.isFeatureSupported(null); fail("Should raise a NPE for null feature");
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 use this file except in compliance with * the License. You may obtain a copy of the License at
0
if (!res.getPopulateRequiredFlag()) { continue; }
0
NAMESPACE_DOESNT_EXIST;
0
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.InvalidProtocolBufferException; import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.Struct; import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.util.JsonFormat;
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(LogSearchConfigFactory.class); if (configClassName != null && !"".equals(configClassName.trim())) { LOG.error("Could not initialize logsearch config.", e);
0
import org.apache.cocoon.configuration.Settings;
0
import static com.google.common.base.Charsets.UTF_8; byte[] sb = s.getBytes(UTF_8); String hs = new String(hex, UTF_8);
0
* the {@link org.apache.commons.net.tftp.TFTP} because * the {@link org.apache.commons.net.DatagramSocketClient#open open() }, * {@link org.apache.commons.net.DatagramSocketClient#close close() }, * {@link #sendFile sendFile() }, and * {@link #receiveFile receiveFile() } methods. Additionally, the * {@link #setMaxTimeouts setMaxTimeouts() } and * {@link org.apache.commons.net.DatagramSocketClient#open open()} before * {@link org.apache.commons.net.DatagramSocketClient#open open()} before * {@link org.apache.commons.net.DatagramSocketClient#open open()} before * {@link org.apache.commons.net.DatagramSocketClient#open open()} before
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/GenericValidator.java,v 1.15 2003/04/29 02:15:35 dgraham Exp $ * $Revision: 1.15 $ * $Date: 2003/04/29 02:15:35 $ * <p>This class contains basic methods for performing validations.</p> * @version $Revision: 1.15 $ $Date: 2003/04/29 02:15:35 $ * Delimiter to put around a regular expression following Perl 5 syntax. * @deprecated Use ValidatorUtil.REGEXP_DELIMITER instead. public final static String REGEXP_DELIM = ValidatorUtil.REGEXP_DELIMITER; * @param value The value validation is being performed on. public static boolean isEmail(String value) { return EmailValidator.getInstance().isEmail(value); } */ */ * @deprecated use ValidatorUtil.getDelimitedRegExp() instead. */ return ValidatorUtil.getDelimitedRegExp(regexp);
0
for (int significantBit : significantBits) { cs.writeByte(significantBit); for (int aHist : hist) { cs.writeShort(aHist); for (byte aT : t) { cs.writeByte(aT);
0
Schema beamSQLSchema = buildBeamSqlSchema(args); return pCollectionBuilder().withSchema(type).withRows(rows); public PCollectionBuilder withSchema(Schema type) { * Convenient way to build a {@link Schema}. * buildBeamSqlSchema( public static Schema buildBeamSqlSchema(Object... args) {
0
import org.junit.BeforeClass; @BeforeClass public static void setProtocol() throws Exception { SimpleProxyBase.factory = new TTupleProtocol.Factory(); setUpProxy();
0
import org.apache.hc.core5.http.ReadableByteChannelMock; import org.apache.hc.core5.http.config.H1Config; H1Config.DEFAULT, null, null); H1Config.custom().setMaxLineLength(10).build(), null, null); H1Config.DEFAULT, StandardCharsets.US_ASCII); H1Config.custom().setMaxLineLength(25).build(), StandardCharsets.US_ASCII); H1Config.DEFAULT, StandardCharsets.US_ASCII); final H1Config constraints = H1Config.custom() .setMaxLineLength(25) .build(); H1Config.DEFAULT, StandardCharsets.US_ASCII); final H1Config constraints = H1Config.custom()
1
import java.util.concurrent.ExecutionException; final List<Future> runningThreads = new ArrayList<>(); runningThreads.add(executor.submit(() -> { // propagate exception throw new RuntimeException(ex); })); // wait for all threads to finish for (Future f : runningThreads) { f.get(); } catch (InterruptedException e) { } catch (ExecutionException e) { throw new RuntimeException(e); // commit all sinks try { for (Dataset<?> o : outputs) { DataSink<?> s = o.getOutputSink(); s.commit(); } } catch (IOException e) { throw new RuntimeException(e); } return 0;
0
import static org.apache.ambari.logsearch.solr.SolrConstants.ServiceLogConstants.COMPONENT; @Field(COMPONENT)
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 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 agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
0
public TrackActionResponse createCluster(ClusterRequest request) throws AmbariException { // TODO return null; public TrackActionResponse createServices(ServiceRequest request) throws AmbariException { // TODO return null; public TrackActionResponse createComponents( return null; public TrackActionResponse createHosts(HostRequest request) throws AmbariException { // TODO return null; public TrackActionResponse createHostComponents( // TODO return null; public TrackActionResponse updateCluster(ClusterRequest request) { // TODO return null; public TrackActionResponse updateServices(ServiceRequest request, // TODO return null; public TrackActionResponse updateComponents( // TODO return null; public TrackActionResponse updateHosts(HostRequest request, Predicate predicate) { // TODO return null; public TrackActionResponse updateHostComponents( // TODO return null; public TrackActionResponse deleteCluster(ClusterRequest request) { // TODO return null; public TrackActionResponse deleteServices(ServiceRequest request) { // TODO return null; public TrackActionResponse deleteComponents(ServiceComponentRequest request) { // TODO return null; public TrackActionResponse deleteHosts(HostRequest request) { // TODO return null; public TrackActionResponse deleteHostComponents(ServiceComponentHostRequest request) { // TODO return null;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/JXPathContext.java,v 1.2 2001/09/08 20:59:58 dmitri Exp $ * $Revision: 1.2 $ * $Date: 2001/09/08 20:59:58 $ * @version $Revision: 1.2 $ $Date: 2001/09/08 20:59:58 $ * Evaluates the xpath and returns the resulting object. Primitive * Evaluates the xpath, converts the result to the specified class and * returns the resulting object. */ public abstract Object getValue(String xpath, Class requiredType); /**
0
import java.io.Serializable; public abstract class MetricKey implements Serializable {
0