Skip to content

Commit

Permalink
del Flush in outer
Browse files Browse the repository at this point in the history
  • Loading branch information
xitongsys committed Jan 25, 2018
1 parent a57b7d1 commit 3b4f2c5
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ParquetWriter/ParquetWriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (self *ParquetWriter) RenameSchema() {

//Write the footer and stop writing
func (self *ParquetWriter) WriteStop() {
//self.Flush()
self.Flush(true)
ts := thrift.NewTSerializer()
ts.Protocol = thrift.NewTCompactProtocolFactory().GetProtocol(ts.Transport)
self.RenameSchema()
Expand Down
2 changes: 1 addition & 1 deletion Plugin/CSVWriter/CSVWriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (self *CSVWriter) Write(rec []interface{}) {

//Write footer to parquet file and stop writing
func (self *CSVWriter) WriteStop() {
//self.Flush()
self.Flush(true)
ts := thrift.NewTSerializer()
ts.Protocol = thrift.NewTCompactProtocolFactory().GetProtocol(ts.Transport)
self.RenameSchema()
Expand Down
2 changes: 1 addition & 1 deletion Plugin/JSONWriter/JSONWriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (self *JSONWriter) Write(rec string) {

//Write footer to parquet file and stop writing
func (self *JSONWriter) WriteStop() {
//self.Flush()
self.Flush(true)
ts := thrift.NewTSerializer()
ts.Protocol = thrift.NewTCompactProtocolFactory().GetProtocol(ts.Transport)
self.RenameSchema()
Expand Down
1 change: 0 additions & 1 deletion example/column_read.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func main() {
}
pw.Write(stu)
}
pw.Flush(true)
pw.WriteStop()
log.Println("Write Finished")
fw.Close()
Expand Down
1 change: 0 additions & 1 deletion example/csv_write.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ func main() {
}
pw.Write(data2)
}
pw.Flush(true)
pw.WriteStop()
log.Println("Write Finished")
fw.Close()
Expand Down
1 change: 0 additions & 1 deletion example/hdfs_flat.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func main() {
}
pw.Write(stu)
}
pw.Flush(true)
pw.WriteStop()
log.Println("Write Finished")
fw.Close()
Expand Down
1 change: 0 additions & 1 deletion example/json_write.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ func main() {
pw.Write(rec)

}
pw.Flush(true)
pw.WriteStop()
log.Println("Write Finished")
fw.Close()
Expand Down
1 change: 0 additions & 1 deletion example/local_flat.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func main() {
}
pw.Write(stu)
}
pw.Flush(true)
pw.WriteStop()
log.Println("Write Finished")
fw.Close()
Expand Down
1 change: 0 additions & 1 deletion example/local_nested.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ func writeNested() {
for _, stu := range stus {
pw.Write(stu)
}
pw.Flush(true)
pw.WriteStop()
fw.Close()
log.Println("Write Finished")
Expand Down
1 change: 0 additions & 1 deletion example/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func main() {
}
pw.Write(tp)
}
pw.Flush(true)
pw.WriteStop()
log.Println("Write Finished")
fw.Close()
Expand Down

0 comments on commit 3b4f2c5

Please sign in to comment.