Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Seeking in a file

by spazm (Monk)
on Jun 02, 2012 at 00:25 UTC ( #973895=note: print w/ replies, xml ) Need Help??


in reply to Re: Seeking in a file
in thread Seeking in a file

Is seeking backwards in a piped stream going to work (reliably)?

This seems like a basic map-reduce paradigm. It would be nice to have a method that would "just work(tm)" for pre sorted data like this.

Something like an iterator over the group of file handles that stores a one line buffer. Hadoop::Streaming::Reducer::Input does something like this for a single filehandle, but its terrible clumsy code (sorry 'bout that).

Hadoop::Streaming::Reducer::Input source.


Comment on Re^2: Seeking in a file
Replies are listed 'Best First'.
Re^3: Seeking in a file
by choroba (Canon) on Jun 02, 2012 at 00:29 UTC
    I fear seeking does not work in a piped stream at all. You have to remember tha last line so you can return to it later.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://973895]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2015-07-30 17:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls