Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
int bytesRead;
do {
bytesRead = this.responseParser.fillBuffer(this.session.channel());
if (bytesRead > 0) {
this.inTransportMetrics.incrementBytesTransferred(bytesRead);
}
this.respon... | 0 |
import org.apache.http.conn.routing.HttpRoute; | 0 |
LogEntry log = new LogEntry(RootTable.EXTENT, System.currentTimeMillis(), tabletSession.hostPort(), filename.toString());
final byte[] node;
try {
node = log.toBytes();
} catch (IOException e) {
throw new RuntimeException("Failed to write to byte array", e);
}
rw.... | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
package org.apache.commons.beanutils2;
import org.apache.commons.beanutils2.expression.Resolver; | 1 |
import org.apache.xml.security.stax.securityEvent.KeyNameTokenSecurityEvent;
} else if (tokenType == XMLSecurityConstants.KeyNameToken) {
tokenSecurityEvent = new KeyNameTokenSecurityEvent(); | 0 |
* Abstract class for SecurityHeaderHandlers with parse LOGic for the xml structures | 0 |
* {@code ClientConnectionPoolManager} maintains a pool of
* {@code ClientConnectionPoolManager} maintains a maximum limit of connection | 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 applicabl... | 0 |
import org.apache.beam.learning.katas.util.Log; | 0 |
package org.apache.hc.client5.http.classic.methods; | 0 |
package org.apache.accumulo.core.util.shell.commands;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import org.apache.accumulo.core.util.shell.Shell;
import org.apache.accumulo.core.uti... | 1 |
import org.apache.accumulo.core.data.TableId;
ReplicationTarget target = new ReplicationTarget("cluster1", "table1", TableId.of("1"));
ReplicationTarget target = new ReplicationTarget("cluster1", "table1", TableId.of("1")); | 0 |
@Deprecated | 0 |
package org.apache.http.impl.client;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import org.apache.http.client.HttpClient;
import org.apache.http.client.protocol.HttpClientContext;
private FutureRequestExecutionService httpAsyncClientWithFuture;
final HttpClient h... | 0 |
import org.apache.ambari.common.rest.entities.agent.ConfigFile;
action4.setBluePrintName("blueprint");
action4.setBluePrintRevision("0.1");
action4.setUser("hdfs");
action4.setKind(Kind.WRITE_FILE_ACTION);
String owner ="hdfs";
String group = "hadoop";
String permission = "0700";
String ... | 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.http.impl.client.HttpClients; | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* v... | 0 |
Collection<String> reported = (vers == null) ? null : vers.getVersions();
continue; // debug breakpoint | 0 |
expect(dao.findByForeignKeys(eq(foreignKeys))).andReturn(entities).once();
expect(dao.findByNameAndForeignKeys(eq("test-artifact"), eq(foreignKeys))).andReturn(entity).once();
expect(dao.findByNameAndForeignKeys(eq("test-artifact2"), eq(foreignKeys))).andReturn(entity2).once(); | 0 |
import com.google.cloud.dataflow.sdk.coders.CollectionCoder;
import com.google.cloud.dataflow.sdk.coders.ListCoder;
import com.google.cloud.dataflow.sdk.coders.SetCoder;
import com.google.common.collect.ImmutableSet;
import java.util.Collection;
import java.util.Set;
public void testFlattenIterablesLists() {
Pipe... | 0 |
import org.apache.beam.runners.dataflow.DataflowRunner.CombineGroupedValues;
TransformTranslator translator = getTransformTranslator(transform.getClass());
checkState(
translator != null, "no translator registered for primitive transform %s", transform);
DataflowRunner.CombineGroupedValues... | 0 |
@Nullable private String strippedTableSpec;
this.strippedTableSpec = null;
public String getStrippedTableSpec() {
if (strippedTableSpec == null) {
int index = tableSpec.lastIndexOf('$');
strippedTableSpec = (index == -1) ? tableSpec : tableSpec.substring(0, index);
}
return strippedTabl... | 0 |
public static <A extends Appendable> A appendNonEmptyValues(A sb, String name, Object... values) throws IOException {
public static void writeHostConfigEntries(Path path, Collection<? extends HostConfigEntry> entries, OpenOption... options) throws IOException { | 0 |
import java.io.File;
/**
* Returns the disk size of the volume which holds the working directory.
* <p>
* Identical to:
* <pre>
* freeSpaceKb(new File(".").getAbsolutePath())
* </pre>
* @return the amount of free drive space on the drive or volume in kilobytes
* @throws Illeg... | 0 |
import org.apache.batik.refimpl.gvt.text.ConcreteTextSelector;
initSelectors();
new ConcreteTextSelector(nodeRenderContext);
node.addGraphicsNodeMouseListener(
(GraphicsNodeMouseListener) selector); | 0 |
HostComponentResourceProvider(controller); | 0 |
import org.apache.felix.dm.service.ServiceStateListener;
Service service = m_manager.createService()
for (int i = 0; i < m_stateListeners.size(); i ++) {
service.addStateListener((ServiceStateListener) m_stateListeners.get(i));
}
return service; | 0 |
public void testHTTPCLIENT_1031() throws Exception {
BasicClientCookie2 orig = new BasicClientCookie2("name", "value");
orig.setDomain("domain");
orig.setPath("/");
orig.setAttribute("attrib", "stuff");
BasicClientCookie2 clone = (BasicClientCookie2) orig.clone();
Ass... | 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 |
*
*
*/
* @return The converted value
* @throws ParseException if an error occurs parsing a String to a Number | 0 |
AccumuloInputFormat.setConnectionInfo(job, getConnectionInfo());
AccumuloOutputFormat.setConnectionInfo(job, getConnectionInfo()); | 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 |
package org.apache.batik.anim.dom; | 0 |
package org.apache.beam.sdk.runners.inprocess;
import org.apache.beam.sdk.transforms.PTransform;
import org.apache.beam.sdk.values.PInput;
import org.apache.beam.sdk.values.POutput; | 0 |
import org.apache.atlas.model.metrics.AtlasMetrics;
import org.apache.atlas.services.MetricsService;
private MetricsService metricsService;
public AdminResource(ServiceState serviceState, MetricsService metricsService) {
this.metricsService = metricsService;
@GET
@Path("metrics")
@Produces(... | 0 |
package org.apache.felix.upnp.sample.binaryLight.actions;
import org.apache.felix.upnp.sample.binaryLight.LightModel;
| 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 |
// Consume response content
entity.consumeContent();
| 0 |
package org.apache.accumulo.core.client.mock;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.accumulo.core.conf.AccumuloConfiguration;
import org.apache.accumulo.core.conf.Property;
class MockConfiguration extends AccumuloConfiguration {
Map<String, String> map;
... | 1 |
import org.apache.http.message.HttpPostRequest; | 0 |
/* $Id: CallParamRule.java,v 1.23 2004/11/30 03:08:55 skitching Exp $
* <p>Note that if the element is empty the an <i>empty string</i> is
* passed to the target method, not null. And if automatic type conversion
* is being applied (ie if the target function takes something other than
* a string a... | 0 |
import org.apache.felix.http.proxy.AbstractProxyListener;
this.servletContext.addListener(new AbstractProxyListener() {
protected void stopTracking() {
ProxyServletContextListener.this.stopTracking();
protected void startTracking(final Object bun... | 0 |
// Term can't be deleted if it is assigned to any entity
if (CollectionUtils.isNotEmpty(storeObject.getAssignedEntities())) {
throw new AtlasBaseException(AtlasErrorCode.TERM_HAS_ENTITY_ASSOCIATION, storeObject.getGuid(), String.valueOf(storeObject.getAssignedEntities().size()));
}
| 0 |
import org.apache.sshd.common.NamedResource;
default boolean canExtractKeyPairs(NamedResource resourceKey, List<String> lines) | 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 |
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
import java.io.FileNotFoundException;
try {
if (!fs.getFileStatus(ret).isDirectory()) {
throw new AccumuloException(kind + " import " + type + " directory " + dir + " is not a directory!");
}
} catch (File... | 0 |
package cz.seznam.euphoria.core.client.dataset.windowing; | 0 |
bytes = JavaUtils.getBytesFromStream(inputOctetStreamProxy);
inputOctetStreamProxy.close();
return bytes; | 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 |
writeRead(16, (12 + 4) * (int) (Math.ceil(25.0 / 12) + Math.ceil(31.0 / 12)));
blockOut.close();
assertEquals(16 * 8, baos.toByteArray().length);
}
@Test
public void testGiantWrite() throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int blockSize = 16;
... | 0 |
public StringMap getIdentifiers() { | 0 |
/**
* 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
* distribu... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/test/org/apache/commons/digester/TestRuleSet.java,v 1.3 2002/01/09 20:22:51 sanders Exp $
* $Revision: 1.3 $
* $Date: 2002/01/09 20:22:51 $
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* @ve... | 0 |
* @version CVS $Id: WidgetReplacingPipe.java,v 1.14 2003/11/17 04:27:48 antonio Exp $
private static final String REPEATER_SIZE = "repeater-size";
private static final String REPEATER_WIDGET_LABEL = "repeater-widget-label";
private static final String WIDGET_LABEL = "widget-label";
private static final... | 0 |
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.UriInfo;
import org.apache.ambari.server.api.resources.ResourceInstance;
import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
import org.apache.ambari.server.api.services.serializers.ResultSerializer;
| 0 |
* Copyright (c) 2002 The Apache Software Foundation. All rights | 0 |
for (Method method : methods) { | 0 |
static SerializedMutation create(String tableName, byte[] key, byte[] bytes) { | 1 |
import org.apache.aurora.common.application.ShutdownStage;
import org.apache.aurora.common.base.Command;
import org.apache.aurora.common.quantity.Amount;
import org.apache.aurora.common.quantity.Time;
import org.apache.aurora.common.stats.StatsProvider;
import org.apache.aurora.common.util.Clock;
import org.apache.auro... | 0 |
import org.apache.hadoop.metrics2.util.Servers; | 0 |
@Override
protected void setUp() throws Exception {
@Override
protected void tearDown() throws Exception { | 0 |
outStream.write(value);
}
}
/**
* Encodes the provided {@code value} with the identical encoding to {@link #encode}, but with
* optimizations that take ownership of the value.
*
* <p>Once passed to this method, {@code value} should never be observed or mutated again.
*/
public void encod... | 0 |
stateTimestampNs = System.nanoTime(); | 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 |
public static final String ACCUMULO_CLUSTER_CLIENT_CONF_KEY = "accumulo.it.cluster.clientconf";
String clusterTypeValue = null, clientConf = null;
clientConf = fileProperties.getProperty(ACCUMULO_CLUSTER_CLIENT_CONF_KEY);
if (null == clientConf) {
clientConf = systemProperties.getProperty(ACC... | 0 |
private static final String SCR_SERVICE = "org.apache.felix.scr.ScrService";
private static final String META_TYPE_NAME = "org.osgi.service.metatype.MetaTypeService";
private static final String CONFIGURATION_ADMIN_NAME = "org.osgi.service.cm.ConfigurationAdmin"; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/SetNextRule.java,v 1.6 2001/08/20 18:28:40 craigmcc Exp $
* $Revision: 1.6 $
* $Date: 2001/08/20 18:28:40 $
* @version $Revision: 1.6 $ $Date: 2001/08/20 18:28:40 $
/**
* Ren... | 0 |
import org.apache.accumulo.core.rpc.ThriftUtil; | 1 |
* 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 applicabl... | 0 |
public class Log
{
public static final String PREFIX = "Sigil: ";
private static final boolean highlight = false;
public static void error( String msg )
{
if ( highlight )
Message.deprecated( PREFIX + "[error] " + msg );
Message.error( PREFIX + msg );
}
public ... | 0 |
public void write(final byte[] b, final int off, final int len) throws IOException {
int chunk = len;
if (chunk > max) {
chunk = (int) max;
this.out.write(b, off, chunk);
this.total += chunk; | 0 |
import static org.easymock.EasyMock.anyString;
import static org.easymock.EasyMock.getCurrentArguments;
import org.easymock.IAnswer;
static Method methodGetExecutable;
methodGetExecutable = KerberosOperationHandler.class.getDeclaredMethod("getExecutable", String.class);
KDCKerberosOperationHandler handler = ... | 0 |
import org.apache.sshd.util.test.NoIoTestCase;
import org.junit.experimental.categories.Category;
@Category({ NoIoTestCase.class }) | 0 |
import org.apache.beam.sdk.extensions.sql.RowSqlTypes;
import org.apache.beam.sdk.schemas.Schema.TypeName;
private static final Map<Class, TypeName> JAVA_CLASS_TO_FIELDTYPE = ImmutableMap
.<Class, TypeName>builder()
.put(Byte.class, TypeName.BYTE)
.put(Short.class, TypeName.INT16)
.put(Integer... | 0 |
JobKeys::from;
query -> Optional.fromNullable(query.get().getSlaveHosts());
private final Function<IScheduledTask, Task> toTask = task -> new Task(task, configInterner);
private static final Function<Task, IScheduledTask> TO_SCHEDULED = task -> task.storedTask; | 0 |
Copyright 2002-2003 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 l... | 0 |
public abstract class HttpRequestBase extends AbstractHttpMessage | 0 |
* @version $Revision$ $Date$ | 0 |
initialValue = 0 | 0 |
User,
Stack,
StackVersion,
OperatingSystem,
Repository,
StackService,
StackConfiguration,
StackServiceComponent | 0 |
import org.apache.beam.sdk.coders.Coder;
import org.apache.beam.sdk.coders.Coder.Context;
import org.apache.beam.sdk.coders.StringUtf8Coder;
import org.apache.beam.sdk.coders.VoidCoder;
import org.apache.beam.sdk.io.Read.Bounded;
import org.apache.beam.sdk.options.PipelineOptions;
import org.apache.beam.sdk.transforms.... | 0 |
/** {@inheritDoc} */ | 0 |
import org.apache.cocoon.servlet.RequestUtil;
getLogger().error("Problem in multipart filter. Unable to create request.", e);
RequestUtil.manageException(request, response, null, null,
HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
... | 0 |
final HttpHost target = new HttpHost("https", "somehost", 443);
mgr.connect(endpoint1, TimeValue.ofMilliseconds(123), context);
Mockito.verify(plainSocketFactory, Mockito.times(1)).connectSocket(TimeValue.ofMilliseconds(123), socket, target,
final HttpHost target = new HttpHost("https", ... | 0 |
org.apache.accumulo.core.data.thrift.TConstraintViolationSummary _elem2; // optional
org.apache.accumulo.core.data.thrift.TConstraintViolationSummary _elem7; // optional | 0 |
* Core HTTP transport component APIs. | 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.util.test.NoIoTestCase;
import org.junit.experimental.categories.Category;
@Category({ NoIoTestCase.class }) | 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.beam.runners.dataflow.options.DataflowPipelineOptions;
import com.google.api.services.bigquery.model.TableSchema;
| 0 |
* Factory for poolable blocking connections. | 0 |
import java.nio.channels.ClosedChannelException;
} catch (ClosedChannelException ex) {
throw new LogClosedException(); | 0 |
* @param <K> the key type
* @param <V> the value type
* @param <K> the key type
* @param <V> the value type
* @param <K> the key type
* @param <V> the value type | 0 |
import org.apache.commons.lang3.math.NumberUtils; | 0 |
import org.apache.avalon.framework.service.ServiceSelector;
* @version CVS $Id$
ServiceSelector inputSelector = null;
ServiceSelector outputSelector = null;
inputSelector=(ServiceSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);
if (inputName != null && inputSelector != nul... | 0 |
import org.apache.hadoop.metadata.typesystem.ITypedReferenceableInstance;
import org.apache.hadoop.metadata.typesystem.Referenceable;
import org.apache.hadoop.metadata.typesystem.json.InstanceSerialization;
import org.apache.hadoop.metadata.typesystem.json.Serialization;
public ITypedReferenceableInstance getEntity... | 0 |
private final String OS_MAPPING = "mapping";
private final String OS_ALIASES = "aliases";
private JsonOsFamilyRoot jsonOsFamily = null;
Type type = new TypeToken<JsonOsFamilyRoot>() {}.getType();
jsonOsFamily = gson.fromJson(new InputStreamReader(inputStream), type);
osMap = jsonOsFa... | 0 |
import org.apache.aurora.scheduler.mesos.TaskExecutors;
ResourceSlot.from(TASK, TaskExecutors.NO_OVERHEAD_EXECUTOR), | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.