Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.cocoon.portal.event.aspect.EventAspect;
import org.apache.cocoon.portal.services.aspects.support.AspectChain;
protected AspectChain chain;
this.chain = new AspectChain();
this.chain.configure(this.manager, EventAspect.class, this.configuration);
DefaultEvent... | 0 |
import org.apache.commons.collections.map.ListOrderedMap;
* @version CVS $Id: AbstractLayout.java,v 1.11 2004/01/27 10:37:47 cziegeler Exp $
protected Map parameters = new ListOrderedMap(); | 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 may not... | 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... | 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 |
* INSTALLED: all hosts in INSTALLED -OR- INSTALLED and NOT_REQUIRED
* INSTALLING: all hosts in INSTALLING -or- INSTALLING and NOT_REQUIRED. Notice that if one host is CURRENT and another is INSTALLING, then the
int totalInstalling = stateToHosts.containsKey(RepositoryVersionState.INSTALLING) ? stateToHosts.ge... | 0 |
*
public class ArrayElementsAccessor
implements ElementsAccessor
return new Enumeration()
{
| 0 |
import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.NOT_MANAGED_HDFS_PATH_LIST;
Set<String> notManagedHdfsPathSet = configHelper.getPropertyValuesWithPropertyType(stackId, PropertyType.NOT_MANAGED_HDFS_PATH, cluster);
String notManagedHdfsPathList = gson.toJson(notManagedHdfsPathSet);
... | 0 |
throw toIOException(result);
throw toIOException(result);
boolean debugEnabled = log.isDebugEnabled();
boolean traceEnabled = log.isTraceEnabled();
if (debugEnabled) {
if (traceEnabled) {
... | 0 |
import org.apache.hc.core5.http.HttpHost;
import org.apache.hc.core5.http.HttpRequest;
import org.apache.hc.core5.http.HttpResponse; | 0 |
import org.apache.beam.runners.core.construction.JavaReadViaImpulse;
import org.apache.beam.sdk.testing.PAssert;
import org.apache.beam.sdk.values.PCollection;
@Test(timeout = 120_000)
PCollection<KV<String, Integer>> output =
pipeline.apply(Impulse.create()).apply(ParDo.of(inputFn)).apply(ParDo.of(testF... | 0 |
import java.lang.annotation.*;
@Retention(RetentionPolicy.SOURCE) | 0 |
expect(mockThrift.createJob(job, null, null)).andReturn(response);
assertSame(response, thrift.createJob(job, null, null)); | 0 |
import org.apache.hc.core5.concurrent.CancellableDependency;
private CancellableDependency cancellableDependency;
execRuntime = new InternalExecRuntime(log, mgr, requestExecutor, cancellableDependency);
Mockito.verify(cancellableDependency, Mockito.times(1)).setDependency(leaseRequest);
Mock... | 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
... | 0 |
import org.w3c.dom.Document;
import org.w3c.dom.DocumentType;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.UserDataHandler; | 1 |
import aQute.bnd.header.*;
import aQute.bnd.osgi.*; | 0 |
public PredicatedBagTest(final String testName) {
public boolean evaluate(final T o) {
protected Bag<T> decorateBag(final HashBag<T> bag, final Predicate<T> predicate) {
final Bag<T> bag = makeTestBag();
final T[] els = (T[]) new Object[] { "1", "3", "5", "7", "2", "4", "1" };
... | 0 |
/**
* Copyright 2016 Seznam a.s.
*
* 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... | 0 |
Throwables.propagateIfInstanceOf(e, UserCodeException.class);
throw new UserCodeException(e); | 0 |
package org.apache.atlas.repository.converters; | 0 |
/**
* Copyright 2013 Apache Software Foundation | 0 |
/**
* Abstract {@link RawFrame} factory that supports standard
* HTTP/2 {@link FrameType}s.
*
* @since 5.0
*/ | 0 |
import org.apache.ambari.server.state.HostConfig;
/**
* Configs derived from Config groups
*/
private Map<String, HostConfig> desiredHostConfigs;
public Map<String, HostConfig> getDesiredHostConfigs() {
return desiredHostConfigs;
}
public void setDesiredHostConfigs(Map<String, HostConfig> desiredH... | 0 |
requestStageContainer = kerberosHelper.executeCustomOperations(cluster, requestProperties, requestStageContainer,
kerberosHelper.getManageIdentitiesDirective(requestProperties));
requestStageContainer = kerberosHelper.toggleKerberos(cluster, securityType, requestStageContainer,
... | 0 |
ModificationHandler {
baseVal.setModificationHandler(this);
* Implements {@link ModificationHandler#valueChanged(String)}.
public void valueChanged(String value) { | 0 |
System.getProperty("test.data.dir", "src/test/resources/data")); | 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 |
import org.apache.hc.core5.util.TimeValue;
final TimeValue connectTimeout,
sock.connect(remoteAddress, TimeValue.isPositive(connectTimeout) ? connectTimeout.toMillisIntBound() : 0); | 1 |
import org.apache.aurora.scheduler.storage.entities.IAppcImage;
import org.apache.aurora.scheduler.storage.entities.IDockerImage;
import org.apache.aurora.scheduler.storage.entities.IImage;
if (config.isSetImage()) {
IImage image = config.getImage();
switch (image.getSetField()) {
case DOCKER:
... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/test/org/apache/commons/jelly/test/xml/TestXMLValidation.java,v 1.7 2003/10/09 21:21:32 rdonkin Exp $
* $Revision: 1.7 $
* $Date: 2003/10/09 21:21:32 $
* any, must include the following acknowledgement:
* Alterna... | 0 |
PCollection<Event> bids = testPipeline.apply(Create.of(BIDS_EVENTS));
auction,
bidder,
price,
new DateTime(432342L + index * config.windowSizeSec * 1000),
"extra_" + auction); | 0 |
* Use <code>constantTransformer</code> if you want that. | 0 |
import com.google.common.collect.ImmutableMap;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map; | 0 |
public void onMerge(WID window, TriggerContext.TriggerMergeContext ctx) { | 0 |
// Get the bundles parameter for the current refresh request.
bundles = m_reqBundles[0]; | 0 |
*
* this does not change the source document in any way.
* @return the <code>EncryptedData</code>
/**
* Returns an <code>EncryptedData</code> interface. Use this operation if
* you want to have full control over the contents of the
* <code>EncryptedData</code> structure.
*
* ... | 0 |
import com.google.common.base.Objects; | 0 |
* $Source: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//dbcp/src/java/org/apache/commons/jocl/ConstructorUtil.java,v $
* $Revision: 1.3 $
* $Date: 2003/08/22 16:08:32 $
* Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* any, must include the following acknowle... | 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 |
import org.apache.accumulo.server.ServerContext;
private final ServerContext context;
GarbageCollectWriteAheadLogs(final ServerContext context, VolumeManager fs, boolean useTrash)
throws IOException {
GarbageCollectWriteAheadLogs(ServerContext context, VolumeManager fs, boolean useTrash, | 0 |
* @version CVS $Id: AggregateField.java,v 1.11 2004/06/29 13:06:04 sylvain Exp $
if (this.valueState == VALUE_UNPARSED) {
if (field.valueState == VALUE_UNPARSED) {
this.valueState = VALUE_UNPARSED;
}
if (this.valueState == VALUE_PARSED) { | 0 |
children = zk.getChildren("/test-" + i, false, null);
assertEquals(childCount, children.size());
children = zk.getChildren("/test-" + i, false, null);
assertEquals(childCount, children.size()); | 0 |
import org.apache.ambari.annotations.ApiIgnore;
@GET @ApiIgnore // until documented
@GET @ApiIgnore // until documented
@POST @ApiIgnore // until documented
@POST @ApiIgnore // until documented
@PUT @ApiIgnore // until documented
@PUT @ApiIgnore // until documented
@DELETE @ApiIgnore // until documented | 0 |
import org.apache.hc.core5.http.ClassicHttpRequest;
import org.apache.hc.core5.http.ClassicHttpResponse;
import org.apache.hc.core5.http.message.BasicClassicHttpRequest;
ClassicHttpRequest request = new BasicClassicHttpRequest("POST", host,
ClassicHttpResponse response = httpexecutor.exe... | 0 |
{ "jar", "bundle" } );
if ( !supportedProjectTypes.contains( artifact.getType() ) ) | 0 |
import org.junit.Ignore;
@Ignore("known as borekn after service dependency interceptors") | 0 |
TaskConfig taskConfig = defaultTask(true);
taskConfig.getExecutorConfig().unsetData();
taskConfig)); | 0 |
import org.apache.beam.sdk.values.PCollection;
private Map<PCollection<?>, AppliedPTransform<?, ?, ?>> producers = new HashMap<>();
private Map<PCollectionView<?>, AppliedPTransform<?, ?, ?>> viewWriters = new HashMap<>();
if (node.getTransform() instanceof ViewOverrideFactory.WriteView) {
viewWriters... | 0 |
XMLCipher instance = new XMLCipher();
XMLCipher instance = new XMLCipher();
contextDocument = context;
contextDocument = context;
contextDocument = context;
contextDocument = context;
contextDocument = context;
if(cipherMode != UNWRAP_MODE && cipherMode != DECRYPT_MOD... | 0 |
@SuppressWarnings("rawtypes") | 0 |
import org.junit.Before;
import org.junit.Test;
}
data = new TreeMap<>(); | 1 |
@Override
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append("[local: ").append(this.local);
buf.append("defaults: ").append(this.defaults);
buf.append("]");
return buf.toString();
}
| 0 |
AccumuloClient accumuloClient = opts.getClient(); | 0 |
import org.apache.ambari.server.security.authorization.AuthorizationException;
} catch (AuthorizationException e) {
result = new ResultImpl(new ResultStatus(ResultStatus.STATUS.FORBIDDEN, e.getMessage())); | 0 |
expect(storage.weaklyConsistentRead(EasyMock.<Quiet<Object>>anyObject())) | 0 |
import javax.validation.constraints.NotNull;
@NotNull
@NotNull
public LSServerInputS3File() {}
| 0 |
protected final boolean cache;
/** Registers or arguments. */
/** Parameter names if any. */
protected String[] parameters = null;
* Sets this interpreter parameters and arguments.
* @param parameters the array of parameters
* @param arguments the array of arguments
*/
protected ... | 0 |
Map<Long,List<String>> heldLocks = new HashMap<>();
Map<Long,List<String>> waitingLocks = new HashMap<>();
lockNodes = new ArrayList<>(lockNodes);
tables = new ArrayList<>(); | 0 |
Field fieldFirstName = form.getFields().get(0);
Field fieldLastName = form.getFields().get(1);
fieldLastName = form2.getFields().get(0);
fieldFirstName = form2.getFields().get(1); | 0 |
import static org.apache.aurora.scheduler.storage.mem.MemCronJobStore.CRON_STORE_SIZE;
assertEquals(0L, statsProvider.getLongValue(CRON_STORE_SIZE));
assertEquals(1L, statsProvider.getLongValue(CRON_STORE_SIZE));
assertEquals(2L, statsProvider.getLongValue(CRON_STORE_SIZE));
assertEquals(0L, statsProvid... | 0 |
public class BasicAsyncResponseProducer implements HttpAsyncResponseProducer {
public BasicAsyncResponseProducer(final HttpResponse response) {
throw new IllegalArgumentException("HTTP response may not be null");
public synchronized HttpResponse generateResponse() {
public synchronized void prod... | 0 |
* @param cutoff the threshold age of the files
* @param cutoff the threshold age of the files
* @param cutoffDate the threshold age of the files
* @param cutoffDate the threshold age of the files
* @param cutoffReference the file whose last modification
* time is usesd as the t... | 0 |
* @version $Revision$, $Date$ | 0 |
assertEquals("Unknown property 'unknown' on class '" +
bean.getClass() + "'", e.getMessage() );
assertEquals("Property 'writeOnlyProperty' has no getter method in class '" +
bean.getClass() + "'", e.getMessage() );
assertEquals("Pro... | 0 |
Map<Resource.Type,String> mapIds = new HashMap<>(); | 0 |
*
*
} else
*
*
*
* | 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 |
Mockito.verify(mgr).connect(connectionEndpoint, Timeout.ofMillis(123), context);
Mockito.verify(connectionEndpoint).setSocketTimeout(Timeout.ofMillis(123)); | 0 |
HttpResponse response = conn.receiveResponse(request); | 0 |
/** {@inheritDoc} */
/** {@inheritDoc} */
/** {@inheritDoc} */
/** {@inheritDoc} */
/** {@inheritDoc} */
/** {@inheritDoc} */
/** {@inheritDoc} */
/** {@inheritDoc} */
/** {@inheritDoc} */
/** {@inheritDoc} */ | 0 |
* <p/>
* <p/>
package org.apache.ambari.view.hive.resources.uploads.query;
import org.apache.ambari.view.hive.resources.uploads.*;
List<ColumnDescriptionImpl> cdList = tableInfo.getColumns();
for (ColumnDescriptionImpl cd : cdList) {
if (cd.getPrecision() != null) {
query.append("(").append(cd.g... | 0 |
public void addProperty(String category, String property, TemporalInfo temporalInfo) { | 0 |
@ServiceDependency(filter="(name=FactoryServiceTestWthPublisher)")
@ServiceDependency(filter="(name=FactoryServiceTestWthPublisher)") | 0 |
/** Reads from the source using the options provided by the given configuration. */
/** Transforms the keys read from the source using the given key translation function. */
checkArgument(function != null, "function can not be null");
/** Transforms the values read from the source using the given valu... | 0 |
import java.io.*;
private final FileOutputStream outputFile;
this.outputFile = new FileOutputStream(file, true);
this.fileChannel = outputFile.getChannel();
outputFile.close(); | 0 |
} else if (event.getState() != KeeperState.Disconnected && event.getState() != KeeperState.Expired && (lock != null || asyncLock != null)) { | 0 |
import org.apache.ambari.server.orm.cache.ConfigGroupHostMapping;
import java.util.Set;
Set<ConfigGroupHostMapping> hostMappingEntities = configGroupHostMappingDAO
for (ConfigGroupHostMapping hostMappingEntity : hostMappingEntities) {
Assert.assertEquals("h1", hostMappingEntity.getHostname());
... | 0 |
Set<HostVersionEntity> hostVersionsAllowed = new HashSet<>();
Set<String> hostsWithoutCorrectVersionState = new HashSet<>();
Set<String> hostsToUpdate = new HashSet<>();
Set<String> badVersions = new HashSet<>();
Set<String> badHosts = new HashSet<>();
ArrayList<InfoTuple> errors = new... | 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... | 0 |
@NamedQuery(name = "AlertGroupEntity.findByAssociatedDefinition", query = "SELECT alertGroup FROM AlertGroupEntity alertGroup WHERE :alertDefinition MEMBER OF alertGroup.alertDefinitions"),
@NamedQuery(name = "AlertGroupEntity.findServiceDefaultGroup", query = "SELECT alertGroup FROM AlertGroupEntity alertGroup... | 0 |
/** Internal implementation of the Beam runner for Apache Samza. */ | 1 |
import org.apache.sshd.common.util.io.der.DERParser;
import org.apache.sshd.common.util.io.der.DERWriter; | 0 |
* Recursively lists the files and directories under a given path, ingests their names and file info
* into one Accumulo table, indexes the file names in a separate table, and the file data into a
* third table. See docs/examples/README.dirlist for instructions.
public static Mutation buildMutation(ColumnVisibility... | 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 |
.withTimestampCombiner(TimestampCombiner.EARLIEST)) | 0 |
Set<TwitterTaskInfo> oldTasks =
ImmutableSet.copyOf(Iterables.transform(tasks, Tasks.SCHEDULED_TO_INFO));
AssignedTask assigned = task.getAssignedTask();
assigned.setAssignedPorts(CommandLineExpander.getNameMappedPorts(
assigned.getTask().getRequestedPorts(), assignedPorts)); | 0 |
for (E element : elements) {
summand.add(element); | 0 |
public static final String JDK_NAME_KEY = "jdk.name";
public static final String JCE_NAME_KEY = "jce.name";
JAVA_HOME_KEY));
public String getJavaHome() {
return properties.getProperty(JAVA_HOME_KEY);
}
public String getJDKName() {
return properties.getProperty(JDK_NAME_KEY);
}
public S... | 0 |
import org.apache.ambari.server.state.RepositoryType;
Mockito.when(m_repositoryVersion.getType()).thenReturn(RepositoryType.STANDARD); | 0 |
checkEncryptionToken(securityEventListener, null, secretKey,
XMLSecurityConstants.XMLKeyIdentifierType.NO_KEY_INFO , "");
checkEncryptionToken(securityEventListener, null, secretKey,
checkEncryptionToken(securityEventListener, null, secretKey,
checkEncryptionToken(securit... | 0 |
byte[] bytes = resources.get(path);
if (bytes == null) {
throw new IOException();
}
return bytes; | 0 |
* This method expects the current user (as defined by {@link UserGroupInformation#getCurrentUser()} to be authenticated via Kerberos or as a Proxy (on top of
* another user). An {@link IllegalArgumentException} will be thrown for all other cases.
*
* @throws IllegalArgumentException
* If the cu... | 0 |
throws CanonicalizationException {
throws CanonicalizationException {
byte[] result = null;
input.setNeedsToBeExpanded(true);
result=c14n.engineCanonicalize(input);
return output; | 0 |
public class HttpServiceServletHandlerTest
ServletHandler h1 = createHandler("/a");
ServletHandler h1 = createHandler("/a");
final InvocationChain ic = new InvocationChain(h1, new FilterHandler[0]);
ServletHandler h1 = createHandler("/");
final InvocationChain ic = new Invocation... | 0 |
EasyMock.expect(upgradeEntity.getId()).andReturn(1L).atLeastOnce();
EasyMock.expect(upgradeEntity.getId()).andReturn(1L).atLeastOnce(); | 0 |
List<HiveQueryId> getHiveQueryIdsForUser(String username);
List<HiveQueryId> getHiveQueryIdsForUserByTime(String username, long startTime, long endTime);
HiveQueryId getHiveQueryIdByHiveEntityId(String hiveEntityId);
List<HiveQueryId> getHiveQueryIdByEntityList(List<String> hiveEntityIds); | 0 |
import org.apache.ambari.server.collections.PredicateUtils;
* <ssoEnabledTest>
* {
* "equals": [
* "config-type/sso.enabled.property_name",
* "true"
* ]
* }
* </ssoEnabledTest>
*
* @deprecated Use {@link #ssoEnabledTest} inst... | 0 |
* {@link com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.