dongjoon-hyun opened a new pull request #833:
URL: https://github.com/apache/orc/pull/833


   ### What changes were proposed in this pull request?
   
   This PR aims to add an encrypted example file to the `example` directory.
   
   ### Why are the changes needed?
   
   `example` directory is a good place to show Apache ORC feature.
   
   ### How was this patch tested?
   
   This is an example file which can be read by the following.
   
   **From Java Tools**
   ```
   $ cd java
   $ mvn package -DskipTests
   $ java -jar tools/target/*-uber.jar data ../examples/encrypted/sample.orc
   Processing data file ../examples/encrypted/sample.orc [length: 1355]
   
{"ssn":null,"email":"841626795E7D351555B835A002E3BF10669DE9B81C95A3D59E10865AC37EA7C3","name":"Dongjoon
 Hyun"}
   
________________________________________________________________________________________________________________________
   ```
   
   **From Spark 3.2 + Hadoop KMS with the provided `kms.keystore` file**
   ```
   scala> spark.read.option("orc.key.provider", 
"hadoop").option("hadoop.security.key.provider.path", 
"kms://http@localhost:9600/kms").option("orc.encrypt", 
"pii:ssn,email").orc("sample.orc").show
   +---------+-------------------+-------------+
   |      ssn|              email|         name|
   +---------+-------------------+-------------+
   |123456789|[email protected]|Dongjoon Hyun|
   +---------+-------------------+-------------+
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to