Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
1
|
---|---|
return name != null ? name : getKindString();
if (name == null) {
return getKindString();
} else {
return getName() + " [" + getKindString() + "]";
}
* <p> By default, returns the base name of this {@code PTransform}'s class.
return StringUtils.approximatePTransformName(getClass()); | 0 |
import org.apache.accumulo.core.conf.AccumuloConfiguration;
import com.google.common.collect.Iterables;
@Override
public AccumuloConfiguration getSiteConfiguration() {
// TODO Auto-generated method stub
return new ConfigurationCopy(Iterables.concat(AccumuloConfiguration.getDefaultConfiguration(), config.getSiteConfig().entrySet()));
} | 0 |
package org.apache.ambari.server.controller.internal; | 0 |
} catch (IllegalArgumentException e) { | 0 |
import org.apache.atlas.type.AtlasTypeUtil;
processInst.setRelationshipAttribute(ATTRIBUTE_INPUTS, Collections.singletonList(AtlasTypeUtil.getAtlasRelatedObjectId(pathInst, RELATIONSHIP_DATASET_PROCESS_INPUTS)));
processInst.setRelationshipAttribute(ATTRIBUTE_OUTPUTS, Collections.singletonList(AtlasTypeUtil.getAtlasRelatedObjectId(tableInst, RELATIONSHIP_PROCESS_DATASET_OUTPUTS)));
tableEntity.setRelationshipAttribute(ATTRIBUTE_DB, AtlasTypeUtil.getAtlasRelatedObjectId(database, RELATIONSHIP_HIVE_TABLE_DB));
AtlasEntity sdEntity = toStorageDescEntity(hiveTable.getSd(), tableQualifiedName, getStorageDescQFName(tableQualifiedName), AtlasTypeUtil.getObjectId(tableEntity));
tableEntity.setRelationshipAttribute(ATTRIBUTE_STORAGEDESC, AtlasTypeUtil.getAtlasRelatedObjectId(sdEntity, RELATIONSHIP_HIVE_TABLE_STORAGE_DESC));
tableEntity.setRelationshipAttribute(ATTRIBUTE_PARTITION_KEYS, AtlasTypeUtil.getAtlasRelatedObjectIds(partKeys, RELATIONSHIP_HIVE_TABLE_PART_KEYS));
tableEntity.setRelationshipAttribute(ATTRIBUTE_COLUMNS, AtlasTypeUtil.getAtlasRelatedObjectIds(columns, RELATIONSHIP_HIVE_TABLE_COLUMNS));
ret.setRelationshipAttribute(ATTRIBUTE_TABLE, AtlasTypeUtil.getAtlasRelatedObjectId(tableId, RELATIONSHIP_HIVE_TABLE_STORAGE_DESC));
column.setRelationshipAttribute(ATTRIBUTE_TABLE, AtlasTypeUtil.getAtlasRelatedObjectId(table, relationshipType)); | 0 |
import org.apache.http.conn.params.TestAllConnParams;
suite.addTest(TestAllConnParams.suite()); | 0 |
import org.apache.ambari.server.controller.internal.RequestOperationLevel;
private RequestOperationLevel operationLevel;
public RequestOperationLevel getOperationLevel() {
return operationLevel;
}
public void setOperationLevel(RequestOperationLevel operationLevel) {
this.operationLevel = operationLevel;
}
", operationLevel=" + operationLevel + | 0 |
import org.apache.aurora.gen.Resource;
new DockerParameter("c", "d")))))
.setResources(ImmutableSet.of(
Resource.numCpus(1.0),
Resource.ramMb(1024),
Resource.diskMb(1024),
Resource.namedPort("http")))); | 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.notifications;
/**
* The {@link Recipient} class represents a target of a {@link Notification}.
*/
public class Recipient {
/**
* A string that the concrete {@link NotificationDispatcher} can use to build
* a backend recipient that will work with the dispatch mechanism.
*/
public String Identifier;
/**
* Constructor.
*
*/
public Recipient() {
}
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return Identifier;
}
} | 0 |
import org.apache.ambari.server.configuration.ComponentSSLConfiguration;
import org.apache.ambari.server.controller.internal.URLStreamProvider;
| 0 |
/*
getContext().ungetService(sr);
| 0 |
private static final Set<String> pkPropertyIds = new HashSet<>(
Arrays.asList(new String[]{TASK_ATTEMPT_CLUSTER_NAME_PROPERTY_ID,
TASK_ATTEMPT_WORKFLOW_ID_PROPERTY_ID,
TASK_ATTEMPT_JOB_ID_PROPERTY_ID, TASK_ATTEMPT_ID_PROPERTY_ID}));
Set<Resource> resourceSet = new HashSet<>();
Map<Type,String> keyPropertyIds = new HashMap<>();
Set<Resource> taskAttempts = new HashSet<>();
Map<String,TaskAttemptFields> dbFields = new HashMap<>(); | 1 |
import com.twitter.aurora.scheduler.quota.QuotaManager.QuotaManagerImpl;
private final QuotaManagerImpl quotaManager;
QuotaFilter(QuotaManagerImpl quotaManager, Storage storage) { | 0 |
package org.apache.beam.sdk.extensions.euphoria.executor.local;
import org.apache.beam.sdk.extensions.euphoria.core.client.accumulators.AccumulatorProvider;
import org.apache.beam.sdk.extensions.euphoria.core.client.accumulators.Counter;
import org.apache.beam.sdk.extensions.euphoria.core.client.accumulators.Histogram;
import org.apache.beam.sdk.extensions.euphoria.core.client.accumulators.Timer;
import org.apache.beam.sdk.extensions.euphoria.core.client.dataset.windowing.Window;
import org.apache.beam.sdk.extensions.euphoria.core.client.io.Collector;
import org.apache.beam.sdk.extensions.euphoria.core.client.io.Context;
import org.apache.beam.sdk.extensions.euphoria.core.util.Settings;
private final org.apache.beam.sdk.extensions.euphoria.executor.local.Collector<Datum> wrap;
org.apache.beam.sdk.extensions.euphoria.executor.local.Collector<Datum> wrap, | 0 |
* A structure for storing state kept during a test. This class is not thread-safe.
State() {}
* @param key
* key for object
* @param value
* object
* @param key
* key for object
* @param key
* key for object
* @throws RuntimeException
* if state object is not present
* @param key
* key for object
* Gets the map of state objects. The backing map for state is returned, so changes to it affect the state.
* @param key
* key for object
* @throws ClassCastException
* if the value object is not a string
* @param key
* key for object
* @throws ClassCastException
* if the value object is not an integer
* @param key
* key for object
* @throws ClassCastException
* if the value object is not a long | 0 |
import org.apache.hc.core5.http.io.SocketConfig; | 0 |
log.info("Checking that metadata only has two WALs recorded for this table (inUse, and opened)"); | 0 |
import org.apache.accumulo.core.security.tokens.InstanceTokenWrapper;
public void initializeSecurity(InstanceTokenWrapper itw, String rootuser) throws AccumuloSecurityException { | 0 |
addHostToCluster("h3", service.getCluster().getClusterName());
ServiceComponentHost schCheck = sc.getServiceComponentHost("h2");
Assert.assertNotNull(schCheck);
Assert.assertEquals("h2", schCheck.getHostName());
ServiceComponentHost sch3 =
serviceComponentHostFactory.createNew(sc, "h3", false);
sc.addServiceComponentHost(sch3);
sch3.persist();
Assert.assertNotNull(sc.getServiceComponentHost("h3"));
Assert.assertFalse(sb.toString().isEmpty()); | 0 |
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at | 0 |
import com.google.inject.persist.jpa.AmbariJpaPersistService;
final AmbariJpaPersistService ambariJpaPersistService = injector.getInstance(AmbariJpaPersistService.class);
// assertFalse(ambariJpaPersistService.isWorking());
// assertFalse(ambariJpaPersistService.isWorking());
// assertFalse(ambariJpaPersistService.isWorking());
// assertFalse(ambariJpaPersistService.isWorking()); | 0 |
/** Current maxClientCnxns allowed from a particular host */
public int getMaxClientCnxnsPerHost();
/**
* @return the minimum number of milliseconds allowed for a session timeout
*/
public int getMinSessionTimeout();
/**
* @return the maximum number of milliseconds allowed for a session timeout
*/
public int getMaxSessionTimeout();
| 0 |
import java.nio.charset.StandardCharsets;
byte[] bytes = output.getBytes(StandardCharsets.UTF_8);
byte[] len = String.format("%6s#", Integer.toString(bytes.length, 36)).getBytes(StandardCharsets.UTF_8);
String strLen = new String(len, StandardCharsets.UTF_8);
String strFields = new String(bytes, StandardCharsets.UTF_8); | 0 |
public int getPartition(T element) { | 0 |
} catch (Exception ex) { | 0 |
import org.apache.atlas.impala.model.LineageVertexMetadata;
updateVertexMap(vertex);
// Update internal maps using this vertex.
private void updateVertexMap(LineageVertex vertex) {
verticesMap.put(vertex.getId(), vertex);
vertexNameMap.put(vertex.getVertexId(), new ImpalaNode(vertex));
if (vertex.getVertexType() == ImpalaVertexType.COLUMN) {
LineageVertexMetadata metadata = vertex.getMetadata();
if (metadata == null) {
return;
}
// if the vertex is column and contains metadata, create a vertex for its table
String tableName = metadata.getTableName();
ImpalaNode tableNode = vertexNameMap.get(tableName);
if (tableNode == null) {
tableNode = createTableNode(tableName, metadata.getCreateTime());
vertexNameMap.put(tableName, tableNode);
}
}
}
String tableName = getTableNameFromVertex(vertex);
tableNode = createTableNode(tableName, getCreateTimeInVertex(null));
vertexNameMap.put(tableName, tableNode); | 0 |
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
} | 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.orm;
import com.google.inject.Inject;
import com.google.inject.persist.jpa.AmbariJpaPersistService;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
/**
* AOP interceptor to provide session borders
*/
public class AmbariLocalSessionInterceptor implements MethodInterceptor {
@Inject
private final AmbariJpaPersistService emProvider = null;
private final ThreadLocal<Boolean> didWeStartWork = new ThreadLocal<Boolean>();
@Override
public Object invoke(MethodInvocation invocation) throws Throwable {
if (!emProvider.isWorking()) {
emProvider.begin();
didWeStartWork.set(true);
try {
return invocation.proceed();
} finally {
if (null != didWeStartWork.get()) {
didWeStartWork.remove();
emProvider.end();
}
}
} else {
//if session was in progress just proceed without additional checks
return invocation.proceed();
}
}
} | 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.
*/
ROOT, METADATA, USER;
public static TabletType type(KeyExtent ke) {
if (ke.equals(Constants.ROOT_TABLET_EXTENT)) return ROOT;
if (ke.getTableId().toString().equals(Constants.METADATA_TABLE_ID)) return METADATA;
return USER;
}
public static TabletType type(Collection<KeyExtent> extents) {
if (extents.size() == 0) throw new IllegalArgumentException();
TabletType ttype = null;
for (KeyExtent extent : extents) {
if (ttype == null) ttype = type(extent);
else if (ttype != type(extent)) throw new IllegalArgumentException("multiple extent types not allowed " + ttype + " " + type(extent));
}
return ttype;
} | 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 |
new DocumentLoader(userAgent)); | 0 |
import org.apache.felix.scrplugin.helper.IssueLog;
protected void logWarn(IssueLog iLog, String message) {
iLog.addWarning( "@" + this.tag.getName() + ": " + message, tag.getSourceLocation(), tag.getLineNumber() );
}
protected void logError(IssueLog iLog, String message) {
iLog.addError( "@" + this.tag.getName() + ": " + message, tag.getSourceLocation(), tag.getLineNumber() ); | 0 |
opts.setConnectionInfo(getConnectionInfo()); | 0 |
getBaseOutputDirectory(), dynamicDestinations, Compression.UNCOMPRESSED) {
getBaseOutputDirectory(), dynamicDestinations, Compression.UNCOMPRESSED);
getBaseOutputDirectory(), dynamicDestinations, Compression.UNCOMPRESSED) {
getBaseOutputDirectory(), dynamicDestinations, Compression.UNCOMPRESSED) { | 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 |
import org.apache.cocoon.util.AbstractLogEnabled;
implements AutoIncrementModule, Configurable, Disposable {
protected HashMap settings; | 0 |
mapIds.put(Resource.Type.User, userName); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jxpath/src/java/org/apache/commons/jxpath/ri/pointers/Attic/PropertyOwnerPointer.java,v 1.4 2002/04/12 02:28:06 dmitri Exp $
* $Revision: 1.4 $
* $Date: 2002/04/12 02:28:06 $
* @version $Revision: 1.4 $ $Date: 2002/04/12 02:28:06 $ | 0 |
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.apache.accumulo.core.util.ShutdownUtil;
import org.apache.accumulo.fate.util.UtilWaitThread;
blockIfHadoopShutdown(tid, e);
private boolean isIOException(Throwable e) {
if (e == null)
return false;
if (e instanceof IOException)
return true;
for (Throwable suppressed : e.getSuppressed())
if (isIOException(suppressed))
return true;
return isIOException(e.getCause());
}
/**
* The Hadoop Filesystem registers a java shutdown hook that closes the file system. This can
* cause threads to get spurious IOException. If this happens, instead of failing a FATE
* transaction just wait for process to die. When the master start elsewhere the FATE
* transaction can resume.
*/
private void blockIfHadoopShutdown(long tid, Exception e) {
if (isIOException(e) && ShutdownUtil.isShutdownInProgress()) {
String tidStr = String.format("%016x", tid);
log.info("Ignoring exception that was likely caused by Hadoop Shutdown hook. tid : {} ",
tidStr, e);
while (true) {
// Nothing is going to work well at this point, so why even try. Just wait for the end.
UtilWaitThread.sleepUninterruptibly(1, TimeUnit.MINUTES);
}
}
}
| 0 |
final List<K> list = new ArrayList<>(confirmed.keySet()); | 1 |
*
* @return the input stream | 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.servicemix.kernel.gshell.log.layout;
/**
* Copied from log4j
*/
/**
FormattingInfo instances contain the information obtained when parsing
formatting modifiers in conversion modifiers.
@author <a href=mailto:[email protected]>Jim Cakalic</a>
@author Ceki Gülcü
@since 0.8.2
*/
public class FormattingInfo {
int min = -1;
int max = 0x7FFFFFFF;
boolean leftAlign = false;
void reset() {
min = -1;
max = 0x7FFFFFFF;
leftAlign = false;
}
void dump() {
//LogLog.debug("min="+min+", max="+max+", leftAlign="+leftAlign);
}
}
| 0 |
import org.apache.accumulo.core.client.admin.SamplerConfiguration;
import org.apache.accumulo.core.sample.impl.SamplerConfigurationImpl;
private void clearSamplerOptions(String tableName) throws AccumuloException, TableNotFoundException, AccumuloSecurityException {
String prefix = Property.TABLE_SAMPLER_OPTS.getKey();
for (Entry<String,String> entry : getProperties(tableName)) {
String property = entry.getKey();
if (property.startsWith(prefix)) {
removeProperty(tableName, property);
}
}
}
@Override
public void setSamplerConfiguration(String tableName, SamplerConfiguration samplerConfiguration) throws AccumuloException, TableNotFoundException,
AccumuloSecurityException {
clearSamplerOptions(tableName);
List<Pair<String,String>> props = new SamplerConfigurationImpl(samplerConfiguration).toTableProperties();
for (Pair<String,String> pair : props) {
setProperty(tableName, pair.getFirst(), pair.getSecond());
}
}
@Override
public void clearSamplerConfiguration(String tableName) throws AccumuloException, TableNotFoundException, AccumuloSecurityException {
removeProperty(tableName, Property.TABLE_SAMPLER.getKey());
clearSamplerOptions(tableName);
}
@Override
public SamplerConfiguration getSamplerConfiguration(String tableName) throws TableNotFoundException, AccumuloException {
AccumuloConfiguration conf = new ConfigurationCopy(this.getProperties(tableName));
SamplerConfigurationImpl sci = SamplerConfigurationImpl.newSamplerConfig(conf);
if (sci == null) {
return null;
}
return sci.toSamplerConfiguration();
}
| 1 |
public static class FileInfo {
public static class Files implements Iterable<FileInfo> { | 0 |
*
*
*
* @version $Revision: 1.5 $
//------------------------------------------------------------------------- | 1 |
import org.apache.felix.webconsole.DefaultVariableResolver;
DefaultVariableResolver vr = ( DefaultVariableResolver ) WebConsoleUtil.getVariableResolver( request );
if ( getShellService() == null )
{
vr.put( "shell.status", "Shell Service not available" );
vr.put( "shell.disabled", "true" );
} else {
vr.put( "shell.disabled", "false" );
} | 0 |
import org.apache.accumulo.core.client.Accumulo;
try (AccumuloClient c = Accumulo.newClient().from(getClientProps()).build()) { | 0 |
*
* <h3>Event Timestamp and Watermark</h3>
* By default record timestamp and watermark are based on processing time in KafkaIO reader.
* This can be overridden by providing {@code WatermarkFn} with
* {@link Read#withWatermarkFn(SerializableFunction)}, and {@code TimestampFn} with
* {@link Read#withTimestampFn(SerializableFunction)}.<br>
* Note that {@link KafkaRecord#getTimestamp()} reflects timestamp provided by Kafka if any,
* otherwise it is set to processing time.
@Override
@Override
@Override
@Override
@Override
this.consumerSpEL = new ConsumerSpEL();
@Override
@Override
@Override
consumerSpEL.getRecordTimestamp(rawRecord),
@Override | 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.
* ====================================================================
*
* 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/>.
*
*/
/**
* Client TLS/SSL support.
*/
package org.apache.hc.client5.http.conn.ssl; | 0 |
boolean success = getServiceInternal();
if ( success )
{
m_useCount.incrementAndGet();
return m_componentContext.getImplementationObject( true );
}
else
{
return null;
}
}
@Override
boolean getServiceInternal()
{
boolean success = true;
if ( m_componentContext == null )
{
try
if ( !collectDependencies() )
log(
LogService.LOG_DEBUG,
"getService did not win collecting dependencies, try creating object anyway.",
null );
else
LogService.LOG_DEBUG,
"getService won collecting dependencies, proceed to creating object.",
}
catch ( IllegalStateException e )
{
log(
LogService.LOG_INFO,
"Could not obtain all required dependencies, getService returning null",
null );
success = false;
}
obtainWriteLock( "ImmediateComponentManager.getService.1" );
try
{
if ( m_componentContext == null )
//state should be "Registered"
S result = (S) state().getService( this );
if ( result == null )
success = false;;
finally
{
releaseWriteLock( "ImmediateComponentManager.getService.1" );
}
}
return success; | 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 |
//TODO test fails because offset of some hundreds of ms beween expect and actual | 0 |
implements Builders.WindowBy<T, OutputBuilder<T, VALUE, OUT>> { | 0 |
@Override
@Override | 0 |
import org.apache.hc.core5.util.Timeout;
public static final Timeout TIMEOUT = Timeout.ofSeconds(30);
public static final Timeout LONG_TIMEOUT = Timeout.ofSeconds(60);
IOReactorConfig.custom()
.setSoTimeout(TIMEOUT)
.build(), | 0 |
/** Tests of SerializableAvroCodecFactory. */
private final List<String> avroCodecs =
Arrays.asList(NULL_CODEC, SNAPPY_CODEC, DEFLATE_CODEC, XZ_CODEC, BZIP2_CODEC);
SerializableAvroCodecFactory codecFactory =
new SerializableAvroCodecFactory(CodecFactory.fromString(codec));
SerializableAvroCodecFactory codecFactory =
new SerializableAvroCodecFactory(CodecFactory.fromString(codec));
SerializableAvroCodecFactory codecFactory =
new SerializableAvroCodecFactory(CodecFactory.deflateCodec(i));
SerializableAvroCodecFactory codecFactory =
new SerializableAvroCodecFactory(CodecFactory.xzCodec(i)); | 1 |
expectedLogs
.apply(
new Statement() {
@Override
public void evaluate() throws Throwable {
evaluateRan[0] = true;
expectedLogs.verifyNotLogged(messageUnexpected);
LOG.info(messageExpected);
expectedLogs.verifyInfo(messageExpected);
}
},
Description.EMPTY)
.evaluate(); | 1 |
// No alternative api in hadoop 20 | 0 |
import org.apache.commons.vfs.provider.UriParser;
FileName name = getFileSystemManager().resolveName(getRootName(), UriParser.encode(entry.getName())); | 0 |
Map<KeyExtent,TServerInstance> assignments = new HashMap<KeyExtent,TServerInstance>();
| 0 |
import org.apache.cocoon.util.AbstractLogEnabled;
public abstract class ForwardRedirector extends AbstractLogEnabled
implements Redirector, PermanentRedirector {
String newURL,
boolean permanent,
boolean global)
if (request.isRequestedSessionIdValid()) {
HttpSession session = request.getSession(true);
getLogger().debug("redirect: session mode completed, id = " + session.getId());
| 0 |
package org.apache.commons.vfs2.cache;
import org.apache.commons.vfs2.FileObject;
import org.apache.commons.vfs2.test.AbstractProviderTestCase; | 1 |
else if ( uri != null ) {
schema = factory.compileSchema(in, uri);
}
else{ | 0 |
package org.apache.commons.codec.binary; | 1 |
/*
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.cocoon.woody.datatype.typeimpl;
/**
* A {@link org.apache.cocoon.woody.datatype.Datatype Datatype} implementation
* for strings.
* @version $Id: StringType.java,v 1.6 2004/03/09 13:53:54 reinhard Exp $
*/
public class StringType extends AbstractDatatype {
public Class getTypeClass() {
return String.class;
}
public String getDescriptiveName() {
return "string";
}
} | 0 |
import java.util.Comparator;
import java.util.function.Function;
Collections.unmodifiableMap(
GenericUtils.toSortedMap(MODES, PtyMode::toInt, Function.identity(), Comparator.naturalOrder())); | 0 |
if (m == null) m = e.getClass().getName(); | 0 |
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. | 0 |
import java.util.function.Predicate;
Predicate<String> all = x -> true; | 0 |
* @version CVS $Id$
public interface Cache { | 0 |
public interface TabletServerMinCMetricsMBean extends TabletServerMinCMetricsKeys {
| 1 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/decorators/Attic/TestPredicatedBag.java,v 1.5 2003/11/02 16:20:36 scolebourne Exp $
import org.apache.commons.collections.AbstractTestBag;
* @version $Revision: 1.5 $ $Date: 2003/11/02 16:20:36 $ | 0 |
import java.io.ByteArrayInputStream;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import org.apache.xml.security.c14n.*;
import org.apache.xml.security.signature.Reference;
import org.apache.xml.security.signature.ReferenceNotInitializedException;
import org.apache.xml.security.signature.XMLSignatureInput;
import org.apache.xml.security.transforms.TransformationException;
import org.apache.xml.security.transforms.Transforms;
import org.w3c.dom.*;
if (!XMLUtils
.elementIsInSignatureSpace(this
._constructionElement, Constants._TAG_MANIFEST) &&!XMLUtils
.elementIsInSignatureSpace(this
._constructionElement, Constants._TAG_SIGNEDINFO)) {
public Reference item(int i) throws XMLSecurityException {
referencedManifest._perManifestResolvers =
this._perManifestResolvers;
referencedManifest._resolverProperties =
this._resolverProperties;
referencedManifest.verifyReferences(followManifests);
/** Field _signedContents */
/**
* Method addSignedContent
*
* @param signedBytes
*/
/**
* Method getSignedContentItem
*
* @param i
* @return
*/
/**
* Method getSignedContentLength
*
* @return
*/ | 0 |
return new HashBag<>(); | 1 |
import org.apache.beam.sdk.values.BeamRecordType;
public static BeamRecordType inputRowType;
inputRowType = initTypeOfRow(columnMetadata);
public static BeamRecordType initTypeOfRow(List<KV<String, SqlTypeName>> columnMetadata){
BeamRecordType rowType = initTypeOfRow(columnMetadata); | 0 |
* Autogenerated by Thrift Compiler (0.11.0)
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.11.0)") | 0 |
/**
* Thrown when there are insufficient resources to satisfy a request.
*/
public static class InsufficientResourcesException extends RuntimeException {
InsufficientResourcesException(String message) {
super(message);
}
} | 0 |
/** Base class for test description of a test case. */
* <p>These outputs will be compared irrespective of order.
* @return list of expected outputs that will be compared irrespective of order | 0 |
* Copyright 2002-2005 The Apache Software Foundation. | 0 |
import org.apache.beam.sdk.io.aws.options.S3Options;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
S3Options options =
PipelineOptionsFactory.fromArgs().withValidation().create().as(S3Options.class);
int uploadBufferSize = 5_242_880;
options.setS3UploadBufferSizeBytes(uploadBufferSize);
new S3WritableByteChannel(mockAmazonS3, path, "text/plain", options);
int contentSize = 34_078_720;
for (int i = 0; i < contentSize; i++) {
uploadContent.put((byte) 0xff); | 0 |
input.getWindows().stream() | 0 |
import org.apache.accumulo.core.client.impl.Credentials; | 1 |
package org.apache.felix.ipojo.tests.core.component;
import org.apache.felix.ipojo.tests.core.service.MyService;
public class MyComponent implements MyService {
public void foo() {
// Nothing to do.
}
} | 0 |
/**
* @see java.lang.Object#toString()
*/
public String toString() {
return "AvalonServiceSelector[" + super.toString() + "]: role=" + this.role + ", factory=" + this.beanFactory;
} | 0 |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ambari.logsearch.model.request.impl;
import org.apache.ambari.logsearch.common.LogSearchConstants;
import org.apache.ambari.logsearch.model.request.FormatParamDefinition;
import org.apache.ambari.logsearch.model.request.UtcOffsetParamDefinition;
import javax.ws.rs.QueryParam;
public class ServiceLogExportRequest extends ServiceLogFileRequest implements FormatParamDefinition, UtcOffsetParamDefinition {
@QueryParam(LogSearchConstants.REQUEST_PARAM_FORMAT)
private String format;
@QueryParam(LogSearchConstants.REQUEST_PARAM_UTC_OFFSET)
private String utcOffset;
@Override
public String getFormat() {
return format;
}
@Override
public void setFormat(String format) {
this.format = format;
}
@Override
public String getUtcOffset() {
return utcOffset;
}
@Override
public void setUtcOffset(String utcOffset) {
this.utcOffset = utcOffset;
}
} | 0 |
* Builder chained when invoking {@link LinkedRuleBuilder#callParam()}. | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/Attic/DualHashBidiMap.java,v 1.2 2003/10/09 20:21:32 scolebourne Exp $
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
* @version $Id: DualHashBidiMap.java,v 1.2 2003/10/09 20:21:32 scolebourne Exp $
public class DualHashBidiMap extends AbstractDualBidiMap implements Serializable {
/** Ensure serialization compatability */
private static final long serialVersionUID = 721969328361808L;
super();
super();
/**
* Creates a new instance of the map used by the subclass to store data.
*
* @return the map to be used for internal storage
*/
protected Map createMap() {
return new HashMap();
}
// Serialization
//-----------------------------------------------------------------------
private void writeObject(ObjectOutputStream out) throws IOException {
out.defaultWriteObject();
out.writeObject(maps[0]);
}
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
Map map = (Map) in.readObject();
putAll(map);
} | 0 |
import org.apache.ambari.server.actionmanager.ActionDBAccessor;
ActionDBAccessor actionDBAccessor;
actionDBAccessor = mock(ActionDBAccessor.class);
bind(ActionDBAccessor.class).toInstance(actionDBAccessor); | 1 |
String startStr = new SimpleDateFormat("HH:mm:ss.SSS").format(new Date(start)); | 0 |
void execute(T iface) throws Exception; | 1 |
public interface Window extends org.apache.batik.w3c.dom.Window
{ | 0 |
import org.apache.http.impl.nio.reactor.AbstractIODispatch;
* @deprecated use {@link DefaultHttpServerIODispatch} | 0 |
final InstructionHandle[] pair = new InstructionHandle[2]; | 0 |
return addAlias( elementName ).forProperty( null );
* @deprecated
@Deprecated
return addAlias( elementName ).forProperty( propertyName );
}
/**
* Allows element2property mapping to be overridden.
*
* @param elementName
* @return the property alias builder
* @since 3.2
*/
public AddAliasBuilder<NestedPropertiesBuilder> addAlias( String elementName )
{
reportError( "setProperties().addAlias( String )", "empty 'elementName' not allowed" );
return new AddAliasBuilder<NestedPropertiesBuilder>( this, elementNames, elementName ); | 0 |
public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive)
throws IOException {
public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
IteratorEnvironment env) throws IOException { | 0 |
import java.util.Comparator;
public static final Comparator<File> SIZE_COMPARATOR = new SizeFileComparator();
public static final Comparator<File> SIZE_REVERSE = new ReverseComparator(SIZE_COMPARATOR);
public static final Comparator<File> SIZE_SUMDIR_COMPARATOR = new SizeFileComparator(true);
public static final Comparator<File> SIZE_SUMDIR_REVERSE = new ReverseComparator(SIZE_SUMDIR_COMPARATOR); | 0 |
public class SimpleIOReactorExceptionHandler implements IOReactorExceptionHandler { | 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 |
/** Test usage of hints in different operators. */ | 0 |
PCollection<TableRow> eventsTable = p.apply(BigQueryIO.read().from(GDELT_EVENTS_TABLE));
PCollection<TableRow> countryCodes = p.apply(BigQueryIO.read().from(COUNTRY_CODES)); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.