-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Major refactor/simplification for writing parquet files. * new parquet io scheme now passes tests. * Updating changelog. * Updating changelog.
- Loading branch information
Showing
7 changed files
with
217 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,5 @@ graalvm* | |
resources | ||
graal-test | ||
tc | ||
__pycache__ | ||
__pycache__ | ||
*.crc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<configuration debug="false"> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<!-- encoders are assigned the type | ||
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> | ||
<encoder> | ||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<root level="info"> | ||
<appender-ref ref="STDOUT" /> | ||
</root> | ||
</configuration> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package tech.v3.dataset; | ||
|
||
import org.apache.parquet.schema.MessageType; | ||
import org.apache.parquet.io.api.RecordConsumer; | ||
import org.apache.parquet.hadoop.api.WriteSupport; | ||
import org.apache.hadoop.conf.Configuration; | ||
import clojure.lang.IFn; | ||
import java.util.Map; | ||
|
||
public class ParquetRowWriter extends WriteSupport<Long> | ||
{ | ||
public final IFn rowWriter; | ||
public final MessageType schema; | ||
public final Map<String,String> metadata; | ||
public RecordConsumer consumer; | ||
public Object dataset; | ||
public ParquetRowWriter(IFn _writer, MessageType _schema, Map<String,String> _meta) { | ||
rowWriter = _writer; | ||
schema = _schema; | ||
metadata = _meta; | ||
consumer = null; | ||
//Outside forces must set dataset | ||
dataset = null; | ||
} | ||
|
||
@Override | ||
public WriteContext init(Configuration configuration) { | ||
return new WriteContext( schema, metadata ); | ||
} | ||
|
||
@Override | ||
public void prepareForWrite(RecordConsumer recordConsumer) { | ||
consumer = recordConsumer; | ||
} | ||
|
||
@Override | ||
public void write(Long record) { | ||
rowWriter.invoke(dataset,record,consumer); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.