@aperloff : I just pushed 9fd293c, it exposes the chunked dirlist handling that has been implemented in cc83c09

The chunked semantics is available only for asynchronous calls, here's an example:

from XRootD import client
from XRootD.client.flags import DirListFlags, OpenFlags, MkDirFlags, QueryCode
from XRootD.client import responses

import time

def callback(st, rsp, hosts):

  if st.ok:

    for ent in rsp:
      print ent # or do something else

    if st.code == responses.XRootDStatus.suDone:
      # this is the last chunk
      print 'We are done.'

    if st.code == responses.XRootDStatus.suPartial:
      # this happens if some of the requests failed, e.g. 
      # in case of recursive dirls client might fail listing
      # some subdirectories
      print 'We are done, but this is only partial result'

    if st.code == responses.XRootDStatus.suContinue:
      #more chunks will follow
      print 'We will continue with this callback'

fs = client.FileSystem('root://slc7-test:1094')
fs.dirlist( '/tmp', DirListFlags.RECURSIVE | DirListFlags.CHUNKED, 0, callback )

# make sure you wait until the callback gets the final response
time.sleep(3)

I hope this helps! Let me know if there's anything else you need or if the issue can be closed!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/xrootd/xrootd/issues/962#issuecomment-489548514", "url": "https://github.com/xrootd/xrootd/issues/962#issuecomment-489548514", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1