| Chunk |
|---|
| Conflicting content |
|---|
import edu.ucsb.eucalyptus.msgs.NodeComponentInfoType;
import edu.ucsb.eucalyptus.msgs.RegisterComponentResponseType;
import edu.ucsb.eucalyptus.msgs.RegisterComponentType;
<<<<<<< HEAD
import edu.ucsb.eucalyptus.msgs.RegisterStorageControllerType;
import edu.ucsb.eucalyptus.msgs.RegisterWalrusType;
import edu.ucsb.eucalyptus.msgs.RegisterVMwareBrokerType;
=======
>>>>>>> 6fc54d0a386faa6ed9d955cd1463bcee685b1d91
public class Configuration {
static Logger LOG = Logger.getLogger( Configuration.class ); |
| Solution content |
|---|
import edu.ucsb.eucalyptus.msgs.NodeComponentInfoType;
import edu.ucsb.eucalyptus.msgs.RegisterComponentResponseType;
import edu.ucsb.eucalyptus.msgs.RegisterComponentType;
public class Configuration {
static Logger LOG = Logger.getLogger( Configuration.class ); |
| File |
|---|
| Configuration.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
public RegisterComponentResponseType registerComponent( RegisterComponentType request ) throws EucalyptusCloudException {
RegisterComponentResponseType reply = ( RegisterComponentResponseType ) request.getReply( );
<<<<<<< HEAD
reply.set_return( true );
try {
if ( !NetworkUtil.testGoodAddress( request.getHost( ) ) ) {
throw new EucalyptusCloudException( "Components cannot be registered using local, link-local, or multicast addresses." );
}
if ( request instanceof RegisterClusterType && !ConfigurationUtil.testClusterCredentialsDirectory( request.getName( ) ) ) {
throw new EucalyptusCloudException( "Cluster registration failed because the key directory cannot be created." );
}
} catch ( EucalyptusCloudException e ) {
throw e;
} catch ( Exception e1 ) {
throw new EucalyptusCloudException( e1.getMessage( ), e1 );
}
try {
if ( ConfigurationUtil.checkComponentExists( request ) ) {
return reply;
}
} catch ( Exception e2 ) {
throw new EucalyptusCloudException( e2 );
}
if ( request instanceof RegisterStorageControllerType && NetworkUtil.testLocal( request.getHost( ) ) && !Component.storage.isLocal( ) ) {
throw new EucalyptusCloudException( "You do not have a local storage controller enabled (or it is not installed)." );
} else if ( request instanceof RegisterWalrusType && NetworkUtil.testLocal( request.getHost( ) ) && !Component.walrus.isLocal( ) ) {
throw new EucalyptusCloudException( "You do not have a local walrus enabled (or it is not installed)." );
} else if ( request instanceof RegisterVMwareBrokerType && NetworkUtil.testLocal( request.getHost( ) ) && !Component.vmwarebroker.isLocal( ) ) {
throw new EucalyptusCloudException( "You do not have a local vmware broker enabled (or it is not installed)." );
} else if ( request instanceof RegisterStorageControllerType ) {
try {
Configuration.getClusterConfiguration( request.getName( ) );
} catch ( Exception e1 ) {
throw new EucalyptusCloudException(
"Storage controllers may only be registered with a corresponding Cluster of the same name. No cluster found with the name: "
+ request.getName( ) );
}
}
EntityWrapper |
| Solution content |
|---|
public RegisterComponentResponseType registerComponent( RegisterComponentType request ) throws EucalyptusCloudException {
RegisterComponentResponseType reply = ( RegisterComponentResponseType ) request.getReply( );
reply.set_return( false );
String name = request.getName( );
String hostName = request.getHost();
Integer port = request.getPort( );
ServiceBuilder builder = builders.get( request.getClass( ) );
if( !builder.checkAdd( name, hostName, port ) ) {
return reply;
}
ServiceConfiguration newComponent = builder.add( name, hostName, port );
builder.getComponent( ).buildService( newComponent ); |
| File |
|---|
| Configuration.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Return statement |
| Try statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
=======
reply.set_return( true );
return reply;
}
<<<<<<< HEAD
public static void fireStartComponent( ComponentConfiguration newComponent ) throws EucalyptusCloudException {
StartComponentEvent e = null;
if ( Component.walrus.equals( newComponent.getComponent( ) ) && NetworkUtil.testLocal( newComponent.getHostName( ) ) ) {
e = StartComponentEvent.getLocal( newComponent );
} else if ( Component.storage.equals( newComponent.getComponent( ) ) && ( NetworkUtil.testLocal( newComponent.getHostName( ) ) ) ) {
e = StartComponentEvent.getLocal( newComponent );
} else if ( Component.vmwarebroker.equals( newComponent.getComponent( ) ) && ( NetworkUtil.testLocal( newComponent.getHostName( ) ) ) ) {
e = StartComponentEvent.getLocal( newComponent );
} else {
e = StartComponentEvent.getRemote( newComponent );
}
try {
ListenerRegistry.getInstance( ).fireEvent( newComponent.getComponent( ), e );
} catch ( EventVetoedException e1 ) {
throw new EucalyptusCloudException( e1.getMessage( ), e1 );
}
}
>>>>>>> 6fc54d0a386faa6ed9d955cd1463bcee685b1d91
public DeregisterComponentResponseType deregisterComponent( DeregisterComponentType request ) throws EucalyptusCloudException {
DeregisterComponentResponseType reply = ( DeregisterComponentResponseType ) request.getReply( );
reply.set_return( false ); |
| Solution content |
|---|
reply.set_return( true );
return reply;
}
public DeregisterComponentResponseType deregisterComponent( DeregisterComponentType request ) throws EucalyptusCloudException {
DeregisterComponentResponseType reply = ( DeregisterComponentResponseType ) request.getReply( );
reply.set_return( false ); |
| File |
|---|
| Configuration.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
return reply;
}
<<<<<<< HEAD
public static void fireStopComponent( ComponentConfiguration componentConfig ) throws EucalyptusCloudException {
StopComponentEvent e = null;
if ( Component.walrus.equals( componentConfig.getComponent( ) ) && NetworkUtil.testLocal( componentConfig.getHostName( ) ) ) {
e = StopComponentEvent.getLocal( componentConfig );
} else if ( Component.storage.equals( componentConfig.getComponent( ) ) && NetworkUtil.testLocal( componentConfig.getHostName( ) ) ) {
e = StopComponentEvent.getLocal( componentConfig );
} else if ( Component.vmwarebroker.equals( componentConfig.getComponent( ) ) && NetworkUtil.testLocal( componentConfig.getHostName( ) ) ) {
e = StopComponentEvent.getLocal( componentConfig );
} else {
e = StopComponentEvent.getRemote( componentConfig );
}
try {
ListenerRegistry.getInstance( ).fireEvent( componentConfig.getComponent( ), e );
} catch ( EventVetoedException e1 ) {
throw new EucalyptusCloudException( e1.getMessage( ), e1 );
}
}
=======
>>>>>>> 6fc54d0a386faa6ed9d955cd1463bcee685b1d91
public DescribeNodesResponseType listComponents( DescribeNodesType request ) throws EucalyptusCloudException {
DescribeNodesResponseType reply = ( DescribeNodesResponseType ) request.getReply( );
reply.setRegistered( ( ArrayList |
| Solution content |
|---|
return reply;
}
public DescribeNodesResponseType listComponents( DescribeNodesType request ) throws EucalyptusCloudException {
DescribeNodesResponseType reply = ( DescribeNodesResponseType ) request.getReply( );
reply.setRegistered( ( ArrayList |
| File |
|---|
| Configuration.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method declaration |
| Chunk |
|---|
| Conflicting content |
|---|
import com.eucalyptus.system.SubDirectory;
public class ConfigurationUtil {
<<<<<<< HEAD
static Map |
| Solution content |
|---|
import com.eucalyptus.system.SubDirectory;
public class ConfigurationUtil {
static void removeClusterCredentials( String clusterName ) { |
| File |
|---|
| ConfigurationUtil.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
private static Properties getProperties( String context ) {
singleton = dbConfig;
}
<<<<<<< HEAD
enum Internal {
general,images,auth,config,walrus,storage,dns,vmwarebroker;
public String getDatabaseName() {
return Component.eucalyptus.name( ) + "_" + this.name();
}
public Properties getProperties() {
Properties props = new Properties( );
props.setProperty( ServerConstants.SC_KEY_DATABASE + "." + this.ordinal( ), SubDirectory.DB.toString( ) + File.separator + this.getDatabaseName( ) );
props.setProperty( ServerConstants.SC_KEY_DBNAME + "."+ this.ordinal( ), this.getDatabaseName( ) );
return props;
}
=======
Properties props = new Properties( );
props.setProperty( ServerConstants.SC_KEY_DATABASE + "." + index, SubDirectory.DB.toString( ) + File.separator + context );
props.setProperty( ServerConstants.SC_KEY_DBNAME + "."+ index, context );
index++;
return props;
>>>>>>> 6fc54d0a386faa6ed9d955cd1463bcee685b1d91
}
|
| Solution content |
|---|
singleton = dbConfig;
}
private static Properties getProperties( String context ) {
Properties props = new Properties( );
props.setProperty( ServerConstants.SC_KEY_DATABASE + "." + index, SubDirectory.DB.toString( ) + File.separator + context );
props.setProperty( ServerConstants.SC_KEY_DBNAME + "."+ index, context );
index++;
return props;
}
|
| File |
|---|
| DatabaseConfig.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Enum signature |
| Enum value |
| Method declaration |
| Method invocation |
| Method signature |
| Return statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
@Deprecated
public enum Component {
<<<<<<< HEAD
bootstrap( "vm://EucalyptusRequestQueue" ),
eucalyptus( "vm://EucalyptusRequestQueue" ),
walrus( "vm://BukkitInternal" ),
dns( "vm://DNSControlInternal" ),
storage( "vm://StorageInternal" ),
db( "jdbc:hsqldb:hsqls://127.0.0.1:9001/eucalyptus" ),
cluster( "vm://ClusterSink" ),
jetty( "vm://HttpServer" ),
vmwarebroker("vm://VMwareBrokerInternal"),
=======
bootstrap( true ),
eucalyptus( true ),
walrus( true ),
dns( true ),
storage( false ),
db( true ),
jetty( true ),
configuration( true ),
cluster( false ),
>>>>>>> 6fc54d0a386faa6ed9d955cd1463bcee685b1d91
any( true );
private static Logger LOG = Logger.getLogger( Component.class );
private final Boolean singleton; |
| Solution content |
|---|
@Deprecated
public enum Component {
bootstrap( true ),
eucalyptus( true ),
walrus( true ),
dns( true ),
storage( false ),
db( true ),
jetty( true ),
configuration( true ),
cluster( false ),
vmwarebroker( false ),
any( true );
private static Logger LOG = Logger.getLogger( Component.class );
private final Boolean singleton; |
| File |
|---|
| Component.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Enum value |
| Chunk |
|---|
| Conflicting content |
|---|
import com.eucalyptus.bootstrap.BootstrapException; import com.eucalyptus.bootstrap.Bootstrapper; import com.eucalyptus.bootstrap.Provides; <<<<<<< HEAD import com.eucalyptus.bootstrap.Resource; import com.eucalyptus.bootstrap.ServiceBootstrapper; import com.eucalyptus.config.ComponentConfiguration; import com.eucalyptus.config.Configuration; import com.eucalyptus.config.RemoteConfiguration; import com.eucalyptus.config.StorageControllerConfiguration; import com.eucalyptus.config.VMwareBrokerConfiguration; import com.eucalyptus.config.WalrusConfiguration; import com.eucalyptus.event.EventVetoedException; import com.eucalyptus.event.ListenerRegistry; import com.eucalyptus.event.StartComponentEvent; import com.eucalyptus.util.EucalyptusCloudException; import com.eucalyptus.util.LogUtil; import com.eucalyptus.util.NetworkUtil; import com.eucalyptus.ws.client.LocalDispatcher; import com.eucalyptus.ws.client.RemoteDispatcher; ======= import com.eucalyptus.bootstrap.RunDuring; import com.eucalyptus.bootstrap.Bootstrap.Stage; import com.eucalyptus.component.Component; import com.eucalyptus.component.Components; import com.eucalyptus.component.ServiceConfiguration; import com.eucalyptus.records.EventType; import com.eucalyptus.util.Exceptions; >>>>>>> 6fc54d0a386faa6ed9d955cd1463bcee685b1d91 import com.eucalyptus.ws.client.ServiceDispatcher; import edu.ucsb.eucalyptus.msgs.EventRecord; |
| Solution content |
|---|
import com.eucalyptus.bootstrap.BootstrapException; import com.eucalyptus.bootstrap.Bootstrapper; import com.eucalyptus.bootstrap.Provides; import com.eucalyptus.config.ComponentConfiguration; import com.eucalyptus.config.Configuration; import com.eucalyptus.config.RemoteConfiguration; import com.eucalyptus.config.StorageControllerConfiguration; import com.eucalyptus.config.WalrusConfiguration; import com.eucalyptus.event.EventVetoedException; import com.eucalyptus.event.ListenerRegistry; import com.eucalyptus.component.event.StartComponentEvent; import com.eucalyptus.util.EucalyptusCloudException; import com.eucalyptus.util.LogUtil; import com.eucalyptus.util.NetworkUtil; import com.eucalyptus.ws.client.LocalDispatcher; import com.eucalyptus.ws.client.RemoteDispatcher; import com.eucalyptus.bootstrap.RunDuring; import com.eucalyptus.bootstrap.Bootstrap.Stage; import com.eucalyptus.component.Component; import com.eucalyptus.component.Components; import com.eucalyptus.component.ServiceConfiguration; import com.eucalyptus.records.EventType; import com.eucalyptus.util.Exceptions; import com.eucalyptus.ws.client.ServiceDispatcher; import edu.ucsb.eucalyptus.msgs.EventRecord; import com.eucalyptus.config.VMwareBrokerConfiguration; |
| File |
|---|
| ServiceDispatchBootstrapper.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
@Override
public void fireEvent( Event event ) {
<<<<<<< HEAD
if ( event instanceof ComponentEvent ) {
ComponentEvent e = ( ComponentEvent ) event;
if ( !Component.walrus.equals( e.getComponent( ) ) && !Component.storage.equals( e.getComponent( ) ) && !Component.vmwarebroker.equals( e.getComponent( ) )) {
=======
if ( event instanceof LifecycleEvent ) {
LifecycleEvent e = ( LifecycleEvent ) event;
if ( !Component.walrus.equals( e.getPeer( ) ) && !Component.storage.equals( e.getPeer( ) ) ) {
>>>>>>> 6fc54d0a386faa6ed9d955cd1463bcee685b1d91
return;
} else if ( e.getConfiguration( ).getPort( ) < 0 ) {
return; |
| Solution content |
|---|
@Override
public void fireEvent( Event event ) {
if ( event instanceof LifecycleEvent ) {
LifecycleEvent e = ( LifecycleEvent ) event;
if ( !Component.walrus.equals( e.getPeer( ) ) && !Component.storage.equals( e.getPeer( ) ) && !Component.vmwarebroker.equals( e.getPeer( ) ) ) {
return;
} else if ( e.getConfiguration( ).getPort( ) < 0 ) {
return; |
| File |
|---|
| RemoteBootstrapperClient.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Cast expression |
| If statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
public static void register( ) {
ServiceEventListener me = new ServiceEventListener( );
<<<<<<< HEAD
ListenerRegistry.getInstance( ).register( Component.walrus, me );
ListenerRegistry.getInstance( ).register( Component.storage, me );
ListenerRegistry.getInstance( ).register( Component.db, me );
ListenerRegistry.getInstance( ).register( Component.dns, me );
ListenerRegistry.getInstance( ).register( Component.jetty, me );
ListenerRegistry.getInstance( ).register( Component.eucalyptus, me );
ListenerRegistry.getInstance( ).register( Component.cluster, me );
ListenerRegistry.getInstance().register ( Component.vmwarebroker, me);
=======
for( Component c : Component.values() ) {
ListenerRegistry.getInstance( ).register( c, me );
}
>>>>>>> 6fc54d0a386faa6ed9d955cd1463bcee685b1d91
if( Component.eucalyptus.isLocal( ) ) {
ListenerRegistry.getInstance( ).register( ClockTick.class, RemoteBootstrapperClient.getInstance( ) );
ListenerRegistry.getInstance( ).register( Component.walrus, RemoteBootstrapperClient.getInstance( ) ); |
| Solution content |
|---|
public static void register( ) {
ServiceEventListener me = new ServiceEventListener( );
for( Component c : Component.values() ) {
ListenerRegistry.getInstance( ).register( c, me );
}
if( Component.eucalyptus.isLocal( ) ) {
ListenerRegistry.getInstance( ).register( ClockTick.class, RemoteBootstrapperClient.getInstance( ) );
ListenerRegistry.getInstance( ).register( Component.walrus, RemoteBootstrapperClient.getInstance( ) ); |
| File |
|---|
| ServiceEventListener.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| For statement |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
private void handleInitialize( ChannelHandlerContext ctx, MappingHttpRequest request ) throws IOException, SocketException {
InetSocketAddress addr = ( InetSocketAddress ) ctx.getChannel( ).getRemoteAddress( );
LOG.info( LogUtil.subheader( "Using " + addr.getHostName( ) + " as the database address." ) );
<<<<<<< HEAD
Component.db.setHostAddress( addr.getHostName( ) );
Component.db.markEnabled( );
Component.dns.setHostAddress( addr.getHostName( ) );
Component.eucalyptus.setHostAddress( addr.getHostName( ) );
Component.cluster.setHostAddress( addr.getHostName( ) );
Component.jetty.setHostAddress( addr.getHostName( ) );
HeartbeatType msg = ( HeartbeatType ) request.getMessage( );
LOG.info( LogUtil.header( "Got heartbeat event: " + LogUtil.dumpObject( msg ) ) );
for ( HeartbeatComponentType component : msg.getComponents( ) ) {
LOG.info( LogUtil.subheader( "Registering local component: " + LogUtil.dumpObject( component ) ) );
System.setProperty( "euca." + component.getComponent( ) + ".name", component.getName( ) );
Component.valueOf( component.getComponent( ) ).markLocal( );
//FIXME: this is needed because we can't dynamically change the mule config, so we need to disable at init time and hup when a new component is loaded.
initializedComponents.add( component.getComponent( ) );
}
//FIXME: this is needed because we can't dynamically change the mule config, so we need to disable at init time and hup when a new component is loaded.
if( !initializedComponents.contains( Component.storage.name( ) ) ) {
Component.storage.markDisabled( );
}
//FIXME: this is needed because we can't dynamically change the mule config, so we need to disable at init time and hup when a new component is loaded.
if( !initializedComponents.contains( Component.walrus.name( ) ) ) {
Component.walrus.markDisabled( );
}
if( !initializedComponents.contains( Component.vmwarebroker.name( ) ) ) {
Component.vmwarebroker.markDisabled( );
}
System.setProperty( "euca.db.password", Hashes.getHexSignature( ) );
System.setProperty( "euca.db.url", Component.db.getUri( ).toASCIIString( ) );
try {
GroovyUtil.evaluateScript( "after_database.groovy" );
GroovyUtil.evaluateScript( "after_persistence.groovy" );
} catch ( FailScriptFailException e1 ) {
LOG.debug( e1, e1 );
System.exit( 123 );
}
boolean foundDb = false;
=======
>>>>>>> 6fc54d0a386faa6ed9d955cd1463bcee685b1d91
try {
this.prepareComponent( Components.delegate.db, addr );
this.prepareComponent( Components.delegate.dns, addr ); |
| Solution content |
|---|
private void handleInitialize( ChannelHandlerContext ctx, MappingHttpRequest request ) throws IOException, SocketException {
InetSocketAddress addr = ( InetSocketAddress ) ctx.getChannel( ).getRemoteAddress( );
LOG.info( LogUtil.subheader( "Using " + addr.getHostName( ) + " as the database address." ) );
try {
this.prepareComponent( Components.delegate.db, addr );
this.prepareComponent( Components.delegate.dns, addr ); |
| File |
|---|
| HeartbeatHandler.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Cast expression |
| Comment |
| For statement |
| If statement |
| Method invocation |
| Try statement |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
package com.eucalyptus.ws.stages; import org.jboss.netty.channel.ChannelPipeline; <<<<<<< HEAD ======= >>>>>>> 6fc54d0a386faa6ed9d955cd1463bcee685b1d91 import com.eucalyptus.ws.handlers.BindingHandler; import com.eucalyptus.ws.handlers.VMwareBrokerBindingHandler; |
| Solution content |
|---|
package com.eucalyptus.ws.stages; import org.jboss.netty.channel.ChannelPipeline; import com.eucalyptus.ws.handlers.BindingHandler; import com.eucalyptus.ws.handlers.VMwareBrokerBindingHandler; |
| File |
|---|
| BindingStage.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Blank |