Skip to content

Commit

Permalink
tidb: remove useless code (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustin170506 committed Feb 29, 2020
1 parent 820e3b9 commit 7c2f188
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions tidb/mapreduce/casegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import (
type DataSize int

const (
Byte = 1
KB = 1 << 10
MB = 1 << 20
GB = 1 << 30
KB = 1 << 10
MB = 1 << 20
GB = 1 << 30
)

func (d DataSize) String() string {
Expand Down
2 changes: 1 addition & 1 deletion tidb/mapreduce/urltop10_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func ExampleURLTop10(nWorkers int) RoundsArgs {

// ExampleURLCountMap is the map function in the first round
func ExampleURLCountMap(filename string, contents string) []KeyValue {
lines := strings.Split(string(contents), "\n")
lines := strings.Split(contents, "\n")
kvs := make([]KeyValue, 0, len(lines))
for _, l := range lines {
l = strings.TrimSpace(l)
Expand Down

0 comments on commit 7c2f188

Please sign in to comment.