Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
import org.apache.accumulo.core.client.NamespaceNotFoundException;
import org.apache.accumulo.core.client.impl.Namespaces;
private Option tableOpt, deleteOpt, setOpt, filterOpt, disablePaginationOpt, outputFileOpt, namespaceOpt;
@Override
TableNotFoundException, IOException, ClassNotFoundException, Namespa... | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
import org.apache.cocoon.util.AbstractLogEnabled;
int newGuess; | 0 |
import org.apache.beam.sdk.coders.CustomCoder;
public static final class FileResultCoder extends CustomCoder<FileResult> { | 0 |
import org.apache.beam.sdk.io.FileSystems;
import org.apache.beam.sdk.io.fs.ResolveOptions;
return FileSystems.matchNewResource(tempLocationDir, true)
.resolve(bigQueryOperationName, ResolveOptions.StandardResolveOptions.RESOLVE_DIRECTORY)
.resolve(stepUuid, ResolveOptions.StandardResolveOptions.RES... | 0 |
*
private Map<OgnlContext, Class> defaultMapClassMap = new HashMap<OgnlContext, Class>( );
String getClassName( )
answer = (Map) defaultMapClass.newInstance( );
throw new OgnlException( "Default Map class '" + defaultMapClass.getName( ) + "' instantiation error",
... | 0 |
import org.apache.batik.gvt.GraphicsNodeRenderContext;
public RenderedImage createScaledRendering(int w, int h,
RenderingHints hints) {
public Shape getDependencyRegion(int srcIndex,
Rectangle2D outputRgn) {
public Shape getD... | 0 |
public void testObjectEncode() throws Exception {
Base64 b64 = new Base64();
assertEquals("SGVsbG8gV29ybGQ=", new String(b64.encode("Hello World".getBytes("UTF-8"))));
}
| 0 |
* @version $Id$ | 0 |
* Copyright 2001-2004 The Apache Software Foundation.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... | 0 |
import static org.apache.atlas.repository.converters.AtlasInstanceConverter.toAtlasBaseException; | 0 |
boolean isRealVisible=isVisibleDO(E,ns.getLevel())==1; | 0 |
int idx = baseUrl.toLowerCase().indexOf(repoFileName);
if (ri.getBaseUrl() != null
&& ri.getBaseUrl().equals(ri.getDefaultBaseUrl())) {
// Override baseUrl with the latestBaseUrl.
ri.setBaseUrl(baseUrl);
}
... | 0 |
* Constructs an uninitialised instance of this class.
*
* A factory must be | 0 |
Set<String> supportedIds = new HashSet<>();
Set<Resource> keepers = new HashSet<>();
Map<String, MetricReportRequest> propertyMap = new HashMap<>();
private Map<String, String> propertyIdMap = new HashMap<>(); | 1 |
*
* @param configuration The (initial) configuration for the new
* component manager
* @param isNewInstance <code>true</code> if this component manager is
* created as per {@link #newInstance(Dictionary)}. In this case the
* given configuration is used as the factory config... | 0 |
import static org.junit.Assert.*;
@Test(expected=NullPointerException.class) | 0 |
import java.util.Arrays;
private Set<String> clearedProperties = new HashSet<String>();
private void recursiveGetKeys(Set<String> keys, Context context, String prefix, Set<Context> processedCtx) throws NamingException
NamingEnumeration<NameClassPair> elements = null;
NameClassPair nameCl... | 0 |
Collection<ByteSequence> f = new java.util.HashSet<>(); | 1 |
Job job = createJob(insertQuery, input.getFromDatabase());
Job job = createJob(deleteQuery, input.getDatabase()); | 0 |
import javax.annotation.Nullable;
* Creates a {@link ShuffleSink} from a {@link CloudObject} spec.
public class ShuffleSinkFactory implements SinkFactory {
@Override
public ShuffleSink<?> create(
CloudObject spec,
Coder<?> coder,
@Nullable PipelineOptions options,
@Nullable ExecutionConte... | 0 |
Element service = new Element("provides", ""); | 0 |
LOG.info("Loading latest URL info for stack " + stack.getName() + "-" +
stack.getVersion() + " from " + sourceUri);
LOG.info("Loading latest URL info for stack " + stack.getName() + "-" +
stack.getVersion() + " from " + jsonFile);
LOG.error("Could not load the U... | 0 |
import org.apache.ambari.server.security.authorization.UserType;
userEntity = userDAO.findUserByNameAndType(userName, UserType.JWT);
}
if (userEntity == null) { | 0 |
import org.apache.xml.security.utils.IdResolver;
IdResolver.registerElementById(objElem, this.id); | 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... | 0 |
urls = new ToLocalUrlEnumeration(urls);
Enumeration urls = ModuleImpl.this.getResourcesByDelegation(name);
if (m_useLocalURLs)
{
urls = new ToLocalUrlEnumeration(urls);
}
return urls;
static URL convertToLocalUrl(URL url)
... | 0 |
public class TgzProviderTestCase extends AbstractProviderTestConfig {
public static Test suite() throws Exception {
public void prepare(final DefaultFileSystemManager manager) throws Exception {
public FileObject getBaseTestFolder(final FileSystemManager manager) throws Exception { | 1 |
import org.apache.accumulo.core.conf.ClientProperty;
cfg.setClientProperty(ClientProperty.SSL_ENABLED, "true");
cfg.setClientProperty(ClientProperty.SSL_KEYSTORE_PATH, localKeystoreFile.getAbsolutePath());
cfg.setClientProperty(ClientProperty.SSL_KEYSTORE_PASSWORD.getKey(), cfg.getRootPassword());
cfg.... | 0 |
private static final Collection SUPPORTED_PROJECT_TYPES = Arrays.asList(new String[]{"jar","osgi-bundle"});
/* ignore project types not supported, useful when the plugin is configured in the parent pom */
if (!SUPPORTED_PROJECT_TYPES.contains(getProject().getArtifact().getType())) {
getLog().debug("Ignoring p... | 0 |
import org.apache.beam.runners.flink.translation.functions.FlinkAssignWindows;
WindowFn<T, ? extends BoundedWindow> windowFn = windowingStrategy.getWindowFn();
FlinkAssignWindows<T, ? extends BoundedWindow> assignWindowsFunction =
new FlinkAssignWindows<>(windowFn);
SingleOutputStreamOperato... | 0 |
final AtomicReference<Exception> ref = new AtomicReference<>();
List<Thread> threads = new ArrayList<>(); | 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 ... | 0 |
public boolean accept(final File file) {
public boolean accept(final File dir, final String name) { | 1 |
import org.apache.accumulo.core.replication.StatusUtil;
import org.apache.accumulo.core.replication.proto.Replication.Status;
* Common methods for {@link WorkAssigner}s
public abstract class AbstractWorkAssigner implements WorkAssigner {
protected boolean isWorkRequired(Status status) {
return StatusUtil.isWork... | 0 |
final int annotation_table_length = input.readUnsignedShort(); | 0 |
public Command createShell(ChannelSession channel) {
public void destroy(ChannelSession channel) throws Exception {
super.destroy(channel); | 0 |
package org.apache.commons.vfs2.provider.bzip2;
import org.apache.commons.vfs2.Capability;
import org.apache.commons.vfs2.FileName;
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.FileSystemOptions;
import org.apache.commons.vfs2.provider.com... | 1 |
out.print("Keep instances with no references: ");
out.println(scrConfiguration.keepInstances() ? "Supported" : "Unsupported");
out.print("Info Service registered: ");
out.println(scrConfiguration.infoAsService() ? "Supported" : "Unsupported"); | 0 |
import javax.annotation.Nullable;
@Nullable UnaryFunction<T, Long> eventTimeAssigner) { | 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... | 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... | 1 |
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
List<ValueInSingleWindow<T>> elems = (List) getOutputs().get(tag);
List<ValueInSingleWindow<T>> outputList = (List) getOutputs().get(tag);
getOutputs().put(tag, (List) outputList);
@Nullable private DoFn<InputT, OutputT> fn;
@Null... | 0 |
public CommandResult(int exitCode, String output, String error) {
this.output = output;
this.error = error;
private String output;
private String error;
public String getOutput() {
return this.output;
public String getError() {
return this.error;
public void setOutput(String output) {
th... | 0 |
protected IoConnector connector;
protected SessionFactory sessionFactory; | 0 |
// TODO sanity check col fam
return getFullPath(new String(tableId), relPath);
public Path getFullPath(String tableId, String path) {
if (path.contains(":"))
return new Path(path);
if (path.startsWith("../"))
path = path.substring(2);
else if (path.startsWith("/"))
path = "/... | 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... | 0 |
@Override | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestObject.java,v 1.5 2002/02/25 18:14:57 morgand Exp $
* $Revision: 1.5 $
* $Date: 2002/02/25 18:14:57 $
* @version $Id: TestObject.java,v 1.5 2002/02/25 18:14:57 morgand... | 0 |
import com.google.cloud.dataflow.sdk.coders.Coder;
import org.apache.spark.broadcast.Broadcast;
private final Broadcast<byte[]> bcast;
private final Coder<T> coder;
private transient T value;
BroadcastHelper(Broadcast<byte[]> bcast, Coder<T> coder) {
this.bcast = bcast;
this.coder = cod... | 0 |
* Use <code>instantiateTransformer</code> if you want that. | 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 SF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may... | 0 |
import org.apache.beam.sdk.io.FileBasedSink.FileResultCoder;
writer = writeOperation.createWriter();
FileBasedWriter<T> writer = writeOperation.createWriter();
results.setCoder(FileResultCoder.of());
keyedResults.setCoder(KvCoder.of(VoidCoder.of(), FileResultCoder.of()));
writeOper... | 0 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | 0 |
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.instanceOf;
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.sdk.util.UserCodeException;
suppressions.add(allOf(
instanceOf(UserCodeException.class),
new CausedByMatcher(new ThrowableMessageMatcher("foo"... | 0 |
return org.apache.commons.bcel6.Const.getOpcodeName(super.getOpcode()) + " "
+ cp.constantToString(super.getIndex(), org.apache.commons.bcel6.Const.CONSTANT_Fieldref); | 0 |
import org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO; | 0 |
package org.apache.felix.connect.felix.framework.capabilityset; | 0 |
final String exchangeId = ExecSupport.getNextExchangeId();
exchangeId,
final String exchangeId = ExecSupport.getNextExchangeId();
exchangeId,
connectionEndpoint.execute(exchangeId, exchangeHandler, context); | 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 |
"server.1=127.0.0.1:" + port1 + ":" + leport1 + ";" + clientport1 + "\n" +
"server.2=127.0.0.1:" + port2 + ":" + leport2 + ";" + clientport2 + "\n" +
"server.3=127.0.0.1:" + port3 + ":" + leport3 + ";" + clientport3 + "\n" +
"server.4=127.0.0.1:" + port4 + ":" + leport4 + ";" + clientpor... | 0 |
public ReaderInputStream(final Reader reader, final CharsetEncoder encoder) {
public ReaderInputStream(final Reader reader, final CharsetEncoder encoder, final int bufferSize) {
public ReaderInputStream(final Reader reader, final Charset charset, final int bufferSize) {
public ReaderInputStream(final Re... | 1 |
public LocalVariableTypeTable(final LocalVariableTypeTable c) {
public LocalVariableTypeTable(final int name_index, final int length, final LocalVariable[] local_variable_table, final ConstantPool constant_pool) {
LocalVariableTypeTable(final int nameIdx, final int len, final DataInput input, final Constant... | 0 |
* <p>
* Please note the purpose of this application is demonstrate the usage of HttpCore APIs.
* It is NOT intended to demonstrate the most efficient way of building an HTTP client. | 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 |
private static final String DSA_Y =
private static final String DSA_P =
private static final String DSA_Q =
private static final String DSA_G =
private static final String DSA_X =
private static final String RSA_MOD =
private static final String RSA_PRIV =
kspec = new DSAP... | 1 |
import org.apache.http.HttpVersion;
import org.apache.http.ProtocolVersion;
import org.apache.http.UnsupportedHttpVersionException;
final StatusLine statusLine = getLineParser().parseStatusLine(buffer);
final ProtocolVersion version = statusLine.getProtocolVersion();
if (version.greaterEquals(Ht... | 0 |
import static com.google.common.base.Preconditions.checkState;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; | 0 |
import org.osgi.service.log.LogService;
try
{
if (accessibleLatch.await( m_componentManager.getLockTimeout(), TimeUnit.MILLISECONDS ) && m_implementationAccessible)
{
return m_implementationObject;
}
}
ca... | 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 |
// set the repo version resolved state to verify that the version is not sent
repositoryVersion.setResolved(false);
ormTestHelper.repositoryVersionDAO.merge(repositoryVersion);
| 0 |
* which is retrieved by a given Avalon <code>ServiceManager</code>.
* To use this class, you need to add your Avalon <code>ServiceManager</code>
* <code>createMessageContext()</code> method adding the ServiceManager, eg:
* This provider will use that <code>ServiceManager</code> reference to
// Assuming ... | 0 |
.withBlockCache(dataCache, indexCache).withFileLenCache(fileLenCache)
.withCryptoService(context.getCryptoService()).build(); | 0 |
Copyright 2000 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 |
return bundle.getHeaders("").get(Constants.BUNDLE_ACTIVATIONPOLICY) != null; | 0 |
import org.apache.accumulo.core.client.Accumulo; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/AbstractTestSortedSet.java,v 1.2 2003/10/05 23:10:31 scolebourne Exp $
* elements may be added; see {@link AbstractTestCollection} for more details.
* @version $Revision: 1... | 0 |
import static org.powermock.api.easymock.PowerMock.mockStaticPartial;
import static org.powermock.api.easymock.PowerMock.replayAll;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import org.junit.Test;
import com.google.gson.Gson;
... | 0 |
*
final class DefaultManagedHttpClientConnection | 0 |
tmp = getClass().newInstance();
return tmp.engineResolveSecretKey(element, baseURI, storage); | 0 |
import java.security.PublicKey;
if (key instanceof PublicKey) {
setPublicKey((PublicKey)key);
} | 0 |
protected final AtomicReference<IoConnector> connectorHolder = new AtomicReference<>(null); | 0 |
* @deprecated (4.3) use {@link #produceContent(ContentEncoder, IOControl)} | 0 |
return ImmutableList.<Class<? extends PipelineRunner<?>>>of(
GearpumpRunner.class,
TestGearpumpRunner.class); | 0 |
private String displayName;
boolean recoveryEnabled,
String displayName) {
this.displayName = displayName;
* @return the displayName
*/
public String getDisplayName() {
return displayName;
}
/** | 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.felix.utils.capabilities.RequirementImpl;
Requirement req = new RequirementImpl("osgi.wiring.package", attrs, dirs); | 0 |
Partitioner partitioner = getPartitioner(context);
inputRdd, inputKeyCoder, inputValueCoder, windowingStrategy, partitioner); | 0 |
} catch (TableNotFoundException | IOException e) { | 0 |
Config config = createConfig(cluster, configTypeName, properties, tag, propertiesAttributes);
if (config != null) {
String authName = getAuthName();
if (cluster.addDesiredConfig(authName, config) != null) {
LOG.info("cluster '" + cluster.getClusterName() + "' "
... | 0 |
if (sessionIdle != null) { | 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 ma... | 0 |
TabletClientService.Client client =
ThriftUtil.createClient(new TabletClientService.Client.Factory(), transport); | 0 |
* A wrapping entity that buffers it content if necessary.
* The buffered entity is always repeatable.
* If the wrapped entity is repeatable itself, calls are passed through.
* If the wrapped entity is not repeatable, the content is read into a
* buffer once and provided from there as often as required.
*
public c... | 0 |
* This class is created by hand, not automatically.
* @version CVS $Id: ServletContextImpl.java,v 1.2 2003/07/11 17:03:27 joerg Exp $
/** @deprecated The method ServletContextImpl.getServlets() overrides a
* deprecated method from ServletContext */
/** @deprecated The method ServletContextI... | 0 |
import java.util.HashSet;
import java.util.Set;
@Override
public Set<SubResourceDefinition> getSubResourceDefinitions() {
Set<SubResourceDefinition> subs = new HashSet<SubResourceDefinition>();
subs.add(new SubResourceDefinition(Resource.Type.StackConfigurationDependency));
return subs;
} | 0 |
package org.apache.atlas.typesystem.types;
import org.apache.atlas.MetadataException;
import org.apache.atlas.typesystem.IStruct;
import org.apache.atlas.typesystem.persistence.DownCastStructInstance;
import org.apache.atlas.typesystem.types.TypeUtils.Pair; | 1 |
import org.apache.ambari.view.commons.hdfs.ViewPropertyHelper;
public static final String VIEW_CONF_KEYVALUES = "view.conf.keyvalues";
Optional<Map<String, String>> props = ViewPropertyHelper.getViewConfigs(context, VIEW_CONF_KEYVALUES);
HdfsApi api;
if(props.isPresent()){
... | 0 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not u... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.