/[Sack]/trunk/bin/couchdb2shards.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/couchdb2shards.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 242 by dpavlin, Thu Nov 26 17:32:38 2009 UTC revision 243 by dpavlin, Thu Nov 26 18:14:43 2009 UTC
# Line 82  while(<$sock>) { Line 82  while(<$sock>) {
82    
83                  s/,[\r\n]+$//; # cleanup JSON                  s/,[\r\n]+$//; # cleanup JSON
84                  my $json = from_json( $_ );                  my $json = from_json( $_ );
85                    push @$shard, $json->{doc};
                 push @$shard, $json;  
86                  save_shard if $#{ $shard } == $shard_size;                  save_shard if $#{ $shard } == $shard_size;
87          } else {          } else {
88                  warn "UNKNOWN: $_";                  warn "UNKNOWN: $_";

Legend:
Removed from v.242  
changed lines
  Added in v.243

  ViewVC Help
Powered by ViewVC 1.1.26