[
https://issues.apache.org/jira/browse/HDDS-2071?focusedWorklogId=327463&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-327463
]
ASF GitHub Bot logged work on HDDS-2071:
----------------------------------------
Author: ASF GitHub Bot
Created on: 13/Oct/19 08:36
Start Date: 13/Oct/19 08:36
Worklog Time Spent: 10m
Work Description: elek commented on pull request #4: HDDS-2071. Support
filters in ozone insight point
URL: https://github.com/apache/hadoop-ozone/pull/4
## What changes were proposed in this pull request?
Extent the existing ozone insight command with support additional log
filtering. For example if you are interested about
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-2071
## How was this patch tested?
```
#start a cluster
cd hadoop-ozone/dist/target/ozone-*/compose/ozone
docker-compose up -d --scale datanode=3
# go to scm
docker-compose exec scm bash
```
insight without filter (wait until the next node report, ~ 30 s)
```
ozone insight logs -v scm.node-manager
#Example output
[SCM] 2019-10-13 08:34:29,920
[TRACE|org.apache.hadoop.hdds.scm.node.SCMNodeManager|SCMNodeManager] HB is
received from [datanode=ozone_datanode_2.ozone_default]:
storageReport {
storageUuid: "DS-36d38c09-4306-4a30-b48c-b3b612d4eb00"
storageLocation: "/data/hdds"
capacity: 485541425152
scmUsed: 4096
remaining: 128080560128
storageType: DISK
failed: false
}
```
insight WITH filter (wait until the next node report, ~ 30 s)
```
ozone insight logs -v scm.node-manager -f
datanode=ozone_datanode_2.ozone_default
```
You should see only the node reports from datanode_2
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 327463)
Time Spent: 1h 20m (was: 1h 10m)
> Support filters in ozone insight point
> --------------------------------------
>
> Key: HDDS-2071
> URL: https://issues.apache.org/jira/browse/HDDS-2071
> Project: Hadoop Distributed Data Store
> Issue Type: Sub-task
> Reporter: Marton Elek
> Assignee: Marton Elek
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> With Ozone insight we can print out all the logs / metrics of one specific
> component s (eg. scm.node-manager or scm.node-manager).
> It would be great to support additional filtering capabilities where the
> output is filtered based on specific keys.
> For example to print out all of the logs related to one datanode or related
> to one type of RPC request.
> Filter should be a key value map (eg. --filter
> datanode=sjdhfhf,rpc=createChunk) which can be defined in the ozone insight
> CLI.
> As we have no option to add additional tags to the logs (it may be supported
> by log4j2 but not with slf4k), the first implementation can be implemented by
> pattern matching.
> For example in SCMNodeManager.processNodeReport contains trace/debug logs
> which includes the " [datanode={}]" part. This formatting convention can be
> used to print out the only the related information.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]