Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
1
|
---|---|
List<Range> ranges = new ArrayList<>(batch.size());
Set<Text> rowsSeen = new HashSet<>();
HashSet<Text> copy1 = new HashSet<>(rowsSeen);
HashSet<Text> copy2 = new HashSet<>(batch);
private static HashSet<Text> rowsToQuery = new HashSet<>();
HashSet<Text> ret = new HashSet<>(); | 1 |
* @version $Revision$ $Date$ | 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 |
private byte[] bytes;
* @param bytes the raw bytes that represents this byte array
*/
public final void setBytes( byte[] bytes ) {
this.bytes = bytes;
}
/** | 0 |
import java.util.HashMap;
protected java.util.Map _properties = null;
if (_properties==null) {
_properties=new HashMap();
}
if (_properties==null) {
return null;
}
if (properties!=null) {
if (_properties==null) {
_properties=new HashMap();
}
this._properties.putAll(properties);
} | 0 |
import org.apache.atlas.AtlasException;
} catch (AtlasException e) {
public String getOutputs(String tableName) throws AtlasException {
public String getOutputsGraph(String tableName) throws AtlasException {
public String getInputs(String tableName) throws AtlasException {
public String getInputsGraph(String tableName) throws AtlasException {
public String getSchema(String tableName) throws AtlasException {
private void validateTableExists(String tableName) throws AtlasException { | 0 |
return Objects.equal(offer, other.offer) && mode == other.mode; | 0 |
import cz.seznam.euphoria.core.client.dataset.windowing.WindowedElement;
public class DataSinkWrapper<T> extends RichSinkFunction<WindowedElement<?, ?, T>> {
public void invoke(WindowedElement<?, ?, T> elem) throws Exception {
writer.write(elem.get()); | 0 |
String classifier = this.comparisonClassifier != null ? this.comparisonClassifier : project.getArtifact().getClassifier(); | 0 |
protected Request createControllerRequest(Map<PropertyId, Object> properties) { | 0 |
Set<ScheduledTask> tasks =
Storage.Util.weaklyConsistentFetchTasks(storage, Query.unscoped()); | 0 |
import org.apache.sshd.common.scp.ScpFileOpenerHolder;
public interface ScpClientCreator extends ScpFileOpenerHolder { | 0 |
self.maxSessionTimeout, self.clientPortListenBacklog, zkDb); | 0 |
ntcredentials.getNetbiosDomain(), ntcredentials.getWorkstation(), ntlmFlags);
ntcredentials.getNetbiosDomain(), | 0 |
private static Map<Resource.Type, String> keyPropertyIds = new HashMap<>();
private static Set<String> propertyIds = new HashSet<>();
private final Map<Long, LdapSyncEventEntity> events = new ConcurrentSkipListMap<>();
private final Queue<LdapSyncEventEntity> eventQueue = new LinkedList<>();
Set<LdapSyncEventEntity> newEvents = new HashSet<>();
Set<Resource> associatedResources = new HashSet<>();
Set<Resource> resources = new HashSet<>();
return new HashSet<>(keyPropertyIds.values());
Set<Map<String, String>> specs = new HashSet<>();
Map<String, String> specMap = new HashMap<>();
List<LdapSyncSpecEntity> specList = new LinkedList<>();
Set<LdapSyncEventEntity> entities = new HashSet<>();
LinkedBlockingQueue<Runnable> queue = new LinkedBlockingQueue<>();
Set<String> principalNames = new HashSet<>(spec.getPrincipalNames()); | 1 |
if (!str.isEmpty()) { | 0 |
import org.apache.sshd.common.FactoryManager;
window.init(FactoryManager.DEFAULT_WINDOW_SIZE, FactoryManager.DEFAULT_MAX_PACKET_SIZE, null);
window.init(FactoryManager.DEFAULT_WINDOW_SIZE, FactoryManager.DEFAULT_MAX_PACKET_SIZE, null); | 0 |
/**
* @since Mar 18, 2002
* @version CVS $Id: AbstractPreceptor.java,v 1.2 2003/03/16 17:49:05 vgritsenko Exp $ | 0 |
* @return The result of the asynchronous operation - or {@code null}
* if none set.
public Object getValue() { | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/dom/DOMAttributePointer.java,v 1.10 2003/01/11 05:41:25 dmitri Exp $
* $Revision: 1.10 $
* $Date: 2003/01/11 05:41:25 $
* @version $Revision: 1.10 $ $Date: 2003/01/11 05:41:25 $
public DOMAttributePointer(NodePointer parent, Attr attr) {
public QName getName() {
return new QName(
DOMNodePointer.getPrefix(attr),
DOMNodePointer.getLocalName(attr));
public QName getExpandedName() {
public String getNamespaceURI() {
if (prefix == null) {
public Object getBaseValue() {
public boolean isCollection() {
public int getLength() {
public Object getImmediateNode() {
if (value == null) {
if (value.equals("") && !attr.getSpecified()) {
public boolean isActual() {
public boolean isLeaf() {
public boolean testNode(NodeTest nodeTest) {
return nodeTest == null
|| ((nodeTest instanceof NodeTypeTest)
&& ((NodeTypeTest) nodeTest).getNodeType()
== Compiler.NODE_TYPE_NODE);
public void setValue(Object value) {
attr.setValue((String) TypeUtils.convert(value, String.class));
public void remove() {
public String asPath() {
if (parent != null) {
if (buffer.length() == 0
|| buffer.charAt(buffer.length() - 1) != '/') {
public int hashCode() {
public boolean equals(Object object) {
if (object == this) {
if (!(object instanceof DOMAttributePointer)) {
DOMAttributePointer other = (DOMAttributePointer) object;
public int compareChildNodePointers(
NodePointer pointer1,
NodePointer pointer2)
{ | 1 |
import org.apache.beam.runners.dataflow.DataflowRunner;
* {@link DataflowRunner} specific tests for {@link PubsubIO} transforms. | 0 |
// @formatter:off
public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V>
loadIterators(
// @formatter:on
IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent,
AccumuloConfiguration conf, List<IterInfo> ssiList, Map<String,Map<String,String>> ssio,
IteratorEnvironment env, boolean useAccumuloClassLoader) throws IOException {
// @formatter:off
public static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V>
loadIterators(
// @formatter:on
IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent,
AccumuloConfiguration conf, List<IterInfo> ssiList, Map<String,Map<String,String>> ssio,
IteratorEnvironment env, boolean useAccumuloClassLoader, String classLoaderContext)
throws IOException {
// @formatter:off
private static <K extends WritableComparable<?>,V extends Writable> SortedKeyValueIterator<K,V>
loadIteratorsHelper(
// @formatter:on
IteratorScope scope, SortedKeyValueIterator<K,V> source, KeyExtent extent,
AccumuloConfiguration conf, List<IterInfo> ssiList, Map<String,Map<String,String>> ssio,
IteratorEnvironment env, boolean useAccumuloClassLoader, String classLoaderContext)
throws IOException { | 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.
*/ | 0 |
* Id attribute (if found)
* else use the annotation package name.
* Parent attribute (if found)
* else use the annotation package name.
/**
* Build the element object from the given descriptor.
* @param desc : annotation descriptor
* @return the package of the annotation
*/
public static String getPackage(String desc) {
String s = (desc.replace('/', '.')).substring(1, desc.length() - 1);
int index = s.lastIndexOf('.');
return s.substring(0, index);
}
/**
* Visits an enumeration attribute.
* @param arg0 the attribute name
* @param arg1 the enumeration descriptor
* @param arg2 the attribute value
* @see org.objectweb.asm.AnnotationVisitor#visitEnum(java.lang.String, java.lang.String, java.lang.String)
*/
public void visitEnum(String arg0, String arg1, String arg2) {
m_elem.addAttribute(new Attribute(arg0, arg2));
}
} else {
if (! m_collector.getIds().containsKey(m_elem.getNameSpace())) {
// If the namespace is not already used, add the annotation as the
// root element of this namespace.
m_collector.getIds().put(m_elem.getNameSpace(), m_elem);
} else {
// Already used, the element is the parent.
if (m_parent == null) {
m_parent = m_elem.getNameSpace();
}
}
| 0 |
private static final String POLICY_SWITCH = "-p";
return "start [-t | -p] <id> [<id> <URL> ...]";
// Default switch values.
int options = 0;
options |= Bundle.START_TRANSIENT;
}
// Check for "start policy" switch.
if (tokens.contains(POLICY_SWITCH))
{
// Remove the switch and set boolean flag.
tokens.remove(POLICY_SWITCH);
options |= Bundle.START_ACTIVATION_POLICY;
bundle.start(options); | 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.beam.dsls.sql.utils.CalciteUtils;
return CalciteUtils.toBeamRecordType(builder.build()); | 0 |
* Copyright 2003-2004 The Apache Software Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. | 0 |
if (prerequisiteChecks == null) {
return new ArrayList<String>();
}
if (prerequisiteChecks == null) {
return new PrerequisiteCheckConfig();
} | 0 |
* @version $Revision: 6967 $
Collection/* <BundleContext> */contexts); | 0 |
/**
* Tests that the cause of a conversion exception is kept.
*/
@Test
public void testConversionExceptionCause()
{
try
{
conf.get(Integer.TYPE, "uri.string");
fail("No conversion exception thrown!");
}
catch (ConversionException cex)
{
assertTrue("Wrong cause",
cex.getCause() instanceof NumberFormatException);
}
} | 0 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test; | 0 |
public Service createResourceAdapterService(String resourceFilter, Class iface2, Object impl, boolean propagate) {
.setImplementation(new ResourceAdapterImpl(impl, iface2, propagate)) | 0 |
import java.util.function.IntUnaryOperator;
public void ensureCapacity(int capacity, IntUnaryOperator growthFactor) {
int actual = growthFactor.applyAsInt(minimum); | 0 |
package org.apache.http.impl.client;
import static org.junit.Assert.*;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.HttpVersion;
import org.apache.http.message.BasicHttpResponse;
import org.junit.Before;
import org.junit.Test;
public class TestNullBackoffStrategy {
private NullBackoffStrategy impl;
@Before
public void setUp() {
impl = new NullBackoffStrategy();
}
@Test
public void doesNotBackoffForThrowables() {
assertFalse(impl.shouldBackoff(new Exception()));
}
@Test
public void doesNotBackoffForResponses() {
HttpResponse resp = new BasicHttpResponse(HttpVersion.HTTP_1_1,
HttpStatus.SC_SERVICE_UNAVAILABLE, "Service Unavailable");
assertFalse(impl.shouldBackoff(resp));
}
} | 0 |
import org.apache.felix.sigil.eclipse.SigilCore;
import org.eclipse.jface.preference.IPreferenceStore;
private IPreferenceStore prefs;
private StringFieldEditor nameEditor;
nameEditor.setEmptyStringAllowed(false);
addField(nameEditor);
int cols = 0;
if (e instanceof StringFieldEditor) {
StringFieldEditor sfe = (StringFieldEditor) e;
sfe.getTextControl(getFieldEditorParent()).addModifyListener(
new ModifyListener()
{
public void modifyText(ModifyEvent e)
{
checkPageComplete();
}
});
}
e.setPreferenceStore(getStore());
int len = nameEditor.getStringValue().length();
boolean ok = len > 0;
setPageComplete(ok);
if ( !ok ) {
setErrorMessage("Name should not be empty");
}
else {
ok = nameEditor.getStringValue().trim().length() == len;
setPageComplete(ok);
if ( !ok ) {
setErrorMessage("Name cannot start or end with whitespace");
}
}
protected IPreferenceStore getStore() {
if ( prefs == null ) {
prefs = SigilCore.getRepositoryPreferences().toPreferenceStore(getModel());
}
return prefs;
} | 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. | 1 |
public void provideConfiguration( ServiceReference<ManagedService> service, final ConfigurationImpl config, Dictionary<String, ?> properties )
public void removeConfiguration( ServiceReference<ManagedService> service, final ConfigurationImpl config ) | 0 |
import java.util.Dictionary;
import java.util.Hashtable;
Dictionary<String, Object> p3 = new Hashtable<String, Object>();
p3 = new Hashtable<String, Object>();
Dictionary<String, Object> p3 = new Hashtable<String, Object>();
p3 = new Hashtable<String, Object>(); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/jelly-tags/jms/src/java/org/apache/commons/jelly/tags/jms/StopwatchTag.java,v 1.2 2003/01/26 06:24:47 morgand Exp $
* $Revision: 1.2 $
* $Date: 2003/01/26 06:24:47 $
* $Id: StopwatchTag.java,v 1.2 2003/01/26 06:24:47 morgand Exp $
import org.apache.commons.jelly.JellyTagException;
* @version $Revision: 1.2 $
public void doTag(XMLOutput output) throws JellyTagException {
throw new JellyTagException("This tag must be nested within a ConsumerTag like the subscribe tag"); | 0 |
return new HttpCacheEntry(elevenSecondsAgo, nineSecondsAgo, HttpStatus.SC_OK, headers, mockResource);
new HttpCacheEntry(null, new Date(), HttpStatus.SC_OK, new Header[]{}, mockResource);
new HttpCacheEntry(new Date(), null, HttpStatus.SC_OK, new Header[]{}, mockResource);
new HttpCacheEntry(new Date(), new Date(), HttpStatus.SC_OK, null, mockResource);
entry = new HttpCacheEntry(new Date(), new Date(), HttpStatus.SC_OK, new Header[]{}, mockResource);
assertEquals(HttpStatus.SC_OK, entry.getStatus());
entry = new HttpCacheEntry(requestDate, new Date(), HttpStatus.SC_OK, new Header[]{}, mockResource);
entry = new HttpCacheEntry(new Date(), responseDate, HttpStatus.SC_OK, new Header[]{}, mockResource);
entry = new HttpCacheEntry(new Date(), new Date(), HttpStatus.SC_OK, new Header[]{}, mockResource);
entry = new HttpCacheEntry(new Date(), new Date(), HttpStatus.SC_OK, headers, mockResource);
new HttpCacheEntry(new Date(), new Date(), HttpStatus.SC_OK, new Header[]{}, mockResource);
new HttpCacheEntry(new Date(), new Date(), HttpStatus.SC_OK,
new HashMap<String,String>());
entry = new HttpCacheEntry(new Date(), new Date(), HttpStatus.SC_OK,
variantMap);
entry = new HttpCacheEntry(new Date(), new Date(), HttpStatus.SC_OK,
variantMap);
entry = new HttpCacheEntry(new Date(), new Date(), HttpStatus.SC_OK,
new Header[]{}, mockResource);
entry = new HttpCacheEntry(new Date(), new Date(), HttpStatus.SC_OK,
headers, mockResource);
entry = new HttpCacheEntry(new Date(), new Date(), HttpStatus.SC_OK,
headers, mockResource);
entry = new HttpCacheEntry(new Date(), new Date(), HttpStatus.SC_OK,
headers, mockResource); | 0 |
public static final String ATTR_FILEUPLOAD = "org.apache.felix.webconsole.fileupload";
String adminTitle = "OSGi Management Console"; // ServletEngine.VERSION.getFullProductName();
String productName = "Felix"; // ServletEngine.VERSION.getShortProductName();
String productWeb = "http://felix.apache.org"; | 0 |
Copyright 2001 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/ | 0 |
import org.apache.aurora.scheduler.async.TaskGroups.GroupKey;
private static final GroupKey GROUP_A = new GroupKey(TASK_A.getAssignedTask().getTask());
private static final GroupKey GROUP_B = new GroupKey(TASK_B.getAssignedTask().getTask());
assignAndAssert(Result.FAILURE, GROUP_B, OFFER, firstAssignment);
assignAndAssert(Result.SUCCESS, GROUP_B, OFFER, secondAssignment);
assignAndAssert(Result.SUCCESS, GROUP_A, OFFER, firstAssignment);
assignAndAssert(Result.SUCCESS, GROUP_B, OFFER, secondAssignment);
assignAndAssert(Result.SUCCESS, GROUP_A, OFFER, assignment);
assignAndAssert(Result.SUCCESS, GROUP_B, OFFER, assignment);
assignAndAssert(Result.SUCCESS, GROUP_A, OFFER, assignment);
assignAndAssert(Result.SUCCESS, GROUP_A, OFFER, assignment);
public Capture<GroupKey> groupKey = createCapture();
expect(offerManager.launchFirst(capture(capture.assigner), capture(capture.groupKey)))
.andReturn(taskLaunched);
GroupKey groupKey,
assertEquals(groupKey, capture.groupKey.getValue()); | 0 |
import org.apache.beam.vendor.guava.v20_0.com.google.common.annotations.VisibleForTesting; | 0 |
import org.apache.http.annotation.NotThreadSafe; | 0 |
out.writeObject(decorated());
setCollection((Collection<E>) in.readObject()); | 0 |
protected synchronized Map.Entry<K, V> current() { | 0 |
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* @version CVS $Id: JSPEngineImplWLS.java,v 1.6 2004/03/05 13:01:57 bdelacretaz Exp $ | 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.
*/
package org.apache.ambari.server.checks;
import org.apache.ambari.server.orm.dao.RepositoryVersionDAO;
import org.apache.ambari.server.state.CheckHelper;
import org.apache.ambari.server.state.Clusters;
import org.mockito.Mockito;
import com.google.inject.Provider;
/**
* Used to help mock out cluster and repository queries.
*/
public class MockCheckHelper extends CheckHelper {
public RepositoryVersionDAO m_repositoryVersionDAO = Mockito.mock(RepositoryVersionDAO.class);
public Clusters m_clusters = Mockito.mock(Clusters.class);
public MockCheckHelper() {
clustersProvider = new Provider<Clusters>() {
@Override
public Clusters get() {
return m_clusters;
}
};
repositoryVersionDaoProvider = new Provider<RepositoryVersionDAO>() {
@Override
public RepositoryVersionDAO get() {
return m_repositoryVersionDAO;
}
};
}
} | 0 |
// Ignore this exception and attempt to shut down the reactor
// in an orderly fashion. An I/O exception will result in the
// reactor is an inconsistent state | 0 |
@Test | 0 |
import java.util.HashMap;
import java.util.Map;
// collect filters
// collect error pages
final Map<Long, ServletState> servletStates = new HashMap<Long, ServletState>();
final Map<Long, Map<Integer, FailureServletState>> failureServletStates = new HashMap<Long, Map<Integer,FailureServletState>>();
this.errorPageRegistry.getRuntimeInfo(servletStates, failureServletStates);
// collect servlets and resources
this.servletRegistry.getRuntimeInfo(servletStates, failureServletStates);
final Collection<ServletState> sortedServletStates = new TreeSet<ServletState>(ServletState.COMPARATOR);
sortedServletStates.addAll(servletStates.values());
final Collection<FailureServletState> sortedFailureServletStates = new TreeSet<FailureServletState>(ServletState.COMPARATOR);
for(final Map<Integer, FailureServletState> val : failureServletStates.values())
{
sortedFailureServletStates.addAll(val.values());
}
sortedServletStates,
sortedFailureServletStates); | 0 |
super(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes()); | 0 |
// TODO should this throw? | 0 |
import org.apache.beam.runners.core.TimerInternals.TimerData; | 0 |
assertEquals(4, outStages.size()); | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger LOG = LoggerFactory.getLogger(TestPubsubSignal.class);
LOG.warn("Error while polling for result: %s", e.getStatus()); | 0 |
import java.io.FileInputStream;
import org.apache.accumulo.core.Constants;
import org.apache.accumulo.server.cli.ClientOnDefaultTable;
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(log), Constants.UTF8));
this.tablet = tablet;
this.endRow = er;
this.prevEndRow = per;
this.server = server;
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(masterLog), Constants.UTF8));
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in, Constants.UTF8)); | 0 |
import org.apache.accumulo.core.trace.wrappers.TraceRunnable;
import org.apache.accumulo.core.trace.Tracer; | 1 |
import java.nio.charset.StandardCharsets;
byte[] keyBytes = "abcdefghijklmnopqrstuvwx".getBytes(StandardCharsets.US_ASCII);
byte[] keyBytes = "abcdefghijklmnopqrstuvwxyz012345".getBytes(StandardCharsets.US_ASCII);
byte[] keyBytes = "abcdefghijklmnopqrstuvwx".getBytes(StandardCharsets.US_ASCII);
byte[] keyBytes = "abcdefghijklmnop".getBytes(StandardCharsets.US_ASCII);
byte[] keyBytes = "abcdefghijklmnop".getBytes(StandardCharsets.US_ASCII);
byte[] keyBytes = "abcdefghijklmnopqrstuvwx".getBytes(StandardCharsets.US_ASCII);
byte[] keyBytes = "abcdefghijklmnopqrstuvwxyz012345".getBytes(StandardCharsets.US_ASCII); | 1 |
* Copyright 2006 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 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/model/beans/PropertyIterator.java,v 1.5 2002/10/12 21:02:24 dmitri Exp $
* $Revision: 1.5 $
* $Date: 2002/10/12 21:02:24 $
* @version $Revision: 1.5 $ $Date: 2002/10/12 21:02:24 $
if (this.startIndex == NodePointer.WHOLE_COLLECTION){
this.startIndex = 0;
} | 0 |
checkState(!getWindowedWrites() || (getFilenamePolicy() != null),
"When using windowed writes, a filename policy must be set via withFilenamePolicy()."); | 0 |
import java.util.Arrays;
import java.util.List;
import org.apache.felix.dm.ServiceDependency;
List extra = Arrays.asList(new ServiceDependency[] {
dm.createServiceDependency() // this dependency is available at this point
.setInstanceBound(true)
.setService(MyService1.class)
.setRequired(false)
.setCallbacks("bind", null),
dm.createServiceDependency() // not available: we should not be started
.setInstanceBound(true)
.setService(MyService2.class)
.setRequired(true)
.setAutoConfig("m_myService2")
});
s.add(extra); | 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.digester.annotations.catalog;
/**
*
*
* @version $Id$
* @since 2.1
*/
public interface Item {
void print();
} | 0 |
private Option optSplitsFile, base64Opt;
public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
String tableName = OptUtil.configureTableOpt(cl, shellState);
o.addOption(OptUtil.tableOpt("name of the table to add split points to")); | 0 |
return new GrowthList<>();
final List<E> list = new ArrayList<>();
final GrowthList<Integer> grower = new GrowthList<>();
final Collection<Integer> coll = new ArrayList<>();
final GrowthList<Integer> grower = new GrowthList<>();
final GrowthList<Integer> grower = new GrowthList<>();
final GrowthList<Integer> grower = new GrowthList<>(); | 1 |
import org.apache.log4j.Logger;
import com.google.common.cache.RemovalListener;
import com.google.common.cache.RemovalNotification;
public static final Logger logger = Logger.getLogger(ProxyServer.class);
static protected class ScannerPlusIterator {
static class CloseWriter implements RemovalListener<UUID,BatchWriter> {
@Override
public void onRemoval(RemovalNotification<UUID,BatchWriter> notification) {
try {
notification.getValue().close();
} catch (MutationsRejectedException e) {
logger.warn(e, e);
}
}
public CloseWriter() {}
}
static class CloseScanner implements RemovalListener<UUID,ScannerPlusIterator> {
@Override
public void onRemoval(RemovalNotification<UUID,ScannerPlusIterator> notification) {
final ScannerBase base = notification.getValue().scanner;
if (base instanceof BatchScanner) {
final BatchScanner scanner = (BatchScanner)base;
scanner.close();
}
}
public CloseScanner() {}
}
scannerCache = CacheBuilder.newBuilder().expireAfterAccess(10, TimeUnit.MINUTES).maximumSize(1000).removalListener(new CloseScanner()).build();
writerCache = CacheBuilder.newBuilder().expireAfterAccess(10, TimeUnit.MINUTES).maximumSize(1000).removalListener(new CloseWriter()).build(); | 0 |
beginRead(false);
beginWrite(false);
beginWrite(false); | 0 |
import org.apache.accumulo.core.client.mock.MockInstance;
return conn.getInstance() instanceof MockInstance || TableState.ONLINE == Tables.getTableState(conn.getInstance(), ID); | 0 |
final long MINUTES = 3 * 60 * 1000;
tServerList.addSortableColumn("Last Contact", new DurationType(0l, (long) Math.min(avgLastContact * 4, MINUTES)), null); | 0 |
System.err.println("Starting SSHD on port " + port);
sshd.start(); | 0 |
public TriggerResult onElement(OnElementContext c)
TriggerResult result = c.subTrigger(REPEATED).invokeElement(c);
c.forTrigger(c.subTrigger(REPEATED)).resetTree(c.window());
public MergeResult onMerge(OnMergeContext c) throws Exception {
MergeResult mergeResult = c.subTrigger(REPEATED).invokeMerge(c);
c.forTrigger(c.subTrigger(REPEATED)).resetTree(c.newWindow());
public TriggerResult onTimer(OnTimerContext c) throws Exception {
TriggerResult result = c.subTrigger(REPEATED).invokeTimer(c);
c.forTrigger(c.subTrigger(REPEATED)).resetTree(c.window()); | 0 |
enum DataElement { | 0 |
@Override
public Authorizations getAuthorizations() {
return authorizations;
}
| 0 |
c.setCurrentStackVersion(stackId);
c.setCurrentStackVersion(stackID); | 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.hive2.resources.uploads.parsers;
import org.apache.ambari.view.hive2.client.Row;
import java.io.IOException;
import java.io.Reader;
/**
* Interface defining methods for Parsers that can used for generating preview
* and uploading table into hive.
*/
public interface IParser extends Iterable<Row> {
/**
* @return returns the Reader that can be read to get the table data as CSV Text Data that can be uploaded directly
* to HDFS
*/
Reader getTableDataReader();
PreviewData parsePreview();
Row extractHeader();
void close() throws IOException;
} | 0 |
* public void processElement(ProcessContext c) {
* c.output(KV.of(c.element().getKey(), callWebService(c.element().getValue())));
ProcessContext c,
BoundedWindow window) {
key.write(c.element().getKey());
batch.add(c.element().getValue());
flushBatch(c, key, batch, numElementsInBatch);
OnTimerContext context,
context.timestamp(), window.toString());
flushBatch(context, key, batch, numElementsInBatch);
WindowedContext c,
c.output(KV.of(key.read(), values)); | 0 |
contentLen = 0; | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/util/Attic/UtilTagLibrary.java,v 1.4 2002/10/08 11:26:00 jstrachan Exp $
* $Revision: 1.4 $
* $Date: 2002/10/08 11:26:00 $
* $Id: UtilTagLibrary.java,v 1.4 2002/10/08 11:26:00 jstrachan Exp $
* @version $Revision: 1.4 $
public class UtilTagLibrary extends TagLibrary {
registerTag("sleep", SleepTag.class); | 0 |
return this.data.getContent().length;
return new ByteArrayInputStream(this.data.getContent());
this.data.setContent(new byte[0]); | 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.ext.awt.image.renderable;
import java.awt.color.ColorSpace;
/**
* This is an extension of our Filter interface that adds support for
* a color-interpolation specification which indicates what colorspace the
* operation should take place in.
*
* @author <a href="mailto:[email protected]">Thomas DeWeese</a>
* @version $Id$
*/
public interface FilterColorInterp extends Filter{
/**
* Returns true if this operation is to be performed in
* the linear sRGB colorspace, returns false if the
* operation is performed in gamma corrected sRGB.
*/
public boolean isCSLinear();
/**
* Sets the colorspace the operation will be performed in.
* @param csLinear if true this operation will be performed in the
* linear sRGB colorspace, if false the operation will be performed in
* gamma corrected sRGB.
*/
public void setCSLinear(boolean csLinear);
/**
* Returns the ColorSpace that the object will perform
* it's work in.
*/
public ColorSpace getOperationColorSpace();
} | 0 |
public abstract class AbstractOrderedMapTest<K, V> extends AbstractIterableMapTest<K, V> {
public AbstractOrderedMapTest(String testName) {
return AbstractOrderedMapTest.this.isRemoveSupported();
return AbstractOrderedMapTest.this.isGetStructuralModify();
return AbstractOrderedMapTest.this.isSetValueSupported();
return AbstractOrderedMapTest.this.getMap().mapIterator();
return AbstractOrderedMapTest.this.getMap().mapIterator();
return AbstractOrderedMapTest.this.getMap();
return AbstractOrderedMapTest.this.getConfirmed();
AbstractOrderedMapTest.this.verify(); | 0 |
*/
/**
* Empty constructor needed for the Class.newInstance() statement in
* Instruction.readInstruction(). Not to be used otherwise.
*/
StackInstruction() {
}
/**
* @param opcode instruction opcode
*/
protected StackInstruction(short opcode) {
super(opcode, (short) 1);
}
/** @return Type.UNKNOWN
*/
public Type getType( ConstantPoolGen cp ) {
return Type.UNKNOWN;
}
} | 0 |
import com.google.common.collect.Multimaps;
// Access on views, or non-atomic operations on this map must synchronize on the map itself.
// Please be careful to avoid securing any external locks when locking on this data structure,
// however.
private final Multimap<String, String> drainingTasksByHost =
Multimaps.synchronizedMultimap(HashMultimap.<String, String>create());
public void storageStarted(StorageStarted started) {
public void taskChangedState(final TaskStateChange change) {
storage.write(new MutateWork.NoResult.Quiet() {
@Override public void execute(MutableStoreProvider store) {
// If the task _was_ associated with a draining host, and it was the last task on the
// host.
boolean drained;
synchronized (drainingTasksByHost) {
drained = drainingTasksByHost.remove(host, change.getTaskId())
&& !drainingTasksByHost.containsKey(host);
}
if (drained) {
}
});
public Set<HostStatus> drain(final Set<String> hosts) {
public Set<HostStatus> endMaintenance(final Set<String> hosts) {
synchronized (drainingTasksByHost) {
drainingTasksByHost.keys().removeAll(hosts);
}
synchronized (drainingTasksByHost) {
return ImmutableMultimap.copyOf(drainingTasksByHost);
} | 0 |
final String svcPath = "OSGI-INF/" + finalName;
svcComp = ( svcComp == null ) ? svcPath :
svcComp.contains(svcPath) ? svcComp : svcComp + ", " + svcPath; | 0 |
@SuppressWarnings("unchecked")
@SuppressWarnings("unchecked")
DataSink<T> dataSink = inputDataSet.output(new AvroOutputFormat<>(new Path
PValue output = context.getOutput(transform);
PValue input = context.getInput(transform); | 0 |
private final BundleContext m_context;
private final CompositeFactory m_factory;
private HandlerManager[] m_handlers; | 0 |
WindowingStrategyTranslation.fromProto( | 0 |
@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"}) public class TConstraintViolationSummary implements org.apache.thrift.TBase<TConstraintViolationSummary, TConstraintViolationSummary._Fields>, java.io.Serializable, Cloneable, Comparable<TConstraintViolationSummary> {
public enum _Fields implements org.apache.thrift.TFieldIdEnum { | 0 |
/** Attribute name for dx attribute */
public static final String BATIK_EXT_DX_ATRIBUTE =
"dx";
/** Attribute name for dy attribute */
public static final String BATIK_EXT_DY_ATRIBUTE =
"dy";
/** Attribute name for dw attribute */
public static final String BATIK_EXT_DW_ATRIBUTE =
"dw";
/** Attribute name for dh attribute */
public static final String BATIK_EXT_DH_ATRIBUTE =
"dh";
/** Attribute name for filterPrimitiveMarginsUnits */
public static final String BATIK_EXT_FILTER_PRIMITIVE_MARGINS_UNITS_ATTRIBUTE
= "filterPrimitiveMarginsUnits";
/** Attribute name for filterMarginsUnits */
public static final String BATIK_EXT_FILTER_MARGINS_UNITS_ATTRIBUTE
= "filterMarginsUnits";
/** Default value for filter dx */
public static final String SVG_FILTER_DX_DEFAULT_VALUE = "0";
/** Default value for filter dy */
public static final String SVG_FILTER_DY_DEFAULT_VALUE = "0";
/** Default value for filter dw */
public static final String SVG_FILTER_DW_DEFAULT_VALUE = "0";
/** Default value for filter dh */
public static final String SVG_FILTER_DH_DEFAULT_VALUE = "0"; | 0 |
import org.apache.http.HttpRequest;
* @param request request failed die to an I/O exception.
boolean retryRequest(HttpRequest request, IOException exception, int executionCount, HttpContext context); | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
* @param reqline the request line to format
CharArrayBuffer formatRequestLine(CharArrayBuffer buffer,
RequestLine reqline)
* @param statline the status line to format
CharArrayBuffer formatStatusLine(CharArrayBuffer buffer,
StatusLine statline)
* @param header the header to format
CharArrayBuffer formatHeader(CharArrayBuffer buffer,
Header header) | 0 |
import org.apache.beam.sdk.transforms.Combine;
PCollection<Long> count =
windowed.apply(Combine.globally(Count.<Integer>combineFn()).withoutDefaults()); | 0 |
+ Iterables.transform(resources, Protobufs::toString));
.setName(JobKeys.canonicalString(Tasks.getJob(task))) | 0 |
* @param propertyClass
void addMixedIndex(String vertexIndex, AtlasPropertyKey propertyKey, Class propertyClass); | 0 |
KvSwap.create());
KvSwap.create()); | 0 |
Map<String,String> properties = new TreeMap<>();
Map<ByteBuffer,List<ColumnUpdate>> cells = new TreeMap<>(); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.