Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
package org.apache.accumulo.core.file.blockfile.cache.lru; | 0 |
@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"}) public class ScanResult implements org.apache.thrift.TBase<ScanResult, ScanResult._Fields>, java.io.Serializable, Cloneable, Comparable<ScanResult> {
public enum _Fields implements org.apache.thrift.TFieldIdEnum { | 0 |
if (fs.getFileStatus(path).isFile()) { | 0 |
public static final String BATCH_WORKER_HARNESS_CONTAINER_IMAGE =
"dataflow.gcr.io/v1beta3/beam-java-batch:beam-master-20160714";
public static final String STREAMING_WORKER_HARNESS_CONTAINER_IMAGE =
"dataflow.gcr.io/v1beta3/beam-java-streaming:beam-master-20160714"; | 0 |
.apply(WithKeys.<URI, String>of(uri).setName("WithKeys(" + uriString + ")"));
.apply(Keys.<URI>create().setName("GetURIs"))
.apply(RemoveDuplicates.<URI>create().setName("RemoveDuplicateDocs"))
.apply(RemoveDuplicates.<KV<URI, String>>create().setName("RemoveDuplicateWords"))
.apply(Count.<String>perElement().setName("CountDocs"));
.apply(Keys.<URI>create().setName("GetURIs2"))
.apply(Count.<URI>perElement().setName("CountWords"));
.apply(Count.<KV<URI, String>>perElement().setName("CountWordDocPairs"));
.apply(CoGroupByKey.<URI>create().setName("CoGroupByURI")); | 0 |
import java.io.File;
private static final String APPLICATION_PROPERTIES = "application.properties";
String proprtiesLocation = System.getProperty("metadata.properties.location");
if (proprtiesLocation == null) {
return new PropertiesConfiguration(PropertiesUtil.class.getResource("/" + APPLICATION_PROPERTIES));
} else {
return new PropertiesConfiguration(new File(proprtiesLocation, APPLICATION_PROPERTIES));
} | 0 |
Cluster cluster = clusters.getCluster(clusterName);
Map<String, Map<String, String>> configTags = new TreeMap<String,
Map<String, String>>();
findConfigurationPropertiesWithOverrides(configurations, configTags,
cluster, serviceName, namenodeHost);
execCmd.setConfigurationTags(configTags); | 0 |
import org.apache.accumulo.core.security.Credentials;
hasPerm = WalkingSecurity.get(state).canChangePassword(new Credentials(principal, token).toThrift(state.getInstance()), target); | 0 |
defaultParams = new BasicHttpParams(); | 0 |
String metadetadir = temp.newFolder("metadetadir").toString();
String serverVersionFilePath = temp.newFolder("serverVersionFilePath").toString();
LOG.info("Metadetadir is " + metadetadir);
LOG.info("ServerVersionFilePath is " + serverVersionFilePath);
properties.setProperty(Configuration.METADETA_DIR_PATH, metadetadir);
properties.setProperty(Configuration.SERVER_VERSION_FILE, serverVersionFilePath); | 0 |
Utils.configureObject(p, LogService.class);
Utils.configureObject(p, Component.class, Utils.createMockObjectAdapter(Component.class, new Object() {
return new DependencyManager((BundleContext) Utils.createNullObject(BundleContext.class));
Utils.configureObject(p, PersistencyManager.class, new PersistencyManager(tempDir));
Utils.removeDirectoryWithContent(tempDir);
Utils.configureObject(p, LogService.class);
Utils.configureObject(p, Component.class, Utils.createMockObjectAdapter(Component.class, new Object() {
return new DependencyManager((BundleContext) Utils.createNullObject(BundleContext.class));
Utils.configureObject(p, LogService.class, logger);
Utils.configureObject(p, PersistencyManager.class, new PersistencyManager(tempDir));
Utils.removeDirectoryWithContent(tempDir);
Utils.configureObject(p, LogService.class, logger);
Utils.configureObject(p, Component.class, Utils.createMockObjectAdapter(Component.class, new Object() {
return new DependencyManager((BundleContext) Utils.createNullObject(BundleContext.class));
Utils.configureObject(p, PersistencyManager.class, new PersistencyManager(tempDir));
Utils.removeDirectoryWithContent(tempDir);
Utils.configureObject(p, LogService.class, logger);
Utils.configureObject(p, Component.class, Utils.createMockObjectAdapter(Component.class, new Object() {
return new DependencyManager((BundleContext) Utils.createNullObject(BundleContext.class));
Utils.configureObject(p, BundleContext.class, Utils.createMockObjectAdapter(BundleContext.class, new Object() {
return (Filter) Utils.createMockObjectAdapter(Filter.class, new Object() {
Utils.configureObject(p, PersistencyManager.class, new PersistencyManager(tempDir));
Utils.removeDirectoryWithContent(tempDir); | 0 |
File serverActions = oozie.getServerActionsFolder();
assertNotNull(serverActions);
assertTrue("Server actions dir is " + serverActions.getPath(), serverActions.getPath().contains("extensions/EXT/0.1/services/OOZIE2/server_actions"));
serverActions = oozie.getServerActionsFolder();
assertNotNull(serverActions);
assertTrue("Server actions dir is " + serverActions.getPath(), serverActions.getPath().contains("extensions/EXT/0.1/services/OOZIE2/server_actions")); | 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 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 $Revision: 1.3 $ $Date: 2004/02/18 01:20:39 $ | 0 |
* @deprecated (4.3) use {@link HttpClientBuilder} see also {@link CloseableHttpClient}. | 0 |
* Sets the user language. If the value is null, then the default (see
* {@link org.apache.batik.bridge.UserAgent#getLanguages})
* (see {@link org.apache.batik.bridge.UserAgent#getPixelToMM})
* <P>This method modifies the result filename, it changes the existing
* suffix to correspong the result file type. It also adds the suffix
* if the file doesn't have one.</P> | 0 |
import com.google.common.base.Optional;
import com.twitter.mesos.gen.JobConfiguration;
import com.twitter.mesos.gen.JobKey;
import com.twitter.mesos.scheduler.JobKeys;
.entity("<html>Usage: /structdump/{task_id} or /structdump/job/{role}/{env}/{job}</html>")
return dumpEntity("Task " + taskId, new Work.Quiet<Optional<? extends TBase<?, ?>>>() {
@Override public Optional<? extends TBase<?, ?>> apply(StoreProvider storeProvider) {
return Optional.fromNullable(Iterables.getOnlyElement(
storeProvider.getTaskStore().fetchTasks(Query.taskScoped(taskId)),
null))
.transform(Tasks.DEEP_COPY_SCHEDULED);
@Path("/cron/{role}/{environment}/{job}")
@PathParam("environment") final String environment,
final JobKey jobKey = JobKeys.from(role, environment, job);
return dumpEntity("Cron job " + JobKeys.toPath(jobKey),
new Work.Quiet<Optional<? extends TBase<?, ?>>>() {
@Override public Optional<JobConfiguration> apply(StoreProvider storeProvider) {
return storeProvider.getJobStore().fetchJob(CronJobManager.MANAGER_KEY, jobKey);
}
});
private Response dumpEntity(final String id, final Quiet<Optional<? extends TBase<?, ?>>> work) {
Optional<? extends TBase<?, ?>> struct = storage.weaklyConsistentRead(work);
if (!struct.isPresent()) {
template.setAttribute("structPretty", Util.prettyPrint(struct.get())); | 0 |
* Copyright (C) 2015 Google Inc. | 0 |
private Signature signatureAlgorithm; | 1 |
/*
*/
fw = new FunctionWrapper(interp, (Function)args[0],
new Object[0]);
/*
*/
fw = new FunctionWrapper(interp, (Function)args[0],
new Object[0]); | 0 |
* @see #getPixelUnitToMillimeter() | 0 |
return new CombinedResourceBundle( bundleResourceBundle, defaultResourceBundle, locale ); | 0 |
import org.apache.hadoop.mapreduce.JobID;
public void test3() {
String s = "`~!@#$%^&*()-_=+[]{}|,.<>/?;:'\"";
test(s, s, s, new HashMap<String,String[]>());
}
public void test4() {
Map<String,String[]> adj = new HashMap<String,String[]>();
adj.put("X", new String[] {});
test("", "jobName", "X", adj);
}
JobID jobid = new JobID("id", 1);
JobSubmittedEvent event = new JobSubmittedEvent(jobid, workflowName, "", 0l, "", null, "", line.get(ID), line.get(NAME), line.get(NODE), line.get(ADJ));
String resultingWorkflowId = workflowId;
if (workflowId.isEmpty())
resultingWorkflowId = jobid.toString().replace("job_", "mr_");
assertEquals("Didn't recover workflowId", resultingWorkflowId, context.getWorkflowId());
Map<String,String[]> resultingAdjacencies = adjacencies;
if (resultingAdjacencies.size() == 0) {
resultingAdjacencies = new HashMap<String,String[]>();
resultingAdjacencies.put(workflowNodeName, new String[] {});
}
assertEquals("Got incorrect number of adjacencies", resultingAdjacencies.size(), context.getWorkflowDag().getEntries().size());
String[] sTargets = resultingAdjacencies.get(entry.getSource()); | 0 |
Document doc = XMLUtils.read(this.getOctetStream(), secureValidation);
Document document = XMLUtils.read(is, secureValidation); | 0 |
public NavigableSet<E> subSet(final E fromElement, final boolean fromInclusive, final E toElement, final boolean toInclusive) {
public NavigableSet<E> headSet(final E toElement, final boolean inclusive) {
public NavigableSet<E> tailSet(final E fromElement, final boolean inclusive) { | 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.felix.metatype;
import java.util.ArrayList;
import java.util.List;
/**
* The <code>DesignateObject</code> class represents the <code>Object</code> element of
* the meta type descriptor.
*
* @author fmeschbe
*/
public class DesignateObject
{
private String ocdRef;
private List attributes;
public String getOcdRef()
{
return ocdRef;
}
public void setOcdRef( String ocdRef )
{
this.ocdRef = ocdRef;
}
public List getAttributes()
{
return attributes;
}
public void addAttribute( Attribute attribute )
{
if ( attribute != null )
{
if ( attributes == null )
{
attributes = new ArrayList();
}
attributes.add( attribute );
}
}
} | 0 |
import net.jcip.annotations.Immutable;
@Immutable | 0 |
private static final Arg<File> TIER_CONFIG_FILE = Arg.create();
new LeadingOptions(MAX_REGISTRATION_DELAY.get(), MAX_LEADING_DURATION.get()));
.toInstance(MAX_STATUS_UPDATE_BATCH_SIZE.get());
private static Optional<String> readTierFile() {
if (TIER_CONFIG_FILE.hasAppliedValue()) {
return Optional.of(Files.toString(TIER_CONFIG_FILE.get(), StandardCharsets.UTF_8));
}
return Optional.<String>absent(); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/compiler/VariableReference.java,v 1.8 2003/10/09 21:31:39 rdonkin Exp $
* $Revision: 1.8 $
* $Date: 2003/10/09 21:31:39 $
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
* permission of the Apache Software Foundation.
* @version $Revision: 1.8 $ $Date: 2003/10/09 21:31:39 $ | 0 |
* The system property ({@value}) which can be used to override the system type.
* @since 3.0
* @since 3.0
* @since 3.0
* @since 3.0
* @since 3.0 | 0 |
import org.apache.hc.core5.http.HttpException;
import org.apache.hc.core5.http.HttpHost;
import org.apache.hc.core5.http.HttpRequest;
import org.apache.hc.core5.http.HttpResponse;
import org.apache.hc.core5.http.HttpStatus;
import org.apache.hc.core5.http.entity.EntityUtils;
import org.apache.hc.core5.http.entity.StringEntity;
import org.apache.hc.core5.http.io.HttpClientConnection;
import org.apache.hc.core5.http.io.HttpRequestHandler;
import org.apache.hc.core5.http.protocol.BasicHttpContext;
import org.apache.hc.core5.http.protocol.HttpContext; | 0 |
out = new ChannelOutputStream(this, remoteWindow, log, SshConstants.SSH_MSG_CHANNEL_DATA, true);
} catch (Throwable err) {
Throwable ignored = GenericUtils.peelException(err);
if (log.isDebugEnabled()) {
log.debug("doInit(" + this + ") inform listener open failure details", ignored);
} | 0 |
import java.lang.reflect.Constructor;
import org.apache.felix.framework.util.SecureAction;
// Secure action to make object constructors accessible.
private static final SecureAction m_secureAction = new SecureAction();
// The constructor may not be public, so we need to make it
// accessible in that case.
Constructor ctor = lhs.getClass().getConstructor(STRING_CLASS);
if (!ctor.isAccessible())
{
m_secureAction.setAccesssible(ctor);
}
// We don't invoke the constructor in a privileged block,
// since we don't want to elevate the objects privileges.
// If the object needs to, it should be doing a privileged
// block internally.
rhsComparable = (Comparable) ctor.newInstance(new Object[] { rhs });
// The constructor may not be public, so we need to make it
// accessible in that case.
Constructor ctor = lhs.getClass().getConstructor(STRING_CLASS);
if (!ctor.isAccessible())
{
m_secureAction.setAccesssible(ctor);
}
// We don't invoke the constructor in a privileged block,
// since we don't want to elevate the objects privileges.
// If the object needs to, it should be doing a privileged
// block internally.
Object rhsObject = ctor.newInstance(new Object[] { rhs });
return lhs.equals(rhsObject); | 0 |
import com.google.common.io.ByteStreams;
private static void writeString(String value, OutputStream dos) throws IOException {
private static String readString(InputStream dis) throws IOException {
ByteStreams.readFully(dis, bytes);
writeString(value, outStream);
return readString(inStream); | 0 |
Path remoteDir = getTempTargetRelativeFile(
getClass().getSimpleName(), getCurrentTestName(), ScpHelper.SCP_COMMAND_PREFIX, "virtual");
sshd.setFileSystemFactory(new VirtualFileSystemFactory(remoteDir)); | 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.cocoon.portal.services.aspects;
import org.apache.cocoon.portal.PortalException;
/**
* The context for a {@link RequestProcessorAspect}.
*
* @version $Id$
*/
public interface RequestProcessorAspectContext
extends BasicAspectContext {
/**
* Invoke next aspect in the chain.
*/
void invokeNext()
throws PortalException;
} | 0 |
import org.apache.http.util.LangUtils;
return
// Do the cheapest checks first
(this.layered == that.layered) &&
LangUtils.equals(this.targetHost, that.targetHost) &&
LangUtils.equals(this.localAddress, that.localAddress) &&
LangUtils.equals(this.proxyChain, that.proxyChain); | 0 |
checkCombinedRootNotConstructed(); | 0 |
package org.apache.beam.sdk.io.gcp.datastore; | 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 static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
@org.junit.jupiter.api.Test
@org.junit.jupiter.api.Test
@org.junit.jupiter.api.Test
@org.junit.jupiter.api.Test | 0 |
import com.google.common.collect.ImmutableList;
import java.util.List;
import java.util.Objects;
final Pipeline pipeline;
public List<TaggedPValue> expand() {
ImmutableList.Builder<TaggedPValue> values = ImmutableList.builder();
for (Map.Entry<TupleTag<?>, PCollection<?>> entry : pcollectionMap.entrySet()) {
values.add(TaggedPValue.of(entry.getKey(), entry.getValue()));
}
return values.build();
@Override
public boolean equals(Object other) {
if (!(other instanceof PCollectionTuple)) {
return false;
}
PCollectionTuple that = (PCollectionTuple) other;
return this.pipeline.equals(that.pipeline) && this.pcollectionMap.equals(that.pcollectionMap);
}
@Override
public int hashCode() {
return Objects.hash(this.pipeline, this.pcollectionMap);
} | 0 |
thrown.expectMessage("Failed to create job");
thrown.expectMessage("Failed to create job with prefix");
thrown.expectMessage("last failed job");
tester.finishBundle(); | 0 |
package org.apache.commons.fileupload2.util; | 0 |
return numberUnit(c, true);
return numberUnit(c, false);
protected int numberUnit(int c, boolean integer) throws IOException {
return (integer) ? LexicalUnits.INTEGER : LexicalUnits.FLOAT; | 0 |
private static String toHexString(byte[] ba) {
StringBuilder str = new StringBuilder();
for (int i = 0; i < ba.length; i++) {
str.append(String.format("%x", ba[i]));
}
return str.toString();
}
/* Test constructing a Mutation using a byte buffer. The byte array
* returned as the row is converted to a hexadecimal string for easy
* comparision.
*/
public void testByteConstructor() {
Mutation m = new Mutation("0123456789".getBytes());
assertEquals("30313233343536373839", toHexString(m.getRow()));
}
public void testLimitedByteConstructor() {
Mutation m = new Mutation("0123456789".getBytes(), 2, 5);
assertEquals("3233343536", toHexString(m.getRow()));
}
| 0 |
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableMap;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable; | 0 |
protected void doRename(final FileObject newfile) throws Exception
LocalFile newLocalFile = (LocalFile) FileObjectUtils.getAbstractFileObject(newfile);
if (!file.renameTo(newLocalFile.getLocalFile())) | 0 |
public static void test2(final Object o){
public static void test3(final Serializable o){
public static void test4(final Cloneable o){
public static Object foo(final String s){ | 0 |
* in the {@link TimeDomain#EVENT_TIME} time domain.
* <li>Is never {@literal null}, but may be {@link BoundedWindow#TIMESTAMP_MIN_VALUE}. | 0 |
import java.io.InputStream;
import static com.google.common.base.Preconditions.checkNotNull;
private final ThriftConfiguration configuration;
interface ThriftConfiguration {
InputStream getSslKeyStream() throws IOException;
int getServingPort();
}
ThriftServerLauncher(
Iface schedulerThriftInterface,
ThriftServer schedulerThriftServer,
ThriftConfiguration configuration) {
this.schedulerThriftInterface = checkNotNull(schedulerThriftInterface);
this.schedulerThriftServer = checkNotNull(schedulerThriftServer);
this.configuration = checkNotNull(configuration);
ks.load(configuration.getSslKeyStream(), SSL_KEYFILE_PASSWORD.toCharArray());
serverSocket = (SSLServerSocket) ssf.createServerSocket(configuration.getServingPort()); | 0 |
public class GetContentInfoFunctionalTest {
* @throws FileSystemException thrown when the getContentInfo API fails.
public void testGetContentInfo() throws FileSystemException { | 1 |
Iterable<Edge> iterable = new IteratorToIterableAdapter<>(it);
Iterable<Vertex> iterable = new IteratorToIterableAdapter<>(it);
Iterable<Edge> result = it; | 0 |
public UnmodifiableCollectionTest(final String testName) {
final List<E> list = new ArrayList<E>();
final ArrayList<E> list = new ArrayList<E>(); | 0 |
import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
clazz = (Class<? extends SortedKeyValueIterator<K,V>>) AccumuloVFSClassLoader.loadClass(iterInfo.className, SortedKeyValueIterator.class); | 0 |
* inconvenient for use with a remote interactive shell. The TelnetClient | 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.commons.exec;
/**
* Runs daemon processes asynchronously. Callers are expected to register a {@link ProcessDestroyer} before executing
* any processes.
*
* @since 1.3
*/
public class DaemonExecutor extends DefaultExecutor {
/**
* Factory method to create a thread waiting for the result of an asynchronous execution.
*
* @param runnable
* the runnable passed to the thread
* @param name
* the name of the thread
* @return the thread
*/
@Override
protected Thread createThread(Runnable runnable, String name) {
Thread t = super.createThread(runnable, name);
t.setDaemon(true);
return t;
}
} | 0 |
renderingHints = new RenderingHints(null);
renderingHints.add(rh);
renderingHints = new RenderingHints(null);
renderingHints.add(defaultRenderingHints);
renderingHints = new RenderingHints(null);
renderingHints.add(rh); | 0 |
storeProvider.getUnsafeTaskStore().saveTasks(ImmutableSet.of(task)); | 0 |
public class ProcessingInstructionTest { | 0 |
package org.apache.beam.sdk.extensions.euphoria.core.client.io;
import org.apache.beam.sdk.extensions.euphoria.core.annotation.audience.Audience; | 0 |
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceException;
import org.apache.excalibur.source.SourceValidity;
* <code>LinkRewriterReader<code> implements <code>servlet:</code> link rewriting in
* text resources. It should be used especially for serving JavaScript files that have
* paths refering to other blocks (<code>servlet:</code> links).
public class LinkRewriterReader extends AbstractReader
implements CacheableProcessingComponent { | 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 |
zk[i] = ClientBase.createZKClient("127.0.0.1:" + clientPorts[i]);
zk[i] = ClientBase.createZKClient("127.0.0.1:" + clientPorts[i]);
zk[i] = ClientBase.createZKClient("127.0.0.1:" + clientPorts[i]);
ZooKeeper zk = ClientBase.createZKClient("127.0.0.1:" + clientPorts[0]);
zk = ClientBase.createZKClient("127.0.0.1:" + clientPorts[0]); | 0 |
* @author <a href="mailto:deweese@apache.org">l449433</a> | 0 |
executer = new TaskExecuter(currentThreadId, m_running_threads);
private final long threadId;
public TaskExecuter(final long threadId, final Map<Long, TaskExecuter> runningThreads) {
this.threadId = threadId;
this.m_running_threads.remove(threadId); | 0 |
sendName(id, p.getFile().listSshFiles());
if (p.listSshFiles().size() == 0) { | 0 |
if (!"algorithms.HMACOutputLengthMin".equals(ex.getMsgID())) { | 0 |
.setInstructionId("1L")
.addProcessBundleDescriptor(BeamFnApi.ProcessBundleDescriptor.newBuilder().setId("1L")
BeamFnApi.FunctionSpec.newBuilder().setId("10L")).build()))
.addProcessBundleDescriptor(BeamFnApi.ProcessBundleDescriptor.newBuilder().setId("2L")
BeamFnApi.FunctionSpec.newBuilder().setId("20L")).build()))
handler.getById("1L"));
handler.getById("2L"));
handler.getById("10L"));
handler.getById("20L")); | 0 |
return new TestPath(getFileSystem(), root, names); | 0 |
if (log.isDebugEnabled()) {
log.debug("process({}@{})[{}] no more passwords to send", username, session, service);
}
| 0 |
String BASE64 = "http://www.w3.org/2000/09/xmldsig#base64";
String ENVELOPED =
String XPATH = "http://www.w3.org/TR/1999/REC-xpath-19991116";
String XPATH2 = "http://www.w3.org/2002/06/xmldsig-filter2";
String XSLT = "http://www.w3.org/TR/1999/REC-xslt-19991116"; | 1 |
* @version $Revision: 1.15 $ $Date: 2004/07/30 13:51:01 $
return nodePointer.getValue(); | 0 |
package org.apache.bcel.classfile; | 1 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
| 0 |
sqlNode = ParserTestUtils.parse(createTable); | 0 |
} catch (final NoSuchElementException e) {
} catch (final RuntimeException e) {
} catch (final SQLException e) {
} catch (final Exception e) {
} catch (final SQLException ex) {
} catch (final javax.naming.NamingException ne) {
} catch (final NoSuchElementException e) {
} catch (final RuntimeException e) {
} catch (final SQLException e) {
} catch (final Exception e) {
final Connection con = info.getPooledConnection().getConnection();
} catch (final SQLException ex) {
} catch (final Exception exc) {
} catch (final Exception e) {
final Object ds = ctx.lookup(dataSourceName);
catch (final SQLException e) { | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList; | 0 |
* limitations under the License. | 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 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 |
import org.apache.sshd.client.UserInteraction;
import org.apache.sshd.common.SshdSocketAddress; | 0 |
/*******************************************************************************
* Copyright (c) Intel Corporation
* Copyright (c) 2017
*
* 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.apache.felix.fileinstall.plugins.resolver;
import org.osgi.annotation.versioning.ProviderType;
/**
* Service interface for a Plugin Resolver. Takes a request consisting of a list
* of index URIs and returns a resolution result, consisting of a list of
* resources to be installed.
*/
@ProviderType
public interface PluginResolver {
ResolveResult resolve(ResolveRequest request) throws Exception;
} | 0 |
* @version CVS $Id: RemovableAspect.java,v 1.2 2003/05/22 12:32:46 cziegeler Exp $
Boolean mandatory = (Boolean)cid.getCopletData().getAspectData("mandatory");
if ( !mandatory.booleanValue() ) { | 0 |
* recommended for use in operations that require deterministic inputs. | 0 |
* A lexicoder for date objects. It preserves the native Java sort order for Date. | 0 |
* The units values.
*/
protected final static String[] UNITS_VALUES = {
"",
SVG_USER_SPACE_ON_USE_VALUE,
SVG_OBJECT_BOUNDING_BOX_VALUE
};
/**
return getAnimatedEnumerationAttribute
(null, SVG_MASK_UNITS_ATTRIBUTE, UNITS_VALUES,
(short)2);
return getAnimatedEnumerationAttribute
(null, SVG_MASK_CONTENT_UNITS_ATTRIBUTE, UNITS_VALUES,
(short)1); | 0 |
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Function;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Joiner;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.FluentIterable;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableSet;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableSortedSet;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Queues;
@SuppressFBWarnings(
value = "NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION",
justification = "https://github.com/google/guava/issues/920")
@SuppressFBWarnings(
value = "NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION",
justification = "https://github.com/google/guava/issues/920")
@SuppressFBWarnings(
value = "NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION",
justification = "https://github.com/google/guava/issues/920") | 0 |
* Copyright 2004,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: UnmodifiableSet.java,v 1.3 2004/03/05 13:02:15 bdelacretaz Exp $ | 1 |
public Object convert(String[] values, Class clazz) { | 0 |
package cz.seznam.euphoria.executor.local;
class LocalSpillTools implements SpillTools { | 0 |
import static org.junit.Assert.fail;
import com.google.cloud.dataflow.sdk.coders.Coder.NonDeterministicException;
try {
coder.verifyDeterministic();
} catch (NonDeterministicException e) {
fail("Expected that the coder is deterministic");
} | 0 |
import org.apache.sshd.util.test.NoIoTestCase;
import org.junit.experimental.categories.Category;
@Category({ NoIoTestCase.class }) | 0 |
if (connReq.getLastZxidSeen() > zk.getZKDatabase().getDataTreeLastProcessedZxid()) {
+ Long.toHexString(zk.getZKDatabase().getDataTreeLastProcessedZxid())
sb.append(zk.getZKDatabase().dumpEphemerals()).append("\n");
sb.append("Node count: ").append(zk.getZKDatabase().getNodeCount()). | 0 |
"replace following properties with real passwords:\n" + errorMessage); | 1 |
import org.apache.accumulo.core.security.Credentials;
public RootTabletStateStore(Instance instance, Credentials credentials, CurrentState state) {
super(instance, credentials, state, RootTable.NAME);
return new MetaDataTableScanner(instance, credentials, MetadataSchema.TabletsSection.getRange(), state, RootTable.NAME); | 0 |
import org.apache.sshd.client.keyverifier.ServerKeyVerifier; | 0 |
package com.twitter.nexus.scheduler; | 0 |
* @author Apache Software Foundation | 0 |
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; | 0 |
/**
* Default HTTP client implementation.
* <p/>
* The usual execution flow can be demonstrated by the code snippet below:
* <pre>
* CloseableHttpClient httpclient = HttpClients.createDefault();
* try {
* HttpGet httpGet = new HttpGet("http://targethost/homepage");
* CloseableHttpResponse response = httpclient.execute(httpGet);
* try {
* System.out.println(response.getStatusLine());
* HttpEntity entity = response.getEntity();
* // do something useful with the response body
* // and ensure it is fully consumed
* EntityUtils.consume(entity);
* } finally {
* response.close();
* }
* } finally {
* httpclient.close();
* }
* </pre>
*/
package org.apache.http.impl.client; | 0 |
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set; | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.