Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import static org.apache.ambari.server.stack.upgrade.Task.Type.REGENERATE_KEYTABS; import org.apache.ambari.server.stack.upgrade.Direction; import org.apache.ambari.server.stack.upgrade.UpgradePack; import org.apache.ambari.server.stack.upgrade.UpgradeType; import org.apache.ambari.server.stack.upgrade.orchestrate.UpgradeHelper;
0
* Copyright (c) OSGi Alliance (2001, 2013). All Rights Reserved. * @author $Id: e04a2beb3de2afff4cb01747e589c04b5e0f0cc8 $
0
fam.start();
0
import org.apache.atlas.typesystem.exception.SchemaNotFoundException; LOG.error("entity not found for guid={}", guid); LOG.error("table entity not found for {}", guid); } catch (SchemaNotFoundException e) { LOG.error("schema not found for {}", guid); throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.NOT_FOUND)); LOG.error("table entity not found for {}", guid);
0
package cz.seznam.euphoria.core.client.io; import cz.seznam.euphoria.core.util.Settings; import java.net.URI; /** * Factory of {@code DataSource} from URI and settings. */ public abstract class IORegistry { private static final String REGISTRY_IMPL_CONF = "euphoria.io.registry.impl"; public static IORegistry get(Settings settings) throws Exception { return getInstance(settings, REGISTRY_IMPL_CONF, IORegistry.class, new SchemeBasedIORegistry()); } /** * Retrieve {@code DataSource} for URI. */ public abstract <T> DataSource<T> openSource(URI uri, Settings settings) throws Exception; /** * Create new instance from config value. */ static <T> T getInstance(Settings settings, String name, Class<T> clz) throws ClassNotFoundException, InstantiationException, IllegalAccessException { T instance = getInstance(settings, name, clz, null); if (instance == null) { throw new IllegalStateException("No config option " + name + " found"); } return instance; } /** * Create new instance from config value. */ @SuppressWarnings("unchecked") static <T> T getInstance(Settings settings, String name, Class<T> clz, T def) throws ClassNotFoundException, InstantiationException, IllegalAccessException { String clzName = settings.getString(name, null); if (clzName == null) { return def; } return (T) Thread.currentThread().getContextClassLoader() .loadClass(clzName).newInstance(); } }
0
import org.junit.Ignore; @Test @Ignore("TODO FIX")
0
@SuppressWarnings("serial")
0
eventType = new EventType<>(null, "TEST");
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkNotNull; import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkState; import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting; import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Optional; import org.apache.beam.vendor.guava.v20_0.com.google.common.io.CountingOutputStream;
0
* @deprecated since 1.7.0 use {@link #getTablet()} */ @Deprecated public abstract org.apache.accumulo.core.data.KeyExtent getExtent(); /** * @return tablet the scan is running against, if a batch scan may be one of many or null
0
import java.util.Comparator; private final Map<String, List<String>> mapOrderingRules = new HashMap<>(); private final Map<String, Comparator<?>> arrayOrderingRules = new HashMap<>(); public JsonWriterFactory orderMap(String path, List<String> keyOrder) { mapOrderingRules.put(path, keyOrder); return this; } @Override public WriterFactory orderArray(String path) { arrayOrderingRules.put(path, null); return this; } @Override public WriterFactory orderArray(String path, Comparator<?> comparator) { arrayOrderingRules.put(path, comparator); return new DebugJsonWriter(c, mapOrderingRules, arrayOrderingRules);
0
"CR05015202001026284066", "LC55HEMM000100010012001200023015",
0
* http://www.apache.org/licenses/LICENSE-2.0
0
import org.apache.felix.dm.DependencyManager; Component sp = m.createComponent() .setInterface(ServiceInterface.class.getName(), null) .setImplementation(new ServiceProvider(e)); Component sp2 = m.createComponent() .setInterface(ServiceInterface2.class.getName(), null) .setImplementation(new ServiceProvider2(e)); Component sc = m.createComponent() .setImplementation(new ServiceConsumer()) .add(m.createServiceDependency() .setService(ServiceInterface3.class) .setRequired(true)); Component sa = m.createAdapterService(ServiceInterface.class, null) .setInterface(ServiceInterface3.class.getName(), null) .setImplementation(new ServiceAdapter(e));
0
String SVG_EVENT_MOUSEOVER = "mouseover";
0
requests.add(getRequest(Collections.emptyMap()));
0
// This concrete implementation is provided for binary compatibility with 1.6; it can be removed in 2.0. See ACCUMULO-3789.
0
/* * Copyright 2005 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. * */ public abstract class CommandLauncherImpl implements CommandLauncher { public abstract Process exec(final CommandLine cmd, final Environment env, final File workingDir) throws IOException;
0
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
0
public Job analyzeTable(String databaseName, String tableName, Boolean shouldAnalyzeColumns, JobResourceManager resourceManager) throws ServiceException { AnalyzeTableQueryGenerator queryGenerator = new AnalyzeTableQueryGenerator(databaseName, tableName, shouldAnalyzeColumns);
0
import org.junit.Assert;
0
Document document = XMLUtils.read(sourceDocument, false); StAX2DOM.readDoc(securityStreamReader); Document document = XMLUtils.read(sourceDocument, false); StAX2DOM.readDoc(securityStreamReader); Document document = XMLUtils.read(sourceDocument, false); StAX2DOM.readDoc(securityStreamReader); Document document = XMLUtils.read(sourceDocument, false); StAX2DOM.readDoc(securityStreamReader); Document document = XMLUtils.read(sourceDocument, false); StAX2DOM.readDoc(securityStreamReader); Document document = XMLUtils.read(sourceDocument, false); StAX2DOM.readDoc(securityStreamReader);
0
if (Streaming.Async.equals(streaming)) { invertedIn = new ChannelOutputStream(this, remoteWindow, log, SshConstants.SSH_MSG_CHANNEL_DATA, true);
0
import org.apache.ambari.server.topology.Blueprint; Blueprint blueprint = createNiceMock(Blueprint.class); expect(topology.getBlueprint()).andReturn(blueprint).anyTimes(); expect(blueprint.shouldSkipFailure()).andReturn(true).anyTimes(); blueprint,
0
* Copyright (C) 2015 Google Inc.
0
package org.apache.felix.sigil.core.repository; import org.apache.felix.sigil.model.eclipse.ISigilBundle; import org.apache.felix.sigil.repository.AbstractBundleRepository; import org.apache.felix.sigil.repository.IRepositoryVisitor;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/bidimap/TestDualTreeBidiMap.java,v 1.1 2003/11/16 20:35:46 scolebourne Exp $ package org.apache.commons.collections.bidimap; import org.apache.commons.collections.BulkTest; * @version $Revision: 1.1 $ $Date: 2003/11/16 20:35:46 $ // public void testCreate() throws Exception { // resetEmpty(); // writeExternalFormToDisk((Serializable) map, "D:/dev/collections/data/test/DualTreeBidiMap.emptyCollection.version3.obj"); // resetFull(); // writeExternalFormToDisk((Serializable) map, "D:/dev/collections/data/test/DualTreeBidiMap.fullCollection.version3.obj"); // }
0
/** * EvenListener type wrapper. * @version 1.0 <i>(SVN $Revision$)</i> */
0
ValueStorage(String name, Class clz, RuntimeContext context) { "euphoria-state::" + name, ListStorage(String name, Class clz, RuntimeContext context) { "euphoria-state::" + name, public <T> ValueStateStorage<T> getValueStorage(String name, Class<T> what) { return (ValueStateStorage) new ValueStorage(name, what, context); public <T> ListStateStorage<T> getListStorage(String name, Class<T> what) { return (ListStateStorage) new ListStorage(name, what, context);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/functors/IfClosure.java,v 1.2 2004/01/02 01:36:51 psteitz Exp $ * Copyright (c) 2001-2004 The Apache Software Foundation. All rights * @version $Revision: 1.2 $ $Date: 2004/01/02 01:36:51 $ * @param predicate predicate to switch on * @param trueClosure closure used if true * @param falseClosure closure used if false * @return the <code>if</code> closure * @throws IllegalArgumentException if any argument is null
0
/* * Copyright 2002, 2003,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.
0
package org.apache.beam.sdk.nexmark.model; import org.apache.beam.sdk.nexmark.NexmarkUtils;
0
Copyright 2001 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
import javax.inject.Inject; import javax.inject.Singleton;
1
XMLSecNamespace getAttributeNamespace();
0
return SecurityUtils.getKeyPairGenerator(KeyUtils.RSA_ALGORITHM); return SecurityUtils.getKeyFactory(KeyUtils.RSA_ALGORITHM);
0
// starting the dependency above might have triggered another state change, so // we have to fetch the current state again oldState = m_state; // starting the dependency above might have triggered another state change, so // we have to fetch the current state again oldState = m_state; public String toString() { return "update instance " + dependency; } calculateStateChanges(oldState, newState); calculateStateChanges(oldState, newState);
0
public List getRoles(String filter) { Role[] roles = m_store.getRoles(sanitizeFilter(filter)); Role[] roles = m_store.getRoles(criteria); /** * Sanitizes the given filter string. * * @param filter the filter string to sanitize, can be <code>null</code>. * @return the sanitized filter, or <code>null</code> if the given filter was <code>null</code> or empty. */ private String sanitizeFilter(String filter) { if (filter == null || "".equals(filter.trim())) { return null; } return filter.trim(); }
0
import static java.util.Arrays.asList; import java.io.Serializable; import java.util.List; import java.util.Objects;
0
@Test public void testIsLoaded() throws Exception { ViewEntity viewDefinition = getViewEntity(); viewDefinition.setStatus(ViewDefinition.ViewStatus.PENDING); Assert.assertFalse(viewDefinition.isLoaded()); viewDefinition.setStatus(ViewDefinition.ViewStatus.LOADING); Assert.assertFalse(viewDefinition.isLoaded()); viewDefinition.setStatus(ViewDefinition.ViewStatus.LOADED); Assert.assertTrue(viewDefinition.isLoaded()); viewDefinition.setStatus(ViewDefinition.ViewStatus.ERROR); Assert.assertFalse(viewDefinition.isLoaded()); }
0
FileOutputStream fos = new FileOutputStream(clazz); IPojoPluginConfiguration.getLogger().log(Level.INFO, "Put the file " + clazz.getAbsolutePath() + " in the jar file"); } catch (Exception e) { System.err.println("Problem to write the adapted class on the file system " + " [ "+ clazz.getAbsolutePath() +" ] " + e.getMessage()); }
0
.setIntParameter(HttpConnectionParams.SO_TIMEOUT, 15000)
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.accumulo.fate.util; import org.apache.log4j.Logger; public class UtilWaitThread { private static final Logger log = Logger.getLogger(UtilWaitThread.class); public static void sleep(long millis) { try { Thread.sleep(millis); } catch (InterruptedException e) { log.error(e.getMessage(), e); } } }
1
import org.apache.felix.scr.Component; private static final int STATE_MASK = Component.STATE_UNSATISFIED | Component.STATE_ACTIVATING | Component.STATE_ACTIVE | Component.STATE_REGISTERED | Component.STATE_FACTORY; private void serviceRemoved( ServiceReference reference ) // if the dependency is not satisfied anymore, we have to // deactivate the component if ( !isSatisfied() ) { m_componentManager.log( LogService.LOG_DEBUG, "Dependency Manager: Deactivating component due to mandatory dependency on {0}/{1} not satisfied", new Object[] { m_dependencyMetadata.getName(), m_dependencyMetadata.getInterface() }, null ); // deactivate the component now m_componentManager.deactivateInternal( ComponentConstants.DEACTIVATION_REASON_REFERENCE ); } if ( m_dependencyMetadata.isStatic() ) * services this instance is bound to or <code>null</code> if no services * are actually bound. if ( m_bound.isEmpty() ) { return null; } // only invoke the unbind method if there is an instance (might be null // in the delayed component situation) and the unbind method is declared. boolean doUnbind = m_componentInstance != null && m_dependencyMetadata.getUnbind() != null;
0
import java.util.LinkedHashMap; Map<String, ConfigPlacement> mergedConfigPlacements = new LinkedHashMap<String, ConfigPlacement>(); }
0
return (sendCommand(POP3Command.CAPA) == POP3Reply.OK); if (sendCommand(POP3Command.AUTH, method.getAuthName())
0
package org.apache.commons.ognl; import org.apache.commons.ognl.enhance.ExpressionCompiler; import org.apache.commons.ognl.enhance.UnsupportedCompilationException; + ")org.apache.commons.ognl.OgnlOps.toArray(" + parmString + ", " + parms[i].getComponentType().getName() + ")org.apache.commons.ognl.OgnlOps.convertValue(" + parmString + "," "(" + parms[i].getName() + ")org.apache.commons.ognl.OgnlOps.convertValue(" + parmString + "," + parms[i].getName() + ".class)",
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. * ==================================================================== * * 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.hc.core5.http2.nio.command; import org.apache.hc.core5.reactor.Command; /** * Shutdown command. * * @since 5.0 */ public final class ShutdownCommand implements Command { public static final ShutdownCommand GRACEFUL = new ShutdownCommand(ShutdownType.GRACEFUL); public static final ShutdownCommand IMMEDIATE = new ShutdownCommand(ShutdownType.IMMEDIATE); private final ShutdownType type; public ShutdownCommand(final ShutdownType type) { this.type = type; } public ShutdownType getType() { return type; } @Override public boolean cancel() { return true; } @Override public String toString() { return "Shutdown: " + type; } }
0
outputDebugMessage("LsEntry: %s", f); outputDebugMessage("%s: %s", extName, extValue); outputDebugMessage("Symlink %s => %s", remLinkPath, remSrcPath);
0
if (((access & ACC_STATIC) == 0) && (!name.startsWith("class$"))) { // The constructor is manipulated separately if (name.equals("<init>")) { Type[] args = Type.getArgumentTypes(newDesc); String id = "$init"; for (int i = 0; i < args.length; i++) { String cn = args[i].getClassName(); if (cn.endsWith("[]")) { cn = cn.replace('[', '$'); cn = cn.substring(0, cn.length() - 1); } cn = cn.replace('.', '_'); id += cn; } String flag = "_M" + id; m_methods.add(id); FieldVisitor flagField = cv.visitField(Opcodes.ACC_PRIVATE, flag, "Z", null, null); if (flagField != null) { flagField.visitEnd(); } return new ConstructorCodeAdapter(mv, m_owner, m_fields, access, name, newDesc);
0
/* * Copyright 2001-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.5 $ $Date: 2004/02/18 01:20:33 $
0
import org.apache.ambari.server.topology.PersistedState; bind(PersistedState.class).toInstance(createNiceMock(PersistedState.class));
0
* Constructor.
0
public void startVector(List<?> v, String tag) throws IOException; public void endVector(List<?> v, String tag) throws IOException; public void startMap(TreeMap<?,?> v, String tag) throws IOException; public void endMap(TreeMap<?,?> v, String tag) throws IOException;
0
import org.apache.felix.http.base.internal.runtime.dto.state.FilterState; public class FilterHandler implements Comparable<FilterHandler>, FilterState
0
import org.apache.accumulo.fate.zookeeper.ZooUtil;
0
/* * Copyright 2005 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.portal.deployment; /** * Status of a deployment or undeployment action. * * @version $Id$ */ public interface DeploymentStatus { /** The operation could be performed successfully. */ int STATUS_OKAY = 1; /** The operation hasn't been performed yet. */ int STATUS_EVAL = 0; /** An error occured during the operation. */ int STATUS_FAILED = -1; /** * Return the status of the operation (deployment or undeployment) */ int getStatus(); }
0
/** * Global disable flag for AmbariServer Metrics. */ @Markdown(description = "Global disable flag for AmbariServer Metrics.") public static final ConfigurationProperty<Boolean> AMBARISERVER_METRICS_DISABLE = new ConfigurationProperty<>( "ambariserver.metrics.disable", false);
0
import java.util.*; attrMap = new HashMap(); public List getDefinitionSet(List defSet){ if (defSet == null) defSet = new LinkedList();
0
Rectangle2D runBounds = textRunLayout.getBounds2D(); if (runBounds != null) { if (bounds == null) bounds = runBounds; else bounds = bounds.createUnion(runBounds); }
0
.setTypeDescriptor(getOldFn().getOutputTypeDescriptor()); outputs.get(mainOutputTag).setTypeDescriptor(getOldFn().getOutputTypeDescriptor());
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.felix.scr.integration.components.felix3680_2; public class B { }
0
.apply("WriteCounts", TextIO.write().to(options.getOutput()))
0
/** * Create new config builder. * @param prefix String for properties of this file system. * @since 2.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 * * 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.io.input; import java.io.Reader; /** * A filter reader that filters out a given character represented as an <code>int</code> code point, handy to remove * known junk characters from CSV files for example. This class is the most efficient way to filter out a single * character, as opposed to using a {@link CharacterSetFilterReader}. You can also nest {@link CharacterFilterReader}s. */ public class CharacterFilterReader extends AbstractCharacterFilterReader { private final int skip; /** * Constructs a new reader. * * @param reader * the reader to filter. * @param skip * the character to filter out. */ public CharacterFilterReader(final Reader reader, final int skip) { super(reader); this.skip = skip; } @Override protected boolean filter(final int ch) { return ch == skip; } }
0
Number parsedNumber = numberFormat.parse(stringValue, parsePosition);
0
import org.apache.aurora.scheduler.offers.HostOffer;
0
int var_index = access.contains("static") ? 0 : 1; if (str.contains(old)) { // `old' found in str
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; }
0
public boolean accept(final File pathname) public FileSystemView createFileSystemView(final User user) throws FtpException final FileSystemView fsView = super.createFileSystemView(user);
0
// Remove the reference to this flush file, run the GC which should not trim it from the candidates, and assert that it's gone // Removing a reference to a file that wasn't in the candidates should do nothing // Remove the reference to a file in the candidates should cause it to be removed // Adding more candidates which do no have references should be removed // All candidates currently have references // Nothing should be removed because all candidates exist within a blip // Remove the first blip // And we should lose all files in that blip and the blip directory itself -- relative and absolute // Same as above, we should lose relative and absolute for a relative or absolute blip // A directory reference does not preclude a candidate file beneath that directory from deletion // Removing the dir reference for a table will delete all tablet directories
0
state.setTerminated(); Cancellable cancellable = state.getCancellable(); if (cancellable != null) { cancellable.cancel(); } || state.getResponseState().compareTo(MessageState.INIT) > 0) { log(cause); state.setResponseState(MessageState.INIT);
0
import org.apache.beam.runners.core.StateInternals;
0
import org.apache.hc.core5.annotation.Internal; /** * Protocol agnostic client side I/O session initiator. * * @since 5.0 */ @Internal
0
* </p>
0
import org.apache.hc.core5.http.nio.support.BasicRequestProducer; import org.apache.hc.core5.http.nio.support.BasicResponseConsumer; .setExceptionCallback(LoggingExceptionCallback.INSTANCE) .setIOSessionListener(LoggingIOSessionListener.INSTANCE) server.close(CloseMode.GRACEFUL); .setExceptionCallback(LoggingExceptionCallback.INSTANCE) .setIOSessionListener(LoggingIOSessionListener.INSTANCE) requester.close(CloseMode.GRACEFUL);
0
private final ConnectionPoolDataSource cpds; private final String validationQuery; private final int validationQueryTimeout; private final boolean rollbackAfterValidation; private KeyedObjectPool<UserPassKey,PooledConnectionAndInfo> pool; this.cpds = cpds; this.validationQuery = validationQuery; this.validationQueryTimeout = validationQueryTimeout; this.rollbackAfterValidation = rollbackAfterValidation; this.pool = pool; return pool; pc = cpds.getPooledConnection(); pc = cpds.getPooledConnection(userName, password); if (null == validationQuery) { int timeout = validationQueryTimeout; rset = stmt.executeQuery(validationQuery); if (rollbackAfterValidation) { pool.returnObject(pci.getUserPassKey(), pci); pool.invalidateObject(pci.getUserPassKey(), pci); pool.invalidateObject(info.getUserPassKey(), info); pool.invalidateObject(key, info); // Destroy and update pool counters pool.clear(key); // Remove any idle instances with this key pool.clear(new UserPassKey(userName, null));
0
private static String constructString(final int [] unicodeChars) {
0
* @version CVS $Id: StructJXPathBinding.java,v 1.5 2004/02/03 12:22:08 joerg Exp $ public void doLoad(Widget frmModel, JXPathContext jxpc) throws BindingException {
0
import cz.seznam.euphoria.flink.streaming.StreamingElement; extends AbstractStreamOperator<StreamingElement<WID, Pair<?, ?>>> implements OneInputStreamOperator<I, StreamingElement<WID, Pair<?, ?>>>, /** * Extracts the data element from the input stream record. * * @param record input stream record * * @return extracted data element fro Flink stream record */ if (record.getTimestamp() < timerService.currentWatermark()) { KeyedMultiWindowedElement<WID, KEY, ?> element = recordValue(record); record.getTimestamp(), record.getTimestamp(), new StreamingElement<>(window, Pair.of(key, elem)),
0
@Contract(threading = ThreadingBehavior.STATELESS)
0
import com.google.common.base.Predicate; public void getProperties(Map<String,String> props, Predicate<String> filter) { if (filter.apply(prop.getKey())) if (filter.apply(prop.getKey()))
0
PutArtifactMetadata putMetadata = PutArtifactMetadata.newBuilder() .setMetadata(metadata) .setStagingSessionToken(stagingSessionToken) .build(); return new AutoValue_ArtifactServiceStager_StagingResult(null, failures);
1
* public class HdfsFileProvider extends AbstractOriginatingFileProvider { protected static final Collection<Capability> CAPABILITIES = Collections.unmodifiableCollection(Arrays.asList(new Capability[] {Capability.GET_TYPE, Capability.READ_CONTENT, Capability.URI, Capability.GET_LAST_MODIFIED, Capability.ATTRIBUTES, Capability.RANDOM_ACCESS_READ, Capability.DIRECTORY_READ_CONTENT, Capability.LIST_CHILDREN})); /** * Constructs a new HdfsFileProvider */ public HdfsFileProvider() { super(); this.setFileNameParser(HttpFileNameParser.getInstance()); } /** * @see org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider#doCreateFileSystem(org.apache.commons.vfs2.FileName, * org.apache.commons.vfs2.FileSystemOptions) */ @Override protected FileSystem doCreateFileSystem(final FileName rootName, final FileSystemOptions fileSystemOptions) throws FileSystemException { return new HdfsFileSystem(rootName, fileSystemOptions); } /** * @see org.apache.commons.vfs2.provider.FileProvider#getCapabilities() */ @Override public Collection<Capability> getCapabilities() { return CAPABILITIES; } /** * @see org.apache.commons.vfs2.provider.AbstractFileProvider#getConfigBuilder() */ @Override public FileSystemConfigBuilder getConfigBuilder() { return HdfsFileSystemConfigBuilder.getInstance(); }
0
Method method = Felix.class.getDeclaredMethod("cleanMavenVersion", new Class [] {StringBuilder.class}); StringBuilder sb = new StringBuilder(in);
0
package org.apache.accumulo.server.test.randomwalk.concurrent; import java.util.Properties; import org.apache.accumulo.server.test.randomwalk.State; import org.apache.accumulo.server.test.randomwalk.Test; public class StartAll extends Test { @Override public void visit(State state, Properties props) throws Exception { log.info("Starting all servers"); Runtime.getRuntime().exec(new String[]{System.getenv().get("ACCUMULO_HOME") + "/bin/start-all.sh"}); } }
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. */ * @version CVS $Id: CocoonTask.java,v 1.4 2004/03/05 13:02:42 bdelacretaz Exp $
1
import static org.apache.accumulo.core.conf.Property.INSTANCE_CRYPTO_PREFIX; public static AccumuloConfiguration getAccumuloConfig(String cryptoOn) { ConfigurationCopy cfg = new ConfigurationCopy(DefaultConfiguration.getInstance()); switch (cryptoOn) { case CryptoTest.CRYPTO_ON_CONF: cfg.set(Property.INSTANCE_CRYPTO_SERVICE, "org.apache.accumulo.core.security.crypto.impl.AESCryptoService"); cfg.set(INSTANCE_CRYPTO_PREFIX.getKey() + "key.location", CryptoTest.keyPath); cfg.set(INSTANCE_CRYPTO_PREFIX.getKey() + "key.provider", "uri"); } return cfg;
0
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkArgument; import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkNotNull; import org.apache.beam.vendor.guava.v20_0.com.google.common.base.Objects; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ArrayListMultimap; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Lists; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Maps; import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.Multimap; import org.apache.beam.vendor.guava.v20_0.com.google.common.hash.Hashing;
0
/* * Copyright 2001-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.7 $ $Date: 2004/02/18 01:20:33 $
0
// @formatter:off private ColumnToClassMapping<org.apache.accumulo.core.iterators.aggregation.Aggregator> aggregators; // @formatter:on
0
if (!EXCLUDE.contains(getId(test))) { addTests(child, tests); } "bridge/error/transform", // exclude additional failures appearing under JDK 1.8.0_152 on MacOS "Bug4389.renderingCheck", "Bug4389.ContextrenderingCheck", "Bug6535.ContextrenderingCheck", "Bug17965.renderingCheck", "Bug17965.ContextrenderingCheck", "IdentityTest.renderingCheck", "IdentityTest.ContextrenderingCheck", "rlm.sort", "rlm.containsall", "rlm.removeall", "rlm.retainall", "rlm.merge", "rlm.subtract"
0
@Deprecated @Override ColumnUpdate upd = (ColumnUpdate) obj; return Arrays.equals(getColumnFamily(), upd.getColumnFamily()) && Arrays.equals(getColumnQualifier(), upd.getColumnQualifier()) && Arrays.equals(getColumnVisibility(), upd.getColumnVisibility()) && isDeleted() == upd.isDeleted() && Arrays.equals(getValue(), upd.getValue()) && hasTimestamp() == upd.hasTimestamp() && getTimestamp() == upd.getTimestamp(); @Override public int hashCode() { return Arrays.hashCode(columnFamily) + Arrays.hashCode(columnQualifier) + Arrays.hashCode(columnVisibility) + (hasTimestamp ? (Boolean.TRUE.hashCode() + new Long(timestamp).hashCode()) : Boolean.FALSE.hashCode()) + (deleted ? Boolean.TRUE.hashCode() : (Boolean.FALSE.hashCode() + Arrays.hashCode(val))); }
1
import org.apache.ambari.server.state.ConfigHelper; @Inject private ConfigHelper configHelper; Map<String, Map<String, String>> hostConfigTags = configHelper.getEffectiveDesiredTags(cluster, hostName); Map<String, Map<String, String>> hostConfigurations = configHelper.getEffectiveConfigProperties(cluster, hostConfigTags); execCmd.setConfigurations(hostConfigurations);
0
import org.apache.gearpump.DefaultMessage; new DefaultMessage(
0
import org.apache.felix.dm.annotation.api.dependency.ResourceDependency; import org.apache.felix.dm.annotation.api.dependency.ServiceDependency;
0
* Copyright 1999-2005 The Apache Software Foundation. boolean isTerminatedAfterShutdown();
0
String ONLY_KEYTAB_WRITE = "only_keytab_write";
1
import org.apache.atlas.ApplicationProperties; import org.apache.atlas.ha.HAConfiguration; import org.apache.atlas.listener.ActiveStateChangeHandler; import org.apache.commons.configuration.Configuration; public class GraphBackedSearchIndexer implements SearchIndexer, ActiveStateChangeHandler { AtlasException { this(graphProvider, ApplicationProperties.get()); } GraphBackedSearchIndexer(GraphProvider<TitanGraph> graphProvider, Configuration configuration) throws IndexException, RepositoryException { if (!HAConfiguration.isHAEnabled(configuration)) { initialize(); } /** * Initialize global indices for Titan graph on server activation. * * Since the indices are shared state, we need to do this only from an active instance. */ @Override public void instanceIsActive() throws AtlasException { LOG.info("Reacting to active: initializing index"); try { initialize(); } catch (RepositoryException e) { throw new AtlasException("Error in reacting to active on initialization", e); } catch (IndexException e) { throw new AtlasException("Error in reacting to active on initialization", e); } } @Override public void instanceIsPassive() { LOG.info("Reacting to passive state: No action right now."); }
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.zookeeper.server.admin; import java.io.PrintWriter; import java.util.Map; /** * CommandOutputters are used to format the responses from Commands. * * @see Command * @see JettyAdminServer */ public interface CommandOutputter { /** The MIME type of this output (e.g., "application/json") */ String getContentType(); void output(CommandResponse response, PrintWriter pw); }
1