Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
1
|
---|---|
import com.google.bigtable.admin.v2.GetTableRequest;
import com.google.bigtable.v2.MutateRowRequest;
import com.google.bigtable.v2.MutateRowResponse;
import com.google.bigtable.v2.Mutation;
import com.google.bigtable.v2.ReadRowsRequest;
import com.google.bigtable.v2.Row;
import com.google.bigtable.v2.RowRange;
import com.google.bigtable.v2.RowSet;
import com.google.bigtable.v2.SampleRowKeysRequest;
import com.google.bigtable.v2.SampleRowKeysResponse;
BigtableTableName tableName = options.getInstanceName().toTableName(tableId);
.setName(options.getInstanceName().toTableNameStr(tableId))
.setStartKeyClosed(source.getRange().getStartKey().getValue())
.setEndKeyOpen(source.getRange().getEndKey().getValue())
RowSet rowSet = RowSet.newBuilder()
.addRowRanges(range)
.build();
.setRows(rowSet)
.setTableName(options.getInstanceName().toTableNameStr(source.getTableId()));
public ListenableFuture<MutateRowResponse> writeRecord(
KV<ByteString, Iterable<Mutation>> record)
.setTableName(options.getInstanceName().toTableNameStr(source.getTableId())) | 0 |
FileSKVWriter bmfw = FileOperations.getInstance().newWriterBuilder().forFile(fname, fs, conf).withTableConfiguration(acuconf).build();
FileSKVIterator bmfr = FileOperations.getInstance().newReaderBuilder().forFile(fname, fs, conf).withTableConfiguration(acuconf).build(); | 0 |
import org.apache.batik.util.CleanerThread;
DocumentState state;
synchronized (cacheMap) {
state = (DocumentState)cacheMap.get(uri);
}
return state.getDocument();
synchronized (cacheMap) {
cacheMap.put(uri, state);
}
return state.getDocument();
synchronized (cacheMap) {
cacheMap.put(uri, state);
}
return state.getDocument();
synchronized (cacheMap) {
cacheMap.clear();
}
DocumentState state;
synchronized (cacheMap) {
state = (DocumentState)cacheMap.get(uri);
}
private class DocumentState extends CleanerThread.SoftReferenceCleared {
super(document);
public void cleared() {
synchronized (cacheMap) {
cacheMap.remove(uri);
}
}
return (Document)get();
| 0 |
* @version $Revision$ $Date$ | 0 |
* @since 2.0
* @deprecated (2.0) use {@link #doSetLastModTime}
* @since 2.0
* @since 2.0 | 0 |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License. | 0 |
package org.apache.xml.security.stax.impl.algorithms;
import org.apache.xml.security.stax.ext.XMLSecurityException; | 0 |
/**
* Test if left regexp matches right.
*
* @param left first value
* @param right second value
* @return test result.
*/
public boolean matches(Object left, Object right) {
if (left == null && right == null) {
//if both are null L == R
return true;
}
if (left == null || right == null) {
// we know both aren't null, therefore L != R
return false;
}
final String arg = left.toString();
if (right instanceof java.util.regex.Pattern) {
return ((java.util.regex.Pattern) right).matcher(arg).matches();
} else {
return arg.matches(right.toString());
}
}
| 0 |
package org.apache.bcel.classfile;
import org.apache.bcel.Const; | 1 |
import java.util.logging.Logger;
import java.sql.SQLFeatureNotSupportedException;
@Override
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
throw new SQLFeatureNotSupportedException();
} | 0 |
//TODO: this method should be private
private void purgePoolMap() {
final Iterator<Map.Entry<T, RouteSpecificPool<T, C, E>>> it = this.routeToPool.entrySet().iterator();
while (it.hasNext()) {
final Map.Entry<T, RouteSpecificPool<T, C, E>> entry = it.next();
final RouteSpecificPool<T, C, E> pool = entry.getValue();
if (pool.getAllocatedCount() == 0) {
it.remove();
}
}
}
purgePoolMap();
purgePoolMap(); | 0 |
import static org.apache.beam.vendor.guava.v20_0.com.google.common.base.Preconditions.checkNotNull; | 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.beam.dsls.sql.interpreter.operator.math;
import java.util.List;
import java.util.Random;
import org.apache.beam.dsls.sql.interpreter.operator.BeamSqlExpression;
import org.apache.beam.dsls.sql.interpreter.operator.BeamSqlPrimitive;
import org.apache.beam.dsls.sql.schema.BeamSqlRow;
import org.apache.calcite.sql.type.SqlTypeName;
/**
* {@code BeamSqlMathUnaryExpression} for 'RAND_INTEGER([seed, ] numeric)'
* function.
*/
public class BeamSqlRandIntegerExpression extends BeamSqlExpression {
private Random rand = new Random();
private Integer seed = null;
public BeamSqlRandIntegerExpression(List<BeamSqlExpression> subExps) {
super(subExps, SqlTypeName.INTEGER);
}
@Override
public boolean accept() {
return true;
}
@Override
public BeamSqlPrimitive evaluate(BeamSqlRow inputRecord) {
int numericIdx = 0;
if (operands.size() == 2) {
int rowSeed = opValueEvaluated(0, inputRecord);
if (seed == null || seed != rowSeed) {
rand.setSeed(rowSeed);
}
numericIdx = 1;
}
return BeamSqlPrimitive.of(SqlTypeName.INTEGER,
rand.nextInt((int) opValueEvaluated(numericIdx, inputRecord)));
}
} | 0 |
/*
* Copyright 2001-2004 The Apache Software Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
package org.apache.commons.net.smtp; | 0 |
import org.apache.batik.gvt.renderer.ImageRenderer;
protected void startSVGLoadEventDispatcher(GraphicsNode root) {
* Creates a new renderer.
*/
protected ImageRenderer createImageRenderer() {
if (isDynamicDocument) {
return rendererFactory.createDynamicImageRenderer();
} else {
return rendererFactory.createStaticImageRenderer();
}
}
/** | 0 |
*
* @since 4.0
*/ | 0 |
package org.apache.batik.anim.dom; | 0 |
public final class StackMapTableEntry implements Cloneable { | 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 | 0 |
* Copyright 2002,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ | 0 |
package org.apache.bcel.data;
public class AttributeTestClassEM02
{
Runnable r = new Runnable()
{
public void run()
{
System.err.println("hello");
}
};
public static void main(String[] argv)
{
}
} | 0 |
private final Map<String, Aggregator<?>> aggregators = new HashMap<>();
@SuppressWarnings("unchecked")
Aggregator<In> aggregator = (Aggregator<In>) aggregators.get(named);
aggregator = new SparkAggregator<>(state);
@SuppressWarnings("unchecked")
Aggregator<In> aggregator = (Aggregator<In>) aggregators.get(named);
@SuppressWarnings("unchecked")
NamedAggregators.CombineFunctionState<In, Inter, Out> state = new NamedAggregators
.CombineFunctionState<>((Combine.CombineFn<In, Inter, Out>) combineFn);
aggregator = new SparkAggregator<>(state); | 0 |
if (numTimeouts < 1) {
} else {
}
if (mode == TFTP.ASCII_MODE) {
}
if (lastBlock == (block == 0 ? 65535 : (block - 1))) {
}
if (mode == TFTP.ASCII_MODE) {
} | 1 |
* @version $Revision$ $Date$ | 0 |
* Copyright (c) OSGi Alliance (2000, 2008). All Rights Reserved.
* @version $Revision: 5673 $ | 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/io/FilterReader.java,v 1.6 2006/03/14 01:20:23 hargrave Exp $
*
* (C) Copyright 2001 Sun Microsystems, Inc.
* Copyright (c) OSGi Alliance (2001, 2005). All Rights Reserved.
*
* 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 java.io;
public abstract class FilterReader extends java.io.Reader {
protected FilterReader(java.io.Reader var0) { }
public void close() throws java.io.IOException { }
public void mark(int var0) throws java.io.IOException { }
public boolean markSupported() { return false; }
public int read() throws java.io.IOException { return 0; }
public int read(char[] var0, int var1, int var2) throws java.io.IOException { return 0; }
public boolean ready() throws java.io.IOException { return false; }
public void reset() throws java.io.IOException { }
public long skip(long var0) throws java.io.IOException { return 0l; }
protected java.io.Reader in;
}
| 0 |
* Tests {@link HiveZKQuorumConfigAction} to ensure that the correct properties
public class HiveZKQuorumConfigActionTest {
private HiveZKQuorumConfigAction m_action = null;
m_action = new HiveZKQuorumConfigAction();
Field m_clusterField = HiveZKQuorumConfigAction.class.getDeclaredField("m_clusters");
* Tests that the correct properties are set.
public void testZKQuorumPropertiesSetCorrectly() throws Exception {
EasyMock.expect(m_cluster.getDesiredConfigByType(HiveZKQuorumConfigAction.HIVE_SITE_CONFIG_TYPE)).andReturn(m_hiveSiteConfig).atLeastOnce();
EasyMock.replay(m_executionCommand, m_clusters, m_cluster, m_hiveSiteConfig);
EasyMock.verify(m_executionCommand, m_clusters, m_cluster, m_hiveSiteConfig);
Assert.assertEquals(zookeeperQuorum, hiveSiteProperties.get(HiveZKQuorumConfigAction.HIVE_SITE_ZK_QUORUM));
Assert.assertEquals(zookeeperQuorum, hiveSiteProperties.get(HiveZKQuorumConfigAction.HIVE_SITE_ZK_CONNECT_STRING)); | 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 static org.junit.Assert.assertEquals;
assertEquals(EXPECTED_RESULT, out.toString(StandardCharsets.UTF_8.name())); | 0 |
package org.apache.felix.gogo.runtime.equinox; | 0 |
public class MiniAccumuloConfig {
* An empty or nonexistant temp directoy that Accumulo and Zookeeper can store data in. Creating the directory is left to the user. Java 7, Guava,
* and Junit provide methods for creating temporary directories.
public MiniAccumuloConfig(File dir, String rootPassword) {
public MiniAccumuloConfig setNumTservers(int numTservers) {
public MiniAccumuloConfig setSiteConfig(Map<String,String> siteConfig) {
} | 1 |
* @version $Revision$ $Date$ | 0 |
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@SuppressFBWarnings(value = "PATH_TRAVERSAL_IN", justification = "paths not set by user input") | 0 |
import org.apache.beam.sdk.io.common.NetworkTestHelper;
port = NetworkTestHelper.getAvailableLocalPort(); | 0 |
String name = context.getStepName(transform);
executionContext.getStepContext(name, name), | 0 |
partitions.addAll(shellState.getConnector().tableOperations().listSplits(oldTable)); | 0 |
void launchUpdater(String updateToken) throws ScheduleException;
@Override public void launchUpdater(String updateToken) throws ScheduleException { | 0 |
import org.apache.beam.sdk.coders.VarIntCoder;
import org.apache.beam.sdk.transforms.display.DisplayDataEvaluator;
import org.apache.beam.sdk.values.POutput;
@Test
@Category(RunnableOnService.class)
public void testCombinePerKeyPrimitiveDisplayData() {
DisplayDataEvaluator evaluator = DisplayDataEvaluator.create();
CombineTest.UniqueInts combineFn = new CombineTest.UniqueInts();
PTransform<PCollection<KV<Integer, Integer>>, ? extends POutput> combine =
Combine.perKey(combineFn);
Set<DisplayData> displayData = evaluator.displayDataForPrimitiveTransforms(combine,
KvCoder.of(VarIntCoder.of(), VarIntCoder.of()));
assertThat("Combine.perKey should include the combineFn in its primitive transform",
displayData, hasItem(hasDisplayItem("combineFn", combineFn.getClass())));
}
| 0 |
/*
* Copyright 2001-2004 The Apache Software Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* @version $Revision: 1.15 $ $Date: 2004/02/18 01:20:35 $ | 0 |
import java.util.Iterator;
import com.twitter.mesos.gen.TaskEvent;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@Test
public void testAuditMessage() throws Exception {
control.replay();
buildScheduler();
scheduler.createJob(makeJob(OWNER_A, JOB_A, DEFAULT_TASK, 1));
String taskId = Tasks.id(getOnlyTask(queryByOwner(OWNER_A)));
changeStatus(taskId, ASSIGNED);
changeStatus(taskId, STARTING);
changeStatus(taskId, FAILED, "bad stuff happened");
Iterator<Pair<ScheduleStatus, String>> expectedEvents =
ImmutableList.<Pair<ScheduleStatus, String>>builder()
.add(Pair.<ScheduleStatus, String>of(PENDING, null))
.add(Pair.<ScheduleStatus, String>of(ASSIGNED, null))
.add(Pair.<ScheduleStatus, String>of(STARTING, null))
.add(Pair.<ScheduleStatus, String>of(FAILED, "bad stuff happened"))
.build()
.iterator();
for (TaskEvent event : getTask(taskId).getTaskEvents()) {
Pair<ScheduleStatus, String> expected = expectedEvents.next();
assertEquals(expected.getFirst(), event.getStatus());
assertEquals(expected.getSecond(), event.getMessage());
}
}
public void changeStatus(Query query, ScheduleStatus status, @Nullable String message) {
scheduler.setTaskStatus(query, status, message);
}
changeStatus(query, status, null);
changeStatus(taskId, status, null);
}
public void changeStatus(String taskId, ScheduleStatus status, @Nullable String message) {
changeStatus(query(Arrays.asList(taskId)), status, message); | 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.server.state.live.node;
public class NodeHealthyHeartbeatEvent extends NodeEvent {
private final long heartbeatTime;
public NodeHealthyHeartbeatEvent(String nodeName, long heartbeatTime) {
super(nodeName, NodeEventType.NODE_HEARTBEAT_HEALTHY);
this.heartbeatTime = heartbeatTime;
}
/**
* @return the heartbeatTime
*/
public long getHeartbeatTime() {
return heartbeatTime;
}
} | 0 |
Map<String, String> taskParameters = task.getParameters();
commandParams.putAll(taskParameters); | 0 |
import org.apache.http.nio.util.SharedInputBuffer;
import org.apache.http.nio.util.SharedOutputBuffer;
SharedInputBuffer inbuffer = new SharedInputBuffer(20480, conn);
SharedOutputBuffer outbuffer = new SharedOutputBuffer(20480, conn); | 0 |
* @version $Revision$ | 0 |
import org.apache.cocoon.util.avalon.CLLoggerWrapper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/** The default logger for this class. */
private Log logger = LogFactory.getLog(getClass());
* Initialize logger
*
* @throws Exception
*/
public void init() throws Exception {
this.enableLogging(new CLLoggerWrapper(this.logger));
}
/** | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/xml/Attic/ForEachTag.java,v 1.10 2002/10/30 19:16:23 jstrachan Exp $
* $Revision: 1.10 $
* $Date: 2002/10/30 19:16:23 $
* Copyright (c) 2002 The Apache Software Foundation. All rights
* $Id: ForEachTag.java,v 1.10 2002/10/30 19:16:23 jstrachan Exp $
* @version $Revision: 1.10 $ | 0 |
private final String propertyName;
* Returns the property name associated to this setter rule.
*
* @return The property name associated to this setter rule
*/
public String getPropertyName()
{
return propertyName;
}
/** | 0 |
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static final Logger log = LoggerFactory.getLogger(PrintInfo.class); | 0 |
* @version CVS $Id: PartOnDisk.java,v 1.3 2003/11/13 14:56:12 sylvain Exp $
// Ensure the file will be deleted when we exit the JVM
this.file.deleteOnExit();
if (this.file != null) {
return new FileInputStream(file);
} else {
throw new IllegalStateException("This part has already been disposed.");
}
public void dispose() {
if (this.file != null) {
this.file.delete();
this.file = null;
}
}
public void finalize() throws Throwable {
// Ensure the file has been deleted
dispose();
super.finalize();
} | 0 |
import org.apache.commons.digester.Rule; | 0 |
package org.apache.felix.rootcause; | 0 |
private String tableId;
public ProblemReportingIterator(AccumuloServerContext context, String tableId, String resource, boolean continueOnError,
this.tableId = tableId;
return new ProblemReportingIterator(context, tableId, resource, continueOnError, source.deepCopy(env));
ProblemReports.getInstance(context).report(new ProblemReport(tableId, ProblemType.FILE_READ, resource, ioe));
ProblemReports.getInstance(context).report(new ProblemReport(tableId, ProblemType.FILE_READ, resource, ioe)); | 0 |
public static final AbstractMap.SimpleEntry<String, String> DEFAULT_SERVICE_INSTALLABLE_PROPERTY = new AbstractMap.SimpleEntry<>("installable", "true");
public static final AbstractMap.SimpleEntry<String, String> DEFAULT_SERVICE_MANAGED_PROPERTY = new AbstractMap.SimpleEntry<>("managed", "true");
public static final AbstractMap.SimpleEntry<String, String> DEFAULT_SERVICE_MONITORED_PROPERTY = new AbstractMap.SimpleEntry<>("monitored", "true"); | 0 |
MessageFormat mf = new MessageFormat(msg);
return mf.format(args, new StringBuffer(), null).toString(); | 0 |
public abstract BeamSqlPrimitive evaluate(BeamSqlRow inputRow); | 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 |
* @version $Id$ | 0 |
/*
* $Header: $
* $Revision$
* $Date$
*
* ====================================================================
*
* 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http;
import org.apache.http.params.HttpParams;
/**
* <p>
* </p>
* @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
*
* @version $Revision$
*
* @since 4.0
*/
public interface HttpResponse {
StatusLine getStatusLine();
HeaderGroup getHeaders();
HttpEntity getEntity();
HttpParams getParams();
} | 0 |
/** '*' operator. */
@Override
protected BigDecimal calc(BigDecimal left, BigDecimal right) { | 0 |
System.err.println("\tWhere: a selector is a list of numbers/number ranges - 1,2,3-10" +
" - or a list of strings to match in the initial From line"); | 0 |
import org.apache.ambari.logfeeder.conf.LogEntryCacheConfig;
import org.apache.ambari.logfeeder.conf.LogFeederProps;
private LogFeederProps logFeederProps;
logFeederProps = new LogFeederProps();
LogEntryCacheConfig logEntryCacheConfig = new LogEntryCacheConfig();
logFeederProps.setLogEntryCacheConfig(logEntryCacheConfig);
public void init(LogFeederProps logFeederProps) {
inputFile.init(logFeederProps); | 0 |
import com.google.api.gax.longrunning.OperationFuture;
OperationFuture<Database, CreateDatabaseMetadata> op =
op.get(); | 0 |
loc = TabletLocator.getInstance(instance, scanState.tableName).locateTablet(scanState.startRow, scanState.skipStartRow, false, credentials);
TabletLocator.getInstance(instance, scanState.tableName).invalidateCache(loc.tablet_extent);
TabletLocator.getInstance(instance, scanState.tableName).invalidateCache(loc.tablet_location); | 0 |
private static final List<Iterable<Integer>> TEST_VALUES = Arrays.asList(
Collections.emptyList(),
Collections.singletonList(13),
Arrays.asList(1, 2, 3, 4),
CoderProperties.coderDecodeEncodeContentsInSameOrder( | 0 |
import org.apache.beam.sdk.values.WindowingStrategy; | 0 |
@Deprecated
@Deprecated
@Deprecated | 1 |
m_resourceBundle = ( ResourceImpl ) new DataModelHelperImpl().createResource( bundleFile.toURI().toURL() ); | 0 |
private final boolean sharedCache;
* @param sharedCache whether to behave as a shared cache (true) or a
* non-shared/private cache (false)
public ResponseCachingPolicy(int maxObjectSizeBytes, boolean sharedCache) {
this.sharedCache = sharedCache;
|| (sharedCache && "private".equals(elem.getName()))) {
if (sharedCache) {
Header[] authNHeaders = request.getHeaders("Authorization");
if (authNHeaders != null && authNHeaders.length > 0) {
String[] authCacheableParams = {
"s-maxage", "must-revalidate", "public"
};
return hasCacheControlParameterFrom(response, authCacheableParams);
} | 0 |
import org.apache.ambari.server.api.query.render.DefaultRenderer;
import org.apache.ambari.server.api.query.render.Renderer;
Renderer renderer = new DefaultRenderer();
expect(request.getRenderer()).andReturn(renderer);
query.setRenderer(renderer);
Renderer renderer = new DefaultRenderer();
expect(request.getRenderer()).andReturn(renderer);
query.setRenderer(renderer);
Renderer renderer = new DefaultRenderer();
expect(request.getRenderer()).andReturn(renderer);
query.setRenderer(renderer);
Renderer renderer = new DefaultRenderer();
expect(request.getRenderer()).andReturn(renderer);
query.setRenderer(renderer);
Renderer renderer = new DefaultRenderer();
expect(request.getRenderer()).andReturn(renderer);
query.setRenderer(renderer);
Renderer renderer = new DefaultRenderer();
expect(request.getRenderer()).andReturn(renderer);
query.setRenderer(renderer);
Renderer renderer = new DefaultRenderer();
expect(request.getRenderer()).andReturn(renderer);
query.setRenderer(renderer); | 0 |
Map<String,String> pos = new HashMap<>();
Set<String> data= new HashSet<>();
Set<String> r= new HashSet<>();
Set<String> data= new HashSet<>(); | 1 |
parameter = new OutParameter<>(Types.INTEGER, Number.class);
parameter = new OutParameter<>(Types.INTEGER, Number.class, VALUE); | 0 |
* </p>
* </p> | 0 |
.withInitialTimestampInStream(now)
.withRequestRecordsLimit(1000)) | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/observed/Attic/TestObservedBuffer.java,v 1.2 2003/09/21 16:00:55 scolebourne Exp $
* {@link ObservableBuffer} implementation.
* @version $Revision: 1.2 $ $Date: 2003/09/21 16:00:55 $
return ObservableBuffer.decorate(new ArrayStack(), ObservedTestHelper.LISTENER);
return ObservableBuffer.decorate(stack, ObservedTestHelper.LISTENER);
public ObservableCollection createObservedCollection() {
return ObservableBuffer.decorate(new ArrayStack());
public ObservableCollection createObservedCollection(Object listener) {
return ObservableBuffer.decorate(new ArrayStack(), listener); | 0 |
package org.apache.commons.vfs2.provider.jar;
import org.apache.commons.vfs2.FileName;
import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.provider.zip.ZipFileObject; | 1 |
* JDK6's SSLSocketFactory doesn't seem to properly set the protocols on the Sockets that it creates
* which causes an SSLv2 client hello message during handshake, even when only TLSv1 is enabled.
* This only appears to be an issue on the client sockets, not the server sockets.
public ProtocolOverridingSSLSocketFactory(final SSLSocketFactory delegate,
final String[] enabledProtocols) {
public Socket createSocket(final Socket socket, final String host, final int port,
final boolean autoClose) throws IOException {
public Socket createSocket(final String host, final int port)
throws IOException, UnknownHostException {
public Socket createSocket(final String host, final int port, final InetAddress localAddress,
final int localPort) throws IOException, UnknownHostException {
public Socket createSocket(final InetAddress host, final int port, final InetAddress localAddress,
final int localPort) throws IOException {
* Set the {@link javax.net.ssl.SSLSocket#getEnabledProtocols() enabled protocols} to
* {@link #enabledProtocols} if the <code>socket</code> is a {@link SSLSocket} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/test/org/apache/commons/validator/LocaleTest.java,v 1.2 2003/03/13 02:09:23 dgraham Exp $
* $Revision: 1.2 $
* $Date: 2003/03/13 02:09:23 $
import java.util.Locale;
import junit.framework.Test;
import junit.framework.TestCase;
* @version $Revision: 1.2 $ $Date: 2003/03/13 02:09:23 $ | 0 |
import org.junit.Assert;
Assert.fail("validate auth");
Assert.fail("validate auth");
Assert.fail("validate auth");
Assert.fail("validate auth"); | 0 |
/**
* Implementations should return null if a range can not be converted to a bloom key.
*
*/
public org.apache.hadoop.util.bloom.Key transform(Range range);
public org.apache.hadoop.util.bloom.Key transform(Key key); | 1 |
throw new RuntimeException(e); | 0 |
import org.apache.hc.core5.http.EntityDetails;
EntityDetails getEntityDetails(); | 0 |
sessionId = tracker.createSession(CONNECTION_TIMEOUT);
// Track global session
tracker.trackSession(sessionId, CONNECTION_TIMEOUT);
sessionId = tracker.createSession(CONNECTION_TIMEOUT);
tracker.trackSession(sessionId, CONNECTION_TIMEOUT);
tracker.trackSession(sessionId, CONNECTION_TIMEOUT); | 0 |
* @throws InterruptedException
* @throws InterruptedException
* https://issues.apache.org/jira/browse/ZOOKEEPER-1858 | 0 |
class SparkGlobalCombineFn<InputT, AccumT, OutputT> extends SparkAbstractCombineFn { | 0 |
boolean wasExtension = bundle.isExtension();
// then attach the extension
if (!wasExtension && bundle.isExtension())
m_resolverState.refreshSystemBundleModule(m_extensionManager.getModule());
else if (wasExtension)
else
{
// Acquire bundle lock.
try
{
acquireBundleLock(this, Bundle.RESOLVED | Bundle.STARTING | Bundle.ACTIVE);
}
catch (IllegalStateException ex)
{
throw new BundleException(
"System bundle must be active to attach an extension.");
}
try
{
m_extensionManager.startExtensionBundle(this, bundle);
}
finally
{
releaseBundleLock(this);
}
}
if (!bundle.isUsed() && !bundle.isExtension())
bundle.setRemovalPending(true);
rememberUninstalledBundle(bundle);
acquireBundleLock(this, Bundle.RESOLVED | Bundle.STARTING | Bundle.ACTIVE);
if (systemBundle == bundles[i])
// TODO: FRAMEWORK - Is this correct?
helpers[i] = new RefreshHelper(bundles[i]);
// TODO: FRAMEWORK - this will stop the system bundle if
// somebody called refresh 0. Is this what we want? | 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 | 0 |
* @see org.apache.batik.util.awt.svg.SVGGraphics2D | 0 |
port = Utils.getFreePort(); | 0 |
private transient Map<KeyedWindow, State> activeStates;
private void flushStates() {
for (Map.Entry<KeyedWindow, State> e : activeStates.entrySet()) {
State s = e.getValue();
s.flush();
s.close();
}
activeStates.clear();
}
| 0 |
import static org.mockito.ArgumentMatchers.isA;
import static org.mockito.ArgumentMatchers.same; | 0 |
import java.util.Arrays;
// all following lines must be padded with nextLineTabStop space characters
* The wrap point is the last position before startPos+width having a
char[] padding = new char[len];
Arrays.fill(padding, ' ');
return new String(padding); | 0 |
//hh.start();
}
/**
* Explicitly start HH
*/
public static void statHeartBeatHandler() { | 0 |
public void invalidtestSave() throws Exception | 0 |
KeyPairProvider.SSH_RSA + "," + KeyPairProvider.SSH_DSS; | 0 |
package org.apache.hc.core5.http.io.entity; | 1 |
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. | 0 |
/** Describes a customer. */ | 0 |
import com.google.common.annotations.VisibleForTesting;
if (!selectedPorts.isEmpty()) {
resourceBuilder.add(Resources.makeMesosRangeResource(Resources.PORTS, selectedPorts));
@VisibleForTesting
public static Resource makeMesosRangeResource(String name, Set<Integer> values) { | 0 |
/**
* @return
*/
boolean exists(); | 0 |
* Copyright 2002,2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.