eagle-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (EAGLE-1046) Eagle supports policies import to a new site from a policy prototype
Date Tue, 11 Jul 2017 03:30:00 GMT

    [ https://issues.apache.org/jira/browse/EAGLE-1046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16081590#comment-16081590
] 

ASF GitHub Bot commented on EAGLE-1046:
---------------------------------------

GitHub user zombieJ opened a pull request:

    https://github.com/apache/eagle/pull/963

    Eagle-1046 Eagle supports policies import to a new site from a policy prototype

    https://issues.apache.org/jira/browse/EAGLE-1046
    
    add prototype management page
    support policy create with proto

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zombieJ/incubator-eagle EAGLE-1046

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/eagle/pull/963.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #963
    
----
commit 1dcf294fc6066a1626c2782dd3621e4b84ca43d4
Author: zombieJ <smith3816@gmail.com>
Date:   2017-07-10T06:57:32Z

    fix admin check logic

commit 1b8134d1c1dc6ebc892866a15d499c35dbdb49d7
Author: zombieJ <smith3816@gmail.com>
Date:   2017-07-10T08:08:20Z

    add post prototype

----


> Eagle supports policies import to a new site from a policy prototype
> --------------------------------------------------------------------
>
>                 Key: EAGLE-1046
>                 URL: https://issues.apache.org/jira/browse/EAGLE-1046
>             Project: Eagle
>          Issue Type: New Feature
>    Affects Versions: v0.6.0
>            Reporter: Zhao, Qingwen
>            Assignee: Jilin, Jiang
>
> 0. policy prototype entity 
> {code}
>   String name
>   PolicyDefinition definition
>   List<String> alertPublishmentIds
> {code}
> 1. load a list of policies to new site "sandbox" from policy prototypes by  {{POST /rest/policyProto/export/sandbox}}
> {code}
>       [     { "definition": {
>                 "name": "JobRpcThroughput",
>                 "description": "Policy for MAP_REDUCE_JOB_STREAM_SANDBOX_RPC_THROUGHPUT_OUT",
>                 "inputStreams": [
>                     "MAP_REDUCE_JOB_STREAM"
>                 ],
>                 "outputStreams": [
>                     "MAP_REDUCE_JOB_STREAM_SANDBOX_RPC_THROUGHPUT_OUT"
>                 ],
>                 "siteId": null,
>                 "definition": {
>                     "type": "siddhi",
>                     "value": "from MAP_REDUCE_JOB_STREAM[mapOpsPerSecond > 1000 or
reduceOpsPerSecond > 1000 or avgOpsPerMapTask > 50 or avgOpsPerReduceTask > 50] select
* insert into MAP_REDUCE_JOB_STREAM_RPC_THROUGHPUT_OUT;",
>                     "handlerClass": null,
>                     "properties": {},
>                     "inputStreams": [],
>                     "outputStreams": []
>                 },
>                 "stateDefinition": null,
>                 "policyStatus": "DISABLED",
>                 "alertDefinition": {
>                     "templateType": "TEXT",
>                     "subject": "$site job rpc",
>                     "body": "$site job rpc throughput",
>                     "severity": "WARNING",
>                     "category": "JPM"
>                 },
>                 "alertDeduplications": [
>                     {
>                         "outputStreamId": "MAP_REDUCE_JOB_STREAM_SANDBOX_RPC_THROUGHPUT_OUT",
>                         "dedupIntervalMin": "0",
>                         "dedupFields": []
>                     }
>                 ],
>                 "partitionSpec": [
>                     {
>                         "streamId": "MAP_REDUCE_JOB_STREAM_SANDBOX",
>                         "type": "SHUFFLE",
>                         "columns": [],
>                         "sortSpec": null
>                     }
>                 ],
>                 "dedicated": false,
>                 "parallelismHint": 5,
>                 "alertSeverity": "WARNING",
>                 "alertCategory": "JPM"
>             },
>             "alertPublishmentIds": []
>         }
>         ]
> {code}
> 2. create a new policy prototype with an existing policy by {{ POST /rest/policyProto/import}}
> {code}
>  {   "definition": {
>         "name": "JobRpcThroughput",
>         "description": "Policy for MAP_REDUCE_JOB_STREAM_SANDBOX_RPC_THROUGHPUT_OUT",
>         "inputStreams": [
>             "MAP_REDUCE_JOB_STREAM_SANDBOX"
>         ],
>         "outputStreams": [
>             "MAP_REDUCE_JOB_STREAM_SANDBOX_RPC_THROUGHPUT_OUT"
>         ],
>         "siteId": "sandbox",
>         "definition": {
>             "type": "siddhi",
>             "value": "from MAP_REDUCE_JOB_STREAM_SANDBOX[mapOpsPerSecond > 1000 or
reduceOpsPerSecond > 1000 or avgOpsPerMapTask > 50 or avgOpsPerReduceTask > 50] select
* insert into MAP_REDUCE_JOB_STREAM_SANDBOX_RPC_THROUGHPUT_OUT;",
>             "handlerClass": null,
>             "properties": {},
>             "inputStreams": [],
>             "outputStreams": []
>         },
>         "stateDefinition": null,
>         "policyStatus": "DISABLED",
>         "alertDefinition": {
>             "templateType": "TEXT",
>             "subject": "$site job rpc",
>             "body": "$site job rpc throughput",
>             "severity": "WARNING",
>             "category": "JPM"
>         },
>         "alertDeduplications": [
>             {
>                 "outputStreamId": "MAP_REDUCE_JOB_STREAM_SANDBOX_RPC_THROUGHPUT_OUT",
>                 "dedupIntervalMin": "0",
>                 "dedupFields": []
>             }
>         ],
>         "partitionSpec": [
>             {
>                 "streamId": "MAP_REDUCE_JOB_STREAM_SANDBOX",
>                 "type": "SHUFFLE",
>                 "columns": [],
>                 "sortSpec": null
>             }
>         ],
>         "dedicated": false,
>         "parallelismHint": 5,
>         "alertSeverity": "WARNING",
>         "alertCategory": "JPM"
>     },
>     "alertPublishmentIds": []
>  }
> {code}
> 3. update or create a policy prototype by by {{ POST /rest/policyProto}}
> {code}
> {
>         "policyProto": {
>             "name": "JobRpcThroughput",
>             "description": "Policy for MAP_REDUCE_JOB_STREAM_SANDBOX_RPC_THROUGHPUT_OUT",
>             "inputStreams": [
>                 "MAP_REDUCE_JOB_STREAM"
>             ],
>             "outputStreams": [
>                 "MAP_REDUCE_JOB_STREAM_SANDBOX_RPC_THROUGHPUT_OUT"
>             ],
>             "siteId": null,
>             "definition": {
>                 "type": "siddhi",
>                 "value": "from MAP_REDUCE_JOB_STREAM[mapOpsPerSecond > 1000 or reduceOpsPerSecond
> 1000 or avgOpsPerMapTask > 50 or avgOpsPerReduceTask > 50] select * insert into
MAP_REDUCE_JOB_STREAM_RPC_THROUGHPUT_OUT;",
>                 "handlerClass": null,
>                 "properties": {},
>                 "inputStreams": [],
>                 "outputStreams": []
>             },
>             "stateDefinition": null,
>             "policyStatus": "DISABLED",
>             "alertDefinition": {
>                 "templateType": "TEXT",
>                 "subject": "$site job rpc",
>                 "body": "$site job rpc throughput",
>                 "severity": "WARNING",
>                 "category": "JPM"
>             },
>             "alertDeduplications": [
>                 {
>                     "outputStreamId": "MAP_REDUCE_JOB_STREAM_SANDBOX_RPC_THROUGHPUT_OUT",
>                     "dedupIntervalMin": "0",
>                     "dedupFields": []
>                 }
>             ],
>             "partitionSpec": [
>                 {
>                     "streamId": "MAP_REDUCE_JOB_STREAM_SANDBOX",
>                     "type": "SHUFFLE",
>                     "columns": [],
>                     "sortSpec": null
>                 }
>             ],
>             "dedicated": false,
>             "parallelismHint": 5,
>             "alertSeverity": "WARNING",
>             "alertCategory": "JPM"
>         },
>         "alertPublishmentIds": []
>     }
> {code}
> 4. get all policy prototypes by {{GET /rest/policyProto}}
> 5. delete a policy prototype by {{ DELETE /rest/policyProto/\{uuid\}  }}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message