This repository has been archived by the owner on Jul 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BZ 1120418] initial support for bootstrap step
- Loading branch information
John Sanda
committed
Aug 11, 2014
1 parent
1d9a98e
commit 4f801c5
Showing
3 changed files
with
83 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...r/jar/src/main/java/org/rhq/enterprise/server/storage/maintenance/step/BootstrapNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.rhq.enterprise.server.storage.maintenance.step; | ||
|
||
import org.apache.commons.logging.Log; | ||
import org.apache.commons.logging.LogFactory; | ||
|
||
import org.rhq.core.domain.configuration.Configuration; | ||
import org.rhq.core.domain.configuration.PropertyMap; | ||
import org.rhq.core.domain.storage.MaintenanceStep; | ||
|
||
/** | ||
* @author John Sanda | ||
*/ | ||
public class BootstrapNode extends BaseStepRunner { | ||
|
||
private static final Log log = LogFactory.getLog(BootstrapNode.class); | ||
|
||
@Override | ||
public void execute(MaintenanceStep step) { | ||
log.info("Bootstrapping new node"); | ||
|
||
Configuration configuration = step.getConfiguration(); | ||
String targetAddress = configuration.getSimpleValue("targetAddress"); | ||
PropertyMap params = (PropertyMap) configuration.get("parameters"); | ||
|
||
Configuration operationParams = new Configuration(); | ||
operationParams.put(params.get("cqlPort")); | ||
operationParams.put(params.get("gossipPort")); | ||
operationParams.put(params.get("addresses")); | ||
|
||
executeOperation(targetAddress, "prepareForBootstrap", operationParams); | ||
} | ||
} |