Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
value.mutations = Arrays.asList(new ServerMutation(new Text("row")));
value.mutations = Arrays.asList(new ServerMutation(new Text("badrow")));
value.mutations = Arrays.asList(new ServerMutation(new Text("row")));
Long.MAX_VALUE, new HashSet<>());
value.mutations = Arrays.asList(new ServerMutatio... | 0 |
* @param root Root object returned by <code>digester.parse()</code> | 0 |
* See also {@link javax.xml.stream.XMLStreamWriter#writeStartElement(String, String, String)}
* See also {@link javax.xml.stream.XMLStreamWriter#writeEndElement()}
* @return the local name of the current element. | 0 |
* Copyright 1999-2005 The Apache Software Foundation.
* The <code>Constants</code> used throughout the core of the Cocoon engine. | 0 |
import org.apache.sshd.common.NamedResource;
* @param name The factory name - ignored if {@code null}/empty
public static BuiltinDigests fromFactoryName(String name) {
return NamedResource.Utils.findByName(name, String.CASE_INSENSITIVE_ORDER, VALUES); | 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.ReasonPhraseCatalog;
import org.apache.http.annotation.Immutable;
import org.apache.http.util.Args;
this.reasonCatalog = Args.notNull(catalog, "Reason phrase catalog");
Args.notNull(ver, "HTTP version");
Locale loc = determineLocale(context);
String reason = reas... | 0 |
* Handle assignment ( left = right ). | 0 |
final Map<String, Object> ret = new HashMap<>();
ret.put(QUERY, new HashMap<>(TestingFramework.DEFAULT_REQUEST_QUERY));
ret.put(HEADERS, new HashMap<>(TestingFramework.DEFAULT_REQUEST_HEADERS));
final Map<String, Object> responseExpectations = new HashMap<>();
responseExpectation... | 0 |
import org.apache.atlas.type.AtlasEntityType;
AtlasEntityType entityType = typeRegistry.getEntityTypeByName(ENTITY_TYPE);
// Replace list of entities with new values
// add a new element to list of entities
e0Array = entityStore.getByUniqueAttributes(entityType, new Ha... | 0 |
package org.apache.felix.sigil.ui.eclipse.refactor;
import org.apache.felix.sigil.eclipse.model.project.ISigilProjectModel;
import org.apache.felix.sigil.model.osgi.IPackageImport;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Operation... | 0 |
<T> Schema schemaFor(TypeDescriptor<T> typeDescriptor);
<T> SerializableFunction<T, Row> toRowFunction(TypeDescriptor<T> typeDescriptor);
<T> SerializableFunction<Row, T> fromRowFunction(TypeDescriptor<T> typeDescriptor); | 0 |
*
* If there is no way to estimate the size of the source
* implementations MAY return 0L | 0 |
import org.apache.atlas.ApplicationProperties;
import org.apache.atlas.web.security.BaseSecurityTest;
import org.eclipse.jetty.webapp.WebAppContext;
configuration.setProperty("atlas.services.enabled", false);
String persistDir = BaseSecurityTest.writeConfiguration(configuration);
String original... | 0 |
public final class HttpSessionIdListenerTracker extends WhiteboardServiceTracker<HttpSessionIdListener>
super(manager, context, createListenerFilterExpression(HttpSessionIdListener.class)); | 0 |
// ACCUMULO-542: A large root tablet will fail to load if it does't fit in the tserver scan
// buffers
c.tableOperations().addSplits(MetadataTable.NAME,
FunctionalTestUtils.splits("0 1 2 3 4 5 6 7 8 9 a".split(" ")));
assertTrue(
Iterators.size(c.createScanner(RootTable.NAME, Authorizations.... | 0 |
import org.apache.cocoon.util.NetUtils;
+ NetUtils.encode(triggerName.toLowerCase(), "utf-8")
+ NetUtils.encode(tableName.toLowerCase(), "utf-8")).openConnection(); | 0 |
public class HalfDeadTServerIT extends ConfigurableMacIT {
Process ingest = cluster.exec(TestIngest.class, "-u", "root", "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-p", ROOT_PASSWORD, "--rows", rows + ""); | 0 |
expect(resourceProviderFactory.getMemberResourceProvider(EasyMock.anyObject(), EasyMock.anyObject(), eq(managementController)))
expect(resourceProviderFactory.getMemberResourceProvider(EasyMock.anyObject(), EasyMock.anyObject(), eq(managementController)))
.andReturn(Collections.emptySet())
expect(re... | 0 |
@SuppressWarnings("serial") | 0 |
@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"}) public class GCMonitorService {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
public enum _Fields implements org.apache.thrift.TFieldIdEnum { | 0 |
* @version $Id: Soundex.java,v 1.26 2004/07/07 23:15:24 ggregory Exp $
* @deprecated This feature is not needed since the encoding size must be constant. Will be removed in 2.0.
* @deprecated This feature is not needed since the encoding size must be constant. Will be removed in 2.0.
* @deprecated This ... | 0 |
private final double bytes; | 0 |
new BigtableSource(getBigtableConfig(), getRowFilter(), getKeyRanges(), null); | 0 |
import org.apache.ambari.logsearch.solr.SolrConstants;
import org.apache.commons.lang.StringUtils;
import org.apache.solr.client.solrj.SolrQuery;
addInFiltersIfNotNullAndEnabled(
query, request.getUserList(),
SolrConstants.AuditLogConstants.AUDIT_REQUEST_USER,
StringUtils.isNotBlank(request.getUse... | 0 |
import static com.google.common.base.Preconditions.checkArgument;
checkArgument(config != null, "config is null");
checkArgument(zooCache != null, "zooCache is null");
checkArgument(instanceId != null, "instanceId is null"); | 0 |
import org.apache.felix.utils.resource.RequirementImpl; | 0 |
JSONObject json = new JSONObject();
catch ( Exception e )
{
logger.log( "Failed to parse filter '" + filter + "'", e );
try
{
String reason = "filter=" + filter;
if ( e.getMessage() != null )
... | 0 |
// TODO If we have a lot of tservers, this might start to take a fair amount of time
// Consider adding a threadpool to parallelize the requests.
// Alternatively, we might have to move to a solution that doesn't involve tserver RPC
// Could do this through InstanceOperations, but that would set... | 0 |
public synchronized OffsetRange currentRestriction() {
public synchronized OffsetRange checkpoint() {
protected synchronized boolean tryClaimImpl(Long i) {
public synchronized void checkDone() throws IllegalStateException {
public synchronized Backlog getBacklog() { | 0 |
* <p>This class is immutable and thread-safe.</p> | 0 |
private static final long serialVersionUID = 0;
| 0 |
* @version CVS $Id: JPEGSourceInspector.java,v 1.1 2003/10/22 18:53:06 gcasper Exp $ | 0 |
import org.apache.ambari.server.orm.dao.HostRoleCommandDAO;
bind(HostRoleCommandDAO.class).toInstance(createNiceMock(HostRoleCommandDAO.class)); | 0 |
* 0: A E I O U Y H W | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/FastHashMap.java,v 1.4 2001/05/20 21:03:30 craigmcc Exp $
* $Revision: 1.4 $
* $Date: 2001/05/20 21:03:30 $
* @version $Revision: 1.4 $ $Date: 2001/05/20 21:03:30 $
... | 0 |
final ConfigurationDeclaration decl, final Collection<BuilderParameters> params)
protected void initializeParameterObjects(final ConfigurationDeclaration decl,
final Collection<BuilderParameters> params) throws Exception
final BasicBuilderParameters basicParams =
private static v... | 0 |
import java.util.BitSet;
* @version $Id: JexlTest.java,v 1.38 2004/08/15 16:01:12 dion Exp $
// 30652 - support for set
// support generic int size() method
BitSet bitset = new BitSet(5);
jc.getVars().put("bitset", bitset);
assertExpression(jc, "size(bitset)", new Int... | 0 |
import java.net.InetAddress;
String hostname = InetAddress.getLocalHost().getHostName().replaceAll("[-.]", "_");
String pid = state.getPid();
tableName = String.format("bulk_%s_%s_%d", hostname, pid, System.currentTimeMillis()); | 0 |
if ( ComponentRegistry.isBundleActive( bundle ) ) | 0 |
import org.apache.sshd.common.util.closeable.AbstractCloseable;
public class ServerUserAuthService extends AbstractCloseable implements Service { | 0 |
return super.getLinkURI(event); | 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 |
* <code>QueryLoader</code> is a registry for sets of queries so
* that multiple copies of the same queries aren't loaded into memory.
* This implementation loads properties files filled with query name to
* SQL mappings. This class is thread safe.
* Loads a set of named queries into a Map object. This impl... | 0 |
public static final String DOUBLE_CODER_URN = getUrn(StandardCoders.Enum.DOUBLE);
WINDOWED_VALUE_CODER_URN,
DOUBLE_CODER_URN); | 0 |
* @param configMap configMap for BundleArchive
location = decode(location);
//method from Harmony java.net.URIEncoderDecoder (luni subproject) used by URI to decode uri components.
static final String encoding = "UTF8"; //$NON-NLS-1$
private static String decode(String s) throws Unsuppo... | 0 |
doFnRunner.processElement(
WindowedValue.valueInGlobalWindow(
KeyedWorkItems.timersWorkItem(
(String) keyedStateInternals.getKey(),
Collections.singletonList(timer.getNamespace())))); | 0 |
public SVGAnimatedEnumeration getPatternContentUnits( ); | 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 |
/**
* Basic, yet fully functional and spec compliant, HTTP/1.1 file server based on the non-blocking
* I/O model.
* <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 file server.
*
* @auth... | 0 |
void clear();
int getSize(); | 0 |
return ((ModuleDefinition) getCurrentModule().getDefinition()).getHeaders(); | 0 |
* <p>Checks if the value's adjusted length is greater than or equal to the min.</p>
* @param lineEndLength The length to use for line endings. | 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.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.BatchWriterConfig;
public static BatchWriter getBatchWriter(Connector conn) throws TableNotFoundException {
return getBatchWriter(conn, new BatchWriterConfig());
}
public static BatchWriter getBatchWriter(Connector co... | 0 |
System.out.println(Util.getUnderlineString(title.length()));
System.out.println(Util.getUnderlineString(title.length()));
System.out.println(Util.getUnderlineString(title.length()));
System.out.println(Util.getUnderlineString(title.length()... | 0 |
import org.apache.beam.sdk.coders.StringUtf8Coder;
// we know that it is keyed on String
keyCoder = StringUtf8Coder.of(); | 0 |
String.class, 32, "NONE", false));
String.class, null, null, true));
long clusterID = cluster.getClusterId();
final AlertDefinitionEntity journalNodeProcessAlertDefinitionEntity = alertDefinitionDAO.findByName(
clusterID, "journalnode_process");
final AlertDefinitionEntity ho... | 0 |
import org.apache.http.params.HttpProtocolParams;
int buffersize = params.getIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, -1);
Charset charset = CharsetUtils.lookup(HttpProtocolParams.getHttpElementCharset(params));
CodingErrorAction malformedCharAction = HttpProtocolParams.getMalfo... | 0 |
public interface ListeningIOReactor extends IOReactorService, ConnectionAcceptor { | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/map/StaticBucketMap.java,v 1.7 2004/01/02 02:13:07 scolebourne Exp $
* @version $Revision: 1.7 $ $Date: 2004/01/02 02:13:07 $
private Node[] buckets;
private Lock[] locks;... | 0 |
/** Constant for a namespace prefix. */
private static final String NAMESPACE = "commons";
/** Constant for an attribute with a namespace prefix. */
private static final String NS_ATTR = NAMESPACE + ":attr";
ImmutableNode testNode =
orgNode.setAttribute(TEST_ATTR, "yes").setAtt... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/TagLibrary.java,v 1.18 2003/01/17 06:59:03 jstrachan Exp $
* $Revision: 1.18 $
* $Date: 2003/01/17 06:59:03 $
* $Id: TagLibrary.java,v 1.18 2003/01/17 06:59:03 jstrachan Exp $
* @version ... | 0 |
public interface MetricCell<UserT extends Metric, DataT> { | 0 |
private final static String PROP_ROLLBACK_ON_RETURN = "rollbackOnReturn";
private final static String PROP_ENABLE_AUTOCOMMIT_ON_RETURN = "enableAutoCommitOnReturn";
PROP_MAXCONNLIFETIMEMILLIS,
PROP_ROLLBACK_ON_RETURN,
PROP_ENABLE_AUTOCOMMIT_ON_RETURN
value = properties.getPropert... | 0 |
return storage.readOp(new Work.Quiet<GetJobUpdatesResponse>() { | 0 |
StateSampler stateSampler,
StateSampler.StateKind stateKind) {
super(operationName, receivers,
counterPrefix, addCounterMutator, stateSampler, stateKind);
}
public ReceivingOperation(String operationName,
OutputReceiv... | 0 |
import com.google.common.base.Charsets;
static class StartsWith implements Predicate<String> {
String line = new String(encodedElem, Charsets.UTF_8);
try (BufferedReader reader = Files.newBufferedReader(f.toPath(), Charsets.UTF_8)) { | 0 |
import aQute.bnd.osgi.Analyzer; | 0 |
FutureTask<TabletLocations> tlsFuture = new FutureTask<>(() -> {
TabletLocations answer = new TabletLocations();
answer.scan(ctx, tableName);
return answer; | 0 |
LOG.debug("Found {} service repos: {}", serviceRepoIds.size(),Iterables.toString(serviceRepoIds)); | 0 |
try (
final InputStream instr = file.getContent().getInputStream();
final BufferedReader reader = new BufferedReader(new InputStreamReader(instr)); )
{ | 0 |
/**
* @since 2.5.0
*/
/**
* @since 2.5.0
*/
/**
* @since 2.5.0
*/ | 0 |
import org.apache.commons.bcel6.Const;
c = (ConstantUtf8) constant_pool.getConstant(name_index, Const.CONSTANT_Utf8);
c = (ConstantUtf8) constant_pool.getConstant(signature_index, Const.CONSTANT_Utf8); | 0 |
import org.apache.sshd.common.future.CloseFuture;
import org.apache.sshd.common.future.SshFutureListener;
import org.apache.sshd.common.future.SshFuture;
public CloseFuture close(boolean immediately) {
return super.close(immediately).addListener(new SshFutureListener() {
public void operationCom... | 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 |
import org.apache.cocoon.configuration.MutableSettings;
import org.apache.cocoon.configuration.PropertyHelper; | 0 |
TServerInstance someTServer =
new TServerInstance(HostAndPort.fromParts("127.0.0.1", 1234), 0x123456);
MockCurrentState state =
new MockCurrentState(new MergeInfo(new KeyExtent(tableId, new Text("p"), new Text("e")),
MergeInfo.Operation.MERGE)); | 0 |
* @version CVS $Id: MountNode.java,v 1.3 2003/05/04 20:24:47 cziegeler Exp $ | 0 |
@Override
@Override | 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 |
/**
* Close the cnxn and remove it from the factory cnxns list.
*/
public void close(DisconnectReason reason) {
disconnectReason = reason;
close();
}
close(DisconnectReason.CLIENT_CLOSED_CONNECTION);
close(DisconnectReason.IO_EXCEPTION);
close(D... | 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 |
import java.io.UnsupportedEncodingException;
public static final String ENCODING = "encoding";
public static final String ENCODING_DEFAULT = "UTF-8";
private String encoding = ENCODING_DEFAULT;
private Matcher copyMatcher(Matcher m) {
if (m == null)
return m;
else
return m.pattern().match... | 0 |
try (BatchWriter bw = c.createBatchWriter(tableName)) {
for (int i = 0; i < 50000; i++) {
Mutation m = new Mutation(randomHex(8));
m.put("", "", "");
bw.addMutation(m);
} | 0 |
import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CoderResult; | 0 |
* "License"); you may not use this file except in compliance
* distributed under the License is distributed on an "AS IS" BASIS, | 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 |
/**
* Create the node given an id.
*
* @param id node id.
*/
/**
* Create a node with the given parser and id.
*
* @param p a parser.
* @param id node id.
*/
/** {@inheritDoc} */
/** {@inheritDoc} */ | 0 |
private String note;
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
} | 0 |
Optional<Protos.Credential> credentials) { | 0 |
import org.apache.ambari.server.events.JpaInitializedEvent;
import org.apache.ambari.server.events.publishers.AmbariEventPublisher;
public GuiceJpaInitializer(PersistService service, AmbariEventPublisher publisher) {
publisher.publish(new JpaInitializedEvent()); | 0 |
* @version $Revision: 1.14 $ $Date: 2004/04/01 22:18:12 $
* Compares two keys, in internal converted form, to see if they are equal.
* This implementation uses the equals method and assumes neither key is null.
* @param key1 the first key to compare passed in from outside
* @param key2 the second... | 0 |
import org.apache.beam.model.pipeline.v1.RunnerApi.Environment;
sdkComponents.registerEnvironment(Environment.newBuilder().setUrl("java").build()); | 0 |
package aQute.lib.spring;
import java.util.ArrayList;
import java.util.List;
import aQute.lib.osgi.Analyzer;
/**
* This component is called when we find a resource in the META-INF/*.xml
* pattern. We parse the resource and and the imports to the builder.
*
* Parsing is done with XSLT (first time I see the use o... | 0 |
import org.apache.felix.dm.annotation.api.ServiceDependency; | 0 |
/** Matches a glob containing a wildcard, capturing the portion before the first wildcard. */
private S3ResourceId(String bucket, String key, @Nullable Long size) {
checkArgument(
!other.endsWith("/"), "Cannot resolve a file with a directory path: [%s]", other); | 1 |
* "License"); you may not use this file except in compliance
* distributed under the License is distributed on an "AS IS" BASIS, | 0 |
@Override
protected int defaultTimeoutSeconds() {
return 60;
}
@Test | 0 |
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("DIGEST [complete=").append(complete)
.append(", nonce=").append(lastNonce)
.append(", nc=").append(nounceCount)
.append("]");
return builder.t... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.