Comments (5)
You are right! It turns out that overwrite mode has never been implemented in viaParquet
. And to implement it properly, validateWritePath
has to be modified, too.
from parquet4s.
Hi @jhenahan,
I am not sure what's going on. Parquet4s, by design, deletes the whole directory indicated in .write(Path(prefix))
when override mode is in use.
I recommend turning on debug logs. Maybe there's an issue with permissions?
from parquet4s.
Digging through logs, it looks like viaParquet
never calls io.validateWritePath
, so the rotating writer never deletes filesystems. writeSingleFile
does, but can't write partitioned data. I think it might be sufficient to call validateWritePath
in rotatingWriter
's write
definition, but I'm not sure. I'll try it out locally, but if you know better I'm very happy to take some pointers and write a PR.
from parquet4s.
diff --git i/fs2/src/main/scala/com/github/mjakubowski84/parquet4s/parquet/rotatingWriter.scala w/fs2/src/main/scala/com/github/mjakubowski84/parquet4s/parquet/rotatingWriter.scala
index a60f59a..0baadcb 100644
--- i/fs2/src/main/scala/com/github/mjakubowski84/parquet4s/parquet/rotatingWriter.scala
+++ w/fs2/src/main/scala/com/github/mjakubowski84/parquet4s/parquet/rotatingWriter.scala
@@ -517,6 +517,7 @@ object rotatingWriter {
logger <- Stream.eval(logger[F](this.getClass))
eventQueue <- Stream.eval(Queue.unbounded[F, WriterEvent[F, T, W]])
writersRef <- Stream.eval(Ref.of(Map.empty[Path, RecordWriter[F]]))
+ _ <- Stream.eval(io.validateWritePath[F](basePath, options, logger))
rotatingWriter <- Stream.emit(
new RotatingWriter[T, W, F](
basePath = basePath,
This is my local diff. Initial testing looks promising. :)
from parquet4s.
The fix released is released in v2.9.0
from parquet4s.
Related Issues (20)
- Decoding of timestamp fields generated by pandas/pyarrow HOT 4
- Expose all new Parquet options in Options HOT 1
- Support for map Parquet legacy format HOT 4
- Reading of files with fields of type required AND optional Int64 HOT 5
- update to hadoop 3.3.4 HOT 2
- Feature Request: parquet-protobuf HOT 8
- Concurrently read and write files with parquet4s-fs2 HOT 9
- Some of FilteringSpec tests fail when run locally HOT 4
- Applying `not in` (`in` negation) filter always resulting in 0 rows HOT 4
- Question. How to define a TypedSchemaDef for a Map[String, Any] HOT 8
- [question] is there a way to have a single parquet writer that writes for a class hierarchy? HOT 1
- [question] is there a clever way to register writers for lots of case classes HOT 1
- Question: How to provide Hadoop Path for reading files from S3 HOT 3
- Feature Request: scalapb support HOT 4
- An example for writing a required or optional value codec for custom type with more than one field. HOT 6
- Is schema backwards compatibility on projections possible? HOT 1
- Options `ParquetFileWriter.Mode.OVERWRITE` not deleting old parquet files in S3 HOT 1
- failed to read parquet generated by pandas HOT 5
- Add Pekko support HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parquet4s.