Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
1
|
---|---|
* Copyright 1999-2006 The Apache Software Foundation | 0 |
* For any {@link TabletId} known to this object, the method will return the tablet server location for that tablet. | 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 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 in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. | 0 |
import org.apache.sshd.common.session.Session; | 0 |
final int p = 4; | 0 |
import org.apache.accumulo.core.security.thrift.Credential;
public static List<String> bulkLoad(AccumuloConfiguration conf, Instance instance, Credential creds, long tid, String tableId, List<String> files,
private Credential credentials;
public BulkImporter(AccumuloConfiguration conf, Instance instance, Credential credentials, long tid, String tableId, boolean setTime) {
private Map<Path,List<KeyExtent>> assignMapFiles(AccumuloConfiguration acuConf, Instance instance, Configuration conf, Credential credentials, FileSystem fs,
Credential credentials;
public AssignmentTask(Credential credentials, Map<Path,List<KeyExtent>> assignmentFailures, String tableName, String location,
private Map<Path,List<KeyExtent>> assignMapFiles(Credential credentials, String tableName, Map<Path,List<AssignmentInfo>> assignments,
private List<KeyExtent> assignMapFiles(Credential credentials, String location, Map<KeyExtent,List<PathSize>> assignmentsPerTablet) throws AccumuloException, | 1 |
import org.apache.atlas.repository.graph.AtlasGraphProvider;
import org.apache.atlas.runner.LocalSolrRunner;
import org.testng.annotations.AfterClass;
import static org.apache.atlas.graph.GraphSandboxUtil.useLocalSolr;
@AfterClass
public void clear() throws Exception {
AtlasGraphProvider.cleanup();
if (useLocalSolr()) {
LocalSolrRunner.stop();
}
}
| 0 |
* Autogenerated by Thrift Compiler (0.12.0)
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)")
@org.apache.thrift.annotation.Nullable | 0 |
* @param <R> Type of resource from which the {@link KeyPair} is generated | 0 |
* @version $Id: TestConfigurationXMLDocument.java,v 1.6 2004/05/04 22:14:29 epugh Exp $
assertTrue("Class of reader is " + reader.getClass().getName(),reader instanceof HierarchicalConfigurationXMLReader); | 0 |
Alert,
public static final Type Alert = InternalType.Alert.getType(); | 0 |
public SessionInputBufferImpl(
final int buffersize,
final int lineBuffersize,
final Charset charset) {
this(buffersize, lineBuffersize,
charset != null ? charset.newDecoder() : null, HeapByteBufferAllocator.INSTANCE);
final int lineBuffersize) {
this(buffersize, lineBuffersize, null, HeapByteBufferAllocator.INSTANCE);
}
/**
* @since 4.3
*/
public SessionInputBufferImpl(final int buffersize) {
this(buffersize, 256, null, HeapByteBufferAllocator.INSTANCE); | 0 |
counts = new HashMap<>();
hd = new HistData<>(x);
ArrayList<HistData<T>> sortedCounts = new ArrayList<>(counts.values());
ArrayList<T> sortedKeys = new ArrayList<>();
TreeSet<HistData<T>> sortedCounts = new TreeSet<>(counts.values());
TreeSet<HistData<T>> sortedCounts = new TreeSet<>(counts.values()); | 0 |
public Map getComponentConfigurations() { | 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 applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.cocoon.webservices.memory;
/**
* Class which provides JVM memory related SOAP services.
*
* @version $Id$
*/
public class Memory {
// static reference to the runtime object.
private static final Runtime runtime = Runtime.getRuntime();
/**
* <code>getFreeMemory</code> returns the amount of free memory
* in the system.
*
* @return the amount of free memory in the system
*/
public static long getFreeMemory() {
return runtime.freeMemory();
}
/**
* <code>getTotalMemory</code> returns the total amount of memory
* in the JVM.
*
* @return the total amount of memory in the JVM
*/
public static long getTotalMemory() {
return runtime.totalMemory();
}
/**
* <code>invokeGC</code> calls upon the JVM Garbage Collector to
* recycle unused objects.
*/
public static void invokeGC() {
runtime.gc();
}
} | 0 |
public void processElement(final ProcessContext c) throws Exception {
return c.element();
return c.timestamp();
return c.windowingInternals().windows();
c.windowingInternals().outputWindowedValue(c.element(), c.timestamp(), windows); | 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 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 in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.beam.runners.direct;
import java.util.Collection;
import org.apache.beam.runners.direct.DirectRunner.CommittedBundle;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.transforms.AppliedPTransform;
import org.apache.beam.sdk.transforms.PTransform;
/**
* A {@link TransformEvaluatorFactory} for {@link PTransform PTransforms} that are at the root of a
* {@link Pipeline}. Provides a way to get initial inputs, which will cause the {@link PTransform}
* to produce all of the appropriate output.
*/
interface RootTransformEvaluatorFactory extends TransformEvaluatorFactory {
/**
* Get the initial inputs for the {@link AppliedPTransform}. The {@link AppliedPTransform} will be
* provided with these {@link CommittedBundle bundles} as input when the {@link Pipeline} runs.
*
* <p>For source transforms, these should be sufficient that, when provided to the evaluators
* produced by {@link #forApplication(AppliedPTransform, CommittedBundle)}, all of the elements
* contained in the source are eventually produced.
*/
Collection<CommittedBundle<?>> getInitialInputs(AppliedPTransform<?, ?, ?> transform);
} | 0 |
public interface OBRListener
{
void handleBundle( ISigilBundle bundle ); | 0 |
package org.apache.bcel.verifier;
import org.apache.bcel.verifier.tests.TestArrayAccess02Creator;
import org.apache.bcel.verifier.tests.TestArrayAccess03Creator;
import org.apache.bcel.verifier.tests.TestArrayAccess04Creator; | 1 |
import org.apache.commons.codec.binary.Base64;
abstractOutputProcessor.createCharactersAndOutputAsEvent(outputProcessorChain, new Base64(76, new byte[]{'\n'}).encodeToString(rsaPublicKey.getModulus().toByteArray()));
abstractOutputProcessor.createCharactersAndOutputAsEvent(outputProcessorChain, new Base64(76, new byte[]{'\n'}).encodeToString(rsaPublicKey.getPublicExponent().toByteArray()));
abstractOutputProcessor.createCharactersAndOutputAsEvent(outputProcessorChain, new Base64(76, new byte[]{'\n'}).encodeToString(dsaPublicKey.getParams().getP().toByteArray()));
abstractOutputProcessor.createCharactersAndOutputAsEvent(outputProcessorChain, new Base64(76, new byte[]{'\n'}).encodeToString(dsaPublicKey.getParams().getQ().toByteArray()));
abstractOutputProcessor.createCharactersAndOutputAsEvent(outputProcessorChain, new Base64(76, new byte[]{'\n'}).encodeToString(dsaPublicKey.getParams().getG().toByteArray()));
abstractOutputProcessor.createCharactersAndOutputAsEvent(outputProcessorChain, new Base64(76, new byte[]{'\n'}).encodeToString(dsaPublicKey.getY().toByteArray()));
abstractOutputProcessor.createCharactersAndOutputAsEvent(outputProcessorChain, new Base64(76, new byte[]{'\n'}).encodeToString(j.toByteArray()));
abstractOutputProcessor.createCharactersAndOutputAsEvent(outputProcessorChain, new Base64(76, new byte[]{'\n'}).encodeToString(ECDSAUtils.encodePoint(ecPublicKey.getW(), ecPublicKey.getParams().getCurve())));
abstractOutputProcessor.createCharactersAndOutputAsEvent(outputProcessorChain, new Base64(76, new byte[]{'\n'}).encodeToString(data));
abstractOutputProcessor.createCharactersAndOutputAsEvent(outputProcessorChain, new Base64(76, new byte[]{'\n'}).encodeToString(data)); | 0 |
/* ====================================================================
* Copyright (c) 1999-2004 The Apache Software Foundation. All rights
* @version $Revision: 1.6 $ $Date: 2004/01/14 21:43:14 $ | 0 |
private static final Logger log = Logger.getLogger(DumpMapFile.class);
public static void main(String[] args) throws IOException {
if (args.length < 1) {
log.error("usage: DumpMapFile [-s] <map file>");
return;
boolean summarize = false;
int filenameIndex = 0;
if (args[0].equals("-s")) {
summarize = true;
filenameIndex++;
}
Configuration conf = CachedConfiguration.getInstance();
FileSystem fs = FileSystem.get(conf);
MyMapFile.Reader mr = new MyMapFile.Reader(fs, args[filenameIndex], conf);
Key key = new Key();
Value value = new Value();
long count = 0;
if (summarize) {
if (mr.next(key, value)) {
count++;
log.info("first key : " + key);
}
}
long start = System.currentTimeMillis();
while (mr.next(key, value)) {
if (!summarize) {
log.info(key + " -> " + value);
}
count++;
}
if (summarize && count > 0) {
log.info("last key : " + key);
}
long stop = System.currentTimeMillis();
if (summarize) {
System.out.printf("count : %,d\n", count);
}
log.info("\nsecs : " + (stop - start) / 1000);
} | 1 |
return TabletLocator.getInstance(instance, new Text(Tables.getTableId(instance, tableName)));
Connector c = getInstance(implementingClass, conf).getConnector(getPrincipal(implementingClass, conf),
CredentialHelper.extractToken(getTokenClass(implementingClass, conf), getToken(implementingClass, conf)));
if (!c.securityOperations().authenticateUser(getPrincipal(implementingClass, conf),
CredentialHelper.extractToken(getTokenClass(implementingClass, conf), getToken(implementingClass, conf)))) | 0 |
import org.apache.ambari.metrics.alertservice.prototype.core.RFunctionInvoker; | 0 |
Set<Long> bundles = new TreeSet<Long>(); | 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 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 in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ambari.server.api.predicate.operators;
import org.apache.ambari.server.controller.predicate.LessEqualsPredicate;
import org.apache.ambari.server.controller.spi.Predicate;
/**
* Less Than or Equals operator implementation.
*/
public class LessEqualsOperator extends AbstractOperator implements RelationalOperator {
/**
* Constructor.
*/
public LessEqualsOperator() {
super(0);
}
@Override
public TYPE getType() {
return TYPE.LESS_EQUAL;
}
@Override
public Predicate toPredicate(String prop, String val) {
return new LessEqualsPredicate<String>(prop, val);
}
@Override
public String getName() {
return "LessEqualsOperator";
}
} | 0 |
import com.twitter.mesos.scheduler.ClusterName;
import static com.twitter.common.base.MorePreconditions.checkNotBlank;
private final String clusterName;
CreateJob(@CacheTemplates boolean cacheTemplates,
SchedulerThriftInterface scheduler,
@ClusterName String clusterName) {
this.clusterName = checkNotBlank(clusterName);
template.setAttribute("cluster_name", clusterName); | 0 |
import org.apache.batik.bridge.Mark;
import org.apache.batik.bridge.TextNode; | 0 |
final int cr = this.buffer.read();
final int lf = this.buffer.read();
final String s = this.lineBuf.substringTrimmed(0, separator);
} catch (final NumberFormatException e) {
final CharArrayBuffer current = this.lineBuf;
final int count = this.trailerBufs.size();
final CharArrayBuffer previous = this.trailerBufs.get(count - 1);
final char ch = current.charAt(i);
final int count = this.trailerBufs.size();
final CharArrayBuffer buffer = this.trailerBufs.get(i);
} catch (final ParseException ex) {
final int bytesRead = this.buffer.fill(this.channel);
final int maxLen = this.chunkSize - this.pos;
final int len = this.buffer.read(dst, maxLen);
final StringBuilder buffer = new StringBuilder(); | 0 |
import org.apache.http.conn.SchemeRegistry; | 0 |
import org.apache.beam.runners.core.MergingStateAccessor;
import org.apache.beam.runners.core.StateAccessor; | 0 |
import org.apache.accumulo.server.cli.ClientOpts;
import com.beust.jcommander.Parameter;
static public class Opts extends ClientOpts {
@Parameter(names={"-r", "--row"}, required=true, description="find tablets that contain this row")
String row = null;
@Parameter(names="--tableId", required=true, description="table id")
String tableId = null;
}
public static void main(String[] args) throws Exception {
Opts opts = new Opts();
opts.parseArgs(FindTablet.class.getName(), args);
findContainingTablets(opts);
private static void findContainingTablets(Opts opts) throws Exception {
Range range = new KeyExtent(new Text(opts.tableId), null, null).toMetadataRange();
Scanner scanner = opts.getConnector().createScanner("createEvents", opts.auths);
Text row = new Text(opts.row);
if (ke.contains(row)) { | 0 |
if (d.isPropagated()) {
Dictionary dict = d.getProperties();
addTo(properties, dict); | 0 |
package org.apache.felix.sigil.ui.eclipse.ui.preferences.repository;
import org.apache.felix.sigil.eclipse.SigilCore;
import org.apache.felix.sigil.eclipse.model.repository.IRepositoryModel;
import org.apache.felix.sigil.ui.eclipse.ui.util.DefaultLabelProvider;
import org.apache.felix.sigil.ui.eclipse.ui.util.DefaultTableProvider; | 0 |
import org.apache.sshd.util.test.BaseTestSupport; | 0 |
import java.util.Collections;
TimelineMetricsHolder timelineMetricsHolder = TimelineMetricsHolder.getInstance(4,4, Collections.EMPTY_LIST); | 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 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 in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License. | 0 |
import org.apache.ambari.server.orm.entities.ResourceEntity;
PrivilegeEntity entity = new PrivilegeEntity();
String permissionName = (String) properties.get(PERMISSION_NAME_PROPERTY_ID);
ResourceEntity resourceEntity = resourceDAO.findById(resourceId);
entity.setResource(resourceEntity);
entity.setPermission(permissionDAO.findPermissionByNameAndType(permissionName, resourceEntity.getResourceType()));
if (groupEntity != null) {
entity.setPrincipal(principalDAO.findById(groupEntity.getPrincipal().getId()));
}
if (userEntity != null) {
entity.setPrincipal(principalDAO.findById(userEntity.getPrincipal().getId()));
}
if (entity.getPrincipal() == null) {
throw new AmbariException("Can't find principal " + properties.get(PRINCIPAL_TYPE_PROPERTY_ID) +
" " + properties.get(PRINCIPAL_NAME_PROPERTY_ID) + " for privilege.");
} | 0 |
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.HashSet;
import java.util.Set;
import org.apache.xml.security.exceptions.XMLSecurityException;
import org.apache.xml.security.stax.config.Init;
import org.apache.xml.security.stax.ext.InputProcessor;
import org.apache.xml.security.stax.ext.InputProcessorChain;
import org.apache.xml.security.stax.ext.XMLSecurityConstants;
import org.apache.xml.security.stax.ext.XMLSecurityProperties;
import org.apache.xml.security.stax.ext.stax.XMLSecEvent;
import org.apache.xml.security.stax.ext.stax.XMLSecEventFactory;
import org.apache.xml.security.stax.impl.DocumentContextImpl;
import org.apache.xml.security.stax.impl.InboundSecurityContextImpl;
import org.apache.xml.security.stax.impl.InputProcessorChainImpl;
import org.apache.xml.security.stax.impl.XMLSecurityStreamReader;
import org.custommonkey.xmlunit.XMLAssert;
import org.junit.Before;
import org.junit.Test;
| 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 use this file except in compliance with
* the License. You may obtain a copy of the License at | 0 |
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* version 1.1, a copy of which has been included with this distribution in *
* the LICENSE file. *
*****************************************************************************/
package org.apache.batik.refimpl.transcoder;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGEncodeParam;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.OutputStream;
/**
* An <tt>ImageTranscoder</tt> that produces a jpeg image.
*
* @author <a href="mailto:[email protected]">Thierry Kormann</a>
* @version $Id$
*/
public class JpegTranscoder extends ImageTranscoder {
protected void writeImage(BufferedImage img, OutputStream ostream)
throws IOException {
JPEGImageEncoder jpegEncoder = JPEGCodec.createJPEGEncoder(ostream);
JPEGEncodeParam params = JPEGCodec.getDefaultJPEGEncodeParam(img);
params.setQuality((float) 0.9, true);
jpegEncoder.encode(img, params);
}
public String getMimeType() {
return "image/jpeg";
}
} | 0 |
reduced = tuples.reduceByKey(new Reducer(reducer)); | 0 |
* http://www.apache.org/licenses/LICENSE-2.0 | 0 |
return;
return;
return; | 0 |
Date requestDate = getCurrentDate(); | 0 |
public abstract class AbstractGitCommandFactory implements CommandFactory, ExecutorServiceCarrier, GitLocationResolverCarrier {
private GitLocationResolver rootDirResolver;
private CommandFactory delegate;
/**
* @param cmdPrefix The command prefix used to detect and intercept GIT commands handled by this
* factory (never {@code null}/empty)
*/
protected AbstractGitCommandFactory(String cmdPrefix) {
public String getCommandPrefix() {
return cmdPrefix;
@Override
public ExecutorService getExecutorService() {
return executorService;
@Override
public boolean isShutdownOnExit() {
return shutdownOnExit;
public AbstractGitCommandFactory withExecutorService(ExecutorService executorService) {
this.executorService = executorService;
return this;
public GitLocationResolver getGitLocationResolver() {
return rootDirResolver;
public AbstractGitCommandFactory withGitLocationResolver(GitLocationResolver rootDirResolver) {
this.rootDirResolver = rootDirResolver;
return this;
}
public CommandFactory getDelegate() {
return delegate;
}
public AbstractGitCommandFactory withDelegate(CommandFactory delegate) {
this.delegate = delegate;
return this; | 0 |
* Defines a functor interface implemented by classes that transform one
* object into another.
* <p>
* A <code>Transformer</code> converts the input object to the output object.
* The input object should be left unchanged.
* <p>
* Standard implementations of common transformers are provided by
* {@link TransformerUtils}. These include method invokation, returning a constant,
* cloning and returning the string value.
* @version $Revision: 1.10 $ $Date: 2004/04/14 20:08:57 $
* @param input the object to be transformed, should be left unchanged
| 0 |
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.ServiceSelector;
import org.apache.avalon.framework.service.Serviceable;
* @version CVS $Id: AspectRenderer.java,v 1.3 2003/10/20 13:37:10 cziegeler Exp $
implements Renderer, Serviceable, Configurable, Disposable, ThreadSafe {
protected ServiceManager manager;
protected ServiceSelector aspectSelector;
/* (non-Javadoc)
* @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
*/
public void service(ServiceManager manager) throws ServiceException {
this.manager = manager;
this.aspectSelector = (ServiceSelector) this.manager.lookup( RendererAspect.ROLE+"Selector");
}
| 0 |
CachedXPathAPIHolder.setDoc(doc);
XMLSignatureInput result = new XMLSignatureInput(resultNode); | 0 |
assertEquals(new PasswordToken().setPassword("secret".getBytes()), args.getToken()); | 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 applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.bcel.verifier.exc;
| 0 |
public int write(final ByteBuffer src) throws IOException { | 0 |
import org.apache.hc.core5.http.Supplier; | 0 |
* @param <InputT> the type of elements the operator is consuming
* @param <OutputT> the type of elements the operator is producing
public <InputT, OutputT, T extends Operator<InputT, OutputT>> T add(T operator) {
* @param <InputT> the type of elements the operator is consuming
* @param <OutputT> the type of elements the operator is producing
<InputT, OutputT, T extends Operator<InputT, OutputT>> T add(
T operator, @Nullable String logicalName) {
for (Dataset<InputT> d : operator.listInputs()) { | 0 |
import org.apache.beam.runners.dataflow.DataflowRunner;
* {@link DataflowRunner}.
options.setRunner(DataflowRunner.class);
* the {@link DataflowRunner}.
* the {@link DataflowRunner} with the specified {@code options}. | 0 |
} catch (SAXException se) {
throw new XMLEncryptionException(se);
} catch (ParserConfigurationException pce) {
throw new XMLEncryptionException(pce);
} catch (IOException ioe) {
throw new XMLEncryptionException(ioe); | 0 |
} catch (final URISyntaxException ex) { | 0 |
public class Query8Model extends NexmarkQueryModel<IdNameReserve> implements Serializable {
public AbstractSimulator<?, IdNameReserve> simulator() {
protected Collection<String> toCollection(Iterator<TimestampedValue<IdNameReserve>> itr) { | 0 |
private List<TypeDefLink> typeDefSuperTypes = null;
private List<InstanceStatus> validStatusList = null;
private List<String> validInstanceProperties = null;
* Set up the version for the TypeDef. | 0 |
* List the active compaction running on a tablet server
*
* @param tserver
* The tablet server address should be of the form <ip address>:<port>
* @return the list of active compactions
* @throws AccumuloException
* @throws AccumuloSecurityException
*/
public List<ActiveCompaction> getActiveCompactions(String tserver) throws AccumuloException, AccumuloSecurityException;
/**
* Throws an exception if a tablet server can not be contacted.
*
* @param tserver
* The tablet server address should be of the form <ip address>:<port>
* @throws AccumuloException
*/
public void ping(String tserver) throws AccumuloException;
/** | 1 |
import javax.persistence.UniqueConstraint;
initialValue = 0,
uniqueConstraints=@UniqueConstraint(columnNames={"layout_name", "cluster_id"})
@Column(name = "layout_name", nullable = false, length = 255) | 0 |
package org.apache.commons.beanutils2;
import org.apache.commons.beanutils2.BeanComparator;
| 1 |
* A single column and value pair within a {@link Mutation}.
/**
* Creates a new column update.
*
* @param cf column family
* @param cq column qualifier
* @param cv column visibility
* @param hasts true if the update specifies a timestamp
* @param ts timestamp
* @param deleted delete marker
* @param val cell value
*/
/**
* Gets whether this update specifies a timestamp.
*
* @return true if this update specifies a timestamp
*/
* Gets the column family for this update. Not a defensive copy.
*
* @return column family
/**
* Gets the column qualifier for this update. Not a defensive copy.
*
* @return column qualifier
*/
/**
* Gets the column visibility for this update.
*
* @return column visibility
*/
/**
* Gets the timestamp for this update.
*
* @return timestamp
*/
/**
* Gets the delete marker for this update.
*
* @return delete marker
*/
/**
* Gets the cell value for this update.
*
* @return cell value
*/ | 0 |
for ( ReferenceMetadata referenceMetadata: componentMetadata.getDependencies() ) | 0 |
import org.apache.ambari.server.events.publishers.STOMPUpdatePublisher;
private STOMPUpdatePublisher STOMPUpdatePublisher;
STOMPUpdatePublisher.publish(new ConfigsUpdateEvent(serviceConfigEntity,
STOMPUpdatePublisher.publish(new ConfigsUpdateEvent(serviceConfigEntityClone,
STOMPUpdatePublisher.publish(new ConfigsUpdateEvent(this, appliedConfigs)); | 1 |
gncl.changeCompleted(changeCompletedEvent); | 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 |
* @version $Id$ | 1 |
import org.apache.accumulo.core.client.mapreduce.InputFormatBase;
long totalRows = InputFormatBase.getConfiguration(job).getLong(NUMROWS, 0);
int numSplits = InputFormatBase.getConfiguration(job).getInt(NUMSPLITS, 1); | 0 |
* The code of this method is a copy of
* {@link #outputAttributes(Element, NameSpaceSymbTable, Map<String, byte[]>)}, | 0 |
import javax.servlet.http.HttpSession;
final HttpSession session = ObjectModelHelper.getRequest(objectModel).getSession(false);
final HttpSession session = ObjectModelHelper.getRequest(objectModel).getSession(true); | 0 |
* Copyright (c) 2002 The Apache Software Foundation. All rights | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Predicates; | 0 |
private static final String ID_CONTROL = "abc123";
private static final String URI_CONTROL = "http://www.example.org/keyinfo.xml";
KeyInfoReference keyInfoReference = new KeyInfoReference(XMLUtils.newDocument(), URI_CONTROL);
assertEquals(URI_CONTROL, keyInfoReference.getURI());
assertEquals(ID_CONTROL, keyInfoReference.getId());
KeyInfoReference keyInfoReference = new KeyInfoReference(XMLUtils.newDocument(), URI_CONTROL);
assertEquals(URI_CONTROL, keyInfoReference.getURI());
KeyInfoReference keyInfoReference = new KeyInfoReference(XMLUtils.newDocument(), URI_CONTROL);
keyInfoReference.setId(ID_CONTROL);
assertEquals(ID_CONTROL, keyInfoReference.getId()); | 0 |
/**
* Create the resources defined by the properties in the given request object.
*
* @param request the request object which defines the set of properties
* for the resources to be created
*/
public void createResources(Request request);
* @param request the request object which defines the desired set of properties
* @param predicate the predicate object which can be used to filter which
* resources are returned
* Update the resources selected by the given predicate with the properties
* from the given request object.
*
* @param request the request object which defines the set of properties
* for the resources to be updated
* @param predicate the predicate object which can be used to filter which
* resources are updated
*/
public void updateResources(Request request, Predicate predicate);
/**
* Delete the resources selected by the given predicate.
*
* @param predicate the predicate object which can be used to filter which
* resources are deleted
*/
public void deleteResources(Predicate predicate);
/** | 0 |
package org.apache.xml.security.test.dom.signature;
import org.apache.xml.security.test.dom.DSNamespaceContext; | 0 |
if (ttype == StreamTokenizer.TT_WORD || ttype > 0) {
return list; | 0 |
* @version $Revision$ | 0 |
Coder<?> equalCoder =
KvCoder.of(StringUtf8Coder.of(), IterableCoder.of(SetCoder.of(ByteArrayCoder.of())));
assertThat(components.registerCoder(equalCoder), equalTo(id));
Coder<?> otherCoder = VarLongCoder.of(); | 0 |
/*
* @author <a href="mailto:[email protected]">Felix Project Team</a>
*/ | 0 |
* @version $Revision$ $Date$ | 0 |
import org.apache.beam.sdk.options.GcpOptions;
import org.apache.beam.sdk.options.PubsubOptions; | 0 |
Boolean remoteVerification = builder.getRemoteVerification(fileSystemOptions);
if (remoteVerification != null) {
client.setRemoteVerificationEnabled(remoteVerification.booleanValue());
}
| 0 |
@Override | 0 |
@NamedQuery(name = "AlertHistoryEntity.removeByDefinitionId", query = "DELETE FROM AlertHistoryEntity alertHistory WHERE alertHistory.alertDefinition.definitionId = :definitionId") }) | 0 |
Copyright 2002 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 agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/ | 0 |
super(uri, name);
return SAC_PSEUDO_ELEMENT_SELECTOR;
return getLocalName().equalsIgnoreCase(pseudoE);
return 0;
return ":" + getLocalName(); | 1 |
public static BatchTranslationContext createTranslationContext(
JobInfo jobInfo, List<String> filesToStage) { | 0 |
FilePasswordProvider provider = getFilePasswordProvider();
KeyPair kp = loader.loadClientIdentity(null /* TODO use lazy-load here as well */, l, provider);
l, KeyUtils.getKeyType(kp), KeyUtils.getFingerPrint(kp.getPublic()));
Iterable<? extends KeyPair> identities, boolean useDefaultIdentities)
Iterable<? extends KeyPair> identities, boolean useDefaultIdentities) {
SocketAddress address, Iterable<? extends KeyPair> identities, boolean useDefaultIdentities) {
if (identities != null) {
* to {@code FilePasswordProvider#getPassword} is the path of the
* to {@code FilePasswordProvider#getPassword} is the path of the | 0 |
import org.apache.ambari.view.utils.hdfs.HdfsApi; | 0 |
* Finds the first stage matching any of the specified statuses for every
* request. For example, to find the first {@link HostRoleStatus#IN_PROGRESS}
* stage for every request, pass in
* {@link HostRoleStatus#IN_PROGRESS_STATUSES}.
* @param statuses
* {@link HostRoleStatus}
* @return the list of the first matching stage for the given statuses for
* every request.
public List<StageEntity> findFirstStageByStatus(Collection<HostRoleStatus> statuses) {
TypedQuery<Object[]> query = entityManagerProvider.get().createNamedQuery(
"StageEntity.findFirstStageByStatus", Object[].class);
List<Object[]> results = daoUtils.selectList(query);
List<StageEntity> stages = new ArrayList<>();
for (Object[] result : results) {
StageEntityPK stagePK = new StageEntityPK();
stagePK.setRequestId((Long) result[0]);
stagePK.setStageId((Long) result[1]);
StageEntity stage = findByPK(stagePK);
stages.add(stage);
}
return stages; | 0 |
String content = XMLUtils.getFullTextChildrenFromNode(childElem);
String content = XMLUtils.getFullTextChildrenFromNode(elem); | 0 |
Document doc = XMLUtils.parse(new FileInputStream(f), false); | 0 |
Assert.assertNull(KerberosServerAction.getCommandParameterValue(commandParams, "nonexistingvalue"));
Assert.assertEquals("REALM.COM", KerberosServerAction.getCommandParameterValue(commandParams, KerberosServerAction.DEFAULT_REALM)); | 0 |
import org.apache.avalon.framework.component.Component;
* @version CVS $Id: InvokeContext.java,v 1.8 2004/06/02 20:11:35 cziegeler Exp $
((Recomposable)this.processingPipeline).recompose(manager);
((Recomposable)this.processingPipeline).recompose( this.pipelinesManager );
this.pipelineSelector.release( (Component)this.processingPipeline); | 0 |
* Copyright 2000-2009 The Apache Software Foundation | 0 |
private static final String TLD_PATTERN = "^\\p{Alpha}+$";
if (!Pattern.matches(TLD_PATTERN, tld)) { | 0 |
public Collection<String> getEnvironmentIds() { | 0 |
return 9; | 0 |
@Deprecated | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.