Ohara: Group key doesn't work as expected in streamApp

Created on 5 Sep 2019  路  8Comments  路  Source: oharastream/ohara

Assuming that I have a workspace named __dev__ and a pipeline called __manager__
In the frontend, we're using __dev-manager__ as the __group__ name in pipelines.

So inside the pipeline __manager__, Create a stream with a req like below

API: __POST__, http://10.1.13.102:12345/v0/stream

{
    "jarKey": {
        "group": "dev-streamjar",
        "name": "ohara-streamapp.jar"
    },
    "name": "abc",
    "group": "dev-manager",
    "brokerClusterName": "uai7ojq260"
}

Then Update the pipeline to include this stream app in its graph
API: __PUT__ http://10.1.13.102:12345/v0/pipelines/manager?group=dev-manager

{
    "flows": [
        {
            "from": {
                "group": "dev-manager",
                "name": "abc"
            },
            "to": []
        }
    ]
}

With the above you get an empty objects:

{
    "name": "manager",
    "lastModified": 1567652610763,
    "tags": {
        "workerClusterName": "dev"
    },
    "flows": [
        {
            "from": {
                "group": "default",
                "name": "abc"
            },
            "to": []
        }
    ],
    "objects": [],
    "group": "dev-manager"
}

But if you change the group name of the stream app name in the from field. The objects would work as expected:

{
    "name": "manager",
    "lastModified": 1567652610763,
    "tags": {
        "workerClusterName": "dev"
    },
    "flows": [
        {
            "from": {
                "group": "default",
                "name": "abc"
            },
            "to": []
        }
    ],
    "objects": [
        {
            "name": "abc",
            "lastModified": 1567652491041,
            "tags": {},
            "error": "abc is not running",
            "className": "com.island.ohara.it.streamapp.DumbStreamApp",
            "metrics": {
                "meters": []
            },
            "kind": "stream",
            "group": "default"
        }
    ],
    "group": "dev-manager"
}

All 8 comments

/cc @saivirtue

Thanks for reporting :)
I will take over this issue and fix it ASAP

This issue is about "how we support the group for cluster" ?

all zk, bk, wk and stream are not supported group now, and we should have a issue to include this to address it for all clusters than streamapp only.

This issue is blocked by #2570, will back to check if this problem was fixed or not.

ping @konekoya
Since #2602 had been merged, could you help to check if this issue was solved or not?

No problem. I will give it a look as soon as I can

@saivirtue I've tested this and implemented in #2378. It works perfectly. Thanks for the help :)

Remove the fix version tag as there's no PR linked to this issue

Was this page helpful?
0 / 5 - 0 ratings