Diff stringlengths 5 2k | FaultInducingLabel int64 0 1 |
|---|---|
ExtendedProperties props3 = new ExtendedProperties();
props3.setProperty("sub.test", "foo");
props2.combine(props3);
assertEquals("foo", props2.getProperty("sub.test"));
ExtendedProperties subs = props2.subset("sub");
assertNotNull(subs);
assertEquals("foo", sub... | 0 |
import java.util.concurrent.TimeUnit;
import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
sleepUninterruptibly(10, TimeUnit.SECONDS); | 1 |
this.log("DispatcherServlet: service servlet=" + servlet +
" mountPath=" + mountPath +
" servletPath=" + request.getServletPath() +
" pathInfo=" + request.getPathInfo()); | 0 |
* limitations under the License. | 0 |
import org.apache.accumulo.server.ServerContext;
private final String zkRoot;
private final String instanceID;
ServerContext context = ServerContext.getInstance();
zkRoot = context.getZooKeeperRoot();
instanceID = context.getInstanceID();
String statePath = zkRoot + Constants.ZTABLES + "/" + tableId... | 0 |
* AST node for expression. | 0 |
import java.io.Serializable; | 0 |
result = null;
result = null;
result = null;
result = null; | 0 |
import org.apache.hc.core5.net.URIAuthority;
final String challengeResponse,
final URIAuthority authority,
final String requestUri,
final HttpContext context) {
final String challe... | 0 |
import org.apache.cocoon.components.serializers.util.EncodingSerializer;
EncodingSerializer.include(content, this.portalService.getRequestContext().getRequest(), contentHandler); | 0 |
* This class is immutable and thread-safe.
* | 0 |
import org.apache.accumulo.core.Constants;
m.put("cf", "cq" + j, new Value(String.format("%016x", val).getBytes(Constants.UTF8))); | 0 |
import org.apache.felix.fileinstall.ArtifactListener;
registration = this.context.registerService(
new String[] {
ConfigurationListener.class.getName(),
ArtifactListener.class.getName(),
ArtifactInstaller.class.getNa... | 0 |
} else { | 0 |
import org.apache.accumulo.core.client.Accumulo;
public ClientContext(AccumuloClient client) {
this(ClientInfo.from(client.properties(), ((AccumuloClientImpl) client).token()));
}
AccumuloClient client = Accumulo.newClient().from(context.getProperties())
.as(principal, token).build();
... | 0 |
import java.security.PrivilegedExceptionAction;
public static void putStringToFile(final HdfsApi hdfs,final String filePath, final String content) throws HdfsApiException {
try {
hdfs.execute(new PrivilegedExceptionAction<Void>() {
@Override
public Void run() throws Exception {
... | 0 |
* OutputStream to a RamFile.
* @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
* File.
* buffer.
protected byte[] buffer1 = new byte[1];
/** File is open or closed */
* @param file The base file. | 0 |
Map<String, Map<String, Map<String, String>>> configurationAttributes = new TreeMap<String, Map<String, Map<String, String>>>();
execCmd.setConfigurationAttributes(configurationAttributes); | 0 |
try (TraceScope clientSpan = opts.parseArgsAndTrace(RandomWriter.class.getName(), args)) {
try (AccumuloClient accumuloClient = opts.createClient();
BatchWriter bw = accumuloClient.createBatchWriter(opts.getTableName())) { | 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 |
Assert.assertTrue(corePoolSize > 2 && corePoolSize <= 128);
Assert.assertTrue(corePoolSize > 2 && corePoolSize <= 128); | 0 |
import org.apache.accumulo.core.client.Accumulo;
try (AccumuloClient client = Accumulo.newClient().from(clientOpts.getClientProps()).build()) { | 0 |
properties.put(HostComponentResourceProvider.HOST_COMPONENT_STATE_PROPERTY_ID, "STARTED");
property(HostComponentResourceProvider.HOST_COMPONENT_STATE_PROPERTY_ID).equals("INSTALLED").and(). | 0 |
* get access to the delegated file
*/
public FileObject getDelegateFile()
{
return file;
}
/** | 0 |
/**
*
*
*
*
FlatMap.class, ReduceStateByKey.class, Union.class); | 0 |
public final static int dirsCmd =
ByteBuffer.wrap("dirs".getBytes()).getInt();
/*
* See <a href="{@docRoot}/../../../docs/zookeeperAdmin.html#sc_zkCommands">
* Zk Admin</a>. this link is for all the commands.
*/
cmd2String.put(dirsCmd, "dirs"); | 1 |
* 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... | 1 |
* @version CVS $Id: DefaultWeb3StreamerImpl.java,v 1.3 2003/03/19 09:04:40 haul Exp $ | 0 |
import org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration;
scanBasePackages = {"org.apache.ambari.logfeeder"},
exclude = {
SolrAutoConfiguration.class
} | 0 |
import aQute.bnd.annotation.ProviderType;
@ProviderType
* The callback is always invoked with an already instantiated component (the component implementation class(es) are
* always instantiated before the updated callback is invoked).
* The callback is called with a component that is not yet instantiate... | 0 |
import org.apache.ambari.server.state.stack.UpgradePack.PrerequisiteCheckConfig;
private final static String MIN_APPLICABLE_STACK_VERSION_PROPERTY_NAME = "min-applicable-stack-version";
String minApplicableStackVersion = null;
PrerequisiteCheckConfig prerequisiteCheckConfig = request.getPrerequisiteCheckConfi... | 0 |
sb.append(Base64.getEncoder().encodeToString(TextUtil.getBytes(columns[i])));
return Base64.getEncoder().encodeToString(bytes);
columnTexts[i] = new Text(Base64.getDecoder().decode(columnStrings[i]));
byte[] bytes = Base64.getDecoder().decode(flags); | 0 |
* @version $Id: VMSFTPEntryParserTest.java,v 1.3 2002/08/07 18:26:19 brekke Exp $
/**
* @see junit.framework.TestCase#TestCase(String)
*/
/**
* @see org.apache.commons.net.ftp.ftp2.parser.FTPParseTestFramework#testParseFieldsOnDirectory()
*/
public void testParseFieldsOnDirectory() thro... | 0 |
if (path.endsWith(Constants.EMPTY_HEADER))
return; | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
// default
public TimelineMetric() {
}
// copy constructor
public TimelineMetric(TimelineMetric metric) {
setMetricName(metric.getMetricName());
setType(metric.getType());
setTimestamp(metric.getTimestamp());
setAppId(metric.getAppId());
setInstanceId(metric.getInstanceId());
setHost... | 0 |
import java.util.Map;
import java.util.Set;
* Get all known clusters
* @return
*/
public Map<String, Cluster> getClusters();
/**
public List<Host> getHosts();
public Set<Cluster> getClustersForHost(String hostname)
public void mapHostsToCluster(List<String> hostnames, String clusterName)
thr... | 1 |
// need at least one argument for the jar file, two arguments if the jar file manifest doesn't
// specify a main class
System.out.println(
"Classname " + (candidateMainClass != null ? candidateMainClass : "in JAR manifest")
+ " not found. Please make sure you use the wholly qualif... | 0 |
package org.apache.commons.beanutils2.converters;
* {@link org.apache.commons.beanutils2.Converter} implementation that handles conversion
* {@link org.apache.commons.beanutils2.Converter} implementation that
* Create a {@link org.apache.commons.beanutils2.Converter} that will throw a
* {@link org.apache.co... | 1 |
String.format(format, args),
new GoogleJsonResponseException.Builder(404, String.format(format, args), new HttpHeaders())
.build()); | 0 |
field,
publisher,
unpublisher | 0 |
import org.apache.beam.sdk.io.hadoop.SerializableConfiguration;
.withConfiguration(serConf.get())
assertEquals(serConf.get(),
read.getConfiguration().get());
.withConfiguration(serConf.get())
assertEquals(serConf.get(),
read.getConfiguration().get());
.withConfigurati... | 0 |
viewDefinition.setStatus(ViewDefinition.ViewStatus.DEPLOYED); | 0 |
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.Message;
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.TextFormat; | 0 |
import java.util.Map;
public List<? extends Map.Entry<PublicKey, String>> getIdentities() throws IOException { | 0 |
import org.apache.atlas.notification.AbstractNotification;
public static final HookMessageDeserializer HOOK_MESSAGE_DESERIALIZER = new HookMessageDeserializer();
String notificationJson = AbstractNotification.GSON.toJson(request);
HookNotification.HookNotificationMessage actualNotification =
... | 0 |
package org.apache.commons.ognl.test.objects; | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
* Creates a <code>GraphicsNode</code> according to the specified parameters.
* Creates a <code>CompositeGraphicsNode</code>. | 0 |
return ((int) b[0] & 0xff); | 0 |
@Override | 0 |
return Boolean.valueOf(this.completed); | 0 |
import javax.inject.Inject;
| 1 |
private static final long serialVersionUID = -6008991447676468786L;
| 0 |
HttpHost target = (HttpHost) | 0 |
import static com.google.datastore.v1.client.DatastoreHelper.makeAndFilter;
LOG.info("Latest stats timestamp for kind {} is {}", ourKind, latestTimestamp);
queryBuilder.setFilter(makeAndFilter(
makeFilter("kind_name", EQUAL, makeValue(ourKind).build()).build(),
makeFilter("timestamp", E... | 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 javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
@NamedQueries({
@NamedQuery(name = "RoleSuccessCriteriaEntity.removeByRequestStageIds", query = "DELETE FROM RoleSuccessCriteriaEntity criteria WHERE criteria.stageId = :stageId AND criteria.requestId = :requestId")
}) | 0 |
import org.apache.hadoop.conf.Configuration;
public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) { | 0 |
* Copyright (c) 2004 The Apache Software Foundation. All rights | 0 |
throw new MissingAttachedSessionException("No session available to signal caught exception=" + cause.getClass().getSimpleName(), cause); | 0 |
// disable request TTL for these tests
Configuration configuration = injector.getInstance(Configuration.class);
configuration.setProperty(Configuration.METRIC_RETRIEVAL_SERVICE_REQUEST_TTL_ENABLED.getKey(),
"false");
JMXPropertyProvider.init(configuration); | 0 |
* @since 4.0 | 0 |
import org.apache.ambari.server.orm.RequiresSession;
@RequiresSession
@RequiresSession
@RequiresSession
@RequiresSession | 0 |
String dslQuery = "from "+ DATABASE_TYPE + " name=\"" + dbName + "\"";
String dslQuery = "from "+ DATABASE_TYPE + " name=\"" + dbName + "\"";
String query = "g.V.has('type', '" + BaseResourceIT.HIVE_TABLE_TYPE + "').toList()";
String query = "from "+ DATABASE_TYPE + " name=\"" + dbName +... | 1 |
import com.google.common.collect.Maps;
String token =
stateManager.registerUpdate(JOB_KEY, ImmutableMap.of(taskInfo.getInstanceId(), taskInfo));
String token =
stateManager.registerUpdate(JOB_KEY, ImmutableMap.of(updated.getInstanceId(), updated));
String token =
stateManager.registe... | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/BeanMap.java,v 1.8 2002/03/21 17:11:01 morgand Exp $
* $Revision: 1.8 $
* $Date: 2002/03/21 17:11:01 $
/**
* Get the keys for this BeanMap.
*
* @return BeanMa... | 0 |
import java.nio.charset.Charset;
private static final Charset utf8 = Charset.forName("UTF8");
columnTexts[i] = new Text(Base64.decodeBase64(columnStrings[i].getBytes(utf8)));
byte[] bytes = Base64.decodeBase64(flags.getBytes(utf8)); | 0 |
private static final int MAX_CHANNEL_REQUESTS = 10000;
for (int i = 0; i < MAX_CHANNEL_REQUESTS && (socketChannel = this.channelQueue.poll()) != null; i++) {
for (int i = 0; i < MAX_CHANNEL_REQUESTS && (sessionRequest = this.requestQueue.poll()) != null; i++) { | 0 |
package org.apache.beam.sdk.runners.inprocess; | 0 |
ConfigurationAssert.assertConfigurationEquals(setUpDestConfig(), config);
ConfigurationAssert.assertConfigurationEquals(setUpDestConfig(), config); | 0 |
import org.apache.beam.sdk.values.Schema;
public class SchemaGettersTest {
Schema schema = Schema.fromNamesAndCoders(emptyList(), emptyList());
RowTypeGetters getters = new RowTypeGetters(schema, fieldValueGetters);
assertSame(schema, getters.rowType()); | 0 |
final File metaTypePropsFile = new File(mtDir, source.getClassName() + ".properties");
getLog().debug("Deleting " + metaTypePropsFile + " ");
deleted = metaTypePropsFile.delete();
if ( deleted ) {
buildContext.refresh(metaTypePropsFile);
}
| 0 |
DefaultHttpClient httpclient = new DefaultHttpClient(); | 0 |
if (configs == null) {
return;
} | 0 |
package org.apache.cocoon.xml.util; | 0 |
@Override
@Override
@Override
@Override
@Override | 0 |
* @since 2.0 | 1 |
import org.apache.beam.fn.harness.stream.HarnessStreamObserverFactories;
import org.apache.beam.sdk.fn.stream.StreamObserverFactory;
StreamObserverFactory streamObserverFactory =
HarnessStreamObserverFactories.fromOptions(options); | 0 |
import junit.framework.Assert;
RepositoryVersionState repositoryVersionState) {
hostVersionEntity.setHostId(hostEntity.getHostId());
hostEntity.getHostVersionEntities().add(hostVersionEntity);
hostDAO.merge(hostEntity);
| 0 |
import com.twitter.mesos.scheduler.SchedulerCore.TaskState; | 0 |
import org.apache.cocoon.servletservice.util.ServletSerivceRequest;
import org.apache.cocoon.servletservice.util.ServletServiceResponse;
ServletSerivceRequest request;
ServletServiceResponse response;
request = new ServletSerivceRequest(new URI("dummy"), null);
response = new ServletServiceRespo... | 0 |
* Gets the file system capabilities.
* These are the same as on the filesystem, but available before the first file system was instanciated. | 0 |
String.format(
"ByteKeyRangeTracker{range=%s, position=%s}", INITIAL_RANGE, INITIAL_MIDDLE_KEY); | 1 |
IoUtils.closeQuietly(invertedIn, invertedOut, invertedErr, in, out, err); | 0 |
Assert.assertTrue("root table should exist in " + stats.tableMap.keySet(), stats.tableMap.keySet().contains(RootTable.ID.canonicalID()));
Assert.assertTrue("meta table should exist in " + stats.tableMap.keySet(), stats.tableMap.keySet().contains(MetadataTable.ID.canonicalID())); | 1 |
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.ServiceException;
import org.apache.cocoon.transformation.ServiceableTransformer;
* @version CVS $Id: JXTemplateGenerator.java,v 1.39 2004/04/01 16:50:32 coliver Exp $
void recycle() {
startEvent ... | 0 |
import org.apache.cocoon.portal.om.LayoutException; | 0 |
FlowHelper.setContextObject(objectModel, newObjectModel, flowContextObject);
FlowHelper.setContextObject(objectModel, newObjectModel, flowContextObject); | 0 |
package org.ognl.test.objects;
/**
* Simple class used to test various kind of property resolutions.
*/
public class PropertyHolder {
String _value = "";
String _search = "foo";
public String getValue()
{
return _value;
}
public void setValue(String value)
{
_value = va... | 0 |
* Copyright 2001-2005 The Apache Software Foundation | 0 |
/**
* Gets the admin privilege service
*/
@Path("{instanceName}/privileges")
public PrivilegeService getPrivilegeService(@PathParam ("instanceName") String instanceName) {
return new ViewPrivilegeService(viewName, version, instanceName);
} | 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: ASTFloatLiteral.java,v 1.2 2003/10/09 21:28:55 ... | 0 |
* ACCUMULO-3738: Temporary fix to keep Hive working with all versions of Accumulo without extra
* burden on users. Hive referenced this class in the build-up of the classpath used to compute the
* answer to a query. Without this class, the accumulo-trace jar would not make it onto the
* classpath which would break ... | 0 |
import org.apache.ambari.logfeeder.loglevelfilter.FilterLogData; | 0 |
* @version $Revision: 1.3 $ $Date: 2004/05/10 20:09:48 $
public void accessFile(FileObject file)
{
} | 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 |
/*
* 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 |
} catch (Exception t) {
// may happen if the batik interpreters class is here but
t.printStackTrace(); | 0 |
tmpInput = DfsLogger.readHeader(fs, srcPath, cryptoOpts);
if (!cryptoOpts.containsKey(Property.CRYPTO_MODULE_CLASS.getKey())) { | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.