Search in sources :

Example 31 with Cluster

use of org.apache.asterix.event.schema.cluster.Cluster in project asterixdb by apache.

the class EventUtil method getCluster.

public static Cluster getCluster(String clusterConfigurationPath) throws JAXBException {
    File file = new File(clusterConfigurationPath);
    JAXBContext ctx = JAXBContext.newInstance(Cluster.class);
    Unmarshaller unmarshaller = ctx.createUnmarshaller();
    Cluster cluster = (Cluster) unmarshaller.unmarshal(file);
    return cluster;
}
Also used : Cluster(org.apache.asterix.event.schema.cluster.Cluster) JAXBContext(javax.xml.bind.JAXBContext) Unmarshaller(javax.xml.bind.Unmarshaller) File(java.io.File)

Aggregations

Cluster (org.apache.asterix.event.schema.cluster.Cluster)31 ArrayList (java.util.ArrayList)22 Node (org.apache.asterix.event.schema.cluster.Node)20 Pattern (org.apache.asterix.event.schema.pattern.Pattern)15 Patterns (org.apache.asterix.event.schema.pattern.Patterns)15 Event (org.apache.asterix.event.schema.pattern.Event)13 Nodeid (org.apache.asterix.event.schema.pattern.Nodeid)13 Value (org.apache.asterix.event.schema.pattern.Value)13 File (java.io.File)8 JAXBContext (javax.xml.bind.JAXBContext)8 HashSet (java.util.HashSet)6 Unmarshaller (javax.xml.bind.Unmarshaller)5 List (java.util.List)4 ParallelActionSet (org.apache.asterix.experiment.action.base.ParallelActionSet)4 SequentialActionList (org.apache.asterix.experiment.action.base.SequentialActionList)4 LogAsterixManagixAction (org.apache.asterix.experiment.action.derived.ManagixActions.LogAsterixManagixAction)4 StopAsterixManagixAction (org.apache.asterix.experiment.action.derived.ManagixActions.StopAsterixManagixAction)4 FileOutputStream (java.io.FileOutputStream)3 Marshaller (javax.xml.bind.Marshaller)3 AbstractRemoteExecutableAction (org.apache.asterix.experiment.action.derived.AbstractRemoteExecutableAction)3