hadoop-rumen.sh 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/usr/bin/env bash
  2. # Licensed to the Apache Software Foundation (ASF) under one or more
  3. # contributor license agreements. See the NOTICE file distributed with
  4. # this work for additional information regarding copyright ownership.
  5. # The ASF licenses this file to You under the Apache License, Version 2.0
  6. # (the "License"); you may not use this file except in compliance with
  7. # the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. if ! declare -f hadoop_subcommand_rumenfolder >/dev/null 2>/dev/null; then
  17. if [[ "${HADOOP_SHELL_EXECNAME}" = hadoop ]]; then
  18. hadoop_add_subcommand "rumenfolder" "scale a rumen input trace"
  19. fi
  20. ## @description rumenfolder command for hadoop
  21. ## @audience public
  22. ## @stability stable
  23. ## @replaceable yes
  24. function hadoop_subcommand_rumenfolder
  25. {
  26. # shellcheck disable=SC2034
  27. HADOOP_CLASSNAME=org.apache.hadoop.tools.rumen.Folder
  28. hadoop_add_to_classpath_tools hadoop-rumen
  29. hadoop_debug "Appending HADOOP_CLIENT_OPTS onto HADOOP_OPTS"
  30. HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}"
  31. }
  32. fi
  33. if ! declare -f hadoop_subcommand_rumentrace >/dev/null 2>/dev/null; then
  34. if [[ "${HADOOP_SHELL_EXECNAME}" = hadoop ]]; then
  35. hadoop_add_subcommand "rumentrace" "convert logs into a rumen trace"
  36. fi
  37. ## @description rumentrace command for hadoop
  38. ## @audience public
  39. ## @stability stable
  40. ## @replaceable yes
  41. function hadoop_subcommand_rumentrace
  42. {
  43. # shellcheck disable=SC2034
  44. HADOOP_CLASSNAME=org.apache.hadoop.tools.rumen.TraceBuilder
  45. hadoop_add_to_classpath_tools hadoop-rumen
  46. hadoop_debug "Appending HADOOP_CLIENT_OPTS onto HADOOP_OPTS"
  47. HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}"
  48. }
  49. fi