Search in sources :

Example 11 with NimbusInfo

use of backtype.storm.nimbus.NimbusInfo in project jstorm by alibaba.

the class StormConfig method write_nimbus_topology_conf.

public static void write_nimbus_topology_conf(String topologyId, Map topoConf, NimbusData data) throws Exception {
    String confKey = master_stormconf_key(topologyId);
    AtomicOutputStream out = data.getBlobStore().updateBlob(confKey);
    out.write(Utils.serialize(topoConf));
    out.close();
    if (data.getBlobStore() instanceof LocalFsBlobStore) {
        NimbusInfo nimbusInfo = data.getNimbusHostPortInfo();
        int versionForKey = BlobStoreUtils.getVersionForKey(confKey, nimbusInfo, data.getConf());
        data.getStormClusterState().setup_blobstore(confKey, nimbusInfo, versionForKey);
    }
}
Also used : LocalFsBlobStore(com.alibaba.jstorm.blobstore.LocalFsBlobStore) AtomicOutputStream(com.alibaba.jstorm.blobstore.AtomicOutputStream) NimbusInfo(backtype.storm.nimbus.NimbusInfo)

Aggregations

NimbusInfo (backtype.storm.nimbus.NimbusInfo)11 KeyAlreadyExistsException (backtype.storm.generated.KeyAlreadyExistsException)7 KeyNotFoundException (backtype.storm.generated.KeyNotFoundException)7 IOException (java.io.IOException)6 TException (org.apache.thrift.TException)6 LocalFsBlobStore (com.alibaba.jstorm.blobstore.LocalFsBlobStore)5 TTransportException (org.apache.thrift.transport.TTransportException)4 NimbusClient (backtype.storm.utils.NimbusClient)3 BlobStore (com.alibaba.jstorm.blobstore.BlobStore)3 AlreadyAliveException (backtype.storm.generated.AlreadyAliveException)2 InvalidTopologyException (backtype.storm.generated.InvalidTopologyException)2 NotAliveException (backtype.storm.generated.NotAliveException)2 TopologyAssignException (backtype.storm.generated.TopologyAssignException)2 AtomicOutputStream (com.alibaba.jstorm.blobstore.AtomicOutputStream)2 StormClusterState (com.alibaba.jstorm.cluster.StormClusterState)2 FailedAssignTopologyException (com.alibaba.jstorm.utils.FailedAssignTopologyException)2 FileNotFoundException (java.io.FileNotFoundException)2 InvalidParameterException (java.security.InvalidParameterException)2 CuratorFramework (org.apache.curator.framework.CuratorFramework)2 ReadableBlobMeta (backtype.storm.generated.ReadableBlobMeta)1