Skip to content

Instantly share code, notes, and snippets.

@dgadiraju
Last active January 22, 2019 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgadiraju/4106878cc251185d1ab320fa53be4b7a to your computer and use it in GitHub Desktop.
Save dgadiraju/4106878cc251185d1ab320fa53be4b7a to your computer and use it in GitHub Desktop.
hadoop key create mykey1
hadoop fs -mkdir /tmp/zone1
sudo su - hdfs
hdfs crypto -createZone -keyName mykey1 -path /tmp/zone1
exit
# Make sure to be KEY_ADMIN_USER, itversity in our case
echo "Hello World" > /tmp/helloWorld.txt
hadoop fs -put /tmp/helloWorld.txt /tmp/zone1
hadoop fs -cat /tmp/zone1/helloWorld.txt
rm /tmp/helloWorld.txt
sudo su - hdfs
hadoop fs -cat /.reserved/raw/tmp/zone1/helloWorld.txt
hadoop fs -rm -R /tmp/zone1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment