Diff
stringlengths
5
2k
FaultInducingLabel
int64
0
1
import javax.xml.crypto.dsig.XMLSignature; String namespace = element.getNamespaceURI(); if (tag == null || namespace == null) { if (tag.equals("KeyInfo") && XMLSignature.XMLNS.equals(namespace)) { throw new MarshalException("invalid KeyInfo tag: " + namespace + ":" + tag);
0
package org.apache.bcel.generic; super(org.apache.bcel.Const.FSUB);
1
import org.apache.beam.vendor.guava.v20_0.com.google.common.collect.ImmutableMap;
0
import java.util.List; private List<String> configTypes; public StackServiceResponse(String serviceName, String userName, String comments, String serviceVersion, List<String> types) { configTypes = types; public List<String> getConfigTypes() { return configTypes; }
0
import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; /** * A utility method that returns a multi-map of tasks keyed by JobKey. * @param tasks A list of tasks to be keyed by map * @return A multi-map of tasks keyed by job key. */ public static Multimap<JobKey, ScheduledTask> byJobKey(Iterable<ScheduledTask> tasks) { return Multimaps.index(tasks, Tasks.SCHEDULED_TO_JOB_KEY); }
0
comparator = (AbstractFileComparator) SizeFileComparator.SIZE_COMPARATOR;
0
this.selector.select(timeout); return !this.selector.selectedKeys().isEmpty();
0
Range deleteRange = new Range(TabletsSection.getRow(extent.getTableId(), start), false, TabletsSection.getRow(extent.getTableId(), extent.getEndRow()), true); Range scanRange = new Range(TabletsSection.getRow(range.getTableId(), start), false, stopRow, false);
0
RouteSpecificPool rospl = new RouteSpecificPool(route);
0
import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
0
* Takes a list of files and archives them into Accumulo keyed on hashes of the files. See * docs/examples/README.filedata for instructions. public static final ByteSequence CHUNK_CF_BS = new ArrayByteSequence(CHUNK_CF.getBytes(), 0, CHUNK_CF.getLength()); public static final ByteSequence REFS_CF_BS = new ArrayByteSequence(REFS_CF.getBytes(), 0, REFS_CF.getLength()); public String insertFileData(String filename, BatchWriter bw) throws MutationsRejectedException, IOException { m.put(REFS_CF, KeyUtil.buildNullSepText(uid, REFS_ORIG_FILE), cv, new Value(filename.getBytes())); throw new RuntimeException( "too many chunks for file " + filename + ", try raising chunk size"); int i = (((b[offset] & 255) << 24) + ((b[offset + 1] & 255) << 16) + ((b[offset + 2] & 255) << 8) + ((b[offset + 3] & 255) << 0)); @Parameter(names = "--vis", description = "use a given visibility for the new counts", converter = VisibilityConverter.class) conn.tableOperations().attachIterator(opts.getTableName(), new IteratorSetting(1, ChunkCombiner.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. */ package org.apache.felix.ipojo.manipulator.store; import java.util.Collection; import java.util.List; import java.util.Set; import java.util.jar.Manifest; import org.apache.felix.ipojo.manipulator.render.MetadataFilter; import org.apache.felix.ipojo.metadata.Element; /** * A {@code ManifestBuilder} is ... * * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a> */ public interface ManifestBuilder { /** * Add all given package names in the referred packages list * @param packageNames additional packages */ void addReferredPackage(Set<String> packageNames); /** * Add all given metadata * @param metadatas additional metadata */ void addMetada(Collection<Element> metadatas); /** * Update the given manifest. * @param original original manifest to be modified * @return modified manifest */ Manifest build(Manifest original); }
0
* * Noteworthy is the fact that the ftp routines in some web browsers don't * work as well as this. They can't, since they have no way of knowing the * server's time zone. Depending on the local machine's position relative * to GMT and the time of day, the browsers may decide that a timestamp * would be in the future if given the current year, so they assume the * year to be last year. This illustrates the value of FTPClientConfig's * time zone functionality.
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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ambari.view.hive20.internal.parsers; import org.apache.ambari.view.hive20.client.DatabaseMetadataWrapper; import org.apache.ambari.view.hive20.exceptions.ServiceException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.sql.DatabaseMetaData; import java.sql.SQLException; public class DatabaseMetadataExtractor { private static final Logger LOG = LoggerFactory.getLogger(DatabaseMetadataExtractor.class); private final DatabaseMetaData databaseMetaData; public DatabaseMetadataExtractor(DatabaseMetaData databaseMetaData) { this.databaseMetaData = databaseMetaData; } public DatabaseMetadataWrapper extract() throws ServiceException { try { return new DatabaseMetadataWrapper(databaseMetaData.getDatabaseMajorVersion(), databaseMetaData.getDatabaseMinorVersion()); } catch (SQLException e) { LOG.error("Error occurred while fetching version from database metadata.", e); throw new ServiceException(e); } } }
0
* @version $Revision$ $Date$
0
* @author Rodney Waldhoff * @version $Revision: 1.13 $ $Date: 2004/02/28 12:18:17 $
0
Mockito.when(this.credentialsProvider.getCredentials(Mockito.<AuthScope>any(), Mockito.<HttpContext>any())).thenReturn(credentials); Assert.assertTrue(this.httpAuthenticator.prepareAuthResponse(host, ChallengeType.TARGET, response, authStrategy, this.authExchange, this.context)); final HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, HttpStatus.SC_UNAUTHORIZED, "UNAUTHORIZED"); Mockito.when(this.credentialsProvider.getCredentials(Mockito.eq(new AuthScope(host, "test", "basic")), Mockito.<HttpContext>any())).thenReturn(credentials); Assert.assertTrue(this.httpAuthenticator.prepareAuthResponse(host, ChallengeType.TARGET, response, authStrategy, this.authExchange, this.context)); Mockito.when(this.credentialsProvider.getCredentials(Mockito.eq(new AuthScope(host, "realm1", "digest")), Mockito.<HttpContext>any())).thenReturn(credentials);
0
this.buffer.compact();
0
* @version $Id$
0
/** * */ private static final long serialVersionUID = 1L; /** * Constructor InvalidSignatureValueException * */ public InvalidSignatureValueException() { super(); } /** * Constructor InvalidSignatureValueException * * @param msgID */ public InvalidSignatureValueException(String msgID) { super(msgID); } /** * Constructor InvalidSignatureValueException * * @param msgID * @param exArgs */ public InvalidSignatureValueException(String msgID, Object exArgs[]) { super(msgID, exArgs); } /** * Constructor InvalidSignatureValueException * * @param msgID * @param originalException */ public InvalidSignatureValueException(String msgID, Exception originalException) { super(msgID, originalException); } /** * Constructor InvalidSignatureValueException * * @param msgID * @param exArgs * @param originalException */ public InvalidSignatureValueException(String msgID, Object exArgs[], Exception originalException) { super(msgID, exArgs, originalException); }
0
Engine.VarCollector collector = jxlt.getEngine().varCollector();
0
import java.util.Iterator; import org.apache.atlas.repository.graphdb.AtlasEdge; import org.apache.atlas.repository.graphdb.AtlasGraph; import org.apache.atlas.repository.graphdb.AtlasVertex; new GraphBackedSearchIndexer(); public void tearDown() { AtlasGraphProvider.cleanup(); AtlasVertex deptVertex = GraphHelper.getInstance().getVertexForGUID(deptGuid); AtlasGraph graph = TestUtils.getGraph(); AtlasVertex v1 = graph.addVertex(); AtlasVertex v2 = graph.addVertex(); graph.addEdge(v1, v2, "l1"); graph.addEdge(v1, v2, "l2"); Iterator<AtlasEdge> iterator = GraphHelper.getInstance().getOutGoingEdgesByLabel(v1, "l1");
1
StringBuilder buffer = new StringBuilder();
0
getDataSourceConfiguration().populateDisplayData(builder); getDataSourceConfiguration().populateDisplayData(builder);
0
protected byte[] doDecoding(final byte[] bytes) { protected byte[] doEncoding(final byte[] bytes) { final RFC1522TestCodec testcodec = new RFC1522TestCodec(); private void assertExpectedDecoderException(final String s) throws Exception { final RFC1522TestCodec testcodec = new RFC1522TestCodec(); } catch (final DecoderException e) {
1
import java.util.Map; import java.util.concurrent.ConcurrentMap; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.google.inject.Inject; config.save();
0
@Override @Override @Override @Override @Override @Override @Override
0
public Service setServiceProperties(Dictionary serviceProperties);
0
import org.apache.hc.core5.http.Methods; new BasicRequestProducer(Methods.POST, target, "/stuff", new BasicRequestProducer(Methods.POST, target, "/other-stuff", new BasicRequestProducer(Methods.POST, target, "/more-stuff", new BasicRequestProducer(Methods.POST, target, "/stuff", new BasicRequestProducer(Methods.POST, target, "/other-stuff", new BasicRequestProducer(Methods.POST, target, "/more-stuff", new BasicRequestProducer(Methods.POST, target, "/stuff", new BasicRequestProducer(Methods.POST, target, "/other-stuff", new BasicRequestProducer(Methods.POST, target, "/more-stuff", new BasicClientExchangeHandler<>(new BasicRequestProducer(Methods.POST, target, "/stuff",
0
import javax.inject.Qualifier; @Qualifier
0
package com.google.cloud.dataflow.sdk.runners.inprocess; import com.google.cloud.dataflow.sdk.runners.inprocess.InMemoryWatermarkManager.FiredTimers; import com.google.cloud.dataflow.sdk.runners.inprocess.InMemoryWatermarkManager.TimerUpdate; import com.google.cloud.dataflow.sdk.runners.inprocess.InMemoryWatermarkManager.TimerUpdate.TimerUpdateBuilder; import com.google.cloud.dataflow.sdk.runners.inprocess.InMemoryWatermarkManager.TransformWatermarks;
0
private final byte[] data = new byte[32];
0
import org.apache.accumulo.core.client.impl.ClientContext; public static void assertNoDanglingFateLocks(ClientContext context, AccumuloCluster cluster) { FateStatus fateStatus = getFateStatus(context, cluster); private static FateStatus getFateStatus(ClientContext context, AccumuloCluster cluster) { IZooReaderWriter zk = new ZooReaderWriterFactory().getZooReaderWriter(context.getZooKeepers(), context.getZooKeepersSessionTimeOut(), secret); ZooStore<String> zs = new ZooStore<>(context.getZooKeeperRoot() + Constants.ZFATE, zk); return admin.getStatus(zs, zk, context.getZooKeeperRoot() + Constants.ZTABLE_LOCKS, null,
0
@Override public double getTotalParallelism() { return this.endIndex - this.startIndex; } public double getRemainingParallelism() { return tracker.getStopPosition() - nextIndex; } @Override
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/dom/DOMAttributeIterator.java,v 1.10 2003/10/09 21:31:41 rdonkin Exp $ * $Revision: 1.10 $ * $Date: 2003/10/09 21:31:41 $ * any, must include the following acknowledgement: * Alternately, this acknowledgement may appear in the software itself, * if and wherever such third-party acknowledgements normally appear. * permission of the Apache Software Foundation. * @version $Revision: 1.10 $ $Date: 2003/10/09 21:31:41 $
0
package org.apache.felix.gogo.runtime; import org.apache.felix.gogo.runtime.Tokenizer.Type;
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 org.apache.ambari.server.controller.ConfigurationRequest; import org.apache.ambari.server.controller.spi.NoSuchParentResourceException; import org.apache.ambari.server.controller.spi.NoSuchResourceException; import org.apache.ambari.server.controller.spi.Predicate; import org.apache.ambari.server.controller.spi.Request; import org.apache.ambari.server.controller.spi.RequestStatus; import org.apache.ambari.server.controller.spi.Resource; import org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException; import org.apache.ambari.server.controller.spi.SystemException; import org.apache.ambari.server.controller.spi.UnsupportedPropertyException; protected static final String HOST_DESIRED_CONFIGS_PROPERTY_ID = PropertyHelper.getPropertyId("Hosts", "desired_configs"); setResourceProperty(resource, HOST_DESIRED_CONFIGS_PROPERTY_ID, response.getDesiredConfigs(), requestedIds); ConfigurationRequest cr = getConfigurationRequest("Hosts", properties); hostRequest.setDesiredConfig(cr);
0
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.ambari.logsearch.model.request.impl; import org.apache.ambari.logsearch.common.Marker; @Marker public class ServiceLogLevelCountRequest extends BaseServiceLogRequest { }
0
// If no Transforms then just default to an Inclusive without comments transform AlgorithmSuiteSecurityEvent algorithmSuiteSecurityEvent = new AlgorithmSuiteSecurityEvent(); algorithmSuiteSecurityEvent.setAlgorithmURI(XMLSecurityConstants.NS_C14N_OMIT_COMMENTS); algorithmSuiteSecurityEvent.setKeyUsage(XMLSecurityConstants.C14n); algorithmSuiteSecurityEvent.setCorrelationID(referenceType.getId()); inputProcessorChain.getSecurityContext().registerSecurityEvent(algorithmSuiteSecurityEvent); transformType.setAlgorithm(XMLSecurityConstants.NS_C14N_OMIT_COMMENTS);
0
null, "", Byte.valueOf((byte)1), Short.valueOf((short)1), Integer.valueOf(1), Long.valueOf(1L), Float.valueOf(1), private final Object[] invalidValues = { "12ab", "abcd", "-12ab", }; if (value == null || value == "") {
0
NodeKeyResolver<ImmutableNode> resolver = NodeStructureHelper.createResolverMock(); NodeStructureHelper.expectResolveKeyForQueries(resolver); EasyMock.replay(resolver); return resolver; NodeKeyResolver<ImmutableNode> resolverMock = NodeStructureHelper.createResolverMock(); NodeKeyResolver<ImmutableNode> resolverMock = NodeStructureHelper.createResolverMock();
0
public void testWriteZeroLengthArrayWithOffset() {
0
import org.apache.accumulo.core.client.Accumulo; final AccumuloClient client = Accumulo.newClient().from(getClientProperties()).build();
0
@Test(timeout=30*1000)
0
package org.apache.commons.digester3.annotations.rules;
1
package org.apache.http.protocol;
0
String ROLE = JSPEngine.class.getName(); byte[] executeJSP(String url, HttpServletRequest request, HttpServletResponse response, ServletContext context) throws IOException, ServletException, Exception;
0
package org.apache.accumulo.examples.simple.filedata; import org.apache.accumulo.examples.simple.filedata.ChunkInputStream; import org.apache.accumulo.examples.simple.filedata.FileDataIngest;
0
Constants.METADATA_LOCK_COLUMN.put(m, new Value(zooLock.getLockID().serialize(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + "/").getBytes())); Constants.METADATA_TIME_COLUMN.put(m, new Value(time.getBytes())); Constants.METADATA_FLUSH_COLUMN.put(m, new Value((flushId + "").getBytes())); Constants.METADATA_FLUSH_COLUMN.put(m, new Value((flushID + "").getBytes())); Constants.METADATA_COMPACT_COLUMN.put(m, new Value((compactID + "").getBytes())); Constants.METADATA_TIME_COLUMN.put(m, new Value(time.getBytes())); Constants.METADATA_DIRECTORY_COLUMN.put(m, new Value(path.getBytes())); Constants.METADATA_TIME_COLUMN.put(m, new Value((timeType + "0").getBytes())); Constants.METADATA_DIRECTORY_COLUMN.put(m, new Value(path.getBytes())); Constants.METADATA_TIME_COLUMN.put(m, new Value(time.getBytes())); Constants.METADATA_FLUSH_COLUMN.put(m, new Value(("" + lastFlushID).getBytes())); Constants.METADATA_COMPACT_COLUMN.put(m, new Value(("" + lastCompactID).getBytes())); Constants.METADATA_SPLIT_RATIO_COLUMN.put(m, new Value(Double.toString(splitRatio).getBytes())); Constants.METADATA_OLD_PREV_ROW_COLUMN.put(m, KeyExtent.encodePrevEndRow(oldPrevEndRow)); Constants.METADATA_CHOPPED_COLUMN.putDelete(m); Constants.METADATA_SPLIT_RATIO_COLUMN.putDelete(m); Constants.METADATA_OLD_PREV_ROW_COLUMN.putDelete(m); Constants.METADATA_CHOPPED_COLUMN.putDelete(m); Constants.METADATA_COMPACT_COLUMN.put(m, new Value(("" + compactionId).getBytes())); Constants.METADATA_DIRECTORY_COLUMN.fetch(ms); Constants.METADATA_PREV_ROW_COLUMN.fetch(mscanner); Constants.METADATA_TIME_COLUMN.fetch(mscanner); Constants.METADATA_DIRECTORY_COLUMN.put(m, new Value(FastFormat.toZeroPaddedString(dirCount++, 8, 16, "/c-".getBytes()))); Constants.METADATA_CHOPPED_COLUMN.put(m, new Value("chopped".getBytes()));
0
import org.apache.avalon.framework.container.ContainerUtil; * @version CVS $Id$ final Program p = new JavascriptProgram(sourceFile, clazz, dependecies); ContainerUtil.enableLogging(p, this.getLogger()); return p;
0
private final LRUMap problemReports = new LRUMap(1000);
0
= "separatorUsedInOutput"; @Override public INIBuilderParametersImpl setSeparatorUsedInOutput(String separator) { storeProperty(PROP_SEPARATOR_USED_IN_INI_OUTPUT, separator); return this; }
0
* * * * List<IteratorSetting> iterators = split.getIterators();
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/ShortTest.java,v 1.8 2003/05/28 04:28:00 dgraham Exp $ * $Revision: 1.8 $ * $Date: 2003/05/28 04:28:00 $ * @version $Revision: 1.8 $ $Date: 2003/05/28 04:28:00 $ validator.setParameter(Validator.BEAN_PARAM, info);
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
executionContext.getOrCreateStepContext(stepName, stepName, null),
0
package org.apache.atlas.typesystem.exception; import org.apache.atlas.AtlasException;
1
import org.apache.beam.sdk.runners.DirectPipelineRunner; @Default.Class(DirectPipelineRunner.class)
0
import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING)
0
package org.apache.commons.beanutils2.converters;
1
public Class<?>[] getExceptions() { Class<?>[] cs = new Class[1 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
0
import static org.junit.Assert.assertNotEquals; import java.io.File; import org.apache.jute.Record; import org.apache.zookeeper.ZooDefs; import org.apache.zookeeper.server.persistence.FileTxnSnapLog; import org.apache.zookeeper.test.ClientBase; import org.apache.zookeeper.txn.SetDataTxn; import org.apache.zookeeper.txn.TxnHeader; public void testTxnLogElapsedSyncTime() throws IOException { File tmpDir = ClientBase.createEmptyTestDir(); FileTxnSnapLog fileTxnSnapLog = new FileTxnSnapLog(new File(tmpDir, "data"), new File(tmpDir, "data_txnlog")); ZooKeeperServer zks = new ZooKeeperServer(); zks.setTxnLogFactory(fileTxnSnapLog); ZooKeeperServerBean serverBean = new ZooKeeperServerBean(zks); long elapsedTime = serverBean.getTxnLogElapsedSyncTime(); assertEquals(-1, elapsedTime); TxnHeader hdr = new TxnHeader(1, 1, 1, 1, ZooDefs.OpCode.setData); Record txn = new SetDataTxn("/foo", new byte[0], 1); Request req = new Request(0, 0, 0, hdr, txn, 0); try { zks.getTxnLogFactory().append(req); zks.getTxnLogFactory().commit(); elapsedTime = serverBean.getTxnLogElapsedSyncTime(); assertNotEquals(-1, elapsedTime); assertEquals(elapsedTime, serverBean.getTxnLogElapsedSyncTime()); } finally { fileTxnSnapLog.close(); } } @Test
0
new Object[] {(int) refChild.getNodeType(), new Object[] {(int) oldChild.getNodeType(), new Object[] {(int) oldChild.getNodeType(), new Object[] {(int) getNodeType(), new Object[] {(int) getNodeType(), new Object[] {(int) getNodeType(), new Object[] {(int) getNodeType(), new Object[] {(int) r.getNodeType(), new Object[] {(int) o.getNodeType(), new Object[] {(int) n.getNodeType(),
0
private final Map<Long, List<ACL>> longKeyMap = private final Map<List<ACL>, Long> aclKeyMap = private long aclIndex = 0; public Set<String> getEphemerals(long sessionId) { int getAclSize() { return longKeyMap.size(); } result += value.getApproximateDataSize(); if (children != null && children.contains(childName)) { throw new KeeperException.NodeExistsException(); } String lastPrefix = getMaxPrefixWithQuota(path); if(lastPrefix != null) { if (parentName.startsWith(procZookeeper) && Quotas.limitNode.equals(childName)) { // we need to update the trie as well pTrie.deletePath(parentName.substring(quotaZookeeper.length())); String lastPrefix = getMaxPrefixWithQuota(path); if(lastPrefix != null) { childWatches.triggerWatch("".equals(parentName) ? "/" : parentName, String lastPrefix = getMaxPrefixWithQuota(path); if(lastPrefix != null) { if (rootZookeeper.equals(lastPrefix) || "".equals(lastPrefix)) { return null; return lastPrefix; if (childs == null) { } else { children = new ArrayList<String>(childs); + checkTxn.getPath() int ec = post_failed ? Code.RUNTIMEINCONSISTENCY.intValue() header.getZxid(), header.getTime(), lastProcessedZxid = rc.zxid; while (!"/".equals(path)) { if (e == null) { } else { watcher.process(e); if (e == null) { } else { watcher.process(e); if (e == null) { } else { watcher.process(e);
0
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 org.apache.accumulo.core.clientImpl.mapreduce.lib.FileOutputConfigurator;
0
ClassType(TypeSystem typeSystem, String name, ImmutableList<String> superTypes, AttributeInfo... fields) throw new AtlasException(String.format("Id %s is not valid for class %s", id, getName())); public ITypedReferenceableInstance convert(Object val, Multiplicity m) throws AtlasException { ITypedReferenceableInstance tr = r != null ? createInstanceWithTraits(id, r, r.getTraits().toArray(new String[0])) : createInstance(id); if (aVal != null && i.dataType().getTypeCategory() == DataTypes.TypeCategory.CLASS) { return createInstance((String[]) null); public ITypedReferenceableInstance createInstance(String... traitNames) throws AtlasException { public ITypedReferenceableInstance createInstance(Id id, String... traitNames) throws AtlasException { public ITypedReferenceableInstance createInstanceWithTraits(Id id, Referenceable r, String... traitNames) ImmutableMap.Builder<String, ITypedStruct> b = new ImmutableBiMap.Builder<String, ITypedStruct>(); return new ReferenceableInstance(id == null ? new Id(getName()) : id, getName(), fieldMapping, fieldMapping.numBigDecimals == 0 ? null : new BigDecimal[fieldMapping.numBigDecimals], fieldMapping.numReferenceables == 0 ? null : new ReferenceableInstance[fieldMapping.numReferenceables], fieldMapping.numReferenceables == 0 ? null : new Id[fieldMapping.numReferenceables], b.build()); public void output(IReferenceableInstance s, Appendable buf, String prefix) throws AtlasException {
0
import com.google.inject.Inject;
0
* * * * This Tag creates a result set object based on its body content via child row tags. * /** } //------------------------------------------------------------------------- //-------------------------------------------------------------------------
1
import org.apache.accumulo.core.clientImpl.Table; import org.apache.accumulo.core.clientImpl.Tables; 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.InitialMultiScan; import org.apache.accumulo.core.dataImpl.thrift.InitialScan; import org.apache.accumulo.core.dataImpl.thrift.IterInfo; import org.apache.accumulo.core.dataImpl.thrift.MapFileInfo; import org.apache.accumulo.core.dataImpl.thrift.MultiScanResult; import org.apache.accumulo.core.dataImpl.thrift.ScanResult; import org.apache.accumulo.core.dataImpl.thrift.TCMResult; import org.apache.accumulo.core.dataImpl.thrift.TColumn; import org.apache.accumulo.core.dataImpl.thrift.TConditionalMutation; import org.apache.accumulo.core.dataImpl.thrift.TConditionalSession; import org.apache.accumulo.core.dataImpl.thrift.TKeyExtent; import org.apache.accumulo.core.dataImpl.thrift.TMutation; import org.apache.accumulo.core.dataImpl.thrift.TRange; import org.apache.accumulo.core.dataImpl.thrift.TRowRange; import org.apache.accumulo.core.dataImpl.thrift.TSummaries; import org.apache.accumulo.core.dataImpl.thrift.TSummaryRequest; import org.apache.accumulo.core.dataImpl.thrift.UpdateErrors; import org.apache.accumulo.core.securityImpl.thrift.TCredentials;
0
import org.apache.aurora.scheduler.updater.JobUpdateController.JobUpdatingException; import static org.apache.aurora.gen.ResponseCode.JOB_UPDATING_ERROR; jobUpdateController.assertNotUpdating(job.getKey()); } catch (JobUpdatingException e) { return error(JOB_UPDATING_ERROR, e); jobUpdateController.assertNotUpdating(jobKey); } catch (JobUpdatingException e) { return error(JOB_UPDATING_ERROR, e); jobUpdateController.assertNotUpdating(jobKey); } catch (JobUpdatingException e) { return error(JOB_UPDATING_ERROR, e); private void validateLockForTasks(Iterable<IScheduledTask> tasks) throws JobUpdatingException { jobUpdateController.assertNotUpdating(key); } catch (JobUpdatingException e) { return error(JOB_UPDATING_ERROR, e); jobUpdateController.assertNotUpdating(jobKey); } catch (JobUpdatingException e) { return error(JOB_UPDATING_ERROR, e); jobUpdateController.assertNotUpdating(jobKey); } catch (JobUpdatingException e) { return error(JOB_UPDATING_ERROR, e);
0
import org.apache.cocoon.portal.util.AbstractComponent;
0
import com.google.common.collect.ListMultimap; updateServiceStates(cluster, changedServices, changedComponents, changedHosts, ignoredHosts); if (stackInfo == null) { } if (extensionInfo == null) { } if (stackInfo == null) { } if (extensionInfo == null) { } if (stackInfo == null) { } if (extensionInfo == null) { }
0
public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException { public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException {
0
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/TagSupport.java,v 1.22 2003/01/24 19:03:24 morgand Exp $ * $Revision: 1.22 $ * $Date: 2003/01/24 19:03:24 $ * $Id: TagSupport.java,v 1.22 2003/01/24 19:03:24 morgand Exp $ * @version $Revision: 1.22 $ public void invokeBody(XMLOutput output) throws JellyTagException {
1
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/ListUtils.java,v 1.10 2002/08/18 20:11:37 pjack Exp $ * $Revision: 1.10 $ * $Date: 2002/08/18 20:11:37 $
0
// We have to ensure that the protocol communication is in ASCII // but we use ISO-8859-1 just in case 8-bit characters cross // the wire. private static final String __DEFAULT_ENCODING = "ISO-8859-1"; new BufferedReader(new InputStreamReader(getInputStream(), __DEFAULT_ENCODING)); new BufferedWriter(new OutputStreamWriter(getOutputStream(), __DEFAULT_ENCODING));
0
case Artifact: resourceDefinition = new SimpleResourceDefinition(Resource.Type.Artifact, "artifact", "artifacts"); break;
0
import org.apache.accumulo.core.conf.Property; static long pause(long millis, long maxSleep) throws InterruptedException { return (long) (Math.min(millis * 2, maxSleep) * (.9 + Math.random() / 5)); final long maxSleepTime = context.getConfiguration().getTimeInMillis(Property.GENERAL_MAX_SCANNER_RETRY_PERIOD); sleepMillis = pause(sleepMillis, maxSleepTime); sleepMillis = pause(sleepMillis, maxSleepTime); sleepMillis = pause(sleepMillis, maxSleepTime); sleepMillis = pause(sleepMillis, maxSleepTime); sleepMillis = pause(sleepMillis, maxSleepTime);
0
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
0
import com.twitter.aurora.gen.StartUpdateResult; Response resp = thrift.startUpdate(job, SESSION); StartUpdateResult result = resp.getResult().getStartUpdateResult(); assertEquals(token, result.getUpdateToken()); assertTrue(result.isRollingUpdateRequired()); Response resp = thrift.startUpdate(job, SESSION); StartUpdateResult result = resp.getResult().getStartUpdateResult(); assertFalse(result.isRollingUpdateRequired());
0
SparkPipelineOptions options = rc.getPipelineOptions().as(SparkPipelineOptions.class); Long maxRecordsPerBatch = options.getMaxRecordsPerBatch(); SourceDStream<T, CheckpointMarkT> sourceDStream = new SourceDStream<>(jssc.ssc(), source, rc); // if max records per batch was set by the user. if (maxRecordsPerBatch > 0) { sourceDStream.setMaxRecordsPerBatch(maxRecordsPerBatch); } JavaPairInputDStream$.MODULE$.fromInputDStream(sourceDStream, checkpointStream(mapWithStateDStream, options); SparkPipelineOptions options) { long checkpointDurationMillis = options.getCheckpointDurationMillis();
0
@XmlAttribute(name="family") private String family; * @return the os family public String getFamily() { return family;
0
/* * Copyright 1999-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cocoon.forms.event; /** * Abstract implementation of {@link FormHandler}, which checks the type * of the WidgetEvent and calls the more specific {@link #handleActionEvent(ActionEvent)} * or {@link #handleValueChangedEvent(ValueChangedEvent)} methods. * * @version CVS $Id: AbstractFormHandler.java,v 1.1 2004/03/09 10:33:45 reinhard Exp $ */ public abstract class AbstractFormHandler implements FormHandler { public void handleEvent(WidgetEvent widgetEvent) { if (widgetEvent instanceof ActionEvent) handleActionEvent((ActionEvent)widgetEvent); else if (widgetEvent instanceof ValueChangedEvent) handleValueChangedEvent((ValueChangedEvent)widgetEvent); } /** * Called when an ActionEvent occured. */ public abstract void handleActionEvent(ActionEvent actionEvent); /** * Called when an ValueChangedEvent occured. */ public abstract void handleValueChangedEvent(ValueChangedEvent valueChangedEvent); }
0
private X509Certificate certificate = 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 * * 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
throw new IllegalArgumentException( "Coder must be deterministic to perform this sketch." + e.getMessage(), e); * Returns an {@link ApproximateDistinctFn} combiner with a new sparse representation's * precision {@code sp}.
1
} catch (KeeperException.NoNodeException e) {
0
* Adds a file name extension mapping.
0
public Supported2() { super(); } + ",attrsBits=0x" + Integer.toHexString(supportedAttributeBits) + ",openFlags=0x" + Integer.toHexString(supportedOpenFlags) + ",accessMask=0x" + Integer.toHexString(supportedAccessMask) + ",maxRead=" + maxReadSize + ",openBlock=0x" + Integer.toHexString(supportedOpenBlockVector & 0xFFFF) + ",block=" + Integer.toHexString(supportedBlock & 0xFFFF) + ",attribs=" + attribExtensionNames + ",exts=" + extensionNames;
0
"src/test/resources" + fs + "ie" + fs + "baltimore" + fs + "merlin-examples",
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 java.util.Comparator; import java.util.function.Function; Collections.unmodifiableMap( GenericUtils.toSortedMap(SIGNALS, Signal::name, Function.identity(), String.CASE_INSENSITIVE_ORDER)); Collections.unmodifiableMap( GenericUtils.toSortedMap(SIGNALS, Signal::getNumeric, Function.identity(), Comparator.naturalOrder()));
0
import javax.annotation.Nullable; private final TimerRegistry<TimerKey<K>> timerRegistry; TimerRegistry<TimerKey<K>> timerRegistry) { public TimerInternals timerInternalsForKey(@Nullable K key) { keyedTimerData.getKeyBytes(), final TimerKey<K> timerKey = new TimerKey<>( key, keyBytes, timerData.getNamespace(), timerData.getTimerId()); timerRegistry.register(timerKey, timerData.getTimestamp().getMillis()); deleteTimer(TimerData.of(timerId, namespace, Instant.now(), timeDomain)); deleteTimer(TimerData.of(timerId, namespace, Instant.now(), TimeDomain.EVENT_TIME)); final TimerKey<K> timerKey = new TimerKey<>( key, keyBytes, timerData.getNamespace(), timerData.getTimerId()); timerRegistry.delete(timerKey);
0
/* * Copyright 2013 Twitter, Inc. * * 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 org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger LOG = LoggerFactory.getLogger(ADKerberosOperationHandler.class);
1
throws IOException, GeneralSecurityException {
0
// sync: send data to datanodes sync = logFile.getClass().getMethod("sync"); // hsych: send data to datanodes and sync the data to disk
1
import org.slf4j.Logger; import org.slf4j.LoggerFactory; private static final Logger logger = LoggerFactory
0