eagle-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhao, Qingwen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (EAGLE-1046) Eagle supports policies import to a new site from a policy prototype
Date Tue, 20 Jun 2017 07:21:00 GMT

     [ https://issues.apache.org/jira/browse/EAGLE-1046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Zhao, Qingwen updated EAGLE-1046:
---------------------------------
    Description: 
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\}  }}




  was:
0. policy prototype entity 
{code}
  String name
  PolicyDefinition definition
  List<String> alertPublishmentIds
{code}


1. load 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\}  }}





> 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