Bug 1201294 - tools/glusterfind: Output format flexibility
Summary: tools/glusterfind: Output format flexibility
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterfind
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Aravinda VK
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: glusterfs-3.7.1
TreeView+ depends on / blocked
 
Reported: 2015-03-12 13:24 UTC by Aravinda VK
Modified: 2015-05-27 08:08 UTC (History)
5 users (show)

Fixed In Version: glusterfs-3.7.0
Clone Of:
Environment:
Last Closed: 2015-05-27 08:08:54 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Aravinda VK 2015-03-12 13:24:12 UTC
Description of problem:
Some tools expects Number of letters before the path names. If a filename includes newline character it is difficult for consumer to distinguish two files.

For example,

15 hello_world.txt
5  d1/f1

Additional info:
Feature patch: http://review.gluster.org/#/c/9682/

Comment 1 Anand Avati 2015-03-26 12:42:11 UTC
REVIEW: http://review.gluster.org/10012 (tools/glusterfind: Output Format Configurable) posted (#1) for review on master by Aravinda VK (avishwan)

Comment 2 Aravinda VK 2015-04-27 04:33:48 UTC
Above mentioned patch is Abandoned. Below patch standardizes the output format. It is easy to postprocess from this format and convert it to required format.
http://review.gluster.org/#/c/10320/

Example to convert it to required format.(First argument is filename generated by glusterfind --full

#!/usr/bin/python
import sys
import urllib

filename = sys.argv[1]

with open(filename) as f:
    for line in f:
        line = urllib.unquote_plus(line)
        print "%s %s" % (len(line), line)

Comment 3 Aravinda VK 2015-05-27 08:08:54 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.