Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
1
|
---|---|
* @param <E> the type held in the multiset | 0 |
import com.twitter.common.inject.TimedInterceptor.Timed;
@Timed("scheduler_resource_offers")
@Timed("scheduler_status_update")
@Timed("scheduler_framework_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.
*/ | 0 |
*
*
*
"cp1251", | 0 |
BatchInputSplit split = new BatchInputSplit("table", "1", Arrays.asList(ranges),
new String[] {"localhost"});
BatchInputSplit split = new BatchInputSplit("table", "1", Arrays.asList(ranges),
new String[] {"localhost"});
Assert.assertEquals(DeprecationUtil.isMockInstanceSet(split),
DeprecationUtil.isMockInstanceSet(newSplit)); | 0 |
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly; | 0 |
* @version $Revision: 1.12 $ $Date: 2004/06/30 19:06:38 $
public static final Capability SET_LAST_MODIFIED_FILE = new Capability("SET_LAST_MODIFIED_FILE");
/**
* folder set last-modified time is supported.
*/
public static final Capability SET_LAST_MODIFIED_FOLDER = new Capability("SET_LAST_MODIFIED_FOLDER"); | 0 |
package org.apache.commons.ognl.test.objects; | 0 |
import java.util.Collection;
public static final String VALIDATE_CONFIG_DIRECTIVE = "validate_config";
@Override
public Collection<String> getCreateDirectives() {
Collection<String> directives = super.getCreateDirectives();
directives.add(VALIDATE_CONFIG_DIRECTIVE);
return directives;
} | 0 |
import org.codehaus.jettison.json.JSONException;
lineageService.getInputsGraph(tableName);
JSONObject results = getInputsGraph("sales_fact_monthly_mv");
JSONObject results = getInputsGraph("table2");
public void testGetOutputsGraphForEntityInvalidArguments(final String tableId, String expectedException)
lineageService.getOutputsGraphForEntity(tableId);
JSONObject results = getOutputsGraph("sales_fact");
JSONObject results = getSchema(tableName);
assertColumn(rows.getJSONObject(index));
assertColumn(rows.getJSONObject(index));
private void assertColumn(JSONObject jsonObject) throws JSONException {
assertNotNull(jsonObject.getString("name"));
assertNotNull(jsonObject.getString("comment"));
assertNotNull(jsonObject.getString("dataType"));
Assert.assertEquals(jsonObject.getString("$typeName$"), "hive_column");
}
private JSONObject getSchema(String tableName) throws Exception {
return new JSONObject(lineageService.getSchema("qualified:" + tableName));
}
private JSONObject getInputsGraph(String tableName) throws Exception {
return new JSONObject(lineageService.getInputsGraph("qualified:" + tableName));
}
private JSONObject getOutputsGraph(String tableName) throws Exception {
return new JSONObject(lineageService.getOutputsGraph("qualified:" + tableName));
}
JSONObject results = getSchema(tableName);
results = getInputsGraph(tableName);
results = getOutputsGraph(tableName);
getSchema(tableName);
getInputsGraph(tableName);
getOutputsGraph(tableName);
results = getSchema(tableName);
results = getOutputsGraph(tableName);
results = getInputsGraph(tableName); | 0 |
public AsyncEchoShellFactory() {
super();
}
public EchoShell() {
super();
}
String s = buffer.substring(0, i + 1);
byte[] bytes = s.getBytes(StandardCharsets.UTF_8); | 0 |
PCollectionView<Iterable<Void>> cleanupSignalView = outputs.get(cleanupSignal)
.apply(View.<Void>asIterable()); | 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.
* @version $Revision: 1.4 $ | 1 |
* @version $Id: DocumentHelper.java,v 1.3 2004/03/01 20:54:30 cziegeler Exp $
protected static DocumentBuilder createBuilder() throws ParserConfigurationException { | 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.cm.integration.helper;
import org.osgi.framework.BundleContext;
import org.osgi.service.cm.ManagedServiceFactory;
public class MultiManagedServiceFactoryTestActivator extends ManagedServiceFactoryTestActivator
{
public static MultiManagedServiceFactoryTestActivator INSTANCE;
public void start( BundleContext context ) throws Exception
{
super.start( context );
context.registerService( ManagedServiceFactory.class.getName(), this, getServiceProperties( context ) );
INSTANCE = this;
}
@Override
public void stop( BundleContext context ) throws Exception
{
INSTANCE = null;
super.stop( context );
}
} | 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.
* @version $Revision: 1.4 $ | 0 |
import org.apache.atlas.AtlasConfiguration;
int maxLimit = AtlasConfiguration.SEARCH_MAX_LIMIT.getInt();
int defaultLimit = AtlasConfiguration.SEARCH_DEFAULT_LIMIT.getInt(); | 0 |
public Map<String, Set<PropertyInfo>> getDefaultProperties(StackId stack, Cluster cluster)
Map<String, Set<PropertyInfo>> defaultPropertiesByType = new HashMap<String, Set<PropertyInfo>>();
defaultPropertiesByType.put(type, new HashSet<PropertyInfo>());
defaultPropertiesByType.get(type).add(stackDefaultProperty);
defaultPropertiesByType.put(type, new HashSet<PropertyInfo>());
defaultPropertiesByType.get(type).add(serviceDefaultProperty); | 0 |
@Inject
RequestScheduleDAO requestScheduleDAO;
public void setSourceScheduleForRequest(long requestId, long scheduleId) {
RequestEntity requestEntity = requestDAO.findByPK(requestId);
if (requestEntity != null) {
RequestScheduleEntity scheduleEntity = requestScheduleDAO.findById(scheduleId);
if (scheduleEntity != null) {
requestEntity.setRequestScheduleEntity(scheduleEntity);
//we may want to break entity graph here for perf purposes (when list size is too large)
scheduleEntity.getRequestEntities().add(requestEntity);
requestDAO.merge(requestEntity);
requestScheduleDAO.merge(scheduleEntity);
} else {
String message = String.format("Request Schedule with id=%s not found", scheduleId);
LOG.error(message);
throw new RuntimeException(message);
}
} else {
String message = String.format("Request with id=%s not found", scheduleId);
LOG.error(message);
throw new RuntimeException(message);
}
}
@Override
@Transactional | 1 |
import com.google.gson.GsonBuilder;
import org.apache.ambari.logfeeder.common.LogEntryParseTester;
import org.apache.commons.io.FileUtils;
import org.apache.log4j.LogManager;
import org.springframework.boot.Banner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.system.ApplicationPidFileWriter;
@SpringBootApplication(
scanBasePackages = {"org.apache.ambari.logfeeder"}
)
public static void main(String[] args) {
LogFeederCommandLine cli = new LogFeederCommandLine(args);
if (cli.isTest()) {
test(cli);
String pidFile = System.getenv("PID_FILE") == null ? "logfeeder.pid" : System.getenv("PID_FILE");
new SpringApplicationBuilder(LogFeeder.class)
.bannerMode(Banner.Mode.OFF)
.listeners(new ApplicationPidFileWriter(pidFile))
.run(args);
private static void test(LogFeederCommandLine cli) { | 0 |
if (file != null) {
file.close();
} | 0 |
* @version $Revision$ | 0 |
import org.w3c.dom.svg.SVGPathSegList; | 0 |
package org.apache.felix.rootcause; | 0 |
import org.apache.beam.vendor.grpc.v1p13p1.com.google.protobuf.ByteString; | 0 |
* @param conn The connection to execute the query in.
* @param sql The query to execute.
* @param param The replacement parameter.
* @param rsh The handler that converts the results into an object. | 0 |
Set<String> propertyIds = new HashSet<>();
Map<Resource.Type, String> keyPropertyIds = new HashMap<>(); | 0 |
package com.twitter.mesos.scheduler.state;
import com.twitter.mesos.scheduler.base.ScheduleException; | 0 |
public SocketFactoryMockup(final String name) {
final Socket sock,
final InetSocketAddress remoteAddress,
final InetSocketAddress localAddress,
final HttpParams params) throws IOException, UnknownHostException, ConnectTimeoutException {
public boolean isSecure(final Socket sock) { | 0 |
@SuppressWarnings("serial")
@SuppressWarnings("serial") | 0 |
jsonObject.add(((MapFieldDescriptorImpl)m).getJsonName(), context.serialize(m)); | 0 |
private static final ProtocolVersion HTTP_1_1 = new ProtocolVersion("HTTP", 1, 1); | 0 |
import java.util.stream.Collectors;
return peekOutputElementsWithTimestamp()
.stream()
.map(TimestampedValue::getValue)
.collect(Collectors.toList());
return getImmutableOutput(mainOutputTag)
.stream()
.map(input -> TimestampedValue.of(input.getValue(), input.getTimestamp()))
.collect(Collectors.toList());
return getImmutableOutput(tag)
.stream()
.map(ValueInSingleWindow::getValue)
.collect(Collectors.toList()); | 0 |
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact [email protected].
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Software Foundation.
* @version $Revision: 1.3 $ $Date: 2003/07/27 17:11:38 $ | 0 |
import static org.apache.accumulo.fate.util.UtilWaitThread.sleepUninterruptibly; | 1 |
public @interface NotifyDelegate { }
@NotifyDelegate SchedulingFilter delegate, | 0 |
public class SVGLine extends SVGGraphicObjectConverter {
* @param generatorContext used to build Elements
public SVGLine(SVGGeneratorContext generatorContext) {
super(generatorContext);
public Element toSVG(Line2D line) {
Element svgLine =
generatorContext.domFactory.createElementNS(SVG_NAMESPACE_URI,
SVG_LINE_TAG); | 0 |
LOG.info("Received killTask request for " + taskID); | 0 |
public static final String UPGRADE_CLUSTER_NAME = "Upgrade/cluster_name";
public static final String UPGRADE_VERSION = "Upgrade/repository_version";
public static final String UPGRADE_TYPE = "Upgrade/upgrade_type";
public static final String UPGRADE_PACK = "Upgrade/pack";
public static final String UPGRADE_REQUEST_ID = "Upgrade/request_id";
public static final String UPGRADE_FROM_VERSION = "Upgrade/from_version";
public static final String UPGRADE_TO_VERSION = "Upgrade/to_version";
public static final String UPGRADE_DIRECTION = "Upgrade/direction";
public static final String UPGRADE_DOWNGRADE_ALLOWED = "Upgrade/downgrade_allowed";
public static final String UPGRADE_REQUEST_STATUS = "Upgrade/request_status";
public static final String UPGRADE_SUSPENDED = "Upgrade/suspended";
public static final String UPGRADE_ABORT_REASON = "Upgrade/abort_reason";
public static final String UPGRADE_SKIP_PREREQUISITE_CHECKS = "Upgrade/skip_prerequisite_checks";
public static final String UPGRADE_FAIL_ON_CHECK_WARNINGS = "Upgrade/fail_on_check_warnings"; | 1 |
"You may try --auto-fix-database flag to attempt to fix issues automatically. " + | 0 |
import static com.google.common.base.Preconditions.checkState;
import org.apache.beam.sdk.coders.Coder;
import org.apache.beam.sdk.io.BoundedSource;
import org.apache.beam.sdk.io.CountingSource;
import org.apache.beam.sdk.io.Read;
public void splitsInputs() {
Pipeline p = getPipeline();
PCollection<Long> longs = p.apply(Read.from(MustSplitSource.of(CountingSource.upTo(3))));
PAssert.that(longs).containsInAnyOrder(0L, 1L, 2L);
p.run();
}
@Test
private static class MustSplitSource<T> extends BoundedSource<T>{
public static <T> BoundedSource<T> of(BoundedSource<T> underlying) {
return new MustSplitSource<>(underlying);
}
private final BoundedSource<T> underlying;
public MustSplitSource(BoundedSource<T> underlying) {
this.underlying = underlying;
}
@Override
public List<? extends BoundedSource<T>> splitIntoBundles(
long desiredBundleSizeBytes, PipelineOptions options) throws Exception {
// Must have more than
checkState(
desiredBundleSizeBytes < getEstimatedSizeBytes(options),
"Must split into more than one source");
return underlying.splitIntoBundles(desiredBundleSizeBytes, options);
}
@Override
public long getEstimatedSizeBytes(PipelineOptions options) throws Exception {
return underlying.getEstimatedSizeBytes(options);
}
@Override
public boolean producesSortedKeys(PipelineOptions options) throws Exception {
return underlying.producesSortedKeys(options);
}
@Override
public BoundedReader<T> createReader(PipelineOptions options) throws IOException {
throw new IllegalStateException(
"The MustSplitSource cannot create a reader without being split first");
}
@Override
public void validate() {
underlying.validate();
}
@Override
public Coder<T> getDefaultOutputCoder() {
return underlying.getDefaultOutputCoder();
}
} | 0 |
import org.apache.hc.core5.http.config.Http1Config;
private final Http1Config http1Config;
final Http1Config http1Config,
this.http1Config = http1Config != null ? http1Config : Http1Config.DEFAULT;
http1Config, | 0 |
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
private ScheduledExecutorService executor;
executor = createMock(ScheduledExecutorService.class);
expect(executor.schedule(
eq(penaltyMs),
eq(TimeUnit.MILLISECONDS)))
.andReturn(null); | 0 |
import org.apache.accumulo.core.data.TableId;
TableId tableId = TableId.of(client.tableOperations().tableIdMap().get(tablename));
group = group.substring(tableId.canonical().length() + 1).substring(0, 2); | 0 |
import org.apache.sshd.common.session.SessionContext;
* <U>appended</U> to the standard {@link SessionContext#DEFAULT_SSH_VERSION_PREFIX}.
return SessionContext.DEFAULT_SSH_VERSION_PREFIX + (GenericUtils.isEmpty(ident) ? manager.getVersion() : ident);
for (byte[] data = new byte[SessionContext.MAX_VERSION_LINE_LENGTH];;) { | 0 |
if (!(prefix.equals(""))) { | 0 |
* @version CVS $Id: EPAttribute.java,v 1.2 2003/03/11 19:05:01 vgritsenko Exp $ | 0 |
checkNotNull(timestamp);
checkNotNull(windows);
| 0 |
* @version $Id$ | 0 |
// Implementstion methods | 0 |
* @param data the buffer containing the Base64-encoded data
* @param off the start offset (zero-based)
* @param length the number of bytes to convert
* @param out the output stream to hold the decoded bytes
* | 0 |
splits.add((r.nextLong() & 0x7fffffffffffffffL) % 1000000000000L); | 0 |
import org.apache.sshd.common.util.helper.LazyMatchingTypeIterable;
return LazyMatchingTypeIterable.lazySelectMatchingTypes(identities, KeyPair.class);
return LazyMatchingTypeIterable.lazySelectMatchingTypes(identities, String.class);
return LazyMatchingTypeIterable.lazySelectMatchingTypes(identities, Object.class); | 0 |
import org.apache.accumulo.server.conf.ServerConfigurationFactory;
AccumuloConfiguration config = new ServerConfigurationFactory(HdfsZooInstance.getInstance()).getConfiguration(); | 1 |
Cipher cipher = DefaultCryptoModuleUtils.getCipher(params.getAllOptions().get(Property.CRYPTO_DEFAULT_KEY_STRATEGY_CIPHER_SUITE.getKey()),
params.getSecurityProvider()); | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting; | 0 |
import org.apache.http.nio.reactor.SessionRequest;
/**
* Session request handle class used by I/O reactor implementations to keep
* a reference to a {@link SessionRequest} along with the time the request
* was made.
*/ | 0 |
import com.google.common.collect.LinkedListMultimap;
import com.google.common.collect.ListMultimap;
import java.util.Iterator;
private final ListMultimap<String, JobConfiguration> jobs = LinkedListMultimap.create();
public MapStorage(PersistenceLayer<NonVolatileSchedulerState> persistenceLayer) {
return jobs.get(checkNotNull(managerId));
}
@Override public JobConfiguration fetchJob(String managerId, final String jobKey) {
checkNotNull(managerId);
checkNotNull(jobKey);
return Iterables.find(jobs.get(managerId), new Predicate<JobConfiguration>() {
@Override public boolean apply(JobConfiguration jobConfiguration) {
return jobKey.equals(Tasks.jobKey(jobConfiguration));
}
}, null);
jobs.put(checkNotNull(managerId), checkNotNull(jobConfig));
checkNotNull(jobKey);
for (Iterator<JobConfiguration> it = jobs.values().iterator(); it.hasNext(); ) {
JobConfiguration jobConfiguration = it.next();
if (jobKey.equals(Tasks.jobKey(jobConfiguration))) {
it.remove();
}
}
for (Entry<String, Collection<JobConfiguration>> entry : jobs.asMap().entrySet()) {
moduleState.put(entry.getKey(), Lists.newArrayList(entry.getValue()));
for (Entry<String, List<JobConfiguration>> jobs : state.getModuleJobs().entrySet()) {
this.jobs.putAll(jobs.getKey(), jobs.getValue());
} | 0 |
* @version $Revision: $ | 0 |
* @version CVS $Id: HttpEnvironment.java,v 1.18 2004/07/05 07:42:50 cziegeler Exp $ | 0 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.configuration.interpol;
/**
* <p>
* A simple dummy {@code Lookup} implementation.
* </p>
* <p>
* This implementation always returns <b>null</b> for a passed in variable
* indicating that it cannot resolve that variable. This is useful for instance
* as an application of the <em>null object</em> pattern.
* </p>
* <p>
* This class does not define any state, therefore a single instance can be
* shared. To enforce usage of only a single instance this class is actually an
* enumeration.
* </p>
*
* @version $Id$
* @since 2.0
*/
public enum DummyLookup implements Lookup
{
/** The single instance of this class. */
INSTANCE;
/**
* {@inheritDoc} This implementation always returns <b>null</b>.
*/
public Object lookup(String variable)
{
return null;
}
} | 0 |
// If the BouncyCastle provider is not installed, then try to load it
InputStream sourceDocument =
final XMLStreamReader xmlStreamReader =
XMLStreamReader securityStreamReader =
InputStream sourceDocument =
final XMLStreamReader xmlStreamReader =
XMLStreamReader securityStreamReader =
InputStream sourceDocument =
final XMLStreamReader xmlStreamReader =
XMLStreamReader securityStreamReader =
InputStream sourceDocument =
final XMLStreamReader xmlStreamReader =
XMLStreamReader securityStreamReader =
InputStream sourceDocument =
final XMLStreamReader xmlStreamReader =
XMLStreamReader securityStreamReader =
InputStream sourceDocument =
final XMLStreamReader xmlStreamReader =
XMLStreamReader securityStreamReader =
InputStream sourceDocument =
final XMLStreamReader xmlStreamReader =
XMLStreamReader securityStreamReader =
InputStream sourceDocument =
final XMLStreamReader xmlStreamReader =
XMLStreamReader securityStreamReader =
InputStream sourceDocument =
final XMLStreamReader xmlStreamReader =
XMLStreamReader securityStreamReader =
InputStream sourceDocument =
final XMLStreamReader xmlStreamReader =
XMLStreamReader securityStreamReader =
InputStream sourceDocument =
final XMLStreamReader xmlStreamReader =
XMLStreamReader securityStreamReader =
String algorithm,
String algorithm,
| 1 |
import java.util.List;
/**
* {@inheritDoc}.
*
* <p>A {@link PValue} always expands into itself. Calling {@link #expand()} on a PValue is almost
* never appropriate.
*/
@Deprecated
List<TaggedPValue> expand(); | 0 |
public class BeamSqlRow implements Serializable {
private BeamSqlRecordType dataType;
public BeamSqlRow(BeamSqlRecordType dataType) {
public BeamSqlRow(BeamSqlRecordType dataType, List<Object> dataValues) {
public void updateWindowRange(BeamSqlRow upstreamRecord, BoundedWindow window){
public BeamSqlRecordType getDataType() {
public void setDataType(BeamSqlRecordType dataType) {
return "BeamSqlRow [nullFields=" + nullFields + ", dataValues=" + dataValues + ", dataType="
BeamSqlRow other = (BeamSqlRow) obj; | 0 |
public void testTeardownCalledAfterExceptionInSetup() {
public void testTeardownCalledAfterExceptionInStartBundle() {
public void testTeardownCalledAfterExceptionInProcessElement() {
public void testTeardownCalledAfterExceptionInFinishBundle() { | 0 |
<RestrictionT, PositionT> RestrictionTracker<RestrictionT, PositionT> invokeNewTracker( | 0 |
*
*
*
}
while (iter.hasNext() && !majorCompactorDisabled) {
*
*
*
| 0 |
private static final ImmutableMap<Integer, String> EXPECTED_HASHES = | 0 |
configure(cfg);
public void configure(MiniAccumuloConfig cfg) {
}
| 0 |
import org.apache.beam.sdk.values.KV;
new AbstractTestCase<Integer, KV<Integer, Long>>() {
protected Dataset<KV<Integer, Long>> getOutput(Dataset<Integer> input) {
public ListDataSink<KV<Integer, Long>> modifySink(ListDataSink<KV<Integer, Long>> sink) {
.keyBy(p -> p.getKey() % 2)
.valueBy(KV::getValue)
public void validate(List<KV<Integer, Long>> outputs) throws AssertionError {
Map<Integer, List<KV<Integer, Long>>> split =
outputs.stream().collect(Collectors.groupingBy(KV::getKey)); | 0 |
import org.apache.cocoon.util.AbstractLogEnabled; | 0 |
/** Examples on how to use Beam SQL. */ | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//validator/src/share/org/apache/commons/validator/Attic/ValidatorUtil.java,v 1.11 2003/08/21 19:40:13 rleland Exp $
* $Revision: 1.11 $
* $Date: 2003/08/21 19:40:13 $
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* any, must include the following acknowledgement:
* 4. The names, "Apache", "The Jakarta Project", "Commons", and "Apache Software
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
* @version $Revision: 1.11 $ $Date: 2003/08/21 19:40:13 $ | 0 |
public void onClassificationsDeleted(AtlasEntity entity, List<AtlasClassification> classifications) throws AtlasBaseException { | 0 |
import org.apache.accumulo.core.replication.ReplicationSchema;
final String replRowPrefix = ReplicationSchema.ReplicationSection.getRowPrefix(); | 0 |
import org.apache.ambari.server.events.listeners.alerts.AlertServiceStateListener;
import org.apache.ambari.server.events.listeners.alerts.AlertStateChangedListener; | 0 |
instanceDataByUser.put(entity.getUser(), new HashMap<>()); | 0 |
package org.apache.felix.http.base.internal.runtime.dto.state;
public interface FilterState {
static final Comparator<FilterState> COMPARATOR = new Comparator<FilterState>()
public int compare(final FilterState o1, final FilterState o2) | 0 |
columns.add(new DBAccessor.DBColumnInfo("config_data", char[].class, null, null, false)); | 0 |
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.base.Preconditions;
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables; | 0 |
* Thrown when a Decoder has encountered a failure condition during a decode.
* @author Gary Gregory
* @version $Id: DecoderException.java,v 1.4 2003/08/14 07:40:17 ggregory Exp $
* Creates a DecoderException | 0 |
String filter = requirement.getFilter().replaceAll("\\(mandatory\\:\\<\\*[^\\)]*\\)", "").
replaceAll("objectclass", "objectClass"); | 0 |
import java.util.Objects;
/**
* Session; never null.
* <p>
* DCL pattern requires that the ivar be volatile.
* </p>
*/
private volatile Session session;
this.session = Objects.requireNonNull(session, "session");
this.connectTimeoutMillis = SftpFileSystemConfigBuilder.getInstance()
.getConnectTimeoutMillis(fileSystemOptions);
channel = (ChannelSftp) getSession().openChannel("sftp");
private Session getSession() throws FileSystemException {
if (!this.session.isConnected()) {
synchronized (this) {
if (!this.session.isConnected()) {
doCloseCommunicationLink();
this.session = SftpFileProvider.createSession((GenericFileName) getRootName(),
getFileSystemOptions());
}
return this.session;
final ChannelExec channel = (ChannelExec) getSession().openChannel("exec"); | 0 |
/**
* Create a new NodeSetContext.
* @param parentContext parent context
* @param nodeSet associated NodeSet
*/
/**
* {@inheritDoc}
*/
/**
* {@inheritDoc}
*/
/**
* {@inheritDoc}
*/
/**
* {@inheritDoc}
*/
/**
* {@inheritDoc}
*/ | 0 |
List<AlertDefinitionEntity> hiveAlertDefinitions = new ArrayList<>(); | 0 |
throw new RuntimeException(e); | 0 |
Assert.assertNotEquals(replicated, unreplicated); | 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; | 0 |
.append("c.contype as CONSTRAINT_TYPE ")
public StringBuilder writeDropPrimaryKeyStatement(StringBuilder builder, String constraintName, boolean cascade){
return builder.append("DROP CONSTRAINT ").append(constraintName + (cascade ? " CASCADE" : "")); | 0 |
public int execute(final String fullCommand, final CommandLine cl, final Shell shellState)
throws Exception {
boolean tables = cl.hasOption(OptUtil.tableOpt().getOpt())
|| !shellState.getTableName().isEmpty();
if (!shellState.getConnector().namespaceOperations()
.listIterators(OptUtil.getNamespaceOpt(cl, shellState)).containsKey(name)) {
if (!shellState.getConnector().tableOperations()
.listIterators(OptUtil.getTableOpt(cl, shellState)).containsKey(name)) {
shellState.getConnector().namespaceOperations()
.removeIterator(OptUtil.getNamespaceOpt(cl, shellState), name, scopes);
shellState.getConnector().tableOperations()
.removeIterator(OptUtil.getTableOpt(cl, shellState), name, scopes);
mincScopeOpt = new Option(IteratorScope.minc.name(), "minor-compaction", false,
"remove from minor compaction scope");
majcScopeOpt = new Option(IteratorScope.majc.name(), "major-compaction", false,
"remove from major compaction scope");
scanScopeOpt = new Option(IteratorScope.scan.name(), "scan-time", false,
"remove from scan scope"); | 0 |
connPool.freeEntry(e3, true, -1, null);
connPool.freeEntry(e1, true, -1, null);
connPool.freeEntry(e2, true, -1, null);
connPool.freeEntry(e3, true, -1, null);
connPool.freeEntry(e4, true, -1, null);
connPool.freeEntry(e5, true, -1, null);
connPool.freeEntry(e6, true, -1, null); | 0 |
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* @version $Id: ReverseComparator.java,v 1.10 2003/01/07 23:26:47 rwaldhoff Exp $ | 0 |
/*
* Copyright 2016-2018 Seznam.cz, a.s. | 0 |
return true;
} | 0 |
/*
* $Header: /cvshome/build/ee.foundation/src/java/lang/ArrayStoreException.java,v 1.6 2006/03/14 01:20:25 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.lang;
public class ArrayStoreException extends java.lang.RuntimeException {
public ArrayStoreException() { }
public ArrayStoreException(java.lang.String var0) { }
}
| 0 |
import java.util.Objects;
@Override
@Override
@Override
@Override
@Override
Objects.requireNonNull(session, "No client session provided");
@Override | 0 |
MetaDataTableScanner metaDataTableScanner = new MetaDataTableScanner(environment.getInstance(), SecurityConstants.getSystemCredentials(), tableRange, null); | 0 |
import static org.apache.beam.sdk.extensions.sql.utils.RowAsserts.matchesScalar;
import org.apache.beam.sdk.values.Row;
import org.apache.beam.sdk.values.RowType;
private PCollection<Row> boundedInput;
RowType rowType = RowSqlType.builder()
List<Row> rowsInTableB =
.apply(Create.of(rowsInTableB).withCoder(rowType.getRowCoder())); | 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.accumulo.core.security.tokens.SecurityToken;
private static List<KeyExtent> findTablets(boolean selectLocalTablets, SecurityToken token, String table, Instance zki,
private static List<String> getTabletFiles(SecurityToken token, Instance zki, String tableId, KeyExtent ke) { | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.