| OLD | NEW |
| 1 package ingester | 1 package ingester |
| 2 | 2 |
| 3 import ( | 3 import ( |
| 4 "fmt" | 4 "fmt" |
| 5 "io" | 5 "io" |
| 6 "net/http" | 6 "net/http" |
| 7 | 7 |
| 8 "time" | 8 "time" |
| 9 ) | 9 ) |
| 10 | 10 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 return nil | 163 return nil |
| 164 } | 164 } |
| 165 | 165 |
| 166 // Flush writes the current Tile out, should be called once all updates are | 166 // Flush writes the current Tile out, should be called once all updates are |
| 167 // done. Note that Move() writes out the former Tile as it moves to a new Tile, | 167 // done. Note that Move() writes out the former Tile as it moves to a new Tile, |
| 168 // so this only needs to be called at the end of looping over a set of work. | 168 // so this only needs to be called at the end of looping over a set of work. |
| 169 func (tt TileTracker) Flush() { | 169 func (tt TileTracker) Flush() { |
| 170 glog.Info("Flushing Tile.") | 170 glog.Info("Flushing Tile.") |
| 171 if tt.lastTileNum != -1 { | 171 if tt.lastTileNum != -1 { |
| 172 if err := tt.tileStore.Put(0, tt.lastTileNum, tt.currentTile); e
rr != nil { | 172 if err := tt.tileStore.Put(0, tt.lastTileNum, tt.currentTile); e
rr != nil { |
| 173 » » » glog.Error("Failed to write Tile: %s", err) | 173 » » » glog.Errorf("Failed to write Tile: %s", err) |
| 174 } | 174 } |
| 175 } | 175 } |
| 176 } | 176 } |
| 177 | 177 |
| 178 // Tile returns the current Tile. | 178 // Tile returns the current Tile. |
| 179 func (tt TileTracker) Tile() *types.Tile { | 179 func (tt TileTracker) Tile() *types.Tile { |
| 180 return tt.currentTile | 180 return tt.currentTile |
| 181 } | 181 } |
| 182 | 182 |
| 183 // Offset returns the Value offset of a commit in a Trace. | 183 // Offset returns the Value offset of a commit in a Trace. |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 retval := []*ResultsFileLocation{} | 362 retval := []*ResultsFileLocation{} |
| 363 for _, dir := range dirs { | 363 for _, dir := range dirs { |
| 364 files, err := getFilesFromGSDir(dir, last, storage) | 364 files, err := getFilesFromGSDir(dir, last, storage) |
| 365 if err != nil { | 365 if err != nil { |
| 366 return nil, err | 366 return nil, err |
| 367 } | 367 } |
| 368 retval = append(retval, files...) | 368 retval = append(retval, files...) |
| 369 } | 369 } |
| 370 return retval, nil | 370 return retval, nil |
| 371 } | 371 } |
| OLD | NEW |