Diff
stringlengths 5
2k
| FaultInducingLabel
int64 0
1
|
---|---|
import org.apache.ambari.server.state.Service;
import org.apache.ambari.server.state.ServiceComponent;
import org.apache.commons.lang.StringUtils;
Set<String> clusterNamesForHost = new HashSet<String>();
clusterNamesForHost.add(hostRequest.getClusterName());
} else {
Set<Cluster> clustersForHost = clusters.getClustersForHost(hostRequest.getHostname());
if (null != clustersForHost) {
for (Cluster c : clustersForHost) {
clusterNamesForHost.add(c.getClusterName());
}
}
}
for (String clusterName : clusterNamesForHost) {
Cluster cluster = clusters.getCluster(clusterName);
if (!list.isEmpty()) {
List<String> componentsToRemove = new ArrayList<String>();
Service s = cluster.getService(sch.getServiceName());
ServiceComponent sc = s.getServiceComponent(sch.getServiceComponentName());
// Masters and Slaves must be deleted first. Clients are ok.
if (!sc.isClientComponent()) {
componentsToRemove.add(sch.getServiceComponentName());
if (!componentsToRemove.isEmpty()) {
StringBuilder reason = new StringBuilder("Cannot remove host ")
.append(hostName)
.append(" from ")
.append(hostRequest.getClusterName())
.append(". The following roles exist, and these components must be stopped if running, and then deleted: ");
reason.append(StringUtils.join(componentsToRemove, ", "));
throw new AmbariException(reason.toString());
} | 0 |
import org.apache.beam.sdk.transforms.CombineWithContext.CombineFnWithContext;
* {@link CombineFn}, creating a {@link TriggerStateMachine} from the
CombineFn<Integer, AccumT, OutputT> combineFn,
* {@link CombineFn}, and {@link TriggerStateMachine}, for mocking the interaction
CombineFn<Integer, AccumT, OutputT> combineFn,
CombineFnWithContext<Integer, AccumT, OutputT> combineFn,
CombineFnWithContext<Integer, AccumT, OutputT> combineFn, | 0 |
opts.batchScan(batchScan).store(job);
.auths(auths).fetchColumns(fetchColumns).scanIsolation(true).localIterators(true)
.store(job); | 0 |
HasDefaultTracker<
OffsetRange, org.apache.beam.sdk.transforms.splittabledofn.OffsetRangeTracker> { | 1 |
import org.apache.ambari.server.state.Cluster;
import org.apache.ambari.server.state.RepositoryType;
import org.apache.ambari.server.state.repository.ClusterVersionSummary;
import org.apache.ambari.server.state.repository.VersionDefinitionXml;
public void addCommandRepository(ActionExecutionContext context, Cluster cluster,
ClusterVersionSummary summary = null;
if (RepositoryType.STANDARD != repoVersion.getType()) {
try {
VersionDefinitionXml xml = repoVersion.getRepositoryXml();
summary = xml.getClusterSummary(cluster);
} catch (Exception e) {
LOG.warn("Could not determine repository from %s/%s. Will not pass cluster version.");
}
}
final ClusterVersionSummary clusterSummary = summary;
if (null != clusterSummary) {
Map<String, Object> params = command.getRoleParameters();
if (null == params) {
params = new HashMap<>();
command.setRoleParameters(params);
}
params.put(KeyNames.CLUSTER_VERSION_SUMMARY, clusterSummary);
}
| 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//jelly/src/java/org/apache/commons/jelly/tags/xml/Attic/ParseTag.java,v 1.14 2002/12/31 11:11:34 jstrachan Exp $
* $Revision: 1.14 $
* $Date: 2002/12/31 11:11:34 $
* $Id: ParseTag.java,v 1.14 2002/12/31 11:11:34 jstrachan Exp $
* @version $Revision: 1.14 $
/** Sets the source of the XML which is either a String URI, a File, Reader or InputStream */ | 0 |
return new BridgeContext(userAgent, loader); | 0 |
* @version $Revision: 1.16 $ $Date: 2004/06/02 22:12:14 $ | 0 |
if (n.getNodeType() == n.CDATA_SECTION_NODE
|| n.getNodeType() == n.TEXT_NODE)
sb.append(n.getNodeValue()); | 1 |
@Override | 0 |
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.core.Is.is; | 0 |
@Consumes ({"application/xml"})
@Produces({"application/json", "application/xml"}) | 0 |
HOST_SVCCOMP_RESTORE,
/**
* Triggering a server-side action
*/
HOST_SVCCOMP_SERVER_ACTION | 1 |
* Copyright 2016-2017 Seznam.cz, a.s. | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/PathCallParamRule.java,v 1.2 2003/10/05 15:07:31 rdonkin Exp $
* $Revision: 1.2 $
* $Date: 2003/10/05 15:07:31 $
*
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* notice, this list of conditions and the following disclaimer.
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgement:
* "This product includes software developed by the
* 4. The names "Apache", "The Jakarta Project", "Commons", and "Apache Software
* from this software without prior written permission. For written
* 5. Products derived from this software may not be called "Apache",
* "Apache" nor may "Apache" appear in their names without prior
* written permission of the Apache Software Foundation.
*/
* @version $Revision: 1.2 $ $Date: 2003/10/05 15:07:31 $ | 0 |
private String progressPercentage="";
private Boolean ifSuccess;
private String timeTakentotransfer="";
return timeTakentotransfer;
timeTakentotransfer = timeTakentotransfer;
return ifSuccess;
ifSuccess = ifSuccess;
return progressPercentage;
progressPercentage = progressPercentage; | 0 |
package org.apache.cocoon.el.impl.objectmodel; | 0 |
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* @version CVS $Id: AbstractInterpreter.java,v 1.19 2004/03/05 13:02:46 bdelacretaz Exp $ | 1 |
/**
* 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.ambari.server.api.util; | 0 |
package aQute.bnd.service;
import java.util.*;
/**
* A registry for objects.
*/
public interface Registry {
<T> List<T> getPlugins(Class<T> c);
<T> T getPlugin(Class<T> c);
} | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//digester/src/java/org/apache/commons/digester/xmlrules/CircularIncludeException.java,v 1.5 2003/10/09 21:09:48 rdonkin Exp $
* $Revision: 1.5 $
* $Date: 2003/10/09 21:09:48 $
* Alternately, this acknowledgement may appear in the software itself,
* if and wherever such third-party acknowledgements normally appear. | 0 |
public static final short TYPE = (short)1; | 0 |
if (validColumnFams.contains(new Text(cu.getColumnFamily())))
return true;
if (validColumnQuals.contains(new ColumnFQ(cu)))
return true;
if (row.length > 0 && row[0] == '~')
return null;
if (b == ';' || b == '<')
break;
if (violations == null)
violations = new ArrayList<Short>();
if (!violations.contains((short) 4))
violations.add((short) 4);
if (violations == null)
violations = new ArrayList<Short>();
if (!violations.contains((short) 4))
violations.add((short) 4);
if (violations == null)
violations = new ArrayList<Short>();
if (!violations.contains((short) 4))
violations.add((short) 4);
if (violations == null)
violations = new ArrayList<Short>();
if (!violations.contains((short) 4))
violations.add((short) 4);
if (violations == null)
violations = new ArrayList<Short>();
if (violations == null)
violations = new ArrayList<Short>();
if (violations == null)
violations = new ArrayList<Short>();
if (violations == null)
violations = new ArrayList<Short>();
if (violations == null)
violations = new ArrayList<Short>();
if (violations == null)
violations = new ArrayList<Short>();
if (violations == null)
violations = new ArrayList<Short>();
if (violations == null)
violations = new ArrayList<Short>();
if (violations == null)
violations = new ArrayList<Short>();
if (zooCache != null)
zooCache.clear(); | 1 |
when(mockTrigger.buildTrigger()).thenReturn(mockTrigger); | 0 |
import org.apache.accumulo.hadoopImpl.mapreduce.lib.MapReduceClientOpts;
public class Opts extends MapReduceClientOpts {
@Parameter(names = {"-t", "--table"}, required = true, description = "table to use")
String tableName;
AccumuloInputFormat.configure().clientProperties(opts.getClientProps())
.table(opts.tableName).auths(Authorizations.EMPTY)
AccumuloOutputFormat.configure().clientProperties(opts.getClientProps()).store(job); | 0 |
public void setReturnType( Type return_type ) {
public void setArgumentTypes( Type[] arg_types ) {
public void setArgumentType( int i, Type type ) {
public void setArgumentNames( String[] arg_names ) {
public void setArgumentName( int i, String name ) { | 0 |
public static final String PROVIDER_CLASS = "net.i2p.crypto.eddsa.EdDSASecurityProvider"; | 0 |
package org.apache.beam.sdk.io.gcp.bigquery;
import org.apache.beam.sdk.util.AttemptBoundedExponentialBackOff;
import org.apache.beam.sdk.util.Transport;
class BigQueryServicesImpl implements BigQueryServices { | 0 |
Copyright 2001-2003 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/ | 0 |
import org.apache.ambari.spi.upgrade.UpgradeType; | 0 |
import com.google.bigtable.v2.MutateRowResponse;
import com.google.bigtable.v2.Mutation;
import com.google.bigtable.v2.Row;
import com.google.bigtable.v2.RowFilter;
import com.google.bigtable.v2.SampleRowKeysResponse;
* Bigtable instance. A {@link RowFilter} may also optionally be specified using
* .setInstanceId("instance");
* Bigtable instance, for example:
* .setInstanceId("instance");
* the source Cloud Bigtable instance, and a {@link BigtableIO.Read#withTableId tableId} that
* the destination Cloud Bigtable instance, and a {@link BigtableIO.Write#withTableId tableId}
* that specifies which table to write.
* Returns a new {@link BigtableIO.Read} that will read from the Cloud Bigtable instance
* Returns a new {@link BigtableIO.Read} that will read from the Cloud Bigtable instance
* Returns the Google Cloud Bigtable instance being read from, and other parameters.
* Used to define the Cloud Bigtable instance and any options for the networking layer.
* Used to define the Cloud Bigtable instance and any options for the networking layer.
* Returns a new {@link BigtableIO.Write} that will write to the Cloud Bigtable instance
* Returns a new {@link BigtableIO.Write} that will write to the Cloud Bigtable instance
* Returns the Google Cloud Bigtable instance being written to, and other parameters.
private class WriteExceptionCallback implements FutureCallback<MutateRowResponse> {
public void onSuccess(MutateRowResponse produced) {} | 0 |
ExecutorContext context,
int parallelism)
return context.getExecutionEnvironment()
.addSource(new DataSourceWrapper<>(ds))
.setParallelism(parallelism); | 0 |
static final String CLUSTER_NAME = "ambari-metrics-cluster"; | 0 |
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)") | 0 |
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
public interface Resource extends Serializable {
InputStream getInputStream() throws IOException;
long length(); | 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.http.client.RedirectException;
private int redirectCount;
private int maxRedirects;
this.redirectCount = 0;
this.maxRedirects = this.params.getIntParameter(HttpClientParams.MAX_REDIRECTS, 100);
this.redirectHandler.isRedirectNeeded(response, context)) {
if (redirectCount >= maxRedirects) {
throw new RedirectException("Maximum redirects ("
+ maxRedirects + ") exceeded");
}
redirectCount++;
| 0 |
public String getGuidByUniqueAttributes(AtlasEntityType entityType, Map<String, Object> uniqAttributes) throws AtlasBaseException{
return AtlasGraphUtilsV1.getGuidByUniqueAttributes(entityType, uniqAttributes);
}
@Override
@GraphTransaction | 0 |
/**
* The configuration policy
* @since 1.0
*/
ConfigurationPolicy policy() default ConfigurationPolicy.OPTIONAL; | 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.sshd.client.sftp;
import java.io.IOException;
import java.net.URI;
import java.nio.file.LinkOption;
import org.apache.sshd.common.file.util.BasePath;
import org.apache.sshd.common.file.util.ImmutableList;
public class SftpPath extends BasePath<SftpPath, SftpFileSystem> {
public SftpPath(SftpFileSystem fileSystem, String root, ImmutableList<String> names) {
super(fileSystem, root, names);
}
public URI toUri() {
// TODO
return null;
}
public SftpPath toRealPath(LinkOption... options) throws IOException {
// try (SftpClient client = fileSystem.getClient()) {
// client.realP
// }
// TODO: handle links
SftpPath absolute = toAbsolutePath();
fileSystem.provider().checkAccess(absolute);
return absolute;
}
} | 0 |
if (saslEnabled()) {
opts.updateKerberosCredentials(); | 0 |
* @version $Revision$ | 0 |
@Test(timeout = 3 * 60 * 1000)
Process ingest = cluster.exec(TestIngest.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD, "--createTable");
@Test(timeout = 2 * 60 * 1000)
assertEquals(0, cluster.exec(TestIngest.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root","-p", ROOT_PASSWORD, "--createTable").waitFor());
Process verify = cluster.exec(VerifyIngest.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD);
@Test(timeout = 2 * 60 * 1000)
assertEquals(0, cluster.exec(TestIngest.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD, "--createTable").waitFor());
Process deleter = cluster.exec(TestRandomDeletes.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD);
@Test(timeout = 60 * 1000)
@Test(timeout = 4 * 60 * 1000)
@Test(timeout = 2 * 60 * 1000)
assertEquals(0, cluster.exec(TestIngest.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD, "--createTable").waitFor()); | 0 |
public Class<?>[] getExceptions() {
Class<?>[] cs = new Class[2 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length]; | 0 |
import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Iterables; | 0 |
* @author <a href="mailto:[email protected]">Christian Haul</a>
* @version CVS $Id: DigestMetaModule.java,v 1.2 2004/02/15 21:30:00 haul Exp $ | 0 |
c14n.setSecureValidation(secureValidation); | 0 |
return PredicatedMap.predicatedMap(map, keyPredicate, valuePredicate); | 0 |
import org.apache.commons.vfs2.provider.AbstractFileName;
protected RamFileSystem(FileName rootName, FileSystemOptions fileSystemOptions)
protected FileObject createFile(AbstractFileName name) throws Exception | 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.nntp; | 0 |
import org.apache.thrift.transport.TTransportFactory;
options.transportFactory(new TTransportFactory() {
@Override
public TTransport getTransport(TTransport trans) {
Thread.currentThread().setDaemon(true);
return super.getTransport(trans);
}
}); | 0 |
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/LRUMap.java,v 1.19 2003/05/16 14:36:40 scolebourne Exp $
*
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* @version $Revision: 1.19 $ $Date: 2003/05/16 14:36:40 $
* | 0 |
@Override | 0 |
import cz.seznam.euphoria.flink.batch.BatchElement;
import cz.seznam.euphoria.flink.streaming.StreamingElement;
ret.add(StreamingElement.class);
ret.add(BatchElement.class); | 0 |
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* 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 |
/**
* Returns KerberosHelper instance
* @return
*/
KerberosHelper getKerberosHelper(); | 0 |
import org.mockito.Mockito;
public abstract class BasicServerTestBase extends Mockito { | 0 |
package org.apache.felix.dm.test.integration.api;
import org.apache.felix.dm.test.components.Ensure;
import org.apache.felix.dm.test.integration.common.TestBase; | 0 |
import org.apache.atlas.type.AtlasTypeRegistry;
void importLegacyGraphSON(AtlasTypeRegistry typeRegistry, InputStream fs) throws AtlasBaseException; | 0 |
* Copyright 2002-2005 The Apache Software Foundation. | 0 |
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* @version CVS $Id: Web3ClientImpl.java,v 1.5 2004/03/05 13:02:25 bdelacretaz Exp $ | 1 |
log.log(LogService.LOG_WARNING, "DeviceAccessConsumer: Handling device access: id=" + props.get("device.id") | 0 |
//BridgeEventSupport.loadScripts(ctx, e); | 0 |
private static final long serialVersionUID = -7113259629930576230L;
private static final int ATTR0_BEFORE_ATTR1 = -1;
private static final int ATTR1_BEFORE_ATTR0 = 1;
private static final String XMLNS = Constants.NamespaceSpecNS; | 0 |
HostLevelParamsUpdateEvent hostLevelParamsUpdateEvent = new HostLevelParamsUpdateEvent(addedHost.getHostId(),
clusterId,
new HostLevelParamsCluster( | 0 |
import org.apache.felix.framework.util.FelixConstants;
public void close()
// Nothing to clean up.
// If the entry name refers to the content itself, then
// just return it immediately.
if (entryName.equals(FelixConstants.CLASS_PATH_DOT))
return new DirectoryContent(m_logger, m_revisionLock, m_rootDir, m_dir); | 0 |
* A request message from a client to a server includes, within the
* first line of that message, the method to be applied to the resource,
* the identifier of the resource, and the protocol version in use.
* <pre>
* Request = Request-Line
* *(( general-header
* | request-header
* | entity-header ) CRLF)
* CRLF
* [ message-body ]
* </pre> | 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.avalon.framework.activity.Disposable;
* @version CVS $Id: AbstractInterpreter.java,v 1.10 2003/10/15 17:02:05 cziegeler Exp $
SingleThreaded, Configurable, Disposable
/**
* Composable
*/
this.continuationsMgr = (ContinuationsManager)manager.lookup(ContinuationsManager.ROLE);
throws ContextException{
/* (non-Javadoc)
* @see org.apache.avalon.framework.activity.Disposable#dispose()
*/
public void dispose() {
if ( this.manager != null ) {
this.manager.release( (Component)this.continuationsMgr );
this.continuationsMgr = null;
this.manager = null;
}
}
| 0 |
private Map<InstructionHandle, Set<ExceptionHandler>> exceptionhandlers;
exceptionhandlers = new HashMap<InstructionHandle, Set<ExceptionHandler>>();
Set<ExceptionHandler> hs;
hs = exceptionhandlers.get(ih);
hs = new HashSet<ExceptionHandler>();
Set<ExceptionHandler> hs = exceptionhandlers.get(ih);
return hs.toArray(ret); | 0 |
@Deprecated | 0 |
import org.apache.felix.dm.DependencyManager;
/**
* Returns the composition instances that make up this service, or just the
* service instance if it does not have a composition, or an empty array if
* the service has not even been instantiated.
*/
public Object[] getCompositionInstances();
/**
* Returns the dependency manager associated with this service.
*/
public DependencyManager getDependencyManager(); | 0 |
Map<String, PropertyUpdater> kafkaBrokerMap = new HashMap<String, PropertyUpdater>();
Map<String, PropertyUpdater> multiKafkaBrokerMap = new HashMap<String, PropertyUpdater>();
Map<String, PropertyUpdater> multiSliderClientMap = new HashMap<String, PropertyUpdater>();
Map<String, PropertyUpdater> multiYarnSiteMap = new HashMap<String, PropertyUpdater>();
Map<String, PropertyUpdater> multiOozieSiteMap = new HashMap<String, PropertyUpdater>();
singleHostTopologyUpdaters.put("kafka-broker", kafkaBrokerMap);
multiHostTopologyUpdaters.put("kafka-broker", multiKafkaBrokerMap);
multiHostTopologyUpdaters.put("slider-client", multiSliderClientMap);
multiHostTopologyUpdaters.put("yarn-site", multiYarnSiteMap);
multiHostTopologyUpdaters.put("oozie-site", multiOozieSiteMap);
multiYarnSiteMap.put("hadoop.registry.zk.quorum", new MultipleHostTopologyUpdater("ZOOKEEPER_SERVER"));
multiSliderClientMap.put("slider.zookeeper.quorum", new MultipleHostTopologyUpdater("ZOOKEEPER_SERVER"));
multiKafkaBrokerMap.put("zookeeper.connect", new MultipleHostTopologyUpdater("ZOOKEEPER_SERVER"));
// KAFKA
kafkaBrokerMap.put("kafka.ganglia.metrics.host", new SingleHostTopologyUpdater("GANGLIA_SERVER"));
// KNOX
multiCoreSiteMap.put("hadoop.proxyuser.knox.hosts", new MultipleHostTopologyUpdater("KNOX_GATEWAY"));
multiWebhcatSiteMap.put("webhcat.proxyuser.knox.hosts", new MultipleHostTopologyUpdater("KNOX_GATEWAY"));
multiOozieSiteMap.put("hadoop.proxyuser.knox.hosts", new MultipleHostTopologyUpdater("KNOX_GATEWAY"));
| 0 |
return (Attr)attributes.removeNamedItemNS(oldAttr.getNamespaceURI(),
oldAttr.getLocalName()); | 0 |
import static org.apache.sshd.common.sftp.SftpConstants.SSH_FX_LOCK_CONFLICT;
if (e.getStatus() == SSH_FX_LOCK_CONFLICT) { | 0 |
* Copyright 1999-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 CVS $Id: ActionEvent.java,v 1.3 2004/03/05 13:02:11 bdelacretaz Exp $ | 1 |
/** Factory for secure socket factories */
return init(this.context.getServerSocketFactory().createServerSocket(port, backlog));
return init(this.context.getServerSocketFactory().createServerSocket(port, backlog, ifAddress));
| 1 |
* Can be {@code null}.
* Can be {@code null}.
* {@code null} in which case the current date / time will be used.
* {@code timeout} is set to {@code 0} this method blocks | 0 |
Set<String> hostsWithoutCorrectVersionState = new HashSet<String>();
hostsWithoutCorrectVersionState.add(hostVersion.getHostName()); | 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 |
Assert.assertEquals("http://thathost/", URIUtils.rewriteURI(
URI.create("http://thishost#crap"), target, true).toString());
Assert.assertEquals("http://thathost/#crap", URIUtils.rewriteURI(
URI.create("http://thishost#crap"), target, false).toString());
Assert.assertEquals("http://thathost/", URIUtils.rewriteURI(
URI.create("http://thathost")).toString()); | 0 |
if (log.isDebugEnabled()) {
log.debug("run(open={}) {} while authentication forwarding: {}",
isOpen(), e.getClass().getSimpleName(), e.getMessage());
}
if (log.isTraceEnabled()) {
log.trace("run(open=" + isOpen() + ") authentication forwarding failure details", e); | 0 |
import static org.junit.Assert.assertTrue;
assertTrue(row.getBoolean("aBoolean"));
assertTrue(pojo.aBoolean);
assertTrue(nestedRow.getBoolean("aBoolean"));
assertTrue(pojo.nested.aBoolean); | 0 |
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. | 0 |
import org.apache.felix.sigil.config.Resource;
import org.apache.felix.sigil.eclipse.PathUtil;
Path path = new Path(bundle.getLocation().getAbsolutePath());
IPath source = PathUtil.newPathIfExists(bundle.getSourcePathLocation());
IPath rootPath = PathUtil.newPathIfNotNull(bundle.getSourceRootPath());
IClasspathEntry e = JavaCore.newLibraryEntry( p, source, rootPath, rules,
IClasspathEntry e = JavaCore.newLibraryEntry( path, source, rootPath, rules,
fin = new FileInputStream( bundle.getLocation() );
for ( Resource p : project.getBundle().getSourcePaths() )
IFile f = project.getProject().getFile( p.getLocalFile() ); | 0 |
// ***************************************************
Long requestedClusterId = request.getClusterId();
if (requestedClusterId == null) {
throw new AmbariException("The cluster ID may not be null");
}
Cluster cluster = clusters.getClusterById(request.getClusterId());
if (cluster == null) {
throw new AmbariException("The cluster may not be null");
}
cluster.addSessionAttributes(request.getSessionAttributes());
//
// ***************************************************
response = updateCluster(request); | 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
* 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 |
TransformResult<T> result, | 0 |
validH2Preface = false; | 0 |
package org.apache.bcel.generic;
super(org.apache.bcel.Const.FREM); | 1 |
import java.nio.charset.StandardCharsets;
"secret".getBytes(StandardCharsets.US_ASCII));
byte[] hmacKey = "secret".getBytes(StandardCharsets.US_ASCII);
"secret".getBytes(StandardCharsets.US_ASCII));
byte[] hmacKey = "secret".getBytes(StandardCharsets.US_ASCII); | 0 |
import org.apache.batik.gvt.ShapeNode;
import org.apache.batik.parser.PointsParser;
protected void buildShape(BridgeContext ctx,
SVGElement elt,
ShapeNode node,
CSSStyleDeclaration decl,
UnitProcessor.Context uctx) {
PointsParser p = ctx.getParserFactory().createPointsParser();
AWTPolygonProducer ph = new AWTPolygonProducer();
ph.setWindingRule(wr);
p.setPointsHandler(ph);
p.parse(new StringReader(pts));
new Object[] {ex.getMessage()}),
node);
} finally {
node.setShape(ph.getShape());
} | 0 |
CoderProperties.coderDecodeEncodeContentsInSameOrderInContext(
CoderProperties.coderConsistentWithEqualsInContext(coder, context, value1, value2);
CoderProperties.structuralValueConsistentWithEqualsInContext(
CoderProperties.structuralValueDecodeEncodeEqualInContext( | 0 |
throw new SSLPeerUnverifiedException("Peer certificate chain is empty");
throw new SSLPeerUnverifiedException("Unexpected certificate type: " + peerCertificate.getType()); | 0 |
import org.apache.commons.io.IOCase;
* @param caseSensitivity what case sensitivity to use comparing file names, null means system sensitive
public FilesystemObserver(String directoryName, FileFilter fileFilter, IOCase caseSensitivity) {
this(new File(directoryName), fileFilter, caseSensitivity);
this(directory, fileFilter, (IOCase)null);
* @param caseSensitivity what case sensitivity to use comparing file names, null means system sensitive
public FilesystemObserver(File directory, FileFilter fileFilter, IOCase caseSensitivity) {
this(new FilesystemEntry(directory), fileFilter, caseSensitivity);
* @param caseSensitivity what case sensitivity to use comparing file names, null means system sensitive
protected FilesystemObserver(FilesystemEntry rootEntry, FileFilter fileFilter, IOCase caseSensitivity) {
if (caseSensitivity == null || caseSensitivity.equals(IOCase.SYSTEM)) {
this.comparator = NameFileComparator.NAME_SYSTEM_COMPARATOR;
} else if (caseSensitivity.equals(IOCase.INSENSITIVE)) {
this.comparator = NameFileComparator.NAME_INSENSITIVE_COMPARATOR;
this.comparator = NameFileComparator.NAME_COMPARATOR; | 0 |
private final Cluster cluster = Mockito.mock(Cluster.class);
private PrereqCheckRequest checkRequest = new PrereqCheckRequest(clusterName);
private PreviousUpgradeCompleted puc = new PreviousUpgradeCompleted();
public void setup() throws Exception {
Mockito.when(cluster.getClusterId()).thenReturn(1L);
Mockito.when(cluster.getClusterName()).thenReturn(clusterName);
Mockito.when(clusters.getCluster(clusterName)).thenReturn(cluster);
puc.clustersProvider = new Provider<Clusters>() {
@Override
public Clusters get() {
return clusters;
}
};
}
@Test
public void testPerform() throws Exception {
// no existing upgrades
Mockito.when(cluster.getUpgradeInProgress()).thenReturn(null);
// existing upgrade
UpgradeEntity upgradeInProgress = Mockito.mock(UpgradeEntity.class);
Mockito.when(upgradeInProgress.getDirection()).thenReturn(Direction.UPGRADE);
Mockito.when(upgradeInProgress.getClusterId()).thenReturn(1L);
Mockito.when(upgradeInProgress.getFromVersion()).thenReturn(sourceRepositoryVersion);
Mockito.when(upgradeInProgress.getToVersion()).thenReturn(destRepositoryVersion);
Mockito.when(cluster.getUpgradeInProgress()).thenReturn(upgradeInProgress); | 0 |
conf.setPid("some.pid");
warn("got unexpected configuration error");
e.throwable(err); | 0 |
list, | 0 |
* Ensures that the entity content is fully consumed and the content stream, if exists,
* is closed.
*
* @param entity
* @throws IOException if an error occurs reading the input stream
*
* @since 4.1
*/
public static void consume(final HttpEntity entity) throws IOException {
if (entity == null) {
return;
}
if (entity.isStreaming()) {
InputStream instream = entity.getContent();
if (instream != null) {
instream.close();
}
}
}
/** | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.