Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
private final int maxTypesLengthInIdxQuery;
private final int maxTagsLengthInIdxQuery;
this.maxTypesLengthInIdxQuery = ApplicationProperties.get().getInt(Constants.INDEX_SEARCH_TYPES_MAX_QUERY_STR_LENGTH, 512);
this.maxTagsLengthInIdxQuery ... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/decorators/Attic/TestTransformedCollection.java,v 1.4 2003/10/02 22:14:34 scolebourne Exp $
import org.apache.commons.collections.AbstractTestCollection;
* @version $Revision: 1.4... | 0 |
import org.apache.beam.sdk.util.InstanceBuilder;
import org.apache.beam.sdk.values.TypeDescriptor; | 0 |
private List<MemberRegistration> remoteRegistrations = null; | 0 |
private final Collector<Datum> wrap;
WindowedElementCollector(Collector<Datum> wrap) {
@Override
public void collect(T elem) {
wrap.collect(Datum.of(windowID, elem));
}
void setWindow(WindowID<Object> windowID) {
public Object getWindow() {
return windowID.getLabel(); | 0 |
// Allow proper rollback in case the drop fails...
addRollback(new RollbackCommitAction(session));
private class RollbackCommitAction implements Runnable {
private final DeploymentSessionImpl m_session;
public RollbackCommitAction(DeploymentSessionImpl session... | 0 |
case OpCode.create2: | 0 |
public void setTransform(AffineTransform at) {
// Do nothing.
}
/**
* Unsupported operation.
*/ | 0 |
extends AbstractSVGFilterPrimitiveElementBridge {
* Returns 'feTile'.
*/
public String getLocalName() {
return SVG_FE_TILE_TAG;
}
/** | 0 |
Scheme scheme = connManager.getSchemeRegistry().
getScheme(target.getSchemeName());
Scheme schm = connManager.getSchemeRegistry().
getScheme(newTarget.getSchemeName()); | 0 |
dbAccessor.executeQuery("ALTER TABLE hostcomponentdesiredconfigmapping rename to hcdesiredconfigmapping;", true);
dbAccessor.executeQuery("ALTER TABLE users ALTER column user_id DROP DEFAULT;", true);
dbAccessor.executeQuery("ALTER TABLE users ALTER column ldap_user TYPE INTEGER USING CASE WHEN ldap_u... | 0 |
* @version $Revision: 1.9 $ $Date: 2003/02/23 00:40:37 $
assertSame( info.type, file.getType() );
assertSame( FileType.IMAGINARY, file.getType() );
assertSameMessage( "vfs.provider/read-not-file.error", folder, e ); | 0 |
service.addInterface(JaasRealm.class.getName());
service.addInterface(KeystoreInstance.class.getName()); | 0 |
public int hashCode() {
// uncomment when JDK 1.4 is required
// assert false : "hashCode not designed";
return 47;
}
| 0 |
import org.apache.batik.bridge.DefaultScriptSecurity;
import org.apache.batik.bridge.ScriptSecurity;
/**
* Returns the security settings for the given script
* type, script url and document url
*
* @param scriptType type of script, as found in the
* type at... | 0 |
initCause(cause); | 0 |
package org.apache.beam.sdk.extensions.sql.interpreter.operator.string;
import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlExpression;
import org.apache.beam.sdk.extensions.sql.interpreter.operator.BeamSqlPrimitive;
import org.apache.beam.sdk.extensions.sql.schema.BeamSqlRow; | 0 |
import java.io.IOException; | 0 |
return 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 may... | 0 |
import org.apache.cocoon.environment.Request;
* @version CVS $Id: DefaultLinkService.java,v 1.5 2003/06/01 19:30:36 cziegeler Exp $
// TODO - add portal name to allow several portals at the same time
final Request request = ContextHelper.getRequest( this.context );
Info info = (Info)request.get... | 0 |
final SSLIOSession sslSession = createSSLIOSession(
final NHttpServerIOTarget conn = createConnection(
} catch (final SSLException ex) {
final NHttpServerIOTarget conn =
final NHttpServerIOTarget conn =
final SSLIOSession sslSession =
} catch (final IOException ex... | 0 |
/*
* $HeadURL$
* $Revision$
* $Date$
*
* ====================================================================
* 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... | 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 m... | 0 |
p1 = new Path(new URI(VolumeUtil.removeTrailingSlash(uris[0].trim())));
p2 = new Path(new URI(VolumeUtil.removeTrailingSlash(uris[1].trim()))); | 0 |
import org.apache.commons.bcel6.Const;
super(Const.CONSTANT_InterfaceMethodref, c.getClassIndex(), c.getNameAndTypeIndex());
super(Const.CONSTANT_InterfaceMethodref, input);
super(Const.CONSTANT_InterfaceMethodref, class_index, name_and_type_index); | 0 |
ZooKeeperInstance instance = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
Connector connector = instance.getConnector("root", new PasswordToken(secret));
final Scanner s = connector.createScanner(table, Constants.NO_AUTHS);
// Try to find the active scan for about 15... | 0 |
import org.apache.xml.security.stax.impl.util.UnsynchronizedByteArrayInputStream;
import org.apache.xml.security.stax.impl.util.UnsynchronizedByteArrayOutputStream;
setOutputStream(new UnsynchronizedByteArrayOutputStream());
UtfHelpper.writeUTF8String(prefix, outputStream, cache);
... | 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 |
OptionalMethodBuilder<WindowingBuilder<LeftT, RightT, K, OutputT>>,
Builders.WindowBy<TriggerByBuilder<LeftT, RightT, K, OutputT, ?>>{
public static class TriggerByBuilder<LeftT, RightT, K, OutputT, W extends BoundedWindow>
implements Builders.TriggeredBy<AccumulatorModeBuilder<LeftT, RightT, K, OutputT... | 0 |
* <fb:temp-repeater
* <<em>... child bindings ...</em>>
* </fb:temp-repeater>
* @version CVS $Id: TempRepeaterJXPathBindingBuilder.java,v 1.2 2004/04/01 12:59:57 mpo Exp $ | 0 |
* @author <a href="mailto:sheng.pei@eng.sun.com">Sheng Pei</a> | 1 |
import org.apache.commons.lang.BooleanUtils;
* @version CVS $Id: Attribute.java,v 1.5 2004/03/28 20:51:24 antonio Exp $
* <li>on/off
// Match case for: true, false, yes, no, on, off.
Boolean rvalue = BooleanUtils.toBooleanObject(_value);
if (rvalue != null) {
return rvalu... | 0 |
// leader connection timeout defaults to tickTime * initLimit
int connectTimeout = self.tickTime * self.initLimit;
// but if connectToLearnerMasterLimit is specified, use that value to calculate
// timeout instead of using the initLimit value
if (self.connectToLearnerMaster... | 0 |
Copyright 2001,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... | 0 |
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override
@Override | 0 |
// TODO Privatise fields?
private final AbstractHashedMap<K, V> parent;
private final AbstractHashedMap<K, ?> parent;
private final AbstractHashedMap<?, V> parent;
private final AbstractHashedMap<K, V> parent;
private int hashIndex;
private HashEntry<K, V> last;
... | 0 |
import org.apache.mesos.v1.Protos;
import org.apache.mesos.v1.Protos.Filters;
import org.apache.mesos.v1.Protos.Offer.Operation;
import org.apache.mesos.v1.Protos.TaskInfo;
.setAgentId(MESOS_OFFER.getAgentId())
assertEquals(Optional.of(OFFER_A), offerManager.getOffer(OFFER_A.getOffer().getAgentId())); | 0 |
package org.apache.felix.dm.test.integration.api;
import org.apache.felix.dm.test.components.Ensure;
import org.apache.felix.dm.test.integration.common.TestBase; | 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 u... | 0 |
@Test
Map m = converter.convert(mb).source().asBean().to(Map.class);
@Test
Map<String, String> m = ca.convert(mb).source().asBean().to(new TypeReference<Map<String, String>>(){}); | 0 |
* @since 3.0
* @since 3.1 | 0 |
import org.apache.ambari.server.orm.dao.HostRoleCommandDAO;
bind(HostRoleCommandDAO.class).toInstance(createNiceMock(HostRoleCommandDAO.class)); | 0 |
* This class was copied from Guava release 23.0 to replace the older Guava 14 version that had been used in Accumulo. It was annotated as Beta by Google,
* therefore unstable to use in a core Accumulo library. We learned this the hard way when Guava version 20 deprecated the getHostText method and then removed
* the... | 0 |
import com.twitter.aurora.gen.PopulateJobResult;
import com.twitter.aurora.gen.Result;
import com.twitter.aurora.gen.ScheduleStatusResult;
import com.twitter.aurora.gen.StartUpdateResult;
public Response populateJobConfig(JobConfiguration description) {
Response response = new Response();
PopulateJobResult... | 0 |
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.apache.commons.dbcp.datasources.TestPerUserPoolDataSource;
import org.apache.commons.dbcp.datasources.TestSharedPoolDataSource;
import org.apache.commons.dbcp.managed.TestBasicManagedDataSource;
import org.apache.... | 0 |
dbAccessor.dropColumn(UpgradeCatalog240.VIEWINSTANCE_TABLE,UpgradeCatalog240.CLUSTER_HANDLE_COLUMN);
dbAccessor.renameColumn(eq(UpgradeCatalog240.VIEWINSTANCE_TABLE), anyString() , capture(capturedClusterHandleColumn)); | 0 |
AmbariServerConfigurationHandler handler = new AmbariServerConfigurationHandler(ambariConfigurationDAO, publisher);
AmbariServerConfigurationHandler handler = new AmbariServerConfigurationHandler(ambariConfigurationDAO, publisher);
AmbariServerConfigurationHandler handler = new AmbariServerConfigurationHand... | 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 |
List<ServiceConfigEntity> serviceConfigs = serviceConfigDAO.getServiceConfigsForServiceAndStack(
clusterId, HDP_01, "HDFS");
Assert.assertEquals(3, serviceConfigs.size());
serviceConfigs = serviceConfigDAO.getServiceConfigsForServiceAndStack(clusterId, HDP_01, "YARN");
Assert.assertEquals(1, se... | 0 |
// Mark the bundle as removal pending.
info.setRemovalPending(true);
// Mark the bundle as removal pending.
target.getInfo().setRemovalPending(true);
bundle.getInfo().setRemovalPending(true); | 0 |
public class AddSplitIT extends SimpleMacIT {
String tableName = makeTableName();
c.tableOperations().create(tableName);
insertData(tableName, 1l);
c.tableOperations().addSplits(tableName, splits);
Collection<Text> actualSplits = c.tableOperations().listSplits(tableName);
verifyData(tableName, 1... | 0 |
import org.apache.hc.core5.reactor.Command;
ioSession.enqueue(new ShutdownCommand(ShutdownType.GRACEFUL), Command.Priority.NORMAL);
ioSession.enqueue(new PingCommand(new BasicPingHandler(new Callback<Boolean>() {
})), Command.Priority.NORMAL); | 0 |
"org.apache.felix.webconsole.internal.deppack.DepPackServlet", | 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 |
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
public class DeferredFileOutputStreamT... | 0 |
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Sets;
import java.util.ArrayDeque;
import java.util.ServiceLoader;
import java.util.Set;
import org.apache.beam.sdk.util.common.ReflectHelpers;
import org.apache.beam.sdk.util.common.ReflectHelpers.ObjectsClassComparator;
private static ... | 0 |
import org.apache.felix.cm.integration.helper.ManagedServiceTestActivator;
final ManagedServiceTestActivator tester = ManagedServiceTestActivator.INSTANCE;
TestCase.assertEquals( "Expect no update call", 1, tester.numManagedServiceUpdatedCalls );
TestCase.assertEquals( "Expect a single update ca... | 0 |
Pipeline p = TestPipeline.create();
Pipeline p = TestPipeline.create(); | 0 |
* This class allows MapReduce jobs to use Accumulo as the source of data. This {@link InputFormat}
* provides keys and values of type {@link Key} and {@link Value} to the Map function.
public RecordReader<Key,Value> getRecordReader(InputSplit split, JobConf job, Reporter reporter)
throws IOException {
// ... | 0 |
if (convertedValue == null) {
// BigQuery does not include null values when the export operation (to JSON) is used.
// To match that behavior, BigQueryTableRowiterator, and the DirectPipelineRunner,
// intentionally omits columns with null values.
continue;
}
| 0 |
import java.util.Collection;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.apache.ambari.server.security.authorization.AuthorizationException;
import org.apache.ambari.server.security.authorization.AuthorizationHelper;
import org.ap... | 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 java.lang.reflect.Field;
import java.lang.reflect.Method;
import static junit.framework.Assert.assertNotNull;
public void testGetComponentInstance() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException {
Field im = fs.getClass().getDeclaredField("__IM");
assertNotNull(im... | 0 |
package org.apache.felix.sigil.eclipse.repository;
import org.apache.felix.sigil.common.repository.IResolutionMonitor; | 0 |
package org.apache.commons.ognl.test.objects; | 0 |
* $Header: /cvshome/build/org.osgi.util.position/src/org/osgi/util/position/Position.java,v 1.9 2006/07/12 21:21:35 hargrave Exp $
* Copyright (c) OSGi Alliance (2002, 2006). All Rights Reserved.
import org.osgi.util.measurement.Measurement;
import org.osgi.util.measurement.Unit; | 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 |
@SuppressWarnings("checkstyle:MethodCount")
protected void testRoot(Path path) {
protected void testNames(Path path) {
protected void testParents(Path path) {
protected void testSubpaths(Path path) {
int nameCount = path.getNameCount();
assertEquals(path, path... | 0 |
import org.apache.commons.digester3.binder.LinkedRuleBuilder;
import org.apache.commons.digester3.binder.RulesBinder; | 0 |
Set<String> propertyIds = new HashSet<>();
List<RemoteAmbariClusterServiceEntity> serviceList = new ArrayList<>();
List<String> services = new ArrayList<>();
List<RemoteAmbariClusterServiceEntity> serviceList = new ArrayList<>(); | 0 |
* @param parent is the object that will serve as a parent of the new
* may need to expand or even create the collection to accommodate the new | 0 |
// Action
try {
Action a = actions.getAction(getString(name+ACTION_SUFFIX));
if (a == null) {
throw new MissingListenerException("", "Action",
name+ACTION_SUFFIX);
}
b.setAction(a);
b.setText(getString(name+TEXT_SUFFIX));
... | 0 |
PubsubIO.readStrings().fromTopic("projects/myproject/topics/mytopic").getName());
PubsubIO.writeStrings().to("projects/myproject/topics/mytopic").getName());
PubsubIO.readStrings().fromTopic("projects/my-project/topics/abc");
PubsubIO.readStrings().fromTopic("projects/my-project/topics/ABC");
... | 0 |
import org.apache.ambari.server.state.stack.RepoTag;
if (RepositoryVersionHelper.shouldContainGPLRepo(repositoryVersion.getStackId(), repositoryVersion.getVersion())) {
validateGPLRepoPresence(repositoryVersion);
}
* Checks HDP repository version contains GPL repo for each os.
* @param repositoryVe... | 0 |
public final ClientConnectionRequest requestConnection(final HttpRoute route) {
public ManagedClientConnection getConnection( | 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 com.google.common.base.Functions;
final ImmutableSet<Integer> instancesIds,
final ITaskConfig config) throws InstanceException {
if (!Sets.intersection(existingInstanceIds, instancesIds).isEmpty()) {
insertPendingTasks(Maps.asMap(instancesIds, Functions.constant(config))); | 0 |
/**
* Returns actual request configuration.
*/ | 0 |
PropertiesConfiguration c = new PropertiesConfiguration();
c.setFileName(testProperties);
c.load();
conf = c; | 0 |
* Default buffer size for the I/O pumps.
/*
* Make sure we exhausted all data - the shell might be dead
* but some data may still be in transit via pumping
*/
if ((!shell.isAlive()) && (in.available() <= 0) && (shellOut.available()... | 0 |
import org.apache.http.pool.PoolEntry;
public class BasicNIOConnPool extends AbstractNIOConnPool<HttpHost, NHttpClientConnection,
PoolEntry<HttpHost, NHttpClientConnection>> {
protected void closeEntry(final PoolEntry<HttpHost, NHttpClientConnection> entry) {
public F... | 0 |
if (SqlTypeName.NUMERIC_TYPES.contains(node.type.getSqlTypeName())) {
ret = new BeamSqlPlusExpression(subExps);
} else {
ret = new BeamSqlDatetimePlusExpression(subExps);
} | 0 |
import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.FILES;
import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.LAST;
import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.LOCATION;
import static org.apache.accumulo.core.metadata.schema... | 0 |
import org.apache.accumulo.core.client.impl.Table;
private static final Table.ID userTableId = new Table.ID("tableId");
tableNameToIdMap.put(RootTable.NAME, RootTable.ID.canonicalID());
tableNameToIdMap.put(MetadataTable.NAME, MetadataTable.ID.canonicalID());
tableNameToIdMap.put(ReplicationTable.NAME, Re... | 1 |
* 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 |
import java.util.Map;
import java.util.Vector;
import org.w3c.dom.Attr;
* <LI> Verschiedene Implementierungen können sich als Resolver registrieren.
* <LI> Standardmäßig werden erste Implementierungen auf dem XML config file registrirt.
* <LI> Der Benutzer kann bei Bedarf Implementierungen voranstellen oder anfügen... | 0 |
import javax.annotation.Nullable;
@Nullable
@Nullable Settings config,
@Nullable
private final Settings config;
@Nullable Settings config,
@Nullable
private final Settings config;
@Nullable Settings config) { | 0 |
} catch (AmbariException | IllegalArgumentException e) { | 0 |
import static org.easymock.EasyMock.anyString;
import static org.easymock.EasyMock.startsWith;
expect(request.getHeader(startsWith("X-Forwarded-"))).andReturn(null).times(6);
expect(request.getQueryString()).andReturn(null).once();
expect(request.getParameter(anyString())).andReturn(null).anyTimes();
ex... | 0 |
class AdapterImpl implements InternalConverter { | 0 |
import nexus.Executor;
import nexus.ExecutorDriver;
import nexus.NexusExecutorDriver;
import nexus.TaskDescription;
import nexus.TaskState;
import nexus.TaskStatus;
public class TwitterExecutor extends Executor {
static {
System.loadLibrary("nexus");
}
@Override
public void launchTask(ExecutorDriver drive... | 0 |
/** Utilities concerning {@link SqlNode} for DDL. */
public static SqlDropTable dropTable(SqlParserPos pos, boolean ifExists, SqlIdentifier name) {
public static SqlNode column(
SqlParserPos pos, SqlIdentifier name, SqlDataTypeSpec dataType, SqlNode comment) {
static Pair<CalciteSchema, String> schema(
... | 0 |
import static org.apache.aurora.scheduler.TierInfo.DEFAULT;
import static org.apache.aurora.scheduler.base.TaskTestUtil.REVOCABLE_TIER;
expect(tierManager.getTier(EasyMock.anyObject())).andReturn(DEFAULT);
expect(tierManager.getTier(EasyMock.anyObject())).andReturn(DEFAULT);
expect(tierManager.getTier(EasyM... | 0 |
/**
* Deletes the ranges specified by {@link #setRanges}.
*
* @throws MutationsRejectedException
* this can be thrown when deletion mutations fail
* @throws TableNotFoundException
* when the table does not exist
*/
/**
* Releases any resources.
*/ | 0 |
package org.apache.sshd.client.subsystem.sftp.extensions.openssh.helpers;
import org.apache.sshd.client.subsystem.sftp.extensions.helpers.AbstractSftpClientExtension; | 0 |
* A {@code ByteArrayCoder} encodes {@code byte[]} objects.
* <p> If in a nested context, prefixes the encoded array with its
* length, encoded via a {@link VarIntCoder}. | 0 |
import org.apache.sshd.common.util.SecurityUtils;
if (factory.isGroupExchange()) {
assertEquals(factory.getName() + " not supported even though DH group exchange supported",
SecurityUtils.isDHGroupExchangeSupported(), factory.isSupported());
}
| 0 |
* Tests for replication that should be run at every build -- basic functionality
// Run the master work maker infrequently
cfg.setProperty(Property.MASTER_REPLICATION_STATUS_SCAN_INTERVAL, "99999999");
| 0 |
} catch (final TestingFrameworkException ex) {
} catch (final TestingFrameworkException ex) {
} catch (final TestingFrameworkException ex) {
} catch (final TestingFrameworkException ex) {
} catch (final TestingFrameworkException ex) {
} catch (final TestingFrameworkExcept... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.