Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
@Deprecated
0
import com.google.gson.GsonBuilder; private final Gson prettyGson = new GsonBuilder().serializeNulls().setPrettyPrinting().create(); bind(Gson.class).annotatedWith(Names.named("prettyGson")).toInstance(prettyGson);
0
/** * @throws Exception */ // put the unhealthy host into MM which will allow this check to pass Assert.assertEquals(PrereqCheckStatus.PASS, check.getStatus()); // make the host healthy and take it out of MM to produce a PASS result
0
import org.apache.beam.runners.direct.DirectGroupByKey.DirectGroupAlsoByWindow; import org.apache.beam.runners.direct.DirectGroupByKey.DirectGroupByKeyOnly; .put(DirectGroupByKeyOnly.class, new GroupByKeyOnlyEvaluatorFactory()) .put(DirectGroupAlsoByWindow.class, new GroupAlsoByWindowEvaluatorFa...
0
.onResultOf(o -> o.getUnavailabilityStart().orElse(Instant.MAX));
0
* Do some runner setup: check that the DirectRunner is not used in conjunction with // such as EvaluationResults returned by DirectRunner.
0
// Add instance name & factory name addProperty(new Property(this, "instance.name", handler.getInstanceManager().getInstanceName())); addProperty(new Property(this, "factory.name", handler.getInstanceManager().getFactory().getName())); * service. To avoid cycle in Check Context, the ...
0
* @cocoon.sitemap.component.documentation
0
guid = repositoryService.createEntity(hrDept2); String dbGUID = repositoryService.createEntity(db); String tableGUID = repositoryService.createEntity(table);
0
import cz.seznam.euphoria.core.client.dataset.BatchWindowing; public class MapWindow<IN, OUT, W extends Window<?>> extends WindowWiseOperator<IN, IN, OUT, W> { public <W extends Window<?>> MapWindow<IN, OUT, W> windowBy( MapWindow<IN, OUT, W> mapWindow = new MapWindow<>(flow, input, windowing); public...
0
import static java.nio.charset.StandardCharsets.UTF_8; @Test public void testReverse() throws Exception { Schema resultType = Schema.builder().addByteArrayField("field").build(); Row resultRow = Row.withSchema(resultType).addValues("дгвба".getBytes(UTF_8)).build(); Row resultRow2 = Row.withSchema(resu...
0
import org.apache.ambari.server.orm.dao.RepositoryVersionDAO; @Inject private Provider<RepositoryVersionDAO> repositoryVersionDAO; /** * When hosts are added, add a host_version record for every repo_version in the database. * * @param event the add event */ List<RepositoryVersionEntity> repos ...
0
File testInstanceId = new File( new File(new File(new File("target"), "instanceTest"), ServerConstants.INSTANCE_ID_DIR), UUID.fromString("00000000-0000-0000-0000-000000000000").toString()); assertTrue( testInstanceId.getParentFile().mkdirs() || testInstanceId.getParentFile().isDirect...
0
* @version $Id: TestEqualBehaviour.java,v 1.3 2004/01/16 14:23:39 epugh Exp $ public class TestEqualBehaviour extends TestCase public void testLoading() throws Exception public void testDeletingExisting() throws Exception public void testDeletingNonExisting() throws Exception public void testSettingNo...
0
* Copyright 2001-2005 The Apache Software Foundation
0
log.trace(String.format("tservers per batch : %,8.2f avg %,6d min %,6d max", (float) (numBatches.get() != 0 ? (tabletServersBatchSum.get() / numBatches.get()) : 0), minTabletServersBatch.get(), maxTabletServersBatch.get())); log.trace(String.format("tablets per batch : %,8.2f avg %,6d min %...
0
private final ClientContext context; public TabletServerBatchWriter(ClientContext context, BatchWriterConfig config) { this.context = context; Tables.clearCache(context.getInstance()); if (!Tables.exists(context.getInstance(), tableId)) throw new MutationsRejectedException(context.getInstanc...
1
Copyright 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 law or...
0
* href="http://commons.apache.org/configuration/team-list.html">Commons * <code><a href="http://commons.apache.org/lang/api-release/org/apache/commons/lang/ClassUtils.html">
0
} catch (Exception e) { handleException(e); throws ProcessingException { if (this.data != null) { if (this.data != null) { // Capture environment info this.data.setEnvironmentInfo(new EnvironmentInfo(environment)); // Execute pipeline ...
0
public static Path getRecoveryPath(VolumeManager fs, Path walPath) {
0
import java.util.Optional;
0
import org.apache.beam.runners.core.triggers.ExecutableTriggerStateMachine; import org.apache.beam.runners.core.triggers.TriggerStateMachineContextFactory; import org.apache.beam.runners.core.triggers.TriggerStateMachineRunner; * <p>The {@link #onTrigger} relies on a {@link TriggerStateMachineRunner} to manage the exe...
0
pgpKeyId = XMLUtils.decode(content); pgpKeyPacket = XMLUtils.decode(content);
0
public void testLoadXMLWithSettings() throws Exception
0
* Key used to retrieve the value of the disconnect timeout which * is used when a disconnection is attempted. If the disconnect * message has not been sent before the timeout, the underlying socket * will be forcibly closed. */ public static final String DISCONNECT_TIMEOUT = "disconnect-ti...
0
* * @version $Id$ public FileCacheSeekableStream(InputStream stream) * Returns the current offset in this file. * Sets the file-pointer offset, measured from the beginning of this * @param pos the offset position, measured in bytes from the * beginning of the file, at ...
0
* DOMImplementation#createDocument(String,String,DocumentType)}.
1
package com.twitter.mesos.scheduler.state; import com.twitter.mesos.scheduler.MesosTaskFactory;
0
* @version CVS $Id: XSPSessionFwHelper.java,v 1.7 2003/12/26 23:47:50 antonio Exp $ DocumentFragment df = getXML(cm, context, path); return df != null ? df.getFirstChild().getNodeValue() : "";
0
try (BatchWriter bw = client.createBatchWriter("table1")) { Mutation m1 = new Mutation("00081"); m1.put("math", "sqroot", "9"); m1.put("math", "sq", "6560"); bw.addMutation(m1); } try (BatchWriter bw = client.createBatchWriter(table)) { Mutation m = new Mutation("foo"); ...
0
import static org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.TimelineMetricConfiguration.TIMELINE_METRICS_EVENT_METRIC_PATTERNS; import static org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.aggregators.AggregatorUtils.getJavaRegexFromSqlRegex; import java.util.HashSet...
0
public static int determineJRELevel() { final String s = System.getProperty("java.version"); final String[] parts = s.split("\\."); if (parts.length > 0) { try { final int majorVersion = Integer.parseInt(parts[0]); if (majorVersion > 1) { ...
0
package org.apache.commons.fileupload2; import org.apache.commons.fileupload2.DefaultFileItem; import org.apache.commons.fileupload2.DefaultFileItemFactory; import org.apache.commons.fileupload2.FileItem; import org.apache.commons.fileupload2.FileItemFactory; * Unit tests for {@link org.apache.commons.fileupload2.Def...
0
import org.apache.aurora.common.application.AppLauncher;
0
private Profile profile; PortalService service) { * @see org.apache.cocoon.portal.profile.ProfileManagerAspectContext#invokeNext(org.apache.cocoon.portal.scratchpad.Profile) public void invokeNext(Profile profile) { this.profile = profile; pu...
0
import org.apache.beam.sdk.io.common.NetworkTestHelper; public static void beforeClass() throws Exception { port = NetworkTestHelper.getAvailableLocalPort(); public static void afterClass() {
0
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.text.DateFormat; import java.util.ArrayList; import java.util.Date; import java.util.StringTokenizer;
0
import org.apache.accumulo.core.util.MetadataTable; MetadataTable.PREV_ROW_COLUMN.fetch(scanner); MetadataTable.DIRECTORY_COLUMN.fetch(scanner); if (!MetadataTable.PREV_ROW_COLUMN.hasColumns(prevEndRowKey)) { if (!returnPrevEndRow && MetadataTable.PREV_ROW_COLUMN.hasColumns(entry.getKey())) { ...
0
import org.apache.ambari.server.security.authorization.ResourceType; String typeName = privilegeEntity.getResource().getResourceType().getName(); if (ResourceType.CLUSTER.name().equalsIgnoreCase(typeName)) { privilegeType = ResourceType.CLUSTER.name(); } else if (ResourceType.A...
0
m_metadataHolder = injector.getProvider(MetadataHolder.class); m_agentConfigsHolder = injector.getProvider(AgentConfigsHolder.class);
0
* Copyright (C) 2015 Google Inc.
0
* .apply(Combine.perKey(yourCombineFn))
0
import org.apache.beam.vendor.grpc.v1_13_1.com.google.protobuf.ByteString;
0
IOReactorConfig config = new IOReactorConfig(); config.setIoThreadCount(1); final ListeningIOReactor ioreactor = new DefaultListeningIOReactor(config); IOReactorConfig config = new IOReactorConfig(); config.setIoThreadCount(1); final ListeningIOReactor ioreactor = new Def...
0
@Override
0
import com.twitter.mesos.gen.ScheduledTask; import com.twitter.mesos.scheduler.storage.Storage; private final Storage storage; * @param storage Backing store to fetch tasks from. Storage storage, this.storage = checkNotNull(storage); Set<ScheduledTask> tasks = Storage.Util.fetchTasks(storage, Que...
0
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(PortAssignment.class);
0
* * * * *
0
import java.util.Arrays;
0
import org.apache.beam.runners.core.TimerInternals;
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.http.conn.routing.HttpRoute;
0
public static final class BouncyCastleRandomFactory implements RandomFactory { public BouncyCastleRandomFactory() { public static final class BouncyCastleRandom extends AbstractRandom { BouncyCastleRandom() {
0
this.value = JXTExpression.compileExpr(select, "eval: \"select\":", getLocation());
0
import org.apache.commons.vfs.FileContent; import org.apache.commons.vfs.FileType; * @version $Revision: 1.5 $ $Date: 2003/01/21 02:42:29 $ /** * Asserts that the content of a file is the same as expected. Checks the * length reported by getSize() is correct, then reads the content as * a byte stre...
0
* Common HTTP methods using {@link HttpUriRequest} as a HTTP request message representation. * @since 5.0
0
private static final String[] COLLECTION = new String[] { private static final List<KV<Integer, String>> WITH_KEYS = Arrays.asList( private static final List<KV<Integer, String>> WITH_CONST_KEYS = Arrays.asList( private static final List<KV<Void, String>> WITH_CONST_NULL_KEYS = Arrays.asList( KV.of((Void)...
0
* @XmlType(name = "", propOrder = {"responseId","timestamp", this.hardwareProfile = hardwareProfile;
0
import java.lang.reflect.InvocationTargetException; } catch (IllegalArgumentException e) { log.error("Signature of sync method changed. Accumulo is likely incompatible with this version of Hadoop."); throw new RuntimeException(e); } catch (IllegalAccessException e) { log.error("Could not invok...
0
stackId.getStackVersion(), "admin", RepositoryVersionState.INSTALLING);
0
public class PoolingConnection extends DelegatingConnection<Connection>
0
.include("source", source); builder.delegate(source);
0
import org.apache.sshd.server.Environment; public void start(Environment env) throws IOException { this.env = Collections.unmodifiableMap(env.getEnv()); IoUtils.closeQuietly(in, out, err);
0
import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; import org.apache.accumulo.minicluster.impl.ProcessReference; public void configure(MiniAccumuloConfigImpl cfg) {
0
* @version CVS $Id: DefaultSelectionListBuilder.java,v 1.3 2003/12/10 17:53:26 vgritsenko Exp $ Object value; if ("".equals(stringValue)) { // Empty value translates into the null object value = null; } else { v...
0
/* ==================================================================== * Copyright (c) 2001-2004 The Apache Software Foundation. All rights * @version $Revision: 1.3 $ $Date: 2004/01/14 21:34:35 $
0
* Constructs a key.
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.commons.net.examples.nntp;
0
try { instanceDefinitions.add(createViewInstanceDefinition(viewDefinition, instanceConfig)); } catch (Exception e) { LOG.error("Caught exception adding view instance for view " + viewDefinition.getViewName(), e); ...
0
public int available() throws IOException { long available = raf.length() - raf.getFilePointer(); if (available > Integer.MAX_VALUE) { return Integer.MAX_VALUE; } return (int) available; }
0
String s = System.getProperty("http.keepAlive", "true"); String s = System.getProperty("http.keepAlive", "true");
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
* @version $Id: TestXMLConfiguration.java,v 1.14 2004/10/11 09:26:38 henning Exp $ conf.setFileName("subdir/hello.xml"); assertEquals("subdir/hello.xml", conf.getFileName()); assertEquals(new File(testBasePath, "subdir/hello.xml"), conf.getFile());
0
import org.apache.ambari.server.orm.entities.UserAuthenticationEntity; import org.apache.ambari.server.orm.entities.UserEntity; UserEntity userEntity = createMock(UserEntity.class); expect(userEntity.getAuthenticationEntities()).andReturn(Collections.<UserAuthenticationEntity>emptyList()).once(); expect(use...
0
void setConverter(Converter c); InternalConverting key(Object key);
0
package org.apache.commons.jxpath.issues;
0
Filter.propertyFilter("sso", true), Filter.propertyFilter("authenticated", true),
0
import org.apache.xml.security.exceptions.XMLSecurityException;
0
// Cannot use forEach because of the modification of the updated map value (non-final) // Cannot use forEach because of the IOException being thrown by appendNonEmptyProperty
0
@Ignore( "TODO: BEAM-2902 Add support for user state in a ParDo.Multi once PTransformMatcher " + "exposes a way to know when the replacement is not required by checking that the " + "preceding ParDos to a GBK are key preserving.") private static DataflowPipelineOptions buildPipelineOptions...
1
import org.apache.accumulo.core.file.rfile.PrintInfo; String result = FunctionalTestUtils.readAll(url.openStream()); Process info = cluster.exec(PrintInfo.class, entry.getKey().getColumnQualifier().toString()); String out = FunctionalTestUtils.readAll(cluster, PrintInfo.class, info); bscanner.close(...
0
/** Produces a {@link RunnerApi.CombinePayload} from a {@link Combine}. */ GlobalCombineFn<?, ?, ?> combineFn = combine.getTransform().getFn(); try { return RunnerApi.CombinePayload.newBuilder() .setAccumulatorCoderId( components.registerCoder( extractAccumulato...
0
import static org.apache.beam.sdk.util.CoderUtils.encodeToByteArray; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map;
0
void delete() throws MutationsRejectedException, TableNotFoundException;
0
import java.util.Map; import org.osgi.util.converter.ConversionException; import org.osgi.util.converter.TypeReference; @Override default public boolean equals(Object o1, Object o2) { try { Map<String, Object> m1 = convert(o1).to(new TypeReference<Map<String,Object>>(){}); Map<...
0
import java.util.Collection; Iterable<? extends Map.Entry<PublicKey, String>> keys = client.getIdentities(); assertObjectInstanceOf("Non collection initial identities", Collection.class, keys); assertEquals("Unexpected initial identities size", 0, ((Collection<?>) keys).s...
0
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
0
String[] atlasEndpoint = atlasConf.getStringArray(ATLAS_ENDPOINT); if (atlasEndpoint == null){ atlasEndpoint = new String[]{DEFAULT_DGI_URL}; } atlasClient = new AtlasClient(atlasEndpoint, basicAuthUsernamePassword);
0
if (this.status.get().compareTo(IOReactorStatus.SHUTTING_DOWN) == 0 && this.selector.keys().isEmpty()) { break; if (this.status.compareAndSet(IOReactorStatus.INACTIVE, IOReactorStatus.SHUT_DOWN)) { synchronized (this.shutdownMutex) { this.shutdownM...
0
import org.apache.batik.util.SVGTypes; // ExtendedTraitAccess /////////////////////////////////////////////////// /** * Returns the type of the given attribute. */ public int getAttributeType(String ns, String ln) { if (ns == null) { if (ln.equals(SVG_ACCUMULATE_ATTRIBUTE) ...
1
updaterAssert("header-None", "col-entity-None"); updaterAssert("header-Tx-prop-T1-No-Guid", "col-entity-T1-prop-Tn-No-Guid", PROCESS_DELETE + ":Tn", PROCESS_UPDATE + ":T1", PROCESS_ADD + ":Tx");
0
collector.add(new EventInfo(event.getTopic(), null, null, props));
0
* @version CVS $Id: EPRight.java,v 1.3 2003/09/05 07:31:40 cziegeler Exp $
0
import org.apache.ambari.server.configuration.AmbariServerConfigurationCategory;
0
import org.apache.beam.runners.core.StepContext;
0
import org.apache.beam.sdk.util.state.StateInternalsFactory; private final StateInternalsFactory<K> stateInternalsFactory; StateInternalsFactory<K> stateInternalsFactory, this.stateInternalsFactory = stateInternalsFactory; StateInternals<K> stateInternals = stateInternalsFactory.stateInternalsForKey(key...
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Supplier; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables;
0
@Deprecated
0