Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
LifecycleHelper.setupComponent(cl, this.getLogger(), context, newManager, appContainer);
0
import org.apache.beam.model.fnexecution.v1.BeamFnApi.StateGetResponse; import org.apache.beam.model.fnexecution.v1.BeamFnApi.StateRequest; import org.apache.beam.model.fnexecution.v1.BeamFnApi.StateResponse;
0
import java.util.concurrent.CountDownLatch; import com.twitter.common.args.Arg; import com.twitter.common.args.CmdLine; import com.twitter.common.quantity.Amount; import com.twitter.common.quantity.Time; class SchedulerLifecycle implements RegisteredListener { @CmdLine(name = "max_registration_delay", help = "Max allowable delay to allow the driver to register before aborting") private static final Arg<Amount<Long, Time>> MAX_REGISTRATION_DELAY = Arg.create(Amount.of(1L, Time.MINUTES)); private final CountDownLatch registeredLatch = new CountDownLatch(1); @Override public void registered(String frameworkId) throws RegisterHandlingException { registeredLatch.countDown(); } private void startDaemonThread(String name, Runnable work) { new ThreadFactoryBuilder() .setNameFormat(name + "-%d") .setDaemon(true) .build() .newThread(work) .start(); } startDaemonThread("Driver-Runner", new Runnable() { @Override public void run() { Protos.Status status = driver.run(); LOG.info("Driver completed with exit code " + status); lifecycle.shutdown(); } }); startDaemonThread("Driver-Register-Watchdog", new Runnable() { @Override public void run() { LOG.info(String.format("Waiting up to %s for scheduler registration.", MAX_REGISTRATION_DELAY.get())); try { boolean registered = registeredLatch.await( MAX_REGISTRATION_DELAY.get().getValue(), MAX_REGISTRATION_DELAY.get().getUnit().getTimeUnit()); if (!registered) { LOG.severe("Framework has not been registered within the tolerated delay, quitting."); } catch (InterruptedException e) { LOG.log(Level.WARNING, "Delayed registration check interrupted.", e); Thread.currentThread().interrupt(); } } });
0
import org.apache.sshd.common.util.security.SecurityUtils;
0
import org.apache.http.util.Asserts; Asserts.check(!this.triggered, "Response already triggered"); Asserts.check(!this.triggered, "Response already triggered"); Asserts.check(!this.triggered, "Response already triggered");
0
new HashMap<>(length);
0
public void write(int b) throws IOException { if (!this.buffer.hasRemaining()) { flushBuffer(); } this.buffer.put((byte)b); }
0
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
0
import org.apache.sshd.util.test.JUnitTestSupport; public class SignatureDSATest extends JUnitTestSupport {
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
tableRowCoder.encode(value.tableRow, outStream); tableRowCoder.decode(inStream),
0
import org.apache.commons.jelly.util.ClassLoaderUtils; Class clazz = ClassLoaderUtils.loadClass(m_classToBeLoaded, getClass());
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.test; import org.apache.batik.test.xml.XMLTestReportProcessor; /** * This implementation of the <tt>TestReportProcessor</tt> interface * converts the <tt>TestReports</tt> it processes into an * XML document that it outputs in a directory. The directory * used by the object can be configured at creation time. * * @author <a href="mailto:[email protected]">Vincent Hardy</a> * @version $Id$ */ public class SVGAccuracyTestProcessor extends XMLTestReportProcessor{ }
0
package org.apache.felix.ipojo.test.scenarios.factories; import java.util.Properties; import org.apache.felix.ipojo.ComponentFactory; import org.apache.felix.ipojo.ComponentInstance; import org.apache.felix.ipojo.ConfigurationException; import org.apache.felix.ipojo.MissingHandlerException; import org.apache.felix.ipojo.UnacceptableConfiguration; import org.apache.felix.ipojo.junit4osgi.OSGiTestCase; import org.apache.felix.ipojo.test.scenarios.util.Utils; public class ReconfigurationTest extends OSGiTestCase { public void testRevalidationOnREconfiguration() { ComponentFactory factory = (ComponentFactory) Utils.getFactoryByName(getContext(), "org.apache.felix.ipojo.test.scenarios.component.ReconfigurableSimpleType"); // First inject a configuration triggering an exception of the validate method. Properties props = new Properties(); props.put("prop", "KO"); ComponentInstance ci = null; try { ci = factory.createComponentInstance(props); } catch (UnacceptableConfiguration e) { e.printStackTrace(); } catch (MissingHandlerException e) { e.printStackTrace(); } catch (ConfigurationException e) { e.printStackTrace(); } assertNotNull(ci); assertEquals("instance invalid", ComponentInstance.STOPPED, ci.getState()); // Reconfigure props = new Properties(); props.put("prop", "OK"); ci.reconfigure(props); assertNotNull(ci); assertEquals("instance valid", ComponentInstance.VALID, ci.getState()); } }
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
* 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
1
import java.awt.Color; if (useHinting && (fillPaint != null) && !(fillPaint instanceof Color)) // The coordinate system is different for drawGlyphVector. // So complex paints aren't positioned properly. useHinting = false;
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
package org.apache.atlas.repository.store.graph.v2; import org.apache.atlas.RequestContext; public abstract class InverseReferenceUpdateV2Test { RequestContext.clear(); RequestContext.get().setUser(TestUtilsV2.TEST_USER, null); RequestContext.clear(); RequestContext.get().setUser(TestUtilsV2.TEST_USER, null);
1
import org.apache.accumulo.core.security.tokens.AuthenticationToken;
0
* Verify that acl optimization of storing just * a few acls and there references in the data assertTrue("waiting for server being up", /* * (non-Javadoc) * */ { startSignal.countDown();
0
import org.apache.ambari.server.orm.entities.ViewEntity; import org.apache.ambari.server.orm.entities.ViewEntityTest; import org.apache.ambari.server.orm.entities.ViewInstanceEntity; import org.apache.ambari.server.orm.entities.ViewInstanceEntityTest; ViewEntity viewDefinition = ViewEntityTest.getViewEntity(); Collection<ViewEntity> viewDefinitions = registry.getDefinitions(); ViewEntity viewDefinition = ViewEntityTest.getViewEntity(); ViewInstanceEntity viewInstanceDefinition = ViewInstanceEntityTest.getViewInstanceEntity(); Collection<ViewInstanceEntity> viewInstanceDefinitions = registry.getInstanceDefinitions(viewDefinition); ViewEntity viewDefinition = ViewEntityTest.getViewEntity(); public void testAddInstanceDefinition() throws Exception { ViewEntity viewEntity = ViewEntityTest.getViewEntity(); ViewInstanceEntity viewInstanceEntity = new ViewInstanceEntity(viewEntity, instanceConfig); registry.addDefinition(viewEntity); registry.addInstanceDefinition(viewEntity, viewInstanceEntity); Collection<ViewInstanceEntity> viewInstanceDefinitions = registry.getInstanceDefinitions(viewEntity); Assert.assertEquals(viewInstanceEntity, viewInstanceDefinitions.iterator().next());
0
conn.setClosedInternal(true);
0
private SparkJobServerDriver.SparkServerConfiguration configuration; public static SparkJobInvoker create( SparkJobServerDriver.SparkServerConfiguration configuration) { return new SparkJobInvoker(configuration); private SparkJobInvoker(SparkJobServerDriver.SparkServerConfiguration configuration) { this.configuration = configuration; if (sparkOptions.getSparkMaster().equals(SparkPipelineOptions.DEFAULT_MASTER_URL)) { sparkOptions.setSparkMaster(configuration.getSparkMasterUrl()); }
0
private final boolean isBoundedSource; this.isBoundedSource = false; } public ApexReadUnboundedInputOperator(UnboundedSource<OutputT, CheckpointMarkT> source, boolean isBoundedSource, ApexPipelineOptions options) { this.pipelineOptions = new SerializablePipelineOptions(options); this.source = source; this.isBoundedSource = isBoundedSource; this.pipelineOptions = null; this.source = null; this.isBoundedSource = false; if (!available && (isBoundedSource || source instanceof ValuesSource)) {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/test/org/apache/commons/digester/RegexRulesTestCase.java,v 1.3 2003/10/05 15:35:36 rdonkin Exp $ * $Revision: 1.3 $ * $Date: 2003/10/05 15:35:36 $ * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * notice, this list of conditions and the following disclaimer. * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgement: * "This product includes software developed by the * 4. The names "Apache", "The Jakarta Project", "Commons", and "Apache Software * from this software without prior written permission. For written * 5. Products derived from this software may not be called "Apache", * "Apache" nor may "Apache" appear in their names without prior * written permission of the Apache Software Foundation. */ * @version $Revision: 1.3 $ $Date: 2003/10/05 15:35:36 $
0
long timeCreated = 0; Map<String,Long> fileToTimeCreated = new HashMap<>(); m.put(ReplicationSection.COLF, new Text(Integer.toString(index)), StatusUtil.fileCreatedValue(timeCreated)); fileToTimeCreated.put(file, timeCreated); timeCreated++; timeCreated = fileToTimeCreated.get(file.toString()); Assert.assertNotNull(timeCreated); Assert.assertEquals(StatusUtil.fileCreated(timeCreated), Status.parseFrom(entry.getValue().get())); long timeCreated = 0; m.put(ReplicationSection.COLF, new Text(Integer.toString(index)), StatusUtil.fileCreatedValue(timeCreated)); timeCreated++; Status stat = Status.newBuilder().setBegin(0).setEnd(0).setInfiniteEnd(true).setClosed(true).setCreatedTime(System.currentTimeMillis()).build(); statBuilder.setCreatedTime(time++);
0
import java.nio.charset.Charset; AccumuloInputFormat.setConnectorInfo(job, args[0], args[1].getBytes(Charset.forName("UTF-8"))); AccumuloOutputFormat.setConnectorInfo(job, args[0], args[1].getBytes(Charset.forName("UTF-8")));
0
boolean configsChanged = false; if (configsChanged) { m_metadataHolder.get().updateData(m_controllerProvider.get().getClusterMetadataOnConfigsUpdate(cluster)); m_agentConfigsHolder.get().updateData(cluster.getClusterId(), null);
0
* @version CVS $Id: DeliImpl.java,v 1.6 2003/09/25 16:59:19 butlermh Exp $ private String deliConfig = "WEB-INF/deli/config/deliConfig.xml"; // Workspace.getInstance().configure(this.servletContext, this.deliConfig);
0
import java.util.regex.Pattern; private String valueBorders = null; valueBorders = getStringValue("value_borders"); String splitPattern = Pattern.quote(fieldSplit); String[] tokens = valueObj.toString().split(splitPattern); for (String nv : tokens) { String[] nameValue = getNameValue(nv); String name = nameValue != null && nameValue.length == 2 ? nameValue[0] : null; String value = nameValue != null && nameValue.length == 2 ? nameValue[1] : null; if (name != null && value != null) { } else { logParseError("name=" + name + ", pair=" + nv + ", field=" + sourceField + ", field_value=" + valueObj); private String[] getNameValue(String nv) { if (valueBorders != null) { if (nv.charAt(nv.length() - 1) == valueBorders.charAt(1)) { String splitPattern = Pattern.quote("" + valueBorders.charAt(0)); return nv.substring(0, nv.length() - 1).split(splitPattern); } else { return null; } } else { String splitPattern = Pattern.quote(valueSplit); return nv.split(splitPattern); } }
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 java.io.Serializable; public final class ContentType implements Serializable { private static final long serialVersionUID = -7768694718232371896L;
0
/** * A byte sequence that precedes a boundary (<code>CRLF--</code>). */ protected static final byte[] BOUNDARY_PREFIX = { CR, LF, DASH, DASH}; /** * The number of bytes, over and above the boundary size, to use for the * keep region. */ private static final int KEEP_REGION_PAD = 3; this.boundary = new byte[boundary.length + BOUNDARY_PREFIX.length]; this.boundaryLength = boundary.length + BOUNDARY_PREFIX.length; this.keepRegion = boundary.length + KEEP_REGION_PAD; System.arraycopy(BOUNDARY_PREFIX, 0, this.boundary, 0, BOUNDARY_PREFIX.length); System.arraycopy(boundary, 0, this.boundary, BOUNDARY_PREFIX.length, boundary.length); if (boundary.length != boundaryLength - BOUNDARY_PREFIX.length) { System.arraycopy(boundary, 0, this.boundary, BOUNDARY_PREFIX.length, boundary.length);
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.configuration.beanutils; import java.util.ArrayList; import java.util.List; /** * A simple bean class used for testing bean creation operations that has * a list of children of a different bean type. * * @version $Id: $ */ public class BeanCreationTestBeanWithListChild { private String stringValue; private int intValue; private List<BeanCreationTestBean> children = new ArrayList<BeanCreationTestBean>(); public List<BeanCreationTestBean> getChildren() { return children; } public void setChildren(List<BeanCreationTestBean> buddies) { this.children.clear(); this.children.addAll(buddies); } public int getIntValue() { return intValue; } public void setIntValue(int intValue) { this.intValue = intValue; } public String getStringValue() { return stringValue; } public void setStringValue(String stringValue) { this.stringValue = stringValue; } }
0
case THREADED_SELECTOR: log.debug("Instantiating default, unsecure Threaded selector Thrift server"); serverAddress = createThreadedSelectorServer(address, processor, protocolFactory, serverName, numThreads, numSTThreads, timeBetweenThreadChecks, maxMessageSize); break; throw new IllegalArgumentException("Unknown server type " + serverType);
0
import java.lang.reflect.Field; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(TransformTranslator.class);
0
StrLookup lookup = (StrLookup) BeanHelper.createBean(decl); BeanHelper.setProperty(lookup, "configuration", this); ConfigurationInterpolator.registerGlobalLookup(key, lookup);
0
private static final long serialVersionUID = 0;
0
import org.apache.hc.client5.http.auth.AuthSchemes; import org.apache.hc.client5.http.cookie.CookieSpecs; .setCookieSpec(CookieSpecs.STANDARD.ident) .setTargetPreferredAuthSchemes(Arrays.asList(AuthSchemes.NTLM.ident, AuthSchemes.DIGEST.ident)) .setProxyPreferredAuthSchemes(Arrays.asList(AuthSchemes.BASIC.ident))
0
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlJavaTypeAdapter(JaxbAbstractIdSerializer.class)
0
* or more contributor license agreements. See the NOTICE file * regarding copyright ownership. The ASF licenses this file * with the License. You may obtain a copy of the License at * KIND, either express or implied. See the License for the
0
import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
0
import org.apache.beam.runners.core.construction.TransformInputs; new DoFn<KV<String, Integer>, Integer>() { @StateId(stateId) private final StateSpec<ValueState<String>> spec = StateSpecs.value(StringUtf8Coder.of()); @ProcessElement public void process(ProcessContext c) {} }, mainOutput, TupleTagList.empty(), Collections.<PCollectionView<?>>emptyList())) when(mockExecutionContext.getStepContext(anyString())).thenReturn(mockStepContext); new DoFn<KV<String, Integer>, Integer>() { @StateId(stateId) private final StateSpec<ValueState<String>> spec = StateSpecs.value(StringUtf8Coder.of()); @ProcessElement public void process(ProcessContext c) {} }, mainOutput, TupleTagList.empty(), Collections.<PCollectionView<?>>singletonList(sideInput))) when(mockExecutionContext.getStepContext(anyString())).thenReturn(mockStepContext); WindowedValue<KV<String, Integer>> firstKv = WindowedValue.of(KV.of(key, 1), new Instant(3), firstWindow, PaneInfo.NO_FIRING); Iterables.getOnlyElement( TransformInputs.nonAdditionalInputs(producingTransform))) TransformResult<KeyedWorkItem<String, KV<String, Integer>>> result = evaluator.finishBundle();
0
import org.apache.ambari.server.audit.AuditLoggerModule; injector = Guice.createInjector(new AuditLoggerModule(), new ControllerModule(properties)); injector = Guice.createInjector(new AuditLoggerModule(), new ControllerModule(properties));
1
@SuppressWarnings("checkstyle:anoninnerlength") private Iterator<KeyPair> currentIdentities; currentPair = KeyIdentityProvider.exhaustCurrentIdentities(currentIdentities); if (currentPair != null) { return true; } Iterable<KeyPair> ids; ids = loadClientIdentities(session, l); currentIdentities = (ids == null) ? null : ids.iterator(); currentPair = KeyIdentityProvider.exhaustCurrentIdentities(currentIdentities); protected Iterable<KeyPair> loadClientIdentities(SessionContext session, NamedResource location) return loader.loadClientIdentities(session, location, getFilePasswordProvider());
0
sideInput.getTagInternal().getId(), ParDoTranslation.translateView(sideInput));
0
* @author <A HREF="mailto:[email protected]">M. Dahm</A>
0
Service srv = dm.createBundleAdapterService(stateMask, filter, propagate) .setInterface(service, properties) .setImplementation(adapterImpl);
0
TSaslClientTransport transport = new TSaslClientTransport("GSSAPI", null, proxyPrimary, hostname, Collections.singletonMap("javax.security.sasl.qop", "auth"), null, socket); TSaslClientTransport transport = new TSaslClientTransport("GSSAPI", null, proxyPrimary, hostname, Collections.singletonMap("javax.security.sasl.qop", "auth"), null, socket);
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
/* * 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 java.util.SortedSet; import java.util.TreeSet; * @version CVS $Id: RequestParameterModule.java,v 1.2 2003/04/23 13:37:35 haul Exp $ SortedSet names = new TreeSet(); Enumeration allNames = request.getParameterNames(); while (allNames.hasMoreElements()) { String pname = (String) allNames.nextElement(); names.add(pname); List values = new LinkedList(); Iterator j = names.iterator(); while (j.hasNext()){ String pname = (String) j.next(); values.add( request.getParameter( pname ) ); }
0
import org.apache.avalon.framework.service.ServiceManager; import org.apache.cocoon.core.container.AbstractComponentHandler; * @version CVS $Id$ public AbstractComponentHandler getHandler(ServiceManager manager, Context context) throws Exception { return AbstractComponentHandler.getComponentHandler( clazz, config, manager, context, null, null, null);
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
import com.google.inject.Singleton;
0
throws CSSException { return new CSSAndCondition(first, second); throws CSSException { throw new CSSException("Not implemented in CSS2"); throws CSSException { throw new CSSException("Not implemented in CSS2"); boolean typeNode, boolean type) throws CSSException { throw new CSSException("Not implemented in CSS2"); String namespaceURI, boolean specified, String value) throws CSSException { return new CSSAttributeCondition(localName, namespaceURI, specified, return new CSSIdCondition(idNamespaceURI, idLocalName, value); return new CSSLangCondition(lang); String nsURI, boolean specified, String value) throws CSSException { return new CSSOneOfAttributeCondition(localName, nsURI, specified, throws CSSException { return new CSSBeginHyphenAttributeCondition (localName, namespaceURI, specified, value); String value) throws CSSException { return new CSSClassCondition(classLocalName, classNamespaceURI, value); String value) throws CSSException { return new CSSPseudoClassCondition(namespaceURI, value); throw new CSSException("Not implemented in CSS2"); throw new CSSException("Not implemented in CSS2"); throw new CSSException("Not implemented in CSS2");
1
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
0
* Autogenerated by Thrift Compiler (0.10.0) public enum CompactionReason implements org.apache.thrift.TEnum {
0
protected void handleError(final HttpRequest promise, final Exception cause) { } public void failed(final Exception cause) { handleError(promise, cause); responseConsumer.failed(cause);
0
public static final Map<String,Set<Text>> LOCALITY_GROUPS = ImmutableMap.of(STATUS_LG_NAME, STATUS_LG_COLFAMS, WORK_LG_NAME, WORK_LG_COLFAMS); public static BatchScanner getBatchScanner(Connector conn, int queryThreads) throws ReplicationTableOfflineException { return DeprecationUtil.isMockInstance(conn.getInstance()) || TableState.ONLINE == Tables.getTableState(conn.getInstance(), ID);
0
@Override public String toString() { return super.toString() + " for " + file; }
0
import org.apache.ambari.server.state.fsm.InvalidStateTransitionException; InvalidStateTransitionException {
0
* http://www.apache.org/licenses/LICENSE-2.0
0
protected void clearPropertyDirect(String key)
0
String redir = BasicServlet.currentPage(req); if (namespaces != null) { sb.append("<div id=\"filters\">\n"); String namespace = BasicServlet.getCookieValue(req, "namespaceDropdown." + BasicServlet.encode(page) + "." + BasicServlet.encode(tableName) + "." + "selected"); if (namespace == null) { namespace = "*"; } sb.append("<div class='left show'><dl>\n"); doDropdownMenu(redir, page, tableName, sb, namespaces, namespace); sb.append("</dl></div>\n"); sb.append("</div>\n"); sb.append("<div id=\"tables\">\n"); } else { sb.append("<div>\n"); } if (rows.size() > 1 && sortCol > -1) { Collections.sort(rows, TableRow.getComparator(sortCol, columns.get(sortCol).getCellType())); Collections.reverse(rows); for (TableRow row : rows) { if (rows.isEmpty()) private static void doDropdownMenu(String redir, String page, String tableName, StringBuilder sb, SortedMap<String,String> namespaces, String namespace) { sb.append("<ul id=\"namespaces\">\n"); sb.append("<li><a ").append(namespace.equals("*") ? "class=\"active\" " : "").append("href=\"").append(namespaceUrl).append("*\">*</a></li>"); sb.append("<li><a ").append(namespace.equals("-") ? "class=\"active\" " : "").append("href=\"").append(namespaceUrl).append("-\">-</a></li>"); sb.append("<li><a ").append(namespace.equals(key) ? "class=\"active\" " : "").append("href=\"").append(namespaceUrl).append(key).append("\">") .append(key).append("</a></li>");
0
import org.apache.beam.runners.spark.translation.streaming.utils.SparkTestPipelineOptionsForStreaming; public SparkTestPipelineOptionsForStreaming pipelineOptions = new SparkTestPipelineOptionsForStreaming();
0
for (Object aFontList : fontList) { GVTFont font = (GVTFont) aFontList;
0
//set hostname and hostIp * * @param propFile * @param propNVList * @throws Exception // Let's load properties from argument list /** * @param nvList */ static public boolean isEnabled(Map<String, Object> configs) { return isEnabled(configs, configs); } static public void logCountForMetric(MetricCount metric, String prefixStr, String postFix) { logger.info(prefixStr + ": count=" + metric.count + postFix); } // We need to clone it, so we will create a JSON string and convert it // back /** * @param fileName * @return */
0
import org.mozilla.javascript.WrapHandler; private WrapHandler wrapHandler = new EventTargetWrapHandler(this); Context ctx = Context.enter(); ImporterTopLevel importer = new ImporterTopLevel(ctx); importer.importPackage(ctx, globalObject, p, null); ctx.setWrapHandler(wrapHandler = new EventTargetWrapHandler(this)); Context ctx = Context.enter(); ctx.setWrapHandler(wrapHandler); Context ctx = Context.enter(); ctx.setWrapHandler(wrapHandler); Context ctx = Context.enter(); ctx.setWrapHandler(wrapHandler);
0
this.status = new AtomicReference<>(Status.READY);
0
uriMap = new HashMap<>();
0
import java.util.Collections; return Collections.emptyList();
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.lambda.samples.compositefactory; /** * Our properties interface that is implemented by DependencyManager. * @author <a href="mailto:[email protected]">Felix Project Team</a> */ public interface MyConfig { String getFoo(); }
0
package org.apache.felix.bundlerepository.impl.metadataparser; import org.apache.felix.bundlerepository.impl.Logger;
0
new char[] {(char)((compression == COMP_JPEG_TTN2)? 1 : 2)}));
0
* Describes a component dependency. They form descriptions of dependencies public interface ComponentDependencyDeclaration {
0
* The Digester EDSL implementation.
0
import org.apache.http.protocol.HttpContext;
0
public abstract LanguageSet merge(LanguageSet other); public LanguageSet merge(final LanguageSet other) { if (other == NO_LANGUAGES) { return this; } else if (other == ANY_LANGUAGE) { return other; } else { final SomeLanguages sl = (SomeLanguages) other; final Set<String> ls = new HashSet<String>(languages); for (String lang : sl.languages) { ls.add(lang); } return from(ls); } } @Override public LanguageSet merge(final LanguageSet other) { return other; } @Override public LanguageSet merge(final LanguageSet other) { return other; } @Override
0
return new Pair<>(low, high);
1
private final String instanceID; * @param instanceID * Accumulo instance ID public AuthenticationTokenSecretManager(String instanceID, long tokenMaxLifetime) { requireNonNull(instanceID); this.instanceID = instanceID; identifier.setInstanceId(instanceID);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/primitives/adapters/Attic/TestLongListIteratorListIterator.java,v 1.2 2003/04/13 23:26:09 rwaldhoff Exp $ import java.util.ListIterator; import org.apache.commons.collections.iterators.TestListIterator; * @version $Revision: 1.2 $ $Date: 2003/04/13 23:26:09 $ public class TestLongListIteratorListIterator extends TestListIterator { public ListIterator makeEmptyListIterator() { public ListIterator makeFullListIterator() {
0
ResourceId manifestResourceId = getManifestFileResourceId(request.getStagingSessionToken()); ProxyManifest.Builder proxyManifestBuilder = ProxyManifest.newBuilder() .setManifest(request.getManifest()); proxyManifestBuilder.addLocation(Location.newBuilder() .setName(artifactMetadata.getName()) responseObserver.onNext(CommitManifestResponse.newBuilder() .setStagingToken(manifestResourceId.toString()) .build()); @Override public void close() throws Exception { // Nothing to close here. } public static String generateStagingSessionToken(String sessionId, String basePath) throws Exception { return "artifact_" + Hashing.sha256().hashString(artifactMetadata.getName(), CHARSET) .toString(); private static String encodeStagingSessionToken(StagingSessionToken stagingSessionToken) private ResourceId getManifestFileResourceId(String stagingSessionToken) throws IOException { .resolve(MANIFEST, StandardResolveOptions.RESOLVE_FILE); private ResourceId getArtifactDirResourceId(String stagingSessionToken) throws IOException { return getJobDirResourceId(stagingSessionToken) .resolve("artifacts", StandardResolveOptions.RESOLVE_DIRECTORY);
0
* http://www.apache.org/licenses/LICENSE-2.0
0
boolean quote); boolean quote); boolean quote); boolean quote);
0
import org.apache.beam.sdk.annotations.Internal; @Internal
0
/** * Resets the parser. The parser will be ready to start parsing another * HTTP message. */ /** * Fills the internal buffer of the parser with input data from the * given {@link ReadableByteChannel}. * * @param channel the input channel * @return number of bytes read. * @throws IOException in case of an I/O error. */ /** * Attempts to parse a complete message head from the content of the * internal buffer. If the message in the input buffer is incomplete * this method will return <code>null</code>. * * @return HTTP message head, if available, <code>null</code> otherwise. * @throws IOException in case of an I/O error. * @throws HttpException in case the HTTP message is malformed or * violates the HTTP protocol. */
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
MetaDataTableScanner metaDataTableScanner = new MetaDataTableScanner(environment.getInstance(), SecurityConstants.getSystemCredentials(), tableRange, null);
0
* @param requestId the request id public static void updateStageStatus(long requestId, long stageId, HostRoleStatus desiredStatus) { new PredicateBuilder().property(STAGE_STAGE_ID).equals(stageId). and().property(STAGE_REQUEST_ID).equals(requestId).toPredicate();
0
import com.google.common.collect.ImmutableMap; import com.google.common.collect.Sets; /** * The key property ids for a User resource. */ private static Map<Resource.Type, String> keyPropertyIds = ImmutableMap.<Resource.Type, String>builder() .put(Resource.Type.User, USER_USERNAME_PROPERTY_ID) .build(); * The property ids for a User resource. */ private static Set<String> propertyIds = Sets.newHashSet( USER_USERNAME_PROPERTY_ID, USER_PASSWORD_PROPERTY_ID, USER_OLD_PASSWORD_PROPERTY_ID, USER_LDAP_USER_PROPERTY_ID, USER_TYPE_PROPERTY_ID, USER_ACTIVE_PROPERTY_ID, USER_GROUPS_PROPERTY_ID, USER_ADMIN_PROPERTY_ID); /** UserResourceProvider(AmbariManagementController managementController) { super(Resource.Type.User, propertyIds, keyPropertyIds, managementController); return new HashSet<>(keyPropertyIds.values());
0
managementControllerProvider.get().getHostComponents(Collections.singleton(request), true);
0
import java.util.Comparator; /** * Set the comparator. * The indicated class must implement {@link Comparator} */ Class comparator() default Comparator.class;
0
* The class PosixParser provides an implementation of the * @version $Revision$, $Date$ public class PosixParser extends Parser { * is true, then the remaining entries are copied to the list of * information on the bursting algorithm see * <li>if the current <code>arguments</code> entry is not handled if (pos != -1) { * Breaks <code>token</code> into its constituent parts * * <li>if the {@link Option} can have an argument value and there * are remaining characters in the token then add the remaining * <li>if an {@link Option} does <b>NOT</b> exist <b>AND</b> * "<b>--</b>" followed by the remaining characters and also
0
public static final float PRIORITY = 1000; super(name, PRIORITY, ext); super(name, PRIORITY, ext); super(name, PRIORITY, exts); super(name, PRIORITY, exts);
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//beanutils/src/test/org/apache/commons/beanutils/priv/PrivateIndirect.java,v 1.4 2003/10/05 13:32:13 rdonkin Exp $ * $Revision: 1.4 $ * $Date: 2003/10/05 13:32:13 $ * * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * notice, this list of conditions and the following disclaimer. * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgement: * "This product includes software developed by the * 4. The names "Apache", "The Jakarta Project", "Commons", and "Apache Software * from this software without prior written permission. For written * 5. Products derived from this software may not be called "Apache", * "Apache" nor may "Apache" appear in their names without prior * written permission of the Apache Software Foundation. */ * @version $Revision: 1.4 $ $Date: 2003/10/05 13:32:13 $
0
class SideInputContainer { * Create a new {@link SideInputContainer} with the provided views and the provided public static SideInputContainer create( final EvaluationContext context, Collection<PCollectionView<?>> containedViews) { return new SideInputContainer(containedViews, viewByWindows); private SideInputContainer( * Return a view of this {@link SideInputContainer} that contains only the views in the * provided argument. The returned {@link SideInputContainer} is unmodifiable without * casting, but will change as this {@link SideInputContainer} is modified. private final EvaluationContext context; EvaluationContext context) {
0
* Implements {@link ModificationHandler#getObject(Object)}.
0
Copyright 2001,2003 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