test_perfomance.sh 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/sh
  2. #
  3. # Licensed to the Apache Software Foundation (ASF) under one
  4. # or more contributor license agreements. See the NOTICE file
  5. # distributed with this work for additional information
  6. # regarding copyright ownership. The ASF licenses this file
  7. # to you under the Apache License, Version 2.0 (the
  8. # "License"); you may not use this file except in compliance
  9. # with the License. You may obtain a copy of the License at
  10. #
  11. # http://www.apache.org/licenses/LICENSE-2.0
  12. #
  13. # Unless required by applicable law or agreed to in writing,
  14. # software distributed under the License is distributed on an
  15. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  16. # KIND, either express or implied. See the License for the
  17. # specific language governing permissions and limitations
  18. # under the License.
  19. #
  20. # Delete 2 dirs
  21. sudo -u hdfs hadoop fs -rm -r /tmp/some999
  22. sudo -u hdfs hadoop fs -rm -r /tmp/some888
  23. # Create
  24. sudo -u hdfs hadoop fs -mkdir -p /tmp/some999/more/dirs/for/recursive/tests
  25. # Create + permissions + owner
  26. sudo -u hdfs hadoop fs -mkdir -p /tmp/some888/more/dirs/for/recursive/tests
  27. sudo -u hdfs hadoop fs -chown hadoop:hadoop /tmp/some888/more/dirs/for/recursive/tests
  28. sudo -u hdfs hadoop fs -chmod 777 /tmp/some888/more/dirs/for/recursive/tests
  29. # Empty dirs with permissions/owners to last dir"
  30. sudo -u hdfs hadoop fs -mkdir -p /tmp/some888/and_more/and_dirs/_andfor/recursive/tests
  31. sudo -u hdfs hadoop fs -chmod 777 /tmp/some888/and_more/and_dirs/_andfor/recursive/tests
  32. sudo -u hdfs hadoop fs -chown hadoop:hadoop /tmp/some888/and_more/and_dirs/_andfor/recursive/tests
  33. # Empty dirs with permissions/owners to last file
  34. sudo -u hdfs hadoop fs -touchz /tmp/some888/file.txt
  35. sudo -u hdfs hadoop fs -chown hadoop:hadoop /tmp/some888/file.txt
  36. sudo -u hdfs hadoop fs -chmod 777 /tmp/some888/file.txt
  37. # Empty dirs with permissions/owners to last file
  38. sudo -u hdfs hadoop fs -touchz /tmp/some888/and_more/and_dirs/file2.txt
  39. sudo -u hdfs hadoop fs -chown hadoop:hadoop /tmp/some888/and_more/and_dirs/file2.txt
  40. sudo -u hdfs hadoop fs -chmod 777 /tmp/some888/and_more/and_dirs/file2.txt
  41. # Recursive permissions
  42. sudo -u hdfs hadoop fs -chmod -R 700 /tmp/some888
  43. sudo -u hdfs hadoop fs -chown -R hive:hive /tmp/some999