Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
1
|
---|---|
import static org.apache.accumulo.tserver.compaction.DefaultCompactionStrategyTest.getServerContext;
import org.apache.accumulo.tserver.InMemoryMapTest;
mcr = new MajorCompactionRequest(ke, MajorCompactionReason.NORMAL, conf,
InMemoryMapTest.getServerContext());
mcr = new MajorCompactionRequest(ke, MajorCompactionReason.NORMAL, conf, getServerContext());
mcr = new MajorCompactionRequest(ke, MajorCompactionReason.NORMAL, conf, getServerContext());
| 0 |
clientInfo = ClientInfo.from(Accumulo.newClientProperties()
.to(getInstanceName(), getZooKeepers()).as(getAdminPrincipal(), getAdminToken()).build());
| 0 |
import java.net.URI;
getLog().info( "-Drepository-path is not set, using default repository: " + m_repositoryPath );
URI obrXml = ObrUtils.findObrXml( m_project.getResources() );
if ( null == obrXml )
getLog().info( "obr.xml is not present, use default" );
getLog().debug( "OBR repository = " + obrXml );
ObrUpdate obrUpdate = new ObrUpdate( fileRepo, obrXml, m_project, m_fileInLocalRepo, PathFile
| 0 |
* limitations under the License.
| 0 |
* Moves <code>nde</code> to the head of the list (equivilent to
* Adds <code>nde</code> to the head of the list.
* In perl this is called an 'unpop'. <code>nde</code> should
* Adds <code>nde</code> to tail of list
* Adds <code>nde</code> to head of 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
| 0 |
try (AccumuloClient c = getAccumuloClient()) {
final String tableName = getUniqueNames(1)[0];
c.tableOperations().create(tableName);
final AtomicReference<Exception> ref = new AtomicReference<>();
final int THREADS = 5;
ThreadPoolExecutor tpe = new ThreadPoolExecutor(0, THREADS, 0, TimeUnit.SECONDS,
new ArrayBlockingQueue<>(THREADS));
for (int i = 0; i < THREADS; i++) {
final int index = i;
Runnable r = new Runnable() {
@Override
public void run() {
try {
TestIngest.Opts opts = new TestIngest.Opts();
opts.startRow = index * 10000;
opts.rows = 10000;
opts.setTableName(tableName);
opts.setClientInfo(getClientInfo());
BatchWriterOpts bwOpts = new BatchWriterOpts();
bwOpts.batchMemory = 1024L * 1024;
bwOpts.batchThreads = 2;
TestIngest.ingest(c, opts, new BatchWriterOpts());
} catch (Exception ex) {
ref.set(ex);
}
};
tpe.execute(r);
}
tpe.shutdown();
tpe.awaitTermination(90, TimeUnit.SECONDS);
if (ref.get() != null) {
throw ref.get();
}
VerifyIngest.Opts vopts = new VerifyIngest.Opts();
vopts.rows = 10000 * THREADS;
vopts.setTableName(tableName);
vopts.setClientInfo(getClientInfo());
VerifyIngest.verifyIngest(c, vopts, new ScannerOpts());
| 0 |
// nothing to do
| 0 |
import org.apache.beam.sdk.io.FileSystems;
import org.apache.beam.sdk.io.fs.ResolveOptions.StandardResolveOptions;
return FileSystems.matchNewResource(gcpTempLocation, true /* isDirectory */)
.resolve("staging", StandardResolveOptions.RESOLVE_DIRECTORY)
.toString();
| 0 |
if (preferredVolumes == null || preferredVolumes.isEmpty()) {
if (preferredVolumes == null || preferredVolumes.isEmpty()) {
if ((preferredVolumes == null || preferredVolumes.isEmpty()) && scope != ChooserScope.DEFAULT) {
if (preferredVolumes == null || preferredVolumes.isEmpty()) {
| 0 |
private static final long serialVersionUID = 1L;
private static final LoggerStatus NO_STATUS = new LoggerStatus();
@Override
protected String getTitle(HttpServletRequest req) {
return "Logger Server Status";
}
private void doDeadLoggerList(HttpServletRequest req, StringBuilder sb) {
MasterMonitorInfo mmi = Monitor.getMmi();
if (mmi != null) {
List<DeadServer> obit = mmi.deadLoggers;
Table deadTServerList = new Table("deadLoggers", "Dead Loggers", "error");
deadTServerList.setSubCaption("The following loggers are no longer reachable.");
TServersServlet.doDeadServerTable(req, sb, deadTServerList, obit);
}
@Override
protected void pageBody(HttpServletRequest req, HttpServletResponse response, StringBuilder sb) throws Exception {
String loggerAddress = req.getParameter("s");
doDeadLoggerList(req, sb);
if (loggerAddress == null || loggerAddress.isEmpty()) {
ArrayList<LoggerStatus> loggers = new ArrayList<LoggerStatus>();
if (Monitor.getMmi() != null) loggers.addAll(Monitor.getMmi().loggers);
Table loggerList = new Table("loggers", "Logger Servers");
doLoggerServerList(req, sb, loggers, loggerList);
return;
}
static void doLoggerServerList(HttpServletRequest req, StringBuilder sb, List<LoggerStatus> loggers, Table loggerList) {
loggerList.addSortableColumn("Server", new LoggerLinkType(), null);
for (LoggerStatus status : loggers) {
if (status == null) status = NO_STATUS;
RecoveryStatus s = new RecoveryStatus();
s.host = status.logger;
loggerList.addRow(s);
loggerList.generate(req, sb);
}
| 1 |
package org.apache.accumulo.master.tableOps.tableImport;
import org.apache.accumulo.master.tableOps.MasterRepo;
| 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/TestListUtils.java,v 1.5 2002/10/12 22:36:22 scolebourne Exp $
* $Revision: 1.5 $
* $Date: 2002/10/12 22:36:22 $
import java.util.ArrayList;
import junit.framework.Test;
| 0 |
final Storage storage = DbUtil.createFlaggedStorage();
| 0 |
import org.apache.beam.sdk.runners.AppliedPTransform;
import org.apache.beam.sdk.values.PCollection;
import org.apache.beam.sdk.values.PCollection.IsBounded;
AppliedPTransform<?, ?, ?> appliedPTransform = node.toAppliedPTransform(getPipeline());
if (hasUnboundedOutput(appliedPTransform)) {
Class<? extends PTransform> transformClass = node.getTransform().getClass();
private boolean hasUnboundedOutput(AppliedPTransform<?, ?, ?> transform) {
return transform.getOutputs().values().stream()
.filter(value -> value instanceof PCollection)
.map(value -> (PCollection<?>) value)
.anyMatch(collection -> collection.isBounded() == IsBounded.UNBOUNDED);
}
| 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 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/observed/Attic/ModificationHandler.java,v 1.5 2003/09/07 16:50:59 scolebourne Exp $
* @version $Revision: 1.5 $ $Date: 2003/09/07 16:50:59 $
* Store data and send event before remove() is called on a Buffer.
* <p>
* This implementation forwards to {@link #preEvent(int, int, Object, int, Object, Object, int)}.
*
* @return true to process modification
*/
protected boolean preRemoveNext() {
return preEvent(ModificationEventType.REMOVE_NEXT, -1, null, 1, null, null, -1);
}
/**
* Send an event after remove() is called on a Buffer.
* <p>
* This implementation forwards to {@link #postEvent(boolean, int, int, Object, int, Object, Object, int)}.
*
* @param removedValue the previous value at this index
*/
protected void postRemoveNext(Object removedValue) {
// assume collection changed
postEvent(true, ModificationEventType.REMOVE_NEXT, -1, removedValue, 1, removedValue, null, -1);
}
//-----------------------------------------------------------------------
/**
| 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/bean/src/test/org/apache/commons/jelly/tags/bean/Order.java,v 1.2 2003/01/21 15:16:31 jstrachan Exp $
* $Revision: 1.2 $
* $Date: 2003/01/21 15:16:31 $
* $Id: Order.java,v 1.2 2003/01/21 15:16:31 jstrachan Exp $
* @version $Revision: 1.2 $
*/
public void addProduct(Product product)
{
this.product = product;
}
| 0 |
/* Copyright 2006 aQute SARL
* Licensed under the Apache License, Version 2.0, see http://www.apache.org/licenses/LICENSE-2.0 */
package aQute.lib.osgi;
import java.io.*;
import java.net.*;
public class URLResource implements Resource {
URL url;
String extra;
public URLResource(URL url) {
this.url = url;
}
public InputStream openInputStream() throws IOException {
return url.openStream();
}
public String toString() {
return ":" + url.getPath() + ":";
}
public void write(OutputStream out) throws IOException {
FileResource.copy(this, out);
}
public long lastModified() {
return -1;
}
public String getExtra() {
return extra;
}
public void setExtra(String extra) {
this.extra = extra;
}
}
| 0 |
import org.apache.beam.runners.spark.SparkPipelineOptions;
private final long bundleSize;
this.bundleSize = options.get().as(SparkPipelineOptions.class).getBundleSize();
checkArgument(this.bundleSize > 0, "Bundle size must be greater than zero.");
List<? extends Source<T>> partitionedSources = source.split(bundleSize, options.get());
| 0 |
* @version $Revision: 1.6 $ $Date: 2002/10/27 08:16:20 $
throw new FileSystemException( "vfs.provider.jar/jar-file-no-access.error" );
throw new FileSystemException( "vfs.provider.jar/jar-entry-no-access.error" );
return content.getInputStream();
return content.getOutputStream();
| 0 |
UnitProcessor.Context uctx,
DocumentLoader loader) {
units = getChainableAttributeNS(parent,
null,
SVG_PRIMITIVE_UNITS_ATTRIBUTE,
loader);
| 0 |
expect(ambariMetaInfo.getKerberosDescriptor("HDP","2.5", false)).andReturn(newDescriptor).atLeastOnce();
expect(ambariMetaInfo.getKerberosDescriptor("HDP","2.4",false)).andReturn(previousDescriptor).atLeastOnce();
fields.put(fieldName, clustersField);
| 0 |
import java.io.StringReader;
StringBuilder sb = new StringBuilder();
sb.append(escapedKey).append("=");
} else {
String val0 = valueLines.get(0);
if (!val0.trim().startsWith(escapedKey)) {
valueLines.set(0, escapedKey + " = " + escapeJava(val0) /*+ (0 < lastLine? "\\": "")*/);
sb.append(escapedKey).append(" = ").append(escapeJava(val0));
} else {
valueLines.set(0, escapeJava(val0) /*+ (0 < lastLine? "\\": "")*/);
sb.append(escapeJava(val0));
}
String val = valueLines.get(i);
valueLines.set(i, escapeJava(val) /*+ (i < lastLine? "\\": "")*/);
while (!val.isEmpty() && Character.isWhitespace(val.charAt(0))) {
val = val.substring(1);
}
sb.append(val);
String[] property = PropertiesReader.parseProperty(sb.toString());
return storage.put(key, property[1]);
for (int i = 0; i < l.getValueLines().size(); i++)
String s = l.getValueLines().get(i);
if (i < l.getValueLines().size() - 1)
{
writer.writeln(s + "\\");
}
else
{
writer.writeln(s);
}
boolean combine = checkCombineLines(line);
if (combine)
{
line = line.substring(0, line.length() - 1);
}
buffer.append(line);
if (!combine)
| 0 |
* @see <A HREF="https://docs.oracle.com/javase/8/docs/technotes/guides/net/properties.html">JDK docs for network properties</A>
| 0 |
import com.google.common.net.HostAndPort;
private static TProtocolFactory protocol;
static TProtocolFactory getRandomProtocol() throws InstantiationException, IllegalAccessException {
Class<? extends TProtocolFactory> clz = protocolFactories.get(random.nextInt(protocolFactories.size()));
return clz.newInstance();
protocol = getRandomProtocol();
proxyServer = Proxy.createProxyServer(HostAndPort.fromParts("localhost", proxyPort), protocol, props).server;
client = new TestProxyClient("localhost", proxyPort, protocol).proxy();
Client client2 = new TestProxyClient("localhost", proxyPort, protocol).proxy();
Client client2 = new TestProxyClient("localhost", proxyPort, protocol).proxy();
| 0 |
TreeMap<String, Object> stackProperties = new TreeMap<>();
Collection<String> authToLocalRules = new ArrayList<>();
TreeMap<String, Object> stackServices = new TreeMap<>();
TreeMap<String, Object> stackClusterConfProperties = new TreeMap<>();
TreeMap<String, Object> stackClusterConf = new TreeMap<>();
TreeMap<String, Object> stackConfigurations = new TreeMap<>();
TreeMap<String, Object> stackSharedIdentityKeytabOwner = new TreeMap<>();
TreeMap<String, Object> sharedIdentityKeytabGroup = new TreeMap<>();
TreeMap<String, Object> stackSharedIdentityKeytab = new TreeMap<>();
TreeMap<String, Object> stackSharedIdentity = new TreeMap<>();
stackSharedIdentity.put("principal", new TreeMap<>(KerberosPrincipalDescriptorTest.MAP_VALUE));
TreeMap<String, Object> stackIdentities = new TreeMap<>();
STACK_MAP = new TreeMap<>();
TreeMap<String, Object> userProperties = new TreeMap<>();
TreeMap<String, Object> userClusterConfProperties = new TreeMap<>();
TreeMap<String, Object> userClusterConf = new TreeMap<>();
TreeMap<String, Object> userConfigurations = new TreeMap<>();
TreeMap<String, Object> userSharedIdentityKeytabOwner = new TreeMap<>();
TreeMap<String, Object> userSharedIdentityKeytabGroup = new TreeMap<>();
TreeMap<String, Object> userSharedIdentityKeytab = new TreeMap<>();
TreeMap<String, Object> userSharedIdentity = new TreeMap<>();
userSharedIdentity.put("principal", new TreeMap<>(KerberosPrincipalDescriptorTest.MAP_VALUE));
TreeMap<String, Object> userIdentities = new TreeMap<>();
USER_MAP = new TreeMap<>();
COMPOSITE_MAP = new TreeMap<>();
Map<String, String> requestInfoProperties = new HashMap<>();
| 1 |
* is used when a disconnection is attempted. If the disconnect
| 0 |
if (!this.closed && this.response == null && !this.outbuf.hasData()) {
| 0 |
private static final String VIEW_TABLE = "viewmain";
// view build number
dbAccessor.addColumn(VIEW_TABLE, new DBColumnInfo("build", String.class, 128, null, true));
| 0 |
AtlasType.toJson(lineageQuery), t);
| 0 |
import static com.google.common.base.Preconditions.checkNotNull;
checkNotNull(fn,
"WithKeys constructed with null function. Did you mean WithKeys.of((Void) null)?");
(Class<K>) (key == null ? Void.class : key.getClass()));
| 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.swssf.xmlsec.impl.transformer.canonicalizer;
/**
* @author $Author$
* @version $Revision$ $Date$
*/
public class Canonicalizer20010315_ExclWithCommentsTransformer extends Canonicalizer20010315_Excl {
public Canonicalizer20010315_ExclWithCommentsTransformer() {
super(true);
}
}
| 0 |
public String toString() {
return this.statusline + " " + this.headergroup;
}
| 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
import org.apache.ambari.server.controller.internal.AmbariServerConfigurationCategory;
configEntities = ambariConfigurationDAOProvider.get().findByCategory(AmbariServerConfigurationCategory.LDAP_CONFIGURATION.getCategoryName());
instance = new AmbariLdapConfiguration(properties);
| 0 |
* Copyright (C) 2015 Google Inc.
| 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.commons.jexl;
import org.apache.commons.jexl.context.HashMapContext;
/**
* Helper to create a context. In the current implementation of JEXL, there
* is one implementation of JexlContext - {@link HashMapContext}, and there
* is no reason not to directly instantiate {@link HashMapContext} in your
* own application.
*
* @since 1.0
*
* @version $Id$
*/
public class JexlHelper {
/** singleton instance. */
protected static JexlHelper helper = new JexlHelper();
/** @return the single instance. */
protected static JexlHelper getInstance() {
return helper;
}
/**
* Returns a new {@link JexlContext}.
* @return a new JexlContext
*/
public static JexlContext createContext() {
return getInstance().newContext();
}
/**
* Creates and returns a new {@link JexlContext}.
* The current implementation creates a new instance of
* {@link HashMapContext}.
* @return a new JexlContext
*/
protected JexlContext newContext() {
return new HashMapContext();
}
}
| 0 |
final Field type = commonClass.getField("TYPE");
commonClass = (Class<?>) type.get(null);
| 0 |
// ACCUMULO-3651 Changed level to error and added FATAL to message for slf4j compatibility
@Override
@Override
@Override
| 0 |
import org.apache.http.annotation.NotThreadSafe;
@NotThreadSafe
| 0 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.persist.PersistService;
| 0 |
* Basic implementation of {@link HeaderElement}
*
* @version $Revision$
| 0 |
* Bridge class for the <font> element.
* Constructs a new bridge for the <font> element.
* Constructs a new SVGGVTFont that represents the specified <font> element
| 0 |
* @version $Revision: 1.3 $ $Date: 2004/05/10 20:09:49 $
| 0 |
input.getPipeline(),
WindowingStrategy.globalDefault(),
input.isBounded(),
KeyedWorkItemCoder.of(
GroupByKey.getKeyCoder(input.getCoder()),
GroupByKey.getInputValueCoder(input.getCoder()),
input.getWindowingStrategy().getWindowFn().windowCoder()));
KeyedWorkItemCoder<K, V> inputCoder = getKeyedWorkItemCoder(input.getCoder());
input.getPipeline(), outputWindowingStrategy, input.isBounded(),
KvCoder.of(inputCoder.getKeyCoder(), IterableCoder.of(inputCoder.getElementCoder())));
| 0 |
return createRequest(new KeyExtent("0", null, null), reason, objs);
| 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.xml.security.keys.content;
import org.apache.xml.security.exceptions.XMLSecurityException;
import org.apache.xml.security.utils.Constants;
import org.apache.xml.security.utils.SignatureElementProxy;
import org.w3c.dom.Element;
/**
*
* @author $Author$
* $todo$ Implement
*/
public class PGPData extends SignatureElementProxy implements KeyInfoContent {
/**
* Constructor PGPData
*
* @param element
* @param BaseURI
* @throws XMLSecurityException
*/
public PGPData(Element element, String BaseURI) throws XMLSecurityException {
super(element, BaseURI);
}
/** @inheritDoc */
public String getBaseLocalName() {
return Constants._TAG_PGPDATA;
}
}
| 0 |
@Override
@Override
| 0 |
* Copyright 2002,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.
* @version $Revision: 1.10 $
| 0 |
import org.apache.ambari.server.api.query.render.Renderer;
import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
import org.apache.ambari.server.controller.spi.NoSuchResourceException;
import org.apache.ambari.server.controller.spi.PageRequest;
import org.apache.ambari.server.controller.spi.Predicate;
import org.apache.ambari.server.controller.spi.SystemException;
import org.apache.ambari.server.controller.spi.TemporalInfo;
import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
* Set the corresponding renderer.
* The renderer is responsible for the rendering of the query result, including which
* properties are contained and the format of the result.
* @param renderer renderer for the query
public void setRenderer(Renderer renderer);
| 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//codec/src/test/org/apache/commons/codec/binary/HexTest.java,v 1.3 2003/08/18 03:01:14 bayard Exp $
* $Revision: 1.3 $
* $Date: 2003/08/18 03:01:14 $
* any, must include the following acknowledgement:
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear.
| 0 |
import org.apache.commons.jelly.util.ClassLoaderUtils;
* @version $Revision: 1.9 $
return ClassLoaderUtils.loadClass(className, getClass());
| 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Charsets;
import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Joiner;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableList;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Iterables;
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists;
| 0 |
FileSystems.setDefaultPipelineOptions(TestPipeline.testingPipelineOptions());
| 0 |
super("OSGi Package Export");
public void setPackageName(String packageName)
if (version != null)
ISigilBundle owningBundle = getAncestor(ISigilBundle.class);
if (owningBundle == null)
public void setVersion(Version version)
public void addUse(String use)
uses = tmp.toArray(new String[tmp.size()]);
public void removeUse(String use)
uses = tmp.toArray(new String[tmp.size()]);
public void setUses(Collection<String> uses)
this.uses = tmp.toArray(new String[tmp.size()]);
public int compareTo(IPackageExport o)
int i = name.compareTo(o.getPackageName());
if (i == 0)
i = compareVersion(o.getVersion());
private int compareVersion(Version other)
if (version == null)
if (other == null)
if (other == null)
return version.compareTo(other);
if (obj == this)
return true;
if (obj == null)
return false;
if (obj instanceof PackageExport)
return (name == null ? e.name == null : name.equals(e.name))
&& (version == null ? e.version == null : version.equals(e.version));
else
if (version != null)
hc *= version.hashCode();
| 0 |
* Color Space that the operation should take place in (linear sRGB or
public abstract class AbstractColorInterpolationRable extends AbstractRable {
protected AbstractColorInterpolationRable() {
protected AbstractColorInterpolationRable(Filter src) {
protected AbstractColorInterpolationRable(Filter src, Map props) {
protected AbstractColorInterpolationRable(List srcs) {
protected AbstractColorInterpolationRable(List srcs, Map props) {
public boolean isColorSpaceLinear() { return csLinear; }
* gamma corrected sRGB.
public void setColorSpaceLinear(boolean csLinear) {
if (csLinear)
else
| 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
| 0 |
String export = folder.newFolder().toString();
String import_ = folder.newFolder().toString();
| 0 |
private static final long serialVersionUID = 6993893925210913542L;
| 0 |
boolean isAtSplitPoint, @Nullable ShufflePosition groupStart) {
| 0 |
* Copyright (C) 2015 Google Inc.
| 0 |
import org.apache.commons.jelly.JellyTagException;
public void doTag(XMLOutput output) throws JellyTagException {
| 0 |
* @author <a href="mailto:[email protected]">Bill Haneman</a>
| 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
*
* 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.http.conn.ClientConnectionManager;
* @param mgr the connection manager
public ConnPoolByRoute(ClientConnectionManager mgr) {
super(mgr);
| 0 |
import org.apache.sshd.client.ClientBuilder;
import org.apache.sshd.client.SshClient;
import org.apache.sshd.client.channel.ClientChannel;
import org.apache.sshd.client.session.ClientSession;
import org.apache.sshd.common.kex.KeyExchange;
import org.apache.sshd.server.SshServer;
testClient(ClientBuilder.DH2KEX.transform(factory));
| 0 |
import java.util.Collection;
* Users (helper) object used to obtain privilege entities.
protected static Users users;
* @param users the users helper instance
ViewInstanceDAO viewInstanceDAO, Users users) {
GroupPrivilegeResourceProvider.users = users;
final Collection<PrivilegeEntity> privileges = users.getGroupPrivileges(groupEntity);
| 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 |
protected ZipFileObject createZipFileObject( FileName name,
throw new FileSystemException( "vfs.provider.zip/open-zip-file.error", new Object[]{file}, ioe );
getLogger().warn( "vfs.provider.zip/close-zip-file.error :"+ file, e );
| 0 |
import com.google.common.collect.Iterables;
import cz.seznam.euphoria.core.client.functional.UnaryPredicate;
| 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.controller;
import org.apache.ambari.server.controller.internal.UserAuthenticationSourceResourceProvider;
import org.apache.ambari.server.security.authorization.UserAuthenticationType;
import io.swagger.annotations.ApiModelProperty;
/**
* Interface to help correct Swagger documentation generation
*/
public interface UserAuthenticationSourceRequestCreateSwagger extends ApiModel {
@ApiModelProperty(name = UserAuthenticationSourceResourceProvider.AUTHENTICATION_SOURCE_RESOURCE_CATEGORY)
CreateUserAuthenticationSourceInfo getCreateUserAuthenticationSourceRequest();
interface CreateUserAuthenticationSourceInfo {
@ApiModelProperty(name = UserAuthenticationSourceResourceProvider.AUTHENTICATION_TYPE_PROPERTY_ID, required = true)
public UserAuthenticationType getAuthenticationType();
@ApiModelProperty(name = UserAuthenticationSourceResourceProvider.KEY_PROPERTY_ID, required = true)
public String getKey();
}
}
| 0 |
import org.apache.hc.core5.reactor.IOReactorConfig;
import org.apache.hc.core5.reactor.ListenerEndpoint;
| 1 |
if (!line.startsWith("UUID"))
continue;
if (!tokens[0].equals("FLUSH"))
continue;
if (tm == null)
return null;
if (ta == null)
System.out.println(undefinedNode.undef + " " + undefinedNode.ref + " " + uuid + " " + t1 + " " + t2);
else
System.out.println(undefinedNode.undef + " " + undefinedNode.ref + " " + ta.tablet + " " + ta.server + " " + uuid + " " + t1 + " " + t2);
| 1 |
*
*
*
* @version $Revision: 1.5 $
//-------------------------------------------------------------------------
return connection;
//-------------------------------------------------------------------------
public void doTag(XMLOutput output) throws JellyTagException {
try {
if (connection == null) {
//-------------------------------------------------------------------------
| 1 |
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
protected BeanFactory beanFactory;
public void setProcessorData(BeanFactory beanFactory,
if ( this.beanFactory != null && this.beanFactory instanceof ConfigurableBeanFactory) {
((ConfigurableBeanFactory) this.beanFactory).destroySingletons();
public BeanFactory getBeanFactory() {
| 0 |
* @since 1.1
* @since 1.1
| 0 |
MASTER_STATUS_THREAD_POOL_SIZE("master.status.threadpool.size", "1", PropertyType.COUNT,
"The number of threads to use when fetching the tablet server status for balancing."),
| 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 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client.params;
public final class AuthPolicy {
private AuthPolicy() {
super();
}
/**
* The NTLM scheme is a proprietary Microsoft Windows Authentication
* protocol (considered to be the most secure among currently supported
* authentication schemes).
*/
public static final String NTLM = "NTLM";
/**
* Digest authentication scheme as defined in RFC2617.
*/
public static final String DIGEST = "Digest";
/**
* Basic authentication scheme as defined in RFC2617 (considered inherently
* insecure, but most widely supported)
*/
public static final String BASIC = "Basic";
}
| 0 |
import com.twitter.mesos.scheduler.base.CommandUtil;
| 0 |
import org.apache.cocoon.components.expression.ExpressionContext;
import org.apache.cocoon.template.jxtg.environment.ErrorHolder;
public String toString(Locator location, ExpressionContext expressionContext)
throws SAXException {
StringBuffer buf = new StringBuffer();
Iterator iterSubst = iterator();
while (iterSubst.hasNext()) {
Subst subst = (Subst) iterSubst.next();
if (subst instanceof Literal) {
Literal lit = (Literal) subst;
buf.append(lit.getValue());
} else if (subst instanceof JXTExpression) {
JXTExpression expr = (JXTExpression) subst;
Object val;
try {
val = expr.getValue(expressionContext);
} catch (Exception e) {
throw new SAXParseException(e.getMessage(), location, e);
} catch (Error err) {
throw new SAXParseException(err.getMessage(), location,
new ErrorHolder(err));
}
buf.append(val != null ? val.toString() : "");
}
}
return buf.toString();
}
| 0 |
String baseName =
String.format(
"%s/%s",
stage.getInputPCollection().getPCollection().getUniqueName(),
stage.getEnvironment().getUrl());
Set<String> usedNames =
Sets.union(topLevelTransforms.keySet(), getComponents().getTransformsMap().keySet());
SyntheticNodes.uniqueId(baseName, usedNames::contains), stage.toPTransform());
| 0 |
// check for "post" requests from previous versions
if ( "true".equals(request.getParameter("post")) ) {
this.doPost(request, response);
return;
}
// let's check for a JSON request
| 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/Attic/TestArrayFloatList.java,v 1.4 2003/10/05 20:48:58 scolebourne Exp $
* @version $Revision: 1.4 $ $Date: 2003/10/05 20:48:58 $
protected String[] ignoredTests() {
| 0 |
import org.apache.accumulo.core.cli.ClientOnRequiredTable;
ClientOnRequiredTable opts = new ClientOnRequiredTable();
opts.parseArgs(this.getClass().getName(), args);
opts.setAccumuloConfigs(job);
Text table = new Text(opts.tableName);
rw.write(table, m); // repeat until done
| 1 |
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
* @throws IllegalArgumentException when {@link #getBaseURI()} returns an
* invalid URL. The information from the MalformedURLException
| 0 |
import org.apache.http.client.config.RequestConfig;
* Base implementation of {@link HttpUriRequest}.
implements HttpUriRequest, Configurable, HttpExecutionAware, AbortableHttpRequest, Cloneable {
private RequestConfig config;
public RequestConfig getConfig() {
return config;
}
public void setConfig(final RequestConfig config) {
this.config = config;
}
| 0 |
integerValue = ((Boolean)hostStateValue).booleanValue() ? 1 : 0;
| 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 |
4/*invokeinterface*/, 4/*invokedynamic*/, 2/*new*/,
/** The names of the referencd_kinds of a CONSTANT_MethodHandle_info. */
public static final String[] METHODHANDLE_NAMES = {
"", "getField", "getStatic", "putField", "putStatic", "invokeVirtual",
"invokeStatic", "invokeSpecial", "newInvokeSpecial", "invokeInterface" };
| 0 |
@Parameter(names = {"-s", "--source"}, description = "directory to import from")
@Parameter(names = {"-f", "--failures"}, description = "directory to copy failures into: will be deleted before the bulk import")
@Parameter(description = "<username> <password> <tablename> <sourcedir> <failuredir>")
| 0 |
} else if (args[0].equals("proxy")) {
runTMP = cl.loadClass("org.apache.accumulo.proxy.Proxy");
| 0 |
public static void putStringToFile(HdfsApi hdfs, String filePath, String content) {
synchronized (hdfs) {
stream = hdfs.create(filePath, true);
stream.writeBytes(content);
stream.close();
}
public static String findUnallocatedFileName(HdfsApi hdfs, String fullPathAndFilename, String extension) {
| 0 |
private void checkExpectedRangeBins(int numSubBins, String[] strings, int[] rangeEnds)
throws IOException {
int part = prepPartitioner(numSubBins).findPartition(new Text(strings[i]), cutArray,
numSubBins);
int bin = bins[i], part = prepPartitioner(numSubBins).findPartition(new Text(strings[i]),
cutArray, numSubBins);
| 0 |
import org.apache.ambari.server.state.PassiveState;
private PassiveState passiveState = null;
/**
* @param state
*/
public void setPassiveState(PassiveState state) {
passiveState = state;
}
/**
* @return the passive state
*/
public PassiveState getPassiveState() {
return passiveState;
}
| 0 |
import java.util.List;
* A {@link Source} that reads a finite amount of input and, because of that, supports
* some additional operations.
*
* <p>The operations are:
* <ul>
* <li>Splitting into bundles of given size: {@link #splitIntoBundles};
* <li>Size estimation: {@link #getEstimatedSizeBytes};
* <li>Telling whether or not this source produces key/value pairs in sorted order:
* {@link #producesSortedKeys};
* <li>The reader ({@link BoundedReader}) supports progress estimation
* ({@link BoundedReader#getFractionConsumed}) and dynamic splitting
* ({@link BoundedReader#splitAtFraction}).
* </ul>
*
* <p> To use this class for supporting your custom input type, derive your class
* class from it, and override the abstract methods. For an example, see {@link DatastoreIO}.
* Splits the source into bundles of approximately given size (in bytes).
*/
public abstract List<? extends BoundedSource<T>> splitIntoBundles(
long desiredBundleSizeBytes, PipelineOptions options) throws Exception;
/**
public abstract BoundedReader<T> createReader(
PipelineOptions options, @Nullable ExecutionContext executionContext) throws IOException;
| 0 |
*
* @param out the output stream
* @throws IOException if an error occurs while writing to the stream
*
* @param in the input stream
* @throws IOException if an error occurs while reading from the stream
* @throws ClassNotFoundException if an object read from the stream can not be loaded
| 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/lang/RuntimePermission.java,v 1.6 2006/03/14 01:20:24 hargrave Exp $
*
* (C) Copyright 2001 Sun Microsystems, Inc.
* Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved.
*
* 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 java.lang;
public final class RuntimePermission extends java.security.BasicPermission {
public RuntimePermission(java.lang.String var0) { super((java.lang.String) null, (java.lang.String) null); }
public RuntimePermission(java.lang.String var0, java.lang.String var1) { super((java.lang.String) null, (java.lang.String) null); }
}
| 0 |
List<String> builtin = NamedResource.getNameList(BuiltinCompressions.VALUES);
List<String> weavedList = new ArrayList<>(builtin.size() + unknown.size());
List<String> parsed = NamedResource.getNameList(result.getParsedFactories());
| 0 |
public class EmptyMapIterator<K, V> extends AbstractEmptyMapIterator<K, V> implements
MapIterator<K, V>, ResettableIterator<K> {
public static final MapIterator<Object, Object> INSTANCE = new EmptyMapIterator<Object, Object>();
/**
* Get a typed instance of the iterator.
* @param <K>
* @param <V>
* @return {@link MapIterator}<K, V>
*/
@SuppressWarnings("unchecked")
public static <K, V> MapIterator<K, V> getInstance() {
return (MapIterator<K, V>) INSTANCE;
}
| 0 |
expectedLogs.verifyInfo("Job finished with status DONE");
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.