Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import org.apache.beam.sdk.transforms.OldDoFn; * Returns a {@code Combine.Context} that wraps a {@code OldDoFn.ProcessContext}. public static Context createFromProcessContext(final OldDoFn<?, ?>.ProcessContext c) {
0
import java.util.Set; import org.apache.accumulo.test.functional.ConfigurableMacIT; public class AuditMessageIT extends ConfigurableMacIT { for (MiniAccumuloCluster.LogWriter lw : getCluster().getLogWriters()) { for (File file : getCluster().getConfig().getLogDir().listFiles()) { conn = getConnector(); auditConnector = getCluster().getConnector(AUDIT_USER_1, PASSWORD); Map<String,String> emptyMap = Collections.emptyMap(); Set<String> emptySet = Collections.emptySet(); auditConnector.tableOperations().clone(NEW_TEST_TABLE_NAME, OLD_TEST_TABLE_NAME, true, emptyMap, emptySet); auditConnector = getCluster().getConnector(AUDIT_USER_1, PASSWORD); auditConnector = getCluster().getConnector(AUDIT_USER_1, PASSWORD); File exportDir = new File(getCluster().getConfig().getDir().toString() + "/export"); auditConnector = getCluster().getConnector(AUDIT_USER_1, PASSWORD); auditConnector = getCluster().getConnector(AUDIT_USER_1, PASSWORD);
0
assertEquals(13, allServices.size());
0
import org.apache.beam.sdk.coders.AtomicCoder; import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.coders.CoderException;
0
assertTrue(ScanState.RUNNING.equals(scan.getState()) || ScanState.QUEUED.equals(scan.getState()));
0
import java.util.Collections; return Collections.EMPTY_LIST;
0
import org.apache.accumulo.core.security.tokens.PasswordToken;
0
LOG.debug("Scheduler properties: \n{}", properties); LOG.debug("Using quartz properties: {}", properties);
1
import org.apache.excalibur.source.SourceResolver; * @version CVS $Id: SitemapSource.java,v 1.13 2003/10/19 13:59:21 cziegeler Exp $ /** SourceResolver (for the redirect source) */ private SourceResolver sourceResolver; if ( this.sourceResolver == null ) { this.sourceResolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE); } this.redirectSource = this.sourceResolver.resolveURI(redirectURL); if (this.redirectSource != null) { this.sourceResolver.release(this.redirectSource); } if ( this.sourceResolver != null ) { this.manager.release( this.sourceResolver ); }
0
@Override
0
import org.apache.ambari.server.controller.spi.SystemException; import org.apache.ambari.server.state.Host; String getPublicHostName(String clusterName, String hostName); * Get cluster host info given the host name * @param clusterName * @param hostName the host name * @return the host info {@link Host} */ Host getHost(String clusterName, String hostName); /**
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.http.base.internal.registry; public class PathResolution extends ServletResolution { public String servletPath; public String pathInfo; public String requestURI; public String[] patterns; }
0
* @version $Id$
0
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import org.junit.Before; import org.junit.Test; public class TestDefaultConfigurationKey @Before public void setUp() throws Exception @Test(expected = IllegalArgumentException.class) key.setExpressionEngine(null); @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test @Test(expected = UnsupportedOperationException.class) it.remove(); @Test @Test @Test @Test @Test @Test @Test
0
protected volatile GenericObjectPool<Connection> connectionPool = null;
0
import org.apache.beam.sdk.annotations.Experimental;
0
private String baseURI; public ResolverHttp(String uri, String baseURI) { this.baseURI = baseURI; public ResourceResolverLookup canResolve(String uri, String baseURI) { if (uri == null) { return null; } if (pattern.matcher(uri).matches() || (baseURI != null && pattern.matcher(baseURI).matches())) { public ResourceResolver newInstance(String uri, String baseURI) { return new ResolverHttp(uri, baseURI); URI tmp; if (baseURI == null || "".equals(baseURI)) { tmp = new URI(uri); } else { tmp = new URI(baseURI).resolve(uri); }
0
* @param values The source values - ignored if {@code null}
0
* (Sandbox) A wrapper to an FileObject to get a {@link javax.mail.internet.SharedInputStream}. private SharedRandomContentInputStream(final Set<SharedRandomContentInputStream> createdStreams, final FileObject fo, final long fileStart, final long fileEnd, final InputStream is) throws FileSystemException synchronized (createdStreams) public synchronized int read(final byte[] b, final int off, int len) throws IOException pos += nread; resetCount += nread; pos += nskip; resetCount += nskip; return getFilePosition() + nadd; pos -= resetCount; resetCount = 0; synchronized (createdStreams) final long newFileStart = this.fileStart + start; final long newFileEnd = end < 0 ? this.fileEnd : this.fileStart + end; synchronized (createdStreams) for (final SharedRandomContentInputStream stream : streams) {
0
4, false);
0
public void accept( final Visitor v ) {
0
public void exception(final IOSession session, final Exception cause) { streamMultiplexer.onException(cause); } @Override
0
private final BasicAuthTokenExtractor authTokenExtractor; public RequestBasicAuth() { super(); this.authTokenExtractor = new BasicAuthTokenExtractor(); } context.setAttribute("creds", this.authTokenExtractor.extract(request));
0
* @since 1.6
0
* --tempLocation=gs://YOUR_TEMP_DIRECTORY
0
// Our injected dependency manager
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestFloatListList.java,v 1.3 2003/08/31 17:28:38 scolebourne Exp $ * any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * @version $Revision: 1.3 $ $Date: 2003/08/31 17:28:38 $
0
* @version CVS $Id: ContinuationsManager.java,v 1.5 2003/08/26 09:05:15 mpo Exp $ * @param disposer a <code>ContinuationsDisposer</code> instance to called when * the continuation gets cleaned up. int timeToLive, ContinuationsDisposer disposer);
0
// So this: if (!dfs.setSafeMode(SafeModeAction.SAFEMODE_GET)) return (Boolean) setSafeMode.invoke(dfs, get);
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.dm.benchmark.dependencymanager; import java.util.concurrent.Executor; import org.apache.felix.dm.Component; import org.apache.felix.dm.ComponentExecutorFactory; import org.apache.felix.dm.DependencyManager; import org.apache.felix.dm.benchmark.scenario.Helper; import org.osgi.framework.BundleContext; /** * Parallel version of our default Activator. * * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> */ public class ParallelActivator extends Activator { public void init(BundleContext context, DependencyManager mgr) throws Exception { context.registerService(ComponentExecutorFactory.class.getName(), new ComponentExecutorFactory() { @Override public Executor getExecutorFor(Component component) { return Helper.getThreadPool(); // Return our thread pool shared for all components } }, null); super.init(context, mgr); } }
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
public class ClientH2StreamMultiplexer extends AbstractH2StreamMultiplexer { public ClientH2StreamMultiplexer( final H2StreamListener streamListener) { public ClientH2StreamMultiplexer( public ClientH2StreamMultiplexer( H2StreamHandler createLocallyInitiatedStream( final H2StreamChannel channel, return new ClientH2StreamHandler(channel, httpProcessor, connMetrics, exchangeHandler, H2StreamHandler createRemotelyInitiatedStream( final H2StreamChannel channel, return new ClientPushH2StreamHandler(channel, httpProcessor, connMetrics,
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
TableState tableState = TableManager.getInstance().getTableState(table); if (tableState == null) return null; if (tableState.equals(TableState.ONLINE))
0
import org.apache.accumulo.core.clientImpl.lexicoder.AbstractLexicoderTest;
0
* @version $Revision: 1.14 $ $Date$ throw new SQLNestedException("Cannot get a connection, pool error " + e.getMessage(), e);
0
@Override @Override
0
/** * Sets if this node is visible or not depending on the specified value. * Don't fire a graphicsNodeChange event because this doesn't really * effect us (it effects our children through CSS inheritence). * * @param isVisible If true this node is visible */ public void setVisible(boolean isVisible) { // fireGraphicsNodeChangeStarted(); this.isVisible = isVisible; // fireGraphicsNodeChangeCompleted(); }
0
package org.apache.ambari.server.controller.jdbc;
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/functions/MethodFunction.java,v 1.8 2003/02/07 00:51:41 dmitri Exp $ * $Revision: 1.8 $ * $Date: 2003/02/07 00:51:41 $ import java.lang.reflect.InvocationTargetException; import org.apache.commons.jxpath.util.ValueUtils; * @version $Revision: 1.8 $ $Date: 2003/02/07 00:51:41 $ this.method = ValueUtils.getAccessibleMethod(method); catch (Throwable ex) { if (ex instanceof InvocationTargetException) { ex = ((InvocationTargetException) ex).getTargetException(); } throw new JXPathException("Cannot invoke " + method, ex); public String toString() { return method.toString(); }
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/java/org/apache/commons/beanutils/PropertyUtils.java,v 1.12 2001/09/19 13:58:38 craigmcc Exp $ * $Revision: 1.12 $ * $Date: 2001/09/19 13:58:38 $ * @version $Revision: 1.12 $ $Date: 2001/09/19 13:58:38 $ Introspector.flushCaches();
0
import org.apache.accumulo.core.clientImpl.ClientContext; import org.apache.accumulo.core.clientImpl.ServerClient; import org.apache.accumulo.core.clientImpl.Table; import org.apache.accumulo.core.clientImpl.TabletLocator; import org.apache.accumulo.core.clientImpl.TabletLocator.TabletLocation; import org.apache.accumulo.core.clientImpl.Translator; import org.apache.accumulo.core.clientImpl.Translators; import org.apache.accumulo.core.clientImpl.thrift.ClientService; import org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException; import org.apache.accumulo.core.clientImpl.thrift.ThriftTableOperationException; import org.apache.accumulo.core.dataImpl.KeyExtent; import org.apache.accumulo.core.dataImpl.thrift.TKeyExtent; HashMap<KeyExtent,Map<String,org.apache.accumulo.core.dataImpl.thrift.MapFileInfo>> files = new HashMap<>(); HashMap<String,org.apache.accumulo.core.dataImpl.thrift.MapFileInfo> tabletFiles = new HashMap<>(); org.apache.accumulo.core.dataImpl.thrift.MapFileInfo mfi = new org.apache.accumulo.core.dataImpl.thrift.MapFileInfo(pathSize.estSize);
0
* $Header: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/beanshell/JellyInterpreter.java,v 1.1 2002/03/07 02:46:04 jstrachan Exp $ * $Date: 2002/03/07 02:46:04 $ * $Id: JellyInterpreter.java,v 1.1 2002/03/07 02:46:04 jstrachan Exp $ import org.apache.commons.jelly.JellyContext; /** Integrates BeanShell's interpreter with Jelly's JellyContext private JellyContext context; public JellyContext getJellyContext() { public void setJellyContext(JellyContext context) throws EvalError {
0
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; private final Logger log = LogManager.getLogger(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. */
0
import org.apache.accumulo.core.client.admin.SamplerConfiguration; @Override public void setSamplerConfiguration(SamplerConfiguration samplerConfig) {} @Override public SamplerConfiguration getSamplerConfiguration() { return null; } @Override public void clearSamplerConfiguration() {}
1
package org.w3c.dom.svg; public interface SVGGlyphElement extends SVGElement, SVGStylable { }
1
import com.google.cloud.dataflow.sdk.transforms.DoFn; protected final DoFn<?, KV<K, VO>>.ProcessContext context; DoFn<?, KV<K, VO>>.ProcessContext context, context.windowingInternals().outputWindowedValue(
0
* The {@link UpgradeCheckDescription} is used to provide information about an upgrade public class UpgradeCheckDescription { * The default key to use when creating a new {@link UpgradeCheckDescription} failure. public static final String DEFAULT = "default"; /** * All of the instantiated {@link UpgradeCheckDescription}s. */ private static final Set<UpgradeCheckDescription> s_values = new LinkedHashSet<>(); * a unique identifier for the description container. * the area which is being checked. * a description of what this check is. * the mappings of failure reasons which could potentially happen in * an upgrade check. public UpgradeCheckDescription(String name, UpgradeCheckType type, String description, Map<String, String> fails) { * Gets the unique name of the upgrade check. * public Set<UpgradeCheckDescription> values() { * Gets the area in Ambari that this check is meant for. * UpgradeCheckDescription that = (UpgradeCheckDescription) object;
0
// Spec says we should return null when resources not found, // even though ClassLoader.getResources() returns empty enumeration. Enumeration e = getFramework().getBundleResources(this, name); return ((e == null) || !e.hasMoreElements()) ? null : e;
1
@Override @Override
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/impl/ScriptBlock.java,v 1.11 2003/01/24 05:26:13 morgand Exp $ * $Revision: 1.11 $ * $Date: 2003/01/24 05:26:13 $ * $Id: ScriptBlock.java,v 1.11 2003/01/24 05:26:13 morgand Exp $ * @version $Revision: 1.11 $ public void run(JellyContext context, XMLOutput output) throws JellyException {
0
import org.apache.http.params.CoreConnectionPNames; import org.apache.http.params.CoreProtocolPNames; .setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 5000) .setIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024) .setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK, false) .setBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true) .setParameter(CoreProtocolPNames.ORIGIN_SERVER, "Jakarta-HttpComponents-NIO/1.1");
0
synchronized (this) { // remove logs related to minor compacting data candidates.removeAll(otherLogs); // remove logs related to tablets in memory data candidates.removeAll(currentLogs); // remove logs related to minor compaction file being added to the metadata table candidates.removeAll(doomedLogs); if (doomedLogs.size() > 0) doomedLogs.add(logger); doomedLogs.remove(logger); log.debug("Logs for memory compacted: " + getExtent() + " " + logger); Set<String> doomed = new HashSet<>(); for (DfsLogger logger : doomedLogs) { log.debug("Logs to be destroyed: " + getExtent() + " " + logger.getMeta()); doomed.add(logger.getMeta()); doomedLogs.clear(); // logs related to minor compaction file being added to the metadata table private Set<DfsLogger> doomedLogs = new HashSet<>();
0
public BeamSqlPrimitive<Boolean> evaluate(BeamSqlRow inputRow) { Object leftValue = operands.get(0).evaluate(inputRow).getValue(); Object rightValue = operands.get(1).evaluate(inputRow).getValue();
0
* Copyright 1999-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 CVS $Id: Publisher.java,v 1.2 2004/03/05 13:02:11 bdelacretaz Exp $
1
* cluster id protected Long clusterId; public Long getClusterId() { return clusterId;
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.gvt.renderer; import java.awt.image.BufferedImage; /** * Interface for GVT renderer factory. * * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a> * @version $Id$ */ public interface RendererFactory { /** * Creates a new renderer. * @param im The buffered image used to render. */ Renderer createRenderer(BufferedImage im); }
1
import org.apache.hadoop.metadata.web.util.Servlets; Assert.assertNotNull(response.get(Servlets.REQUEST_ID)); JSONObject results = response.getJSONObject(Servlets.RESULTS); Assert.assertNotNull(response.get(Servlets.REQUEST_ID)); Assert.assertNotNull(response.get(Servlets.REQUEST_ID)); Assert.assertNotNull(response.get(Servlets.REQUEST_ID)); String guid = response.get(Servlets.RESULTS).toString();
0
import org.apache.accumulo.harness.SharedMiniClusterIT; public class CleanUpIT extends SharedMiniClusterIT {
0
// Check if the system tmp dir exists File tmp = new File(System.getProperty("java.io.tmpdir")); if (tmp != null && ! tmp.exists()) { tmp.mkdirs(); }
0
private final HttpServletRequest request;
0
TypeSystem.getInstance().getDataType(ClassType.class, i.dataType().getName());
0
* @version CVS $Id: XSPRequestHelper.java,v 1.1 2004/03/10 12:58:05 stephan Exp $
0
import org.apache.commons.lang.StringEscapeUtils; * @version CVS $Id: SQLTransformer.java,v 1.19 2004/03/28 14:28:04 antonio Exp $ substitute = StringEscapeUtils.escapeSql(substitute); value = StringEscapeUtils.escapeSql(value); value = StringUtils.replace( value, "\\", "\\\\" ); if (StringUtils.isEmpty(name)) { if (StringUtils.isNotEmpty(prefix)) {
0
// Don't actually close the connection if in a transaction. The // connection will be closed by the transactionComplete method. super.close(); super.close(); // way to report the error.
0
throw new ConfigurationException(e.getMessage(), e);
0
/** Pattern for PASV mode responses. Groups: (n,n,n,n),(n),(n) */ private static final java.util.regex.Pattern __PARMS_PAT; __PARMS_PAT = java.util.regex.Pattern.compile( "(\\d{1,3},\\d{1,3},\\d{1,3},\\d{1,3}),(\\d{1,3}),(\\d{1,3})"); java.util.regex.Matcher m = __PARMS_PAT.matcher(reply); __passiveHost = m.group(1).replace(',', '.'); // Fix up to look like IP address int oct1 = Integer.parseInt(m.group(2)); int oct2 = Integer.parseInt(m.group(3)); "Could not parse passive port information.\nServer Reply: " + reply); try { InetAddress host = InetAddress.getByName(__passiveHost); // reply is a local address, but target is not - assume NAT box changed the PASV reply if (host.isSiteLocalAddress() && !getRemoteAddress().isSiteLocalAddress()){ String hostAddress = getRemoteAddress().getHostAddress(); if (_commandSupport_.getListenerCount() > 0) { _commandSupport_.fireReplyReceived(0, "[Replacing site local address "+__passiveHost+" with "+hostAddress+"]\n"); } __passiveHost = hostAddress; } } catch (UnknownHostException e) { // Should not happen as we are passing in an IP address throw new MalformedServerReplyException( "Could not parse passive host information.\nServer Reply: " + reply); }
0
import org.apache.aurora.common.testing.easymock.EasyMockTest;
0
* * * * @version $Revision: 1.10 $ /** */ //------------------------------------------------------------------------- /**
1
import org.apache.commons.bcel6.Const; super(Const.CONSTANT_Long);
0
import java.util.Collection; import org.apache.ambari.server.orm.entities.RepositoryVersionEntity; import org.apache.ambari.server.orm.entities.ServiceComponentDesiredStateEntity; import org.apache.ambari.server.state.UpgradeState; /** * {@inheritDoc} */ @Override public boolean isRepositoryVersionCorrect(RepositoryVersionEntity repositoryVersion) throws AmbariException { HostEntity hostEntity = getHostEntity(); Collection<HostComponentStateEntity> hostComponentStates = hostEntity.getHostComponentStateEntities(); // for every host component, if it matches the desired repo and has reported // the correct version then we're good for (HostComponentStateEntity hostComponentState : hostComponentStates) { ServiceComponentDesiredStateEntity desiredComponmentState = hostComponentState.getServiceComponentDesiredStateEntity(); RepositoryVersionEntity desiredRepositoryVersion = desiredComponmentState.getDesiredRepositoryVersion(); ComponentInfo componentInfo = ambariMetaInfo.getComponent( desiredRepositoryVersion.getStackName(), desiredRepositoryVersion.getStackVersion(), hostComponentState.getServiceName(), hostComponentState.getComponentName()); // skip components which don't advertise a version if (!componentInfo.isVersionAdvertised()) { continue; } // we only care about checking the specified repo version for this host if (!repositoryVersion.equals(desiredRepositoryVersion)) { continue; } String versionAdvertised = hostComponentState.getVersion(); if (hostComponentState.getUpgradeState() == UpgradeState.IN_PROGRESS || !StringUtils.equals(versionAdvertised, repositoryVersion.getVersion())) { return false; } } return true; }
0
// Force the descriptor version (since 1.4.1) public static final String COMPONENT_DS_SPEC_VERSION = "specVersion"; // Specification version identifier for SCR 1.0 (R 4.1) public static final String COMPONENT_DS_SPEC_VERSION_10 = "1.0"; // Specification version identifier for SCR 1.1 (R 4.2) public static final String COMPONENT_DS_SPEC_VERSION_11 = "1.1";
0
import java.util.concurrent.CopyOnWriteArrayList; private List<DiskInfo> disksInfo = new CopyOnWriteArrayList<DiskInfo>();
0
runTMP = cl.loadClass("org.apache.accumulo.server.init.Initialize");
0
@Override @Override @Override @Override
0
import org.apache.cocoon.portal.event.coplet.AbstractCopletInstanceEvent; extends AbstractCopletInstanceEvent {
0
import org.apache.accumulo.core.client.AccumuloClient; AccumuloClient conn = AccumuloClient.builder().usingClientInfo(getClientInfo())
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.atlas.listener; import org.apache.atlas.exception.AtlasBaseException; public interface TypeDefChangeListener { void onChange(ChangedTypeDefs changedTypeDefs) throws AtlasBaseException; }
0
* @version $Revision$ $Date$
0
/** * Test the <code>flush()</code> method. * @throws Exception */ @Test public void testFlush() throws Exception { try (ClosedOutputStream cos = new ClosedOutputStream()) { cos.flush(); fail("flush()"); } catch (final IOException e) { // expected } }
0
return SVGValueConstants.CSS_FILL_PROPERTY; return new CSSOMReadOnlyValue (new ImmutableRGBColor(new CSSOMReadOnlyValue(SVGValueConstants.NUMBER_0), new CSSOMReadOnlyValue(SVGValueConstants.NUMBER_0), new CSSOMReadOnlyValue(SVGValueConstants.NUMBER_0))); styleDeclaration.getPropertyCSSValue (SVGValueConstants.CSS_COLOR_PROPERTY),
0
Config amsEnv = cluster.getDesiredConfigByType(AMS_ENV); if (amsHbaseEnv != null) { Map<String, String> amsHbaseEnvProperties = amsEnv.getProperties(); String content = amsHbaseEnvProperties.get("content"); Map<String, String> newProperties = new HashMap<>(); newProperties.put("content", updateAmsEnvContent(content)); updateConfigurationPropertiesForCluster(cluster, AMS_ENV, newProperties, true, true); } protected String updateAmsEnvContent(String content) { if (content == null) { return null; } if (!content.contains("AMS_COLLECTOR_GC_OPTS")) { content += "\n" + "# AMS Collector GC options\n" + "export AMS_COLLECTOR_GC_OPTS=\"-XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=70 " + "-XX:+UseCMSInitiatingOccupancyOnly -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps " + "-XX:+UseGCLogFileRotation -XX:GCLogFileSize=10M " + "-Xloggc:{{ams_collector_log_dir}}/collector-gc.log-`date +'%Y%m%d%H%M'`\"\n" + "export AMS_COLLECTOR_OPTS=\"$AMS_COLLECTOR_OPTS $AMS_COLLECTOR_GC_OPTS\"\n"; } return content; }
0
<T> OutputReceiver<T> get(TupleTag<T> tag);
0
.setSoTimeout(params.getIntParameter(CoreConnectionPNames.SO_TIMEOUT, 0)) .setSoReuseAddress(params.getBooleanParameter(CoreConnectionPNames.SO_REUSEADDR, false)) .setSoKeepAlive(params.getBooleanParameter(CoreConnectionPNames.SO_KEEPALIVE, false)) .setSoLinger(params.getIntParameter(CoreConnectionPNames.SO_LINGER, -1)) .setTcpNoDelay(params.getBooleanParameter(CoreConnectionPNames.TCP_NODELAY, true)) final String csname = (String) params.getParameter(CoreProtocolPNames.HTTP_ELEMENT_CHARSET);
0
import org.apache.cocoon.util.AbstractLogEnabled; * @version $Id$ implements CronJob, Serviceable {
0
* A restricted implementation of {@link Map.Entry} that prevents * the {@link Map.Entry} contract from being broken. * @version $Id$
0
static final String SUCCESSFUL_OPERATION = "Successful operation"; static final String REQUEST_ACCEPTED = "Request is accepted, but not completely processed yet"; static final String INVALID_ARGUMENTS = "Invalid arguments"; static final String CLUSTER_NOT_FOUND = "Cluster not found"; static final String CLUSTER_OR_HOST_NOT_FOUND = "Cluster or host not found"; static final String NOT_AUTHENTICATED = "Not authenticated"; static final String PERMISSION_DENIED = "Not permitted to perform the operation"; static final String SERVER_ERROR = "Internal server error"; static final String QUERY_FIELDS = "fields"; static final String QUERY_FILTER_DESCRIPTION = "Filter fields in the response (identifier fields are mandatory)"; static final String QUERY_SORT = "sortBy"; static final String QUERY_SORT_DESCRIPTION = "Sort resources in result by (asc | desc)"; static final String QUERY_PAGE_SIZE = "page_size"; static final String QUERY_PAGE_SIZE_DESCRIPTION = "The number of resources to be returned for the paged response."; static final String DEFAULT_PAGE_SIZE = "10"; static final String QUERY_FROM = "from"; static final String QUERY_FROM_DESCRIPTION = "The starting page resource (inclusive). \"start\" is also accepted."; static final String QUERY_FROM_TYPE = "integer"; static final String QUERY_FROM_VALUES = "range[0, infinity]"; static final String DEFAULT_FROM = "0"; static final String QUERY_TO = "to"; static final String QUERY_TO_DESCRIPTION = "The ending page resource (inclusive). \"end\" is also accepted."; static final String QUERY_TO_TYPE = "integer"; static final String QUERY_TO_VALUES = "range[1, infinity]";
0
// TODO(wfarner): Provide status information about cron jobs here. try { .setMessage("Tasks will be killed."); } catch (ScheduleException e) { response.setResponseCode(ResponseCode.INVALID_REQUEST) .setMessage(e.getMessage());
0
public Bridge getInstance(){ return this; }
0
* Implementation of the {@link DynamicPropertyHandler} interface that provides * access to attributes of a {@link PageScopeContext}.
1
import static org.apache.ambari.server.events.AlertDefinitionEventType.CREATE; import org.apache.ambari.server.events.AlertDefinitionEventType; import org.apache.ambari.server.events.AlertDefinitionsAgentUpdateEvent; public class AlertDefinitionsHolder extends AgentHostDataHolder<AlertDefinitionsAgentUpdateEvent> { protected AlertDefinitionsAgentUpdateEvent getCurrentData(Long hostId) throws AmbariException { return new AlertDefinitionsAgentUpdateEvent(CREATE, result, hostName, hostId); protected AlertDefinitionsAgentUpdateEvent getEmptyData() { return AlertDefinitionsAgentUpdateEvent.emptyEvent(); protected boolean handleUpdate(AlertDefinitionsAgentUpdateEvent update) throws AmbariException { private void safelyUpdateData(AlertDefinitionsAgentUpdateEvent event) { public void provideAlertDefinitionAgentUpdateEvent(AlertDefinitionEventType eventType, Long clusterId, Map<Long, AlertDefinition> alertDefinitions, String hostName) throws AmbariException { Long hostId = clusters.get().getHost(hostName).getHostId(); Map<Long, AlertCluster> update = Collections.singletonMap(clusterId, new AlertCluster(alertDefinitions, hostName)); AlertDefinitionsAgentUpdateEvent event = new AlertDefinitionsAgentUpdateEvent(eventType, update, hostName, hostId); safelyUpdateData(event);
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
* @version CVS $Id: DefaultPortalComponentManager.java,v 1.2 2003/10/06 15:22:36 vgritsenko Exp $ if (this.manager != null) { while (i.hasNext()) { this.rendererSelector.release((Component) i.next()); this.manager.release((Component)this.copletFactory); this.manager.release((Component)this.layoutFactory); this.manager = null;
0
getTabletServer().getFileSystem(), tableConfiguration, sc, ic, context); tableConfiguration, context); MajorCompactionReason.USER, tableConfiguration, context);
0
* @version CVS $Id: GIFSourceInspector.java,v 1.5 2003/09/24 22:34:53 cziegeler Exp $ int w1 = (buf[6] & 0xff) | (buf[6] & 0x80); int w2 = (buf[7] & 0xff) | (buf[7] & 0x80); int h1 = (buf[8] & 0xff) | (buf[8] & 0x80); int h2 = (buf[9] & 0xff) | (buf[9] & 0x80);
0
import com.google.gson.Gson; import com.google.inject.Scopes; import com.google.inject.assistedinject.FactoryModuleBuilder; import com.google.inject.persist.jpa.JpaPersistModule; import org.apache.ambari.server.configuration.Configuration; import org.apache.ambari.server.state.*; import org.apache.ambari.server.state.cluster.ClusterFactory; import org.apache.ambari.server.state.cluster.ClusterImpl; import org.apache.ambari.server.state.host.HostFactory; import org.apache.ambari.server.state.host.HostImpl; import org.apache.ambari.server.state.svccomphost.ServiceComponentHostImpl; import java.util.Properties; private final Configuration configuration; public ControllerModule() { configuration = new Configuration(); } public ControllerModule(Properties properties) { configuration = new Configuration(properties); } bind(Configuration.class).toInstance(configuration); install(new JpaPersistModule(configuration.getPersistenceType().getUnitName())); install(new FactoryModuleBuilder().implement(Cluster.class, ClusterImpl.class).build(ClusterFactory.class)); install(new FactoryModuleBuilder().implement(Host.class, HostImpl.class).build(HostFactory.class)); install(new FactoryModuleBuilder().implement(Service.class, ServiceImpl.class).build(ServiceFactory.class)); install(new FactoryModuleBuilder().implement(ServiceComponent.class, ServiceComponentImpl.class).build(ServiceComponentFactory.class)); install(new FactoryModuleBuilder().implement(ServiceComponentHost.class, ServiceComponentHostImpl.class).build(ServiceComponentHostFactory.class)); bind(Gson.class).in(Scopes.SINGLETON);
0
import com.twitter.aurora.gen.storage.storageConstants; new Transaction(ImmutableList.copyOf(ops), storageConstants.CURRENT_SCHEMA_VERSION));
0
package org.apache.bcel.generic; import org.apache.bcel.Const; import org.apache.bcel.ExceptionConst;
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may 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