Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
conn.namespaceOperations().delete(namespace); | 0 |
// try again!
continue; | 0 |
private final int name_index; // Points to field name in constant pool
private final int signature_index; // Points to encoded signature
FieldOrMethod() { // TODO is this ctor needed?
this.name_index = 0;
this.signature_index = 0; | 0 |
import org.apache.ambari.logfeeder.util.FileUtil;
import org.apache.commons.lang3.ArrayUtils;
public class InputFile extends AbstractInputFile {
logFiles = getActualFiles(logPath);
if (!ArrayUtils.isEmpty(logFiles) && logFiles[0].isFile()) {
if (tail && logFiles.length > 1) {
LOG.warn("Fou... | 0 |
* @since 3.0 | 0 |
* {@inheritDoc}
public Map<String, HostConfig> getDesiredHostConfigs(Cluster cluster,
Map<String, DesiredConfig> clusterDesiredConfigs) throws AmbariException {
if( null == cluster ){
clusterDesiredConfigs = new HashMap<String, DesiredConfig>();
}
// per method contract, fetch if not supp... | 0 |
public void encode(BeamSQLRow value, OutputStream outStream) throws CoderException, IOException {
listCoder.encode(value.getNullFields(), outStream);
intCoder.encode(value.getInteger(idx), outStream);
intCoder.encode((int) value.getShort(idx), outStream);
intCoder.encode((int) value.... | 0 |
public TextReader(String filepattern, boolean stripTrailingNewlines, @Nullable Long startPosition,
this(filepattern, stripTrailingNewlines, startPosition, endPosition, coder, true,
protected TextReader(String filepattern, boolean stripTrailingNewlines,
@Nullable Long startPosition, @Nullable Long endPosit... | 0 |
"\t-i - issue SIZE command for a file\n" +
boolean size = false;
else if (args[base].equals("-i")) {
size = true;
minParams = 3;
}
else if (listFiles || mlsd || mdtm || mlst || listNames || size)
if (size) {
... | 0 |
*
*
*
/**
return createTestSuite(TestJelly.class, "suite.jelly"); | 1 |
@Override
@Override
@Override | 0 |
* @deprecated (4.2) use {@link AuthenticationStrategy} | 0 |
Dataset<Pair<String, String>> input =
Pair.of("foo", "bar"),
Pair.of("quux", "ibis"))));
.using(e -> Pair.of(e.getFirst(), e.getSecond())) | 0 |
public static Instruction getInstruction(final int index) { | 0 |
* <br><strong>Method:</strong> <code>boolean empty(L x);</code>.
* @see JexlArithmetic#empty | 0 |
// ~ OutputStream is not closed on purpose because
// that would also cause a closing of underling Kryo output
// ~ InputStream is not closed on purpose because
// that would also cause a closing of the underling Kryo input | 0 |
* Triggered to obtain the remaining capacity of the consumer.
*
* @return the total number of bytes this consumer is capable
* to process without having to allocate additional resources.
*/
protected abstract int remainingCapacity();
/**
* Triggered to obtain the capacity incremen... | 0 |
Iterator<String> iterator = Arrays.asList("a", "b", "c").iterator();
IteratorEnumeration<String> enumeration = new IteratorEnumeration<>(iterator);
} catch (NoSuchElementException e) { | 0 |
public TopNCondition(List<byte[]> uuids, List<String> metricNames, List<String> hostnames, String appId,
super(uuids, metricNames, hostnames, appId, instanceId, startTime, endTime, precision, limit, grouped);
if (!(isTopNHostCondition(metricNames, hostnames) || isTopNMetricCondition(metricNames, hostnames))... | 0 |
/** worker thread for asynchronous execution */
private Thread executorThread;
executorThread = new Thread() {
};
getExecutorThread().start();
}
* Get the worker thread being used for asynchronous execution.
*
* @return the worker thread
*/
protected Thread g... | 0 |
* @param handler the custom SAX ContentHandler where events are redirected. | 0 |
import org.junit.Test;
import com.mockobjects.servlet.MockServletConfig;
import com.mockobjects.servlet.MockServletContext;
* @version $Id$
@Override
@Override
@Override
public Enumeration<?> getInitParameterNames()
/**
* Serial version UID.
... | 0 |
import org.apache.gearpump.cluster.ApplicationStatus;
ApplicationStatus status = null;
if (null == status || status instanceof ApplicationStatus.NONEXIST$) {
} else if (status instanceof ApplicationStatus.ACTIVE$) { | 0 |
Logger.getLogger("org.jcp.xml.dsig.internal.dom");
throws InvalidAlgorithmParameterException
throws InvalidAlgorithmParameterException
throw new InvalidAlgorithmParameterException
("params must be of type HMACParameterSpec");
}
outputLe... | 1 |
import org.apache.cocoon.portal.om.CopletInstance; | 0 |
Document d = parseFragment(fragment);
protected Document parseFragment(String fragment) throws ParserConfigurationException, SAXException, IOException {
DocumentBuilderFactory dbf =
DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
... | 0 |
/*
//createClusterArtifact
m = clusterService.getClass().getMethod("createClusterArtifact", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
//getClusterArtifact
m = clusterService.getClass().getMethod("getClusterArtifact", String.class, HttpHeaders.class, UriInfo.class, Stri... | 0 |
import org.apache.http.client.cache.HttpCacheEntry;
public class BasicHttpCache implements HttpCache {
private final LinkedHashMap<String, HttpCacheEntry> baseMap = new LinkedHashMap<String, HttpCacheEntry>(
protected boolean removeEldestEntry(Map.Entry<String, HttpCacheEntry> eldest) {
* Places a Http... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/primitives/Attic/RandomAccessIntList.java,v 1.2 2003/08/31 17:21:15 scolebourne Exp $
* any, must include the following acknowledgement:
* Alternately, this acknowledgement... | 0 |
import java.nio.charset.StandardCharsets;
charset = StandardCharsets.ISO_8859_1;
charset = StandardCharsets.ISO_8859_1;
response.setEntity(new StringEntity("All is well", StandardCharsets.US_ASCII)); | 0 |
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@RunWith(JUnit4.class) | 0 |
private static final Set<String> resourceProviderProperties = new HashSet<>();
Set<String> unsupportedPropertyIds = new HashSet<>(propertyIds);
private static final Set<String> propertyProviderProperties = new HashSet<>();
Set<String> unsupportedPropertyIds = new HashSet<>(propertyIds);
private st... | 1 |
*
* As documented in https://issues.apache.org/jira/browse/ZOOKEEPER-1816, ZooKeeper.close() is a non-blocking call. This method will wait on the ZooKeeper
* internal threads to exit.
for (Thread thread : threadSet) {
if (thread.getClass().getName().startsWith("org.apache.zookeeper.ClientCnxn")
... | 0 |
getManagementController().getConfigHelper().invalidateStaleConfigsCache(cluster.getDesiredConfigs()); | 0 |
import java.util.Arrays;
assertArrayEquals(b, rs.getBytes(1));
assertArrayEquals(b, rs.getBytes("column"));
private static void assertArrayEquals(byte[] expected, byte[] actual) {
if (expected == actual) return;
if (expected.length != actual.length) {
failNotEquals(null, Arrays.... | 0 |
* @param <T> entity representation.
*
/**
* Signals beginning of an incoming request entity stream.
*
* @param entityDetails the details of the incoming message entity.
* @param resultCallback the result callback.
*/
/**
* Triggered to signal a failure in data processing.
*
... | 0 |
import java.util.Collection;
static {
System.setProperty( "bar.version", "2.0.0" );
}
Collection<IPackageImport> imports = info.getImports();
//IBundleModelElement requirements = project.getRequirements();
}
public void testInherited() throws IOExceptio... | 0 |
* @version $Revision$ | 0 |
private static final int PROPERTIES_CNT = 64; | 0 |
try (AccumuloClient c = createClient()) { | 0 |
Master.log.debug("{} assigning tablets: [{}", store.name(), builder);
Master.log.debug("{} assigning tablets: [{}", store.name(), builder); | 0 |
import com.fasterxml.jackson.annotation.JsonCreator;
import org.apache.beam.sdk.util.VarInt; | 0 |
interpreter = interpreterPool.createInterpreter(document,
language,
null); | 0 |
final Map<String, UpgradePack> upgradePacks = new HashMap<>(); | 1 |
package normalizer;
public class NoOpNormalizer implements Normalizer
{
public String normalizeFieldValue(String field, Object value) {
return value.toString();
}
} | 1 |
import com.thinkaurelius.titan.core.TitanVertex;
import java.util.Set;
ITypedReferenceableInstance typedInstance,
Set<String> superTypeNames) {
graph, typedInstance.getTypeName(), typedInstance.getId(), s... | 1 |
* A key uniquely identifying {@link PreparedStatement}s. | 0 |
*
*
*
* @version $Revision: 1.11 $ | 1 |
/* $Id$ | 0 |
ResourceSlot.from(TASK).withOverhead(TaskExecutors.NO_OVERHEAD_EXECUTOR), | 0 |
import org.apache.ambari.view.hive2.actor.message.SQLStatementJob;
import org.apache.ambari.view.hive2.utils.HiveActorConfiguration;
import org.apache.ambari.view.hive2.utils.ServiceFormattedException;
HiveJob job = new SQLStatementJob(HiveJob.Type.SYNC, statements, config.getUsername(), context); | 0 |
// I have seen this fail when the passed Map contains a key, value
for (Iterator iter = variables.entrySet().iterator(); iter.hasNext();) {
Map.Entry element = (Map.Entry) iter.next();
if (element.getValue() != null) {
this.variables.put(element.getKey(), element... | 0 |
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.AssertJUnit.assertTrue;
assertNotNull(creationOrder);
assertEquals(creationOrder.size(), 4);
assertNotNull(typesDef);
assertEquals(typesDef.getEntityDefs().size(), 6);
... | 0 |
static final Set<String> PROPERTY_IDS = new HashSet<>();
new HashMap<>();
return new HashSet<>(KEY_PROPERTY_IDS.values());
Set<Resource> results = new LinkedHashSet<>();
new HashMap<>(); | 1 |
import java.util.Optional;
@Nullable private Optional<WriterInterface> writer = Optional.empty(); | 0 |
import org.apache.accumulo.test.randomwalk.Environment;
static void bulkLoadLots(Logger log, State state, Environment env, Value value) throws Exception {
env.getConnector().tableOperations().importDirectory(Setup.getTableName(), dir.toString(), fail.toString(), true);
protected void runLater(State state, Envir... | 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... | 0 |
package org.apache.sshd.client.subsystem.sftp.extensions.openssh.helpers; | 0 |
import org.apache.beam.sdk.PipelineRunner; | 0 |
/**
* @see org.springframework.core.io.Resource#isReadable()
*/
public boolean isReadable() {
return this.source.exists();
}
| 0 |
throw new FileSystemException("vfs.provider/config-key-invalid.error",
ctx.name);
throw new FileSystemException("vfs.provider/config-value-invalid.error",
ctx.values); | 0 |
import org.apache.accumulo.core.client.AccumuloClient;
final AccumuloClient c = getAccumuloClient(); | 0 |
import org.junit.rules.TestName;
@Rule public TestWatcher rule = this;
@Rule public final TestName TEST_NAME_HOLDER = new TestName();
private long startTime;
protected BaseTest() {
super();
}
public final String getCurrentTestName() {
return TEST_NAME_HOLDER.getMethodName();
} | 0 |
import com.google.common.collect.Iterators;
int count = Iterators.size(((Iterable<?>) scanner).iterator()); | 0 |
return new TableReference()
.setProjectId(projectId)
.setDatasetId(queryTempDatasetId)
.setTableId(queryTempTableId); | 0 |
this.controller.unregister();
| 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 |
if (n.getNodeType() == Node.ELEMENT_NODE
if (index < 0 || index > this.getLength() - 1) { | 0 |
import java.util.List;
import java.util.LinkedList;
import org.apache.batik.gvt.event.GraphicsNodeChangeListener;
List treeGraphicsNodeChangeListeners = null;
/**
* Returns the root of the GVT tree or null if the node is not
* part of a GVT tree.
*/
public RootGraphicsNode getRoot() {
... | 0 |
if (pc == null) {
throw new IllegalStateException("Connection pool data source returned null from getPooledConnection");
}
| 0 |
import javax.servlet.http.HttpSession;
final HttpSession session = request.getSession(true); | 0 |
public AtlasVertex getEntityVertex(String guid) throws AtlasBaseException { | 0 |
/**@deprecated*/ | 0 |
import org.apache.ambari.server.orm.dao.WidgetDAO;
import org.apache.ambari.server.orm.entities.WidgetEntity;
import java.util.ArrayList;
import static org.easymock.EasyMock.anyLong;
private WidgetDAO widgetDAO = null;
widgetDAO = createStrictMock(WidgetDAO.class);
WidgetEntity widgetEntity = new WidgetEntity... | 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 |
public void encode(Result value, OutputStream outputStream)
public Result decode(InputStream inputStream) | 0 |
package org.apache.felix.obr.plugin; | 0 |
import java.util.HashMap;
import java.util.Map;
import org.apache.ambari.server.api.query.render.AlertSummaryGroupedRenderer;
private Map<String, AlertSummaryGroupedRenderer.AlertDefinitionSummary> summaries = new HashMap<>();
public AlertUpdateEvent(Map<String, AlertSummaryGroupedRenderer.AlertDefinitionSummary> s... | 1 |
import org.apache.accumulo.start.spi.KeywordExecutable;
import com.google.auto.service.AutoService;
@AutoService(KeywordExecutable.class)
public class Initialize implements KeywordExecutable {
public boolean doInit(Opts opts, Configuration conf, VolumeManager fs) throws IOException {
private boolean initialize(Op... | 0 |
DummyHostname1, System.currentTimeMillis()), DummyCluster, HBASE, false);
DummyCluster, "HDFS", false);
DummyCluster, "HDFS", false);
DummyCluster, "HDFS", false); | 0 |
new TestInMemoryStateInternals<>(null /* key */);
? new NonMergingActiveWindowSet<>()
: new MergingActiveWindowSet<>(windowFn, stateInternals);
Collection<W> assignedWindows = windowFn.assignWindows(new TestAssignContext<>(
List<W> activeToBeMerged = new ArrayList<>();
... | 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 |
* Autogenerated by Thrift Compiler (0.12.0)
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)")
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer cf; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer cq; // required
public @org.apache.thrif... | 0 |
throws Exception;
try
{
file = createFile( name );
}
catch ( Exception e )
{
throw new FileSystemException( "vfs.provider/create-file.error", name );
} | 0 |
import java.util.Map;
* If the file is read-only, or is being written to, or on error
* setting the last-modified timestamp.
* Returns a read-only map of this file's attributes.
*
* @throws FileSystemException
* If the file does not exist, or does not support attributes.
... | 0 |
static Factory factory() {
return FlinkDefaultExecutableStageContext.ReferenceCountingFactory.REFERENCE_COUNTING; | 0 |
package org.apache.ambari.metrics.core.timeline.aggregators;
import static org.apache.ambari.metrics.core.timeline.query.PhoenixTransactSQL.EVENT_DOWNSAMPLER_CLUSTER_METRIC_SELECT_SQL;
import static org.apache.ambari.metrics.core.timeline.query.PhoenixTransactSQL.EVENT_DOWNSAMPLER_HOST_METRIC_SELECT_SQL;
import static... | 0 |
* Copyright (C) 2015 Google Inc. | 0 |
import org.apache.batik.gvt.filter.Clip;
* Sets the clipping filter for this node.
* @param newClipper the new clipping filter of this node
void setClip(Clip newClipper);
* Returns the clipping filter of this node or null if any.
* @return the clipping filter of this node or null if any
Clip... | 0 |
info.addParam(annotation, Params.stateMask, Integer.valueOf(Bundle.INSTALLED | Bundle.RESOLVED | Bundle.ACTIVE)); | 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 |
* Copyright 2001-2005 The Apache Software Foundation
* @throws FileUploadException if there are problems reading/parsing
* the request or storing files. | 0 |
ClockParser p = new ClockParser(false); | 0 |
import static org.easymock.EasyMock.expect;
import java.util.Properties;
import org.apache.accumulo.core.Constants;
import org.apache.accumulo.server.ServerContext;
final ServerContext context;
public TestServerConfigurationFactory(ServerContext context) {
super(context);
this.context = context;
... | 0 |
import org.apache.hc.core5.annotation.Experimental;
import org.apache.hc.core5.pool.LaxConnPool;
import org.apache.hc.core5.pool.ManagedConnPool;
import org.apache.hc.core5.pool.PoolConcurrencyPolicy;
private PoolConcurrencyPolicy poolConcurrencyPolicy;
* Assigns {@link PoolConcurrencyPolicy} instance.
*/... | 0 |
*
*
*
void removeAttribute(String name);
Enumeration getAttributeNames();
| 0 |
* Copyright (c) 2002 The Apache Software Foundation. All rights | 0 |
private static final Logger LOG = Logger.getLogger(Shell.class); | 0 |
String folderPath;
folderPath = folder1.getRoot().toURI().toString() + ".*";
AccumuloReloadingVFSClassLoader arvcl = new AccumuloReloadingVFSClassLoader(folderPath, vfs, new ReloadingClassLoader() {
AccumuloReloadingVFSClassLoader arvcl = new AccumuloReloadingVFSClassLoader(folderPath, vfs, new Reloading... | 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 ap... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.