Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. | 0 |
* @version $Revision: 1.5 $ $Date: 2004/06/30 19:06:38 $
if (getReadFolder().getFileSystem().hasCapability(Capability.SET_LAST_MODIFIED_FILE))
{
// Try a file
final FileObject file = getReadFolder().resolveFile("file1.txt");
file.getContent().setLastModifiedTime(now)... | 0 |
@Test
public void testPopulateResources_NoRegionServer() throws Exception {
TestStreamProvider streamProvider = new TestStreamProvider();
TestJMXHostProvider hostProvider = new TestJMXHostProvider(false);
JMXPropertyProvider propertyProvider = new JMXPropertyProvider(
PropertyHelper.getJMXPr... | 0 |
import org.apache.cocoon.ProcessingException;
public static String NAME = BlockManager.class.getName() + "-name";
private BlocksManager blocksManager;
// manager, otherwise the root path will be the one from the
public void setBlocksManager(BlocksManager blocksManager) {
this.blocksManager =... | 0 |
* like if they were on the same line separated with commas. <em>Note</em>:
* When the configuration file is written back to disk the associated
* <code>{@link PropertiesConfigurationLayout}</code> object (see below) will
* try to preserve as much of the original format as possible, i.e. properties
* with... | 0 |
import org.apache.cocoon.portal.coplet.CopletDefinition;
import org.apache.cocoon.portal.coplet.CopletInstance;
* Field handler for attributes of a CopletDefinition and a CopletInstanceData object.
if (object instanceof CopletDefinition) {
return ((CopletDefinition) object).getAttributes();
... | 0 |
import com.google.common.base.Optional;
import com.google.common.base.Strings;
import com.google.common.collect.Iterators;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.PipelineResult;
import org.apache.beam.sdk.options.ApplicationNameOptions;
import org.apache.beam.sdk.options.GcpOptions;
import org.... | 0 |
* Copyright 1999-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 ... | 1 |
import org.apache.ambari.server.controller.UserPrivilegeResponse;
UserPrivilegeResponse response = provider.getResponse(privilegeEntity, "jdoe");
Resource resource = provider.toResource(response, provider.getPropertyIds());
UserPrivilegeResponse response = provider.getResponse(privilegeEntity, "jdoe");
... | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
import org.apache.beam.sdk.values.WindowingStrategy; | 0 |
import java.util.Objects;
this.windowID = Objects.requireNonNull(windowID); | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Maps; | 0 |
import org.apache.kafka.common.serialization.ByteArrayDeserializer;
import org.apache.kafka.common.serialization.ByteArraySerializer;
KafkaIO.<byte[], byte[]>read()
.withBootstrapServers(bootstrapServers)
.withTopics(topics)
.updateConsumerProperties(configUpd... | 0 |
if (DEFAULT_URL.contains(Configuration.HOSTNAME_MACRO)) {
DEFAULT_URL = DEFAULT_URL.replace(Configuration.HOSTNAME_MACRO, "localhost");
} | 0 |
import static org.apache.aurora.scheduler.base.TaskTestUtil.DEV_TIER;
expect(tierManager.getTier(TASK.getAssignedTask().getTask())).andReturn(DEV_TIER);
expect(tierManager.getTier(TASK.getAssignedTask().getTask())).andReturn(DEV_TIER);
expect(tierManager.getTier(TASK.getAssignedTask().getTask())).andReturn(... | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 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.collect.Sets;
import static org.apache.aurora.scheduler.base.Tasks.TERMINAL_STATES;
@Override
public Response pruneTasks(TaskQuery query) throws TException {
if (query.isSetStatuses() && query.getStatuses().stream().anyMatch(ACTIVE_STATES::contains)) {
return error("Tasks in non-t... | 0 |
if (mOptions.getTimeout() > 0) {
LOG.info("Timeout is ignored by the SparkRunner in batch.");
}
return new StreamingEvaluationContext(jsc, pipeline, jssc, mOptions.getTimeout()); | 0 |
return new IFNULL(super.getTarget()); | 0 |
Scriptable kScope = k.getParentScope(); | 0 |
private TimelineMetricReadHelper timelineMetricReadHelper;
<<<<<<< HEAD
=======
private final static String liveHostsMetricName = "live_hosts";
>>>>>>> AMBARI-21214 : Use a uuid vs long row key for metrics in AMS schema. (avijayan)
<<<<<<< HEAD
=======
this.timelineMetricReadHelper = new TimelineMetricReadHelpe... | 0 |
import org.osgi.framework.ServiceException;
try {
ServiceRegistration<S> serviceRegistration = (ServiceRegistration<S>) bundleContext
.registerService(services, getService(),
serviceProperties);
return serviceRegistration;
} catch (ServiceException e) {
log(LogService.LOG_ERROR,... | 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 |
throw new RuntimeException(ex.getMessage());
private volatile URLHandlersActivator m_urlHandlersActivator;
void setURLHandlersActivator(URLHandlersActivator urlHandlersActivator)
{
m_urlHandlersActivator = urlHandlersActivator;
}
Object getStreamHandlerService(String p... | 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 |
package aQute.bnd.service;
import aQute.lib.osgi.*;
public interface AnalyzerPlugin {
/**
* This plugin is called after analysis. The plugin is free to modify the
* jar and/or change the classpath information (see referred, contained).
* This plugin is called after analysis of the JAR but before m... | 0 |
public void terminate(ScheduleStatus terminalState, String reason);
// TODO(William Farner): Attach a GUID here (probably via UUID) to allow for automatic stack
// trace linking between disparate parts of the system.
| 0 |
public TeeOutputStream(OutputStream out, OutputStream branch) {
* Closes both output streams.
*
* If closing the main output stream throws an exception, attempt to close the branch output stream.
*
* If closing the main and branch output streams both throw exceptions, which exceptions is ... | 0 |
import java.util.Collection;
import org.apache.felix.sigil.common.repository.IRepositoryProvider;
import org.apache.felix.sigil.common.repository.RepositoryException;
public interface IRepositoryCache
* @param sponsor
* @param props
* @param instance
* @throws RepositoryException
IBundleReposito... | 0 |
public void releaseConnection() throws IOException {
public void abortConnection() throws IOException {
public boolean eofDetected(InputStream wrapped) throws IOException {
public boolean streamClosed(InputStream wrapped) throws IOException {
public boolean streamAbort(InputStream wrapped) throws IO... | 0 |
* $Id: TestCollectionUtils.java,v 1.9 2002/11/24 21:12:30 scolebourne Exp $
* $Revision: 1.9 $
* $Date: 2002/11/24 21:12:30 $
* @version $Revision: 1.9 $ $Date: 2002/11/24 21:12:30 $
public void testSelect() {
List list = new ArrayList();
list.add("One");
list.add("Two");
list.ad... | 0 |
try (Scanner bs = c.createScanner(tableName, Authorizations.EMPTY)) {
Iterator<Entry<Key,Value>> iterator = bs.iterator();
assertTrue(iterator.hasNext());
Entry<Key,Value> next = iterator.next();
assertFalse(iterator.hasNext());
assertEquals(expected, next.getValue().toString());
} | 0 |
private final MessageDigest algorithm;
private MessageDigestAlgorithm(Document doc, String algorithmURI)
throws XMLSignatureException {
algorithm = getDigestInstance(algorithmURI);
return new MessageDigestAlgorithm(doc, algorithmURI);
return algorithm;
return algorithm.d... | 0 |
import org.apache.aurora.common.quantity.Amount;
import org.apache.aurora.common.quantity.Time;
import org.apache.aurora.common.stats.StatsProvider;
import org.apache.aurora.common.stats.StatsProvider.RequestTimer;
import org.apache.aurora.common.testing.easymock.EasyMockTest;
import org.apache.aurora.common.util.testi... | 0 |
import org.apache.beam.runners.core.construction.SerializablePipelineOptions;
protected final SerializablePipelineOptions serializedOptions;
this.serializedOptions = new SerializablePipelineOptions(pipelineOptions);
PipelineOptions options = serializedOptions.get(); | 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 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 1 |
public void updateConfigType(Cluster cluster, StackId stackId,
AmbariManagementController controller, String configType, Map<String, String> updates,
Collection<String> removals, String authenticatedUserName, String serviceVersionNote)
throws AmbariException {
createConfigType(cluster, stackId... | 0 |
* @version CVS $Id: Authenticator.java,v 1.3 2003/04/27 14:45:04 cziegeler Exp $
handler.getContext().loadApplicationXML( appHandler, this.resolver ); | 0 |
import org.apache.sshd.server.channel.ChannelSession;
* @return The {@link ChannelSession} instance through which
* the shell was created - may be {@code null} if shell not started yet
*/
ChannelSession getChannelSession();
/** | 0 |
import java.util.Arrays;
return super.isApplicable(request, Arrays.asList("HIVE"), true); | 0 |
try {
HttpPost httppost = new HttpPost("http://localhost:8080" +
"/servlets-examples/servlet/RequestInfoExample");
File file = new File(args[0]);
InputStreamEntity reqEntity = new InputStreamEntity(
new FileInputStream(file), -1);
... | 0 |
import java.io.IOException;
import java.io.OutputStream;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.spec.AlgorithmParameterSpec;
import java.util.ArrayDeque;
import java.util.ArrayList;
import jav... | 0 |
* @version $Revision: 1.10 $ $Date: 2005/01/04 23:50:09 $
* http://issues.apache.org/bugzilla/show_bug.cgi?id=18905
// see issue http://issues.apache.org/bugzilla/show_bug.cgi?id=23843
// see issue http://issues.apache.org/bugzilla/show_bug.cgi?id=23843
// see issue http://issues.apache.org/bugzilla/s... | 0 |
String name = Objects.toString(f.get(null), null); | 0 |
extends AbstractFileObject<MimeFileSystem>
final MimeFileSystem fileSystem) throws FileSystemException | 0 |
TRACE_ZK_PATH("trace.zookeeper.path", Constants.ZTRACERS, PropertyType.STRING, "The zookeeper node where tracers are registered"), | 0 |
* by HTTP connections for creating {@link org.apache.http.HttpResponse}
* objects. | 0 |
return in.apply(
Window.named("Window")
.<String>into(windowFn)
.withOutputTimeFn(OutputTimeFns.outputAtEarliestInputTimestamp()))
.apply(ParDo.named("FormatCounts").of(new FormatCountsDoFn())) | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
import org.apache.ambari.server.controller.internal.DeleteStatusMetaData;
Set<Resource> setResources = new HashSet<>();
expect(status.getStatusMetadata()).andReturn(new DeleteStatusMetaData());
expect(status.getStatusMetadata()).andReturn(null);
| 0 |
public boolean apply(String argument) { | 0 |
import java.util.TreeMap;
metric1.setMetricValues(new TreeMap<Long, Double>() {{
metric2.setMetricValues(new TreeMap<Long, Double>() {{ | 0 |
package org.apache.beam.runners.core.metrics;
import org.apache.beam.sdk.metrics.MetricName;
import org.apache.beam.sdk.metrics.MetricNameFilter;
import org.apache.beam.sdk.metrics.MetricsFilter; | 0 |
import org.apache.commons.io.FileUtils;
if (reportDir.exists()) {
FileUtils.deleteDirectory(reportDir);
reportDir.mkdirs(); | 1 |
import org.apache.accumulo.core.security.Authorizations;
@Override public Authorizations getAuthorizations() {
return null;
}
| 0 |
if (outstream != null) {
super.writeTo(outstream);
}
if (wrapped != null) {
wrapped.close();
}
if (wrapped != null) {
wrapped.close();
} | 0 |
Copyright 2001 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 |
@SuppressWarnings("unchecked")
Coder<WindowedValue<?>> wireCoder =
(Coder) WireCoders.instantiateRunnerWireCoder(inputPCollection, components);
wireCoder,
@SuppressWarnings("unchecked")
Coder<WindowedValue<?>> wireCoder =
(Coder) WireCoders.instantiateRunnerWireCoder(outputPColl... | 0 |
//COMMENTED THE FOLLOWING LINE TO WORK AROUND AMBARI-159
//root.addHandler(security); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/NodePointer.java,v 1.12 2002/10/20 03:47:17 dmitri Exp $
* $Revision: 1.12 $
* $Date: 2002/10/20 03:47:17 $
* @version $Revision: 1.12 $ $Date: 2002/10/20 03:47:17 $
public a... | 0 |
import java.lang.reflect.Constructor;
import java.util.Collection;
import java.util.Collections;
import org.apache.commons.configuration.PropertyConverter;
Constructor<?> ctor = BeanHelper.findMatchingConstructor(beanClass, data);
Object[] args = fetchConstructorArgs(ctor, data);
return ctor.n... | 0 |
public PCollection<T> expand(PCollection<TimestampedValue<T>> input) { | 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 ... | 0 |
Object[] exArgs = { actualNamespaceUri + ":" + actualLocalName,
Object[] exArgs = { ns, getElement().getAttributeNS(null, ns) };
Object[] exArgs = { prefix, namespace, storedPrefix }; | 0 |
public void setWaitingThread(final WaitingThread waitingThread) { | 0 |
@Override
public double getRemainingParallelism() {
return Double.NaN;
}
@Override
public double getRemainingParallelism() {
return Double.NaN;
} | 0 |
/* In the following IF-THEN-ELSE block, we process syncs on the leader.
* If the sync is coming from a follower, then the follower
* handler adds it to syncHandler. Otherwise, if it is a client of
* the leader that issued the sync command, then syncHandler won't
* contain t... | 0 |
*
*
*
/**
* Default value for {@link #isInitClassloader()} setting (false)
* Default is false for security reasons.
* Note that absolute pathes are taken as such but relative pathes
*
* @param extraClasspath The extraClasspaths to set.
* @param key The forceProperties to set.... | 0 |
* Parameter annotation for the input element timestamp for a {@link ProcessElement} method.
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
public @interface Timestamp {}
/** | 0 |
import org.apache.ambari.server.orm.entities.RepositoryVersionEntity;
final String stackName = targetStackId.getStackName();
final RepositoryVersionEntity rve = repositoryVersionDaoProvider.get().findByStackNameAndVersion(stackName, request.getRepositoryVersion());
if (StringUtils.isBlank(rve.getVersion())... | 0 |
* {@link PValue}. {@link #mapOutputs(Map, PValue)} is | 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 |
/*
* 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 |
* <p>Note, that each Dataflow worker will already process multiple bundles
* <p>CPU intensive or IO intensive tasks are in general a poor fit for parallelization.
* <p>To parallelize a {@link DoFn} to 10 threads:
* <p>An uncaught exception from the wrapped {@link DoFn} will result in the exception
* <p>Note that... | 0 |
/**
* Create output dataset for given operator.
*
* @param <IN> the type of elements of the input dataset
* @param <OUT> the type of elements in the output dataset
*
* @param flow the flow to associate the output dataset with
* @param input the input dataset the output dataset is indirectly deriv... | 0 |
* @version $Revision$ $Date$ | 0 |
// TODO share code w/ tablet - ACCUMULO-1303
// TODO need to close files - ACCUMULO-1303 | 0 |
* @version $Id: SoundexTest.java,v 1.18 2004/06/02 00:55:38 ggregory Exp $
/**
* Fancy characters are not mapped by the default US mapping.
*
* http://nagoya.apache.org/bugzilla/show_bug.cgi?id=29080
*/
public void testUsMappingOWithDiaeresis() {
assertEquals("O000", this.getEncode... | 0 |
final private static Text ROOT_TABLE_ID = new Text(RootTable.ID);
/* UNLOAD_ROOT_TABLET */ {_, _, _, X, X, X, X},
/* STOP */ {_, _, _, _, _, X, X}};
result += watcher.getStats(METADATA_TAB... | 0 |
ots.addTestSuite(EmptyTest.class); | 0 |
import java.io.InputStream;
import java.io.OutputStream;
final InputStream inStream = jarFile.getInputStream(entry);
final OutputStream outStream = new FileOutputStream(out);
IOUtils.copy(inStream, outStream);
inStream.close();
outStream.cl... | 0 |
protected final JexlEngine jexl; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/java/org/apache/commons/dbcp/PoolableConnection.java,v 1.8 2003/08/11 16:01:25 dirkv Exp $
* $Revision: 1.8 $
* $Date: 2003/08/11 16:01:25 $
* @version $Id: PoolableConnection.java,v 1.8 2003/08/11 16:01:25 dirkv Exp $
... | 0 |
Copyright 2001,2003-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 applica... | 0 |
/** {@link org.apache.commons.logging} logging facility */
static org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory.getLog(
AttributeAncestorOrSelf.class.getName()); | 0 |
import java.util.StringTokenizer;
StringTokenizer tokens = new StringTokenizer(ee, ",");
while (tokens.hasMoreTokens()) {
CapabilityImpl cap = new CapabilityImpl(Capability.EXECUTIONENVIRONMENT);
cap.addProperty(Capability.EXECUTIONENVIRONMENT, tok... | 0 |
* @version CVS $Id: URICopletAdapter.java,v 1.4 2003/05/22 15:19:48 cziegeler Exp $
| 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 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/CursorableLinkedList.java,v 1.5 2002/03/20 05:16:24 mas Exp $
* $Revision: 1.5 $
* $Date: 2002/03/20 05:16:24 $
* @version $Id: CursorableLinkedList.java,v 1.5 2002/03/20 05:16:... | 0 |
in.apply("AddKeys", ParDo.of(new DoFn<V, KV<K, V>>() {
@Override
public void processElement(ProcessContext c) {
c.output(KV.of(fn.apply(c.element()),
c.element()));
}
})); | 0 |
import org.apache.hc.core5.http.EntityDetails;
void consumeRequest(HttpRequest request, EntityDetails entityDetails, FutureCallback<T> resultCallback) throws HttpException, IOException; | 0 |
import org.apache.hc.client5.http.impl.sync.CloseableHttpResponse;
System.out.println("Executing request " + httpget.getMethod() + " " + httpget.getUri());
System.out.println(response.getCode() + " " + response.getReasonPhrase()); | 0 |
package org.apache.ambari.infra.job;
import org.apache.ambari.infra.job.archive.DocumentExportProperties;
import org.apache.ambari.infra.job.archive.SolrProperties;
public class JobPropertiesTest {
SolrProperties solr = new SolrProperties();
solr.setZooKeeperConnectionString("localhost:2181");
solr.setFilte... | 0 |
private static final String realm;
private static String hostName;
realm = atlasProperties.getString(CONF_REALM_NAME, DEFAULT_CLUSTER_NAME); // what should default be ??
convertHdfsPathToLowerCase = atlasProperties.getBoolean(HDFS_PATH_CONVERT_TO_LOWER_CASE, false); | 0 |
* @version CVS $Id$
public InputStream getInputStream() throws IOException {
return getActionRequest().getPortletInputStream();
}
/**
* @deprecated use {@link #getInputStream()}
*/ | 0 |
BundleRevision.PACKAGE_NAMESPACE,
if (cap.getNamespace().equals(BundleRevision.PACKAGE_NAMESPACE))
BundleRevision.PACKAGE_NAMESPACE,
if (cap.getNamespace().equals(BundleRevision.PACKAGE_NAMESPACE)
BundleRevision.PACKAGE_NAMESPAC... | 0 |
import org.apache.atlas.TestModules;
import org.apache.atlas.store.DeleteType;
import org.testng.annotations.Guice;
@Guice(modules = TestModules.TestOnlyModule.class)
private final DeleteType deleteType;
protected InverseReferenceUpdateV2Test(DeleteType deleteType) {
this.deleteType = deleteType... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.