Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
@Override
@Override
@Override
@Override
@Override
@Override | 0 |
import org.hamcrest.CoreMatchers;
* JIRA: DBCP-482
* Verify warning not logged if JMX MBean unregistered before close() called.
*/
@Test
public void testInstanceNotFoundExceptionLogSuppressed() throws Exception {
final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
... | 0 |
import org.apache.batik.anim.values.AnimatableBooleanValue;
import org.apache.batik.anim.values.AnimatableValue;
import org.apache.batik.dom.anim.AnimationTarget;
* Updates the animated value with the gien {@link AnimatableValue}.
*/
protected void updateAnimatedValue(AnimatableValue val) {
if (v... | 0 |
log.error("Could not add table '" + table + "'", e); | 0 |
// add comma delimited lists with escaped delimiters
conf.addProperty("split.list5", "a\\,b\\,c");
conf.setProperty("element3", "value\\,value1\\,value2");
conf.setProperty("element3[@name]", "foo\\,bar");
/**
* Tests the subset() method. There was a bug that calling su... | 0 |
public final class UnmodifiableMap<K, V>
extends AbstractMapDecorator<K, V>
implements IterableMap<K, V>, Unmodifiable, Serializable {
public static <K, V> Map<K, V> decorate(Map<K, V> map) {
return new UnmodifiableMap<K, V>(map);
private UnmodifiableMap(Map<K, V> map) {
@SuppressWar... | 0 |
* <p>To execute this pipeline in streaming mode, specify:
* --streaming
* <p>To change the runner, specify:
* --runner=YOUR_SELECTED_RUNNER
* }
* </pre>
* See examples/java/README.md for instructions about how to configure different runners.
* <p>Inherits standard Beam example configuration options.
/... | 0 |
import com.google.common.collect.HashMultiset;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Multiset; | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList; | 0 |
import org.apache.ambari.logsearch.web.filters.LogsearchTrustedProxyFilter;
.addFilterBefore(logsearchTrustedProxyFilter(), BasicAuthenticationFilter.class)
.addFilterAfter(logsearchKRBAuthenticationFilter(), LogsearchTrustedProxyFilter.class)
public LogsearchTrustedProxyFilter logsearchTrustedProxyFilter... | 0 |
import static com.google.common.base.Charsets.UTF_8; | 0 |
* @version CVS $Id: HttpEnvironment.java,v 1.16 2004/05/25 07:28:25 cziegeler Exp $
public class HttpEnvironment extends AbstractEnvironment {
private HttpRequest request;
private HttpResponse response;
private HttpContext webcontext;
private String contentType;
super(uri, null, null);
/**
... | 0 |
import java.nio.charset.StandardCharsets;
final ByteArrayInputStream instream = new ByteArrayInputStream(s.getBytes(StandardCharsets.US_ASCII));
final ByteArrayInputStream instream = new ByteArrayInputStream(s.getBytes(StandardCharsets.US_ASCII));
final ByteArrayInputStream instream = new ByteAr... | 0 |
import org.apache.hc.core5.http.ClassicHttpResponse;
public class DefaultHttpResponseParserFactory implements HttpMessageParserFactory<ClassicHttpResponse> {
public HttpMessageParser<ClassicHttpResponse> create(final MessageConstraints constraints) { | 0 |
import com.google.common.base.Supplier;
import com.twitter.common.stats.StatsProvider;
@VisibleForTesting
enum State {
ShutdownRegistry shutdownRegistry,
StatsProvider statsProvider) {
shutdownRegistry,
statsProvider);
static final String REGISTERED_GAUGE = "framework_registered";
@... | 0 |
public InvokeContext(InvokeContext context, ServiceManager manager) throws ServiceException {
service(manager);
inform(context.processingPipelineName, context.processingPipelineParameters, context.processingPipelineObjectModel); | 0 |
import com.google.cloud.dataflow.sdk.coders.VoidCoder;
import org.apache.flink.api.java.typeutils.runtime.ValueSerializer;
@Override
public boolean equals(Object obj) {
if (obj instanceof VoidCoderTypeSerializer) {
VoidCoderTypeSerializer other = (VoidCoderTypeSerializer) obj;
return other.canEqual(this);
}... | 0 |
import java.util.Map;
public void flexApp(String appId, Map<String, Integer> componentsMap)
throws YarnException, IOException, InterruptedException; | 0 |
public class TestHttpClientNio {
public TestHttpClientNio(final HttpParams params) throws IOException { | 0 |
for (IOFileFilter filter1 : filters) {
filter.addFileFilter(filter1); | 1 |
Assert.assertEquals(ResourceType.AMBARI.name(), resource.getPropertyValue(UserPrivilegeResourceProvider.TYPE));
Assert.assertEquals("TestCluster", resource.getPropertyValue(ClusterPrivilegeResourceProvider.CLUSTER_NAME));
Assert.assertEquals(ResourceType.CLUSTER.name(), resource.getPropertyValue(UserPrivile... | 0 |
import org.apache.hc.core5.http.HttpResponse;
import org.apache.hc.core5.http.protocol.HttpContext; | 0 |
package org.apache.xml.security.stax.impl.processor.input;
import org.apache.xml.security.stax.ext.*;
import org.apache.xml.security.stax.ext.stax.XMLSecEvent;
import org.apache.xml.security.stax.ext.stax.XMLSecEventFactory;
import org.apache.xml.security.stax.ext.stax.XMLSecStartElement; | 0 |
public void start(int options) throws BundleException
{
throw new UnsupportedOperationException("This feature has not yet been implemented.");
}
public void stop(int options) throws BundleException
{
throw new UnsupportedOperationException("This feature has not yet been implemented.");
... | 1 |
Future<Integer> ret = svc.submit(() -> {
try {
return control.exec(TestIngest.class, args);
} catch (IOException e) {
log.error("Error running TestIngest", e);
return -1;
Future<Integer> ret = svc.submit(() -> {
try {
return control.exec(TestIngest.class, args);... | 0 |
URL newurl = ((BundleWiringImpl)
m_targetRevision.getWiring()).getResourceByDelegation(url.getPath()); | 0 |
import javax.annotation.Nullable;
@Option(name = "zk_endpoints", usage = "Endpoint specification for the ZooKeeper servers.")
@Nullable
if (endpointStatus != null) {
try {
endpointStatus.update(Status.ALIVE);
} catch (ServerSet.UpdateException e) {
LOG.log(Level.SEVERE, "Failed to ... | 0 |
* Data describing the gauge. This should retain enough detail that it can be combined with other
* {@link GaugeData}.
/** Empty {@link GaugeData}, representing no values reported. */
private EmptyGaugeData() {} | 1 |
componentDesiredStateEntity.setHostComponentDesiredStateEntities(new ArrayList<HostComponentDesiredStateEntity>());
componentDesiredStateEntity.getHostComponentDesiredStateEntities().add(hostComponentDesiredStateEntity);
| 0 |
modes.put(mode, v);
modes.put(mode, v);
if (val.contains("undef")) { | 0 |
import java.util.stream.Stream;
Map<String,Reference> references = new TreeMap<>();
public Stream<Reference> getReferences() {
return references.values().stream();
public void addFileReference(String tableId, String endRow, String file) {
references.put(tableId + ":" + endRow + ":" + file,
... | 0 |
import org.apache.cocoon.configuration.Settings; | 0 |
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.BeanNameAware;
* This is a base class that can be used for own {@link SecurityHandler}s.
*/
implements SecurityHandler, BeanNameAware {
/** The id for the security handler. */
prot... | 0 |
Copyright 2000-2002 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law... | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Lists;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Sets; | 0 |
import org.osgi.util.converter.TypeRule;
rule(new TypeRule<Foo, String>(Foo.class, String.class, Foo::tsFun)).
rule(new TypeRule<String, Foo>(String.class, Foo.class, v -> Foo.fsFun(v))).build(); | 0 |
CryptoModuleParameters params = new CryptoModuleParameters();
return fillParamsObjectFromConfiguration(params, conf);
}
public static CryptoModuleParameters fillParamsObjectFromConfiguration(CryptoModuleParameters params, AccumuloConfiguration conf) {
cryptoOp... | 0 |
import org.apache.ambari.logsearch.model.request.impl.query.AuditBarGraphQueryRequest;
AuditBarGraphRequest request = new AuditBarGraphQueryRequest();
AuditBarGraphRequest request = new AuditBarGraphQueryRequest(); | 0 |
@Deprecated | 0 |
final LineParser parser) throws HttpException, IOException {
return parseHeaders(inbuffer, maxHeaderCount, maxLineLen,
parser != null ? parser : BasicLineParser.INSTANCE,
headerLines); | 0 |
package org.apache.atlas;
import org.apache.atlas.security.SecurityProperties;
import org.apache.atlas.util.CredentialProviderUtility;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
provider.getCredentialEntry(SecurityProperties.KEYSTORE_PASSWORD_KEY);
entry = provid... | 1 |
fs.mkdirs(new Path(ServerConstants.getDataVersionLocation(), "" + ServerConstants.DATA_VERSION));
String initRootTabFile = ServerConstants.getRootTabletDir() + "/00000_00000." | 0 |
import org.apache.beam.model.pipeline.v1.RunnerApi; | 0 |
Map<String, KeyPair> pairsMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); | 0 |
// add an instance of the auto-activator it for processing
// auto-install and auto-start properties.
// Create a case-insensitive property map.
// Create an instance of the framework. | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 1 |
import com.google.cloud.dataflow.sdk.options.DirectPipelineOptions;
import com.google.cloud.dataflow.sdk.options.PipelineOptions;
import com.google.cloud.dataflow.sdk.options.PipelineOptionsValidator;
/**
* Constructs a SparkPipelineRunner from the given options.
*/
public static SparkPipelineRunner fromOptio... | 0 |
m_felix.removeBundleListener(m_bundle, l);
m_felix.removeServiceListener(m_bundle, l);
m_felix.removeFrameworkListener(m_bundle, l); | 0 |
import org.apache.batik.bridge.svg12.SVG12ScriptingEnvironment;
import org.apache.batik.dom.svg.SVGOMDocument;
SVGOMDocument d = (SVGOMDocument) doc;
if (d.isSVG12()) {
scriptingEnvironment = new SVG12ScriptingEnvironment(ctx);
} else {
scriptingEnvironment = new Scriptin... | 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 |
return this.count.incrementAndGet() % 4 != 0;
return false; | 0 |
public CombinedBeanDeclaration(final BeanDeclaration... decl)
for (final BeanDeclaration d : childDeclarations)
final String factoryName = d.getBeanFactoryName();
for (final BeanDeclaration d : childDeclarations)
final Object factoryParam = d.getBeanFactoryParameter();
... | 0 |
import org.apache.accumulo.core.clientImpl.Table; | 0 |
* Each property has the syntax <code>key <separator> value</code>. The
* <p>Here is an example of a valid extended properties file:</p>
* <pre>
* Controls whether additional files can be loaded by the {@code include = <xxx>} | 0 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | 0 |
import org.apache.sshd.common.io.IoHandlerFactory;
private final IoHandlerFactory socksProxyIoHandlerFactory = new IoHandlerFactory() {
private final IoHandlerFactory staticIoHandlerFactory = new IoHandlerFactory() { | 0 |
// and that arg is not the sole argument and not an array of the expected type,
Class<?> aclazz = actual[index].getClass();
if (!aclazz.isArray() || !aclazz.getComponentType().equals(type)) {
// create a 1-length array to hold and replace the last argument... | 0 |
//TODO - fix this
//final String message = REZ.getString( "delete-temp.warn", file.getName() );
getLogger().warn( "vfs.impl/delete-temp.warn", e ); | 0 |
import org.apache.ambari.server.controller.internal.RepositoryVersionResourceProvider;
.implement(ResourceProvider.class, Names.named("repositoryVersion"), RepositoryVersionResourceProvider.class)
} | 0 |
final String taskId = change.getTaskId();
final ScheduleStatus newState = change.getNewState();
executor.schedule(
new Runnable() {
@Override
public void run() {
// This query acts as a CAS by including the state that we expect the task to be in if
... | 0 |
import org.apache.accumulo.core.sample.impl.SamplerConfigurationImpl;
@Override
public FileSKVIterator getSample(SamplerConfigurationImpl sampleConfig) {
throw new UnsupportedOperationException();
}
| 1 |
*
*
*
* The name of the requested charset; may be a canonical name, an alias, or null. | 0 |
RepositoryInfo repositoryInfo = ambariMetaInfo.getRepository(rr.getStackName(), rr.getStackVersion(), rr.getOsType(), rr.getRepoId());
String repoName = repositoryInfo.getRepoName();
String suffix = String.format(suffixes[i], repoName); | 0 |
* Retrieve all of the cluster versions for the given cluster name.
*
* @param clusterName Cluster name
* @return Return all of the host versions that match the criteria.
*/
@RequiresSession
public List<HostVersionEntity> findByCluster(String clusterName) {
final TypedQuery<HostVersionEntity> que... | 0 |
int[] positions = byte_positions;
if (ih == null) { | 0 |
import org.apache.batik.util.Platform;
if (Platform.isOSX) | 0 |
JexlContext jc = JexlHelper.createContext();
assertExpression(jc, "myvar == 'Użytkownik'", Boolean.FALSE);
assertExpression(jc, "'c:\\some\\windows\\path'", "c:\\some\\windows\\path");
assertExpression(jc, "'foo\\u0020bar'", "foo\u0020bar");
assertExpression(jc, "'foo\\u0020\\u0... | 0 |
import org.apache.accumulo.core.clientImpl.AuthenticationTokenIdentifier;
import org.apache.accumulo.core.clientImpl.ClientContext;
import org.apache.accumulo.core.clientImpl.DelegationTokenImpl;
import org.apache.accumulo.core.clientImpl.OfflineScanner;
import org.apache.accumulo.core.clientImpl.ScannerImpl;
import or... | 0 |
import org.apache.ambari.server.api.services.AmbariMetaInfo;
import org.apache.ambari.server.orm.dao.StackDAO;
import org.apache.ambari.server.orm.entities.StackEntity;
@Inject
private StackDAO stackDAO;
StackEntity stackEntity = stackDAO.find("HDP", "2.2.0");
clusterEntity.setDesiredStack(stackEntity);
... | 0 |
import org.apache.beam.runners.direct.TestStreamEvaluatorFactory.DirectTestStreamFactory;
import org.apache.beam.sdk.testing.TestStream;
import com.google.common.base.Supplier;
import java.util.concurrent.Executors;
.put(GroupByKey.class, new DirectGroupByKeyOverrideFactory())
.put(TestStrea... | 0 |
VoidCoder.of()); | 0 |
Copyright 2002 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... | 0 |
// a 4xx is only registered as failure DTO if overlayed by a 4xx!
// -> no failure in this case
assertEquals(0, holder.failedErrorPageDTOs.size()); | 0 |
final ClientContext context = getClientContext();
final ClientContext context = getClientContext(); | 0 |
/*
* Copyright 2013 Twitter, Inc.
*
* 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 t... | 0 |
import java.io.Serializable;
private static class BundleByElementTimestampComparator extends Ordering<CommittedBundle<?>>
implements Serializable { | 0 |
osType, repoId, AmbariMetaInfo.REPOSITORY_XML_PROPERTY_BASEURL);
MetainfoEntity entity = metaInfoDAO.findByKey(key);
return entity != null ? entity.getMetainfoValue() : null;
}
public String getUpdatedMirrorsList(String stackName, String stackVersion, String osType, String repoId) {
String key ... | 0 |
description = "The name of the mapping element should be map_field_value. The value json element should contain the following parameter:"
return "map_field_value";
path = "/filter/[]/post_map_values/{field_name}/[]/map_field_value/pre_value",
path = "/filter/[]/post_map_values/{field_name}/[]/map_fiel... | 0 |
AttributedCharacterIterator.Attribute TEXT_COMPOUND_DELIMITER =
GVTAttributedCharacterIterator.TextAttribute.TEXT_COMPOUND_DELIMITER;
public static final AttributedCharacterIterator.Attribute PAINT_INFO =
GVTAttributedCharacterIterator.TextAttribute.PAINT_INFO;
public static final
... | 0 |
at = HdfsZooInstance.getInstance().getAuthenticator().login(principal, props); | 0 |
qb.setUp(); | 0 |
package org.apache.http.mockup; | 0 |
timeout.recordStateChange(TaskStateChange.transition(task, from));
clock.setNowMillis(TIMEOUT_MS * 2);
for (IScheduledTask task : ImmutableList.of(
makeTask("a", ASSIGNED, 0),
makeTask("b", KILLING, TIMEOUT_MS),
makeTask("c", PREEMPTING, clock.nowMillis() + TIMEOUT_MS))) {
tim... | 0 |
/** Test for dependency resolution for pipeline execution on YARN. */
private static class MockApexYarnLauncherParams extends ApexYarnLauncher.LaunchParams {
public MockApexYarnLauncherParams(
DAG dag, AttributeMap launchAttributes, Properties properties) {
public AppHandle launchApp(
... | 1 |
import org.apache.ambari.server.stack.upgrade.RepositoryVersionHelper;
import org.apache.ambari.server.stack.upgrade.UpgradePack;
import org.apache.ambari.server.stack.upgrade.UpgradeType; | 0 |
String viewBox = root.getAttributeNS
(null, SVGConstants.SVG_VIEW_BOX_ATTRIBUTE);
if ((ref != null) && (ref.length() != 0)) {
Px = ViewBox.getViewTransform(ref, root, width, height);
} else if ((viewBox != null) && (viewBox.length() != 0)) {
... | 1 |
import java.util.HashMap;
import java.util.Map;
private static Map<String, String> defaultNamespacePrefixes = new HashMap<String, String>();
static {
defaultNamespacePrefixes.put("http://www.w3.org/2000/09/xmldsig#", "ds");
defaultNamespacePrefixes.put("http://www.w3.org/2001/04/xmlen... | 0 |
Configuration conf = new Configuration(); | 0 |
package org.apache.beam.sdk.io.gcp.bigquery;
/**
* Created by relax on 3/28/17.
*/
public class TableDestination {
} | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables; | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger log = LoggerFactory.getLogger(DeadServerList.class);
log.error(ex.getMessage(), ex);
log.error("delete failed with exception", ex);
log.error("post failed with exception", ex); | 0 |
package org.apache.accumulo.test.randomwalk.bulk;
import org.apache.accumulo.test.randomwalk.State;
import org.apache.accumulo.test.randomwalk.Test; | 0 |
// Trace.enter(this, "seekTo", new Object[] { new Float(time) } ); try {
// } finally { Trace.exit(); } | 0 |
protected final long startOffset;
protected DecompressingStreamFactory compressionStreamFactory;
DecompressingStreamFactory compressionStreamFactory) throws IOException {
// Currently we assume that only a offset position and fraction are reported as
// other metrics, e.g. report a different... | 0 |
package org.apache.accumulo.core.client.mapreduce.lib.util; | 0 |
import static org.apache.commons.collections4.functors.NullPredicate.*;
import static org.apache.commons.collections4.functors.TruePredicate.*;
import static org.junit.Assert.*;
@Test(expected=NullPointerException.class)
@Test(expected=NullPointerException.class)
@Test(expected=NullPointerException.class)... | 0 |
import static org.apache.hadoop.metrics2.sink.timeline.TimelineMetricUtils.getJavaMetricPatterns;
private List<String> skipInterpolationMetricPatterns = new ArrayList<>();
LOG.info("Skipping Interpolation for patterns : " + skipInterpolationMetricPatternStrings);
skipInterpolationMetricPatterns.addAll(get... | 0 |
protected StateNamespace windowNamespace;
this.windowNamespace = namespaceFor(window);
return windowNamespace;
return stateInternals.state(windowNamespace, address);
List<StateNamespace> readNamespaces = new ArrayList<>();
for (W readWindow : activeWindows.readStateAddresses(window)) {... | 0 |
package com.twitter.aurora.scheduler.thrift.auth;
import com.twitter.aurora.scheduler.thrift.auth.CapabilityValidator.Capability; | 0 |
import org.apache.sshd.common.session.SessionContext;
* @param session The {@link SessionContext} for invoking this load command - may
* be {@code null} if not invoked within a session context (e.g., offline tool or session unknown).
public PublicKey resolvePublicKey(SessionContext session, PublicKeyEntry... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.