Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
/*
* Copyright (C) 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... | 0 |
import com.google.common.collect.Lists;
* Annotation used in tests. Can be put on {@link AbstractOperatorTest} implementation as well as on
* {@link ExecutorProvider} implementation to tell testkit which data processing is supported
* (bounded, unbounded, any). The result is an intersecting subset of both declaratio... | 0 |
* value, value=the matching {@link Subkey}
* value, value=the matching {@link Subkey} | 0 |
char lastChar = str.charAt(str.length() - 1);
if (lastChar == 'b') {
log.warn("The 'b' in " + str +
" is being considered as bytes. " +
"Setting memory by bits is not supported");
}
try {
switch (Character.toUpperCase(lastChar)) {
case 'G':
multip... | 0 |
import java.io.IOException;
String fileName = request.getFileName();
} catch (IOException excp) {
LOG.error("import(user={}, from={}, fileName={}): cannot read file", userName, requestingIP, excp);
throw new AtlasBaseException(AtlasErrorCode.INVALID_PARAMETERS, fileName + ": can... | 0 |
public void setCurrentStackVersion(String clusterName, StackId stackId)
throws AmbariException{
if(stackId == null || clusterName == null || clusterName.isEmpty()){
LOG.warn("Unable to set version for cluster " + clusterName);
throw new AmbariException("Unable to set"
+ " version=" + s... | 0 |
import org.apache.beam.sdk.nexmark.queries.NexmarkQueryUtil;
.apply(Filter.by(NexmarkQueryUtil.IS_BID)) | 0 |
import org.apache.beam.sdk.values.TimestampedValue;
List<TimestampedValue<String>> peek = tester.peekOutputElementsWithTimestamp();
TimestampedValue<String> one =
TimestampedValue.of("1", new Instant(1000L));
TimestampedValue<String> two =
TimestampedValue.of("2", new Instant(2000L));
Ti... | 0 |
import org.apache.ambari.server.state.RepositoryVersionState;
StackId stackId = new StackId("HDP-0.1");
c1.setDesiredStackVersion(stackId);
c1.createClusterVersion(stackId.getStackName(), stackId.getStackVersion(), "admin", RepositoryVersionState.CURRENT); | 0 |
import org.apache.beam.sdk.annotations.Experimental;
import org.apache.beam.sdk.annotations.Experimental.Kind;
*
* @deprecated Beam views are migrating off of {@code Iterable<WindowedValue<T>>} as a primitive
* view type.
@Deprecated
@Experimental(Kind.CORE_RUNNERS_ONLY)
public static class Singleton... | 0 |
public abstract class AbstractKeyValue<K, V> implements KeyValue<K, V> {
protected K key;
protected V value;
protected AbstractKeyValue(K key, V value) {
public K getKey() {
public V getValue() { | 0 |
* Get a true or false value specifying
* whether credential store is required by this service.
* @return true or false
*/
boolean isCredentialStoreRequired();
/** | 0 |
if (!infiniteStartKey && !infiniteStopKey && beforeStartKeyImpl(endKey)) {
if (!infiniteStartKey && !infiniteStopKey && beforeStartKeyImpl(stop)) {
if (!infiniteStartKey && !infiniteStopKey && beforeStartKeyImpl(stop)) {
return beforeStartKeyImpl(key);
}
/**
* Implements logic of {@code #beforeS... | 0 |
import org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException; | 0 |
* @version CVS $Id: FormInstance.java,v 1.9 2004/05/01 00:05:44 joerg Exp $
* @param uri the page uri (like in cocoon.sendPageAndWait())
* @param bizData some business data for the view (like in cocoon.sendPageAndWait()).
/*
* @param uri the page uri (like in cocoon.sendPageAndWait())
* @param ... | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Charsets; | 0 |
* 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 $Id: JexlTest.java,v 1.32 2003/10/09 21:28:57 rdonki... | 0 |
* @throws Exception on any logical error.
* @param c class.
* @return a {@link ClassMap}
* Clears the classmap and classname caches. | 0 |
* Copyright (c) 2002, 2003 The Apache Software Foundation. All rights
* @version $Revision: 1.5 $ $Date: 2003/02/12 07:56:19 $ | 0 |
import org.apache.xml.security.stax.ext.OutboundXMLSec;
import org.apache.xml.security.stax.ext.XMLSec;
properties.setSignatureKey(key);
OutboundXMLSec outboundXMLSec = XMLSec.getOutboundXMLSec(properties);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
XMLStreamWriter xmlStre... | 0 |
import java.util.List;
protected ClassLoader createClassLoader(URL[] urls, List includePatterns, List excludePatterns, ClassLoader parent) {
return new DefaultClassLoader(urls, includePatterns, excludePatterns, parent); | 0 |
import org.apache.http.ParseException;
/**
* The parser for the header value, or <code>null</code>.
*/
private HeaderValueParser parser;
* @param parser the header value parser, or <code>null</code>
*
* @throws ParseException in case of a parse error
public BufferedHeader(fina... | 0 |
Capture<DBAccessor.DBColumnInfo> capturedSortOrderColumnInfo = newCapture();
Capture<DBAccessor.DBColumnInfo> capturedPermissionIDColumnInfo = newCapture();
dbAccessor.addColumn(eq("adminpermission"), capture(capturedSortOrderColumnInfo));
dbAccessor.addColumn(eq("adminpermission"), capture(capturedPerm... | 0 |
Assert.assertEquals( mt[i].getDynamicFiles().length, 0 );
File[] dynamicFiles = mt[i].getDynamicFiles();
Assert.assertTrue( dynamicFiles.length== 1 );
cfg = readPropertiesFromFile(dynamicFiles[0]);
public static Properties readPropertiesFromFile(File file) throws IOE... | 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 |
m_wires = Util.newImmutableList(wires);
m_resolvedReqs = Util.newImmutableList(reqList);
m_resolvedCaps = Util.newImmutableList(capList);
m_resolvedNativeLibs = (libList.isEmpty()) ? null : Util.newImmutableList(libList);
(String) m_configMap.get(
Fel... | 0 |
new PreemptorModule(true, NO_DELAY, NO_DELAY), | 0 |
public State waitUntilFinish(Duration duration) {
public State waitUntilFinish() { | 0 |
* if they occur after removing the "0" digits.
* @see <a href="http://de.wikipedia.org/wiki/K%C3%B6lner_Phonetik">Wikipedia (de): Kölner Phonetik (in German)</a>
private static final char[][] PREPROCESS_MAP = new char[][]{{'\u00C4', 'A'}, // Ä
{'\u00DC', 'U'}, // Ü
{'\u00D6', 'O'}, // Ö
... | 0 |
Map<TypeDescriptor, Coder<?>> typeToCoder, Map<Class<?>, Coder<?>> classToCoder) {
public <T> Coder<T> coderFor(
TypeDescriptor<T> typeDescriptor, List<? extends Coder<?>> componentCoders)
throws CannotProvideCoderException {
throw new CannotProvideCoderException(
String.format("No c... | 0 |
} catch (InterruptedException e) {
LOG.warn("InterruptedException during JMXEnv operation", e); | 0 |
public static final String SETTING_NAME_REPOSITORY_SETTINGS = "repository_settings";
| 0 |
import com.twitter.aurora.gen.ExecutorConfig;
.setExecutorConfig(isThermos ? new ExecutorConfig("aurora", "config") : null))); | 0 |
package org.apache.accumulo.hadoopImpl.mapreduce;
Set<IteratorSetting.Column> fetchedColumns = new HashSet<>();
fetchedColumns.add(new IteratorSetting.Column(new Text("colf1"), new Text("colq1")));
fetchedColumns.add(new IteratorSetting.Column(new Text("colf2"), new Text("colq2"))); | 0 |
static final String KEY_IDENTITIES = Type.IDENTITY.getDescriptorPluralName();
static final String KEY_CONFIGURATIONS = Type.CONFIGURATION.getDescriptorPluralName();
static final String KEY_AUTH_TO_LOCAL_PROPERTIES = Type.AUTH_TO_LOCAL_PROPERTY.getDescriptorPluralName();
list = data.get(KEY_IDENTITIES);
... | 1 |
* limitations under the License. | 0 |
import static org.apache.beam.sdk.transforms.Watch.Growth.ignoreInput;
abstract TerminationCondition<?, ?> getWatchForNewFilesTerminationCondition();
abstract Builder setWatchForNewFilesTerminationCondition(
TerminationCondition<?, ?> condition);
public Read watchForNewFiles(
Duratio... | 0 |
this.patterns = new String[] {pattern, pattern + "/*"}; | 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 |
* @since 1.5.0
* @since 1.5.0 | 0 |
package org.apache.hc.core5.http.nio.bootstrap;
import org.apache.hc.core5.http.nio.DefaultHttpServerIODispatch;
import org.apache.hc.core5.http.nio.DefaultNHttpServerConnection;
import org.apache.hc.core5.http.nio.reactor.DefaultListeningIOReactor;
import org.apache.hc.core5.http.nio.reactor.IOReactorConfig; | 0 |
import com.twitter.mesos.gen.MaintenanceMode;
public Optional<HostAttributes> getHostAttributes(String host) {
@Override
public boolean setMaintenanceMode(String host, MaintenanceMode mode) {
return attributeStore.setMaintenanceMode(host, mode);
} | 0 |
assertEquals(7, groups.get(3).items.size()); | 1 |
import org.apache.beam.runners.fnexecution.artifact.BeamFileSystemArtifactRetrievalService;
BeamFileSystemArtifactRetrievalService.create(), serverFactory); | 0 |
private List<XMLSecurityConstants.Action> actions = new ArrayList<>();
actions = new ArrayList<>(); | 0 |
import org.apache.accumulo.server.master.state.TabletLocationState.BadLocationStateException;
TabletLocationState tls;
try {
tls = MetaDataTableScanner.createTabletLocationState(k, v);
} catch (BadLocationStateException e) {
// maybe the master can do something with a tablet with bad/i... | 1 |
import static java.util.Arrays.fill;
fill( this.paramTypes, String.class );
fill( this.paramTypes, String.class );
fill( this.paramTypes, String.class ); | 0 |
package org.apache.beam.runners.flink; | 0 |
"\t-Z timezone - set the server timezone for parsing LIST responses\n" +
String serverTimeZoneId = null;
else if (args[base].equals("-Z")) {
serverTimeZoneId = args[++base];
}
if (lenient || serverTimeZoneId != null) {
config.s... | 0 |
package org.apache.felix.resolver.test.util;
import java.util.Collection;
import org.apache.felix.resolver.test.util.IdentityCapability;
public void addCapabilities(Collection<Capability> caps) {
for (Capability cap : caps) {
addCapability(cap);
}
}
public void addRequirements... | 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 |
/** Unit tests for {@link GeneratedGetterFactory}. */
/** Test pojo. */
assertEquals(ImmutableSet.of("privateStringField", "privateIntegerField"), getNames(getters));
assertEquals(ImmutableSet.of(String.class, Integer.class), getTypes(getters));
assertEquals(ImmutableSet.<Object>of("privateStringValue", 1... | 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/iterators/AbstractTestMapIterator.java,v 1.5 2003/11/20 00:03:05 scolebourne Exp $
* @version $Revision: 1.5 $ $Date: 2003/11/20 00:03:05 $
assertEquals("Map must contain ... | 0 |
if (!this.getProviderConfig().isFileSystemRootAccessible())
{
return;
}
{
if (!this.getProviderConfig().isFileSystemRootAccessible())
{
return;
} | 0 |
import com.google.cloud.dataflow.sdk.testing.PAssert;
PAssert.that(output)
PAssert.that(output).empty();
PAssert.that(output).satisfies(new Checker()); | 0 |
import org.apache.accumulo.server.security.SecurityUtil;
watcher = new TransactionWatcher();
TransactionWatcher watcher;
SecurityUtil.serverLogin();
SecurityUtil.serverLogin();
| 0 |
import org.apache.sshd.common.session.Session;
public interface ServerSession extends Session {
/**
* @return The {@link ServerFactoryManager} for this session
*/
@Override ServerFactoryManager getFactoryManager();
/**
* @return The {@link KeyPair} representing the current session's use... | 0 |
import static org.apache.atlas.model.typedef.AtlasBaseTypeDef.SERVICE_TYPE_ATLAS_CORE;
super(AtlasBaseTypeDef.ATLAS_TYPE_BOOLEAN, TypeCategory.PRIMITIVE, SERVICE_TYPE_ATLAS_CORE);
super(AtlasBaseTypeDef.ATLAS_TYPE_BYTE, TypeCategory.PRIMITIVE, SERVICE_TYPE_ATLAS_CORE);
super(AtlasBa... | 0 |
if (accepted) {
handleAcceptance(username, key, session);
protected void handleAcceptance(String username, PublicKey key, ServerSession session) {
// accepting without really checking is dangerous, thus the warning
log.warn("authenticate({}[{}][{}][{}]: accepted without checking... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/BufferUnderflowException.java,v 1.5 2002/10/13 12:57:38 scolebourne Exp $
* $Revision: 1.5 $
* $Date: 2002/10/13 12:57:38 $
* @author Avalon
* @author Paul Jack
* @author Step... | 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 |
* @throws IOException
* @throws IOException | 0 |
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.expect;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import junit.framework.Assert; | 0 |
import static com.google.cloud.dataflow.sdk.testing.WindowFnTestUtils.runWindowFn;
import static com.google.cloud.dataflow.sdk.testing.WindowFnTestUtils.set;
* Tests for FixedWindows WindowFn.
runWindowFn(
runWindowFn(
runWindowFn( | 0 |
* @version CVS $Id: StyleShading.java,v 1.3 2003/09/05 07:31:40 cziegeler Exp $ | 0 |
attempts = 10;
UtilWaitThread.sleep(1000); | 0 |
String path = Constants.ZROOT + "/" + iid + Constants.ZTRACERS;
zapDirectory(zoo, path);
private static void zapDirectory(IZooReaderWriter zoo, String path) {
List<String> children = zoo.getChildren(path);
message("Deleting " + path + "/" + child + " from zookeeper");
zoo.recursiveDe... | 0 |
.invokeProcessElement(new FakeArgumentProvider<Integer, Integer>() {
@Override
public DoFn.ProcessContext processContext(DoFn<Integer, Integer> doFn) {
return null; // will not be touched
}
@Override
public RestrictionTracker<?> restrictionTracker()... | 0 |
import org.apache.ambari.server.state.stack.upgrade.UpgradeType;
@UpgradeCheck(
group = UpgradeCheckGroup.DEFAULT,
required = { UpgradeType.ROLLING, UpgradeType.NON_ROLLING, UpgradeType.HOST_ORDERED }) | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/xml/src/java/org/apache/commons/jelly/tags/xml/CopyOfTag.java,v 1.2 2003/01/26 03:45:09 morgand Exp $
* $Revision: 1.2 $
* $Date: 2003/01/26 03:45:09 $
* $Id: CopyOfTag.java,v 1.2 2003/01/26 03:45:09 morgand Exp ... | 0 |
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.minicluster.MiniAccumuloConfig;
import org.junit.Test;
public class ScanSessionTimeOutIT extends MacTest {
public void configure(MiniAccumuloConfig cfg) {
cfg.setSiteConfig(Collections.singletonMap(Property.TSERV_SESSION_MAXIDLE.getKey()... | 0 |
pw.println("<a href='configMgr/org.apache.felix.hc.core.impl.executor.HealthCheckExecutorImpl'>Configure executor</a><br/><br/>"); | 0 |
BYTE(1l, ""), KILOBYTE(1024l, "K"), MEGABYTE(1024 * 1024l, "M"), GIGABYTE(1024 * 1024 * 1024l, "G");
for (MemoryUnit memoryUnit : MemoryUnit.values()) {
if (memoryUnit.suffix.equals(suffix)) | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/converters/LongConverter.java,v 1.4 2002/12/09 22:03:11 rwaldhoff Exp $
* $Revision: 1.4 $
* $Date: 2002/12/09 22:03:11 $
* @version $Revision: 1.4 $ $Date: 2002/12/09 22:03:11 $
... | 0 |
List<Constructor<T>> result = new LinkedList<>(); | 0 |
package org.apache.commons.digester3.annotations.rules;
/*
* 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... | 0 |
final Map<String, String> vars = new HashMap<String, String>();
final Map<String, String> vars = new HashMap<String, String>();
final Map<String, String> vars = new HashMap<String, String>();
final Map<String, String> vars = new HashMap<String, String>(); | 0 |
throw new FileSystemException("vfs.provider/get-size.error", exc, fileObject);
throw new FileSystemException("vfs.provider/set-attribute-no-exist.error", attrName, fileObject);
throw new FileSystemException("vfs.provider/set-attribute.error", e,attrName, fileObject);
thro... | 0 |
/*
private boolean m_containsComponentAnnotation = false;
* This map is used to recreate the element hierarchy.
/**
* Instance declaration.
*/
private Element m_instance;
public Element getComponentTypeDeclaration() {
public Element getInstanceDeclaration() {
... | 0 |
public int getAllChildrenNumber(String path) {
//cull out these two keys:"", "/"
if ("/".equals(path)) {
return nodes.size() - 2;
}
return (int)nodes.keySet().parallelStream().filter(key -> key.startsWith(path + "/")).count();
}
| 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.beam.sdk.values.reflect.FieldValueGetter;
TypeDescription.Generic coderType =
TypeDescription.Generic.Builder.parameterizedType(Coder.class, Row.class).build();
DynamicType.Builder<Coder> builder =
(DynamicType.Builder<Coder>) BYTE_BUDDY.subclass(coderTy... | 0 |
package org.apache.atlas.typesystem.types;
import org.apache.atlas.MetadataException; | 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 |
package org.apache.accumulo.core.util.shell;
import org.apache.accumulo.core.util.shell.Shell.Command.CompletionSet;
import org.apache.accumulo.core.util.shell.commands.QuotedStringTokenizer; | 0 |
void truncateBefore(Position position) throws InvalidPositionException, StreamAccessException; | 0 |
import java.util.Map;
import org.apache.sshd.common.FactoryManager;
import org.apache.sshd.common.kex.KexProposalOption;
import org.apache.sshd.common.util.GenericUtils;
protected byte[] sendKexInit() throws IOException {
return GenericUtils.EMPTY_BYTE_ARRAY;
}
@Override
prot... | 0 |
* @deprecated since 1.3, use the {@link DefaultParser} instead | 0 |
package com.google.cloud.dataflow.examples.complete; | 0 |
public TemporaryFolder tempDir =
new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
ConfigurationCopy acuconf =
new ConfigurationCopy(AccumuloConfiguration.getDefaultConfiguration()); | 0 |
/*
* Copyright 2000-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 |
ClassCache<List<Constructor<?>>> cache = new ConcurrentHashMapClassCache<List<Constructor<?>>>(new CacheEntryFactory<Class<?>, List<Constructor<?>>>( ) | 0 |
* Adds an operation for clearing the value of a target node.
*
* @param target the target node
*/
public void addClearNodeValueOperation(ImmutableNode target)
{
fetchOperations(target, LEVEL_UNKNOWN).addOperation(
new ClearNodeValueOperation());
}
/**
* ... | 0 |
public static final String METRICS_RECORD_TABLE_NAME = "METRIC_RECORD_UUID";
"EXISTS " + METRICS_RECORD_TABLE_NAME + " (UUID BINARY(20) NOT NULL, " +
"(UUID BINARY(20) NOT NULL, " +
"(HOSTNAME VARCHAR, UUID BINARY(4), APP_IDS VARCHAR, " +
public static final Pattern PHOENIX_TABLES_REGEX_PATTERN = ... | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions;
static void writeNullableValue(
static void writeValue(ClickHouseRowBinaryStream stream, ColumnType columnType, Object value)
throws IOException {
case ENUM8:
Integer enum8 = columnType.enumValues().get((String) valu... | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument;
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Objects;
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Optional;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.I... | 0 |
* or more contributor license agreements. See the NOTICE file
* regarding copyright ownership. The ASF licenses this file
* with the License. You may obtain a copy of the License at
* KIND, either express or implied. See the License for the | 0 |
entity.writeTo(outstream); | 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 |
Long timeAdded = Long.valueOf(System.currentTimeMillis()); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.